[7372] Cleanup BattleGround::GetClosestGraveYard related code. Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-02 17:13:12 -06:00
parent 27cf8127b4
commit 55dffa8409
8 changed files with 41 additions and 29 deletions
+3 -5
View File
@@ -4366,11 +4366,9 @@ void Player::RepopAtGraveyard()
WorldSafeLocsEntry const *ClosestGrave = NULL;
// Special handle for battleground maps
if( GetBattleGroundTypeId() == BATTLEGROUND_AB || GetBattleGroundTypeId() == BATTLEGROUND_EY || GetBattleGroundTypeId() == BATTLEGROUND_AV)
if( BattleGround *bg = GetBattleGround() )
ClosestGrave = bg->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetTeam());
if(!ClosestGrave)
if( BattleGround *bg = GetBattleGround() )
ClosestGrave = bg->GetClosestGraveYard(this);
else
ClosestGrave = objmgr.GetClosestGraveYard( GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam() );
// stop countdown until repop