1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Switch client-server communication to new API

This commit is contained in:
Ivan Savenko
2023-11-18 16:34:18 +02:00
parent de5227142b
commit 0a1153e1c6
34 changed files with 623 additions and 694 deletions

View File

@@ -123,7 +123,12 @@ bool LobbyInfo::isClientHost(int clientId) const
return clientId == hostClientId;
}
std::set<PlayerColor> LobbyInfo::getAllClientPlayers(int clientId)
bool LobbyInfo::isPlayerHost(const PlayerColor & color) const
{
return vstd::contains(getAllClientPlayers(hostClientId), color);
}
std::set<PlayerColor> LobbyInfo::getAllClientPlayers(int clientId) const
{
std::set<PlayerColor> players;
for(auto & elem : si->playerInfos)