diff options
| author | Shauren <shauren.trinity@gmail.com> | 2012-11-25 10:34:59 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-11-25 10:34:59 +0100 |
| commit | bd2e5b1be83f82732839287ea25a81923c400088 (patch) | |
| tree | d99f7935bb3db7de9d58e49aceb3d85c2e5f3616 | |
| parent | 0462f0b14913a7bc1360e1c6804a493865396bcb (diff) | |
Core/Battlegrounds: Fixed GameMasters logging out in arena counting as player killed for any teams.
Closes #7429
| -rwxr-xr-x | src/server/game/Battlegrounds/Battleground.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index b54efad18f0..22f960ceaef 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -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; |
