fix: player count mismatch (#2051)

tested that showall no longer mis-reports the number of players
This commit is contained in:
David Markowitz
2026-10-28 17:20:26 -07:00
committed by GitHub
parent 0ff5d2bf87
commit 8b7d1b946b
2 changed files with 10 additions and 1 deletions

View File

@@ -57,7 +57,7 @@ void PlayerContainer::InsertPlayer(Packet* packet) {
data.worldServerSysAddr = packet->systemAddress;
m_Names[data.playerID] = GeneralUtils::UTF8ToUTF16(data.playerName);
m_PlayerCount++;
if (isLogin) m_PlayerCount++;
LOG("Added user: %s (%llu), zone: %i", data.playerName.c_str(), data.playerID, data.zoneID.GetMapID());
ChatWeb::SendWSPlayerUpdate(data, isLogin ? eActivityType::PlayerLoggedIn : eActivityType::PlayerChangedZone);