mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7372] Cleanup BattleGround::GetClosestGraveYard related code.
This commit is contained in:
parent
f454ddf6d0
commit
9983286280
8 changed files with 41 additions and 29 deletions
|
|
@ -4261,11 +4261,9 @@ void Player::RepopAtGraveyard()
|
|||
WorldSafeLocsEntry const *ClosestGrave = NULL;
|
||||
|
||||
// Special handle for battleground maps
|
||||
if( GetBattleGroundTypeId() == BATTLEGROUND_AB || GetBattleGroundTypeId() == BATTLEGROUND_EY )
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue