Core/Battlegrounds: Fixed GameMasters logging out in arena counting as player killed for any teams.

Closes #7429
This commit is contained in:
Shauren
2012-11-25 10:34:59 +01:00
parent 0462f0b149
commit bd2e5b1be8

View File

@@ -411,7 +411,7 @@ uint32 Battleground::GetPrematureWinner()
winner = ALLIANCE;
else if (GetPlayersCountByTeam(HORDE) >= GetMinPlayersPerTeam())
winner = HORDE;
return winner;
}
@@ -1265,6 +1265,9 @@ void Battleground::EventPlayerLoggedIn(Player* player)
void Battleground::EventPlayerLoggedOut(Player* player)
{
uint64 guid = player->GetGUID();
if (!IsPlayerInBattleground(guid)) // Check if this player really is in battleground (might be a GM who teleported inside)
return;
// player is correct pointer, it is checked in WorldSession::LogoutPlayer()
m_OfflineQueue.push_back(player->GetGUID());
m_Players[guid].OfflineRemoveTime = sWorld->GetGameTime() + MAX_OFFLINE_TIME;