[Friends] Get friend appids with IW4x mod

This commit is contained in:
momo5502 2017-02-21 08:46:12 +01:00
parent 91d643b2b0
commit 2a3738e001

View File

@ -181,6 +181,24 @@ namespace Components
addId(Steam::Proxy::SteamUtils->GetAppID());
}
if(Steam::Proxy::SteamFriends)
{
std::lock_guard<std::recursive_mutex> _(Friends::Mutex);
char* mod = "IW4x";
unsigned int modId = *reinterpret_cast<unsigned int*>(mod) | 0x80000000;
// Split up the list
for (auto entry : Friends::FriendsList)
{
Steam::FriendGameInfo info;
if(Steam::Proxy::SteamFriends->GetFriendGamePlayed(entry.userId, &info) && info.m_gameID.modID == modId)
{
addId(info.m_gameID.appID);
}
}
}
return ids;
}