mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Battlegrounds: Fixed GameMasters logging out in arena counting as player killed for any teams.
Closes #7429
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user