[7359] Fixed crash when removing battleground from BGFreeSlotQueue.

Fixed player will now drop a flag before he logs out, if he is in BG.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-02-28 09:55:17 +01:00
parent 2791d5a6d3
commit 4994611582
3 changed files with 8 additions and 2 deletions

View file

@ -302,6 +302,9 @@ void WorldSession::LogoutPlayer(bool Save)
_player->BuildPlayerRepop();
_player->RepopAtGraveyard();
}
//drop a flag if player is carrying it
if(BattleGround *bg = _player->GetBattleGround())
bg->EventPlayerDroppedFlag(_player);
///- Teleport to home if the player is in an invalid instance
if(!_player->m_InstanceValid && !_player->isGameMaster())