[7359] Fixed crash when removing battleground from BGFreeSlotQueue. Author: Triply

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

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-02 16:46:43 -06:00
parent e73d01182f
commit f503f320ad
3 changed files with 8 additions and 2 deletions

View File

@@ -305,6 +305,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())