From 27cf8127b463a0592e8dc095e8d76189e27935b5 Mon Sep 17 00:00:00 2001 From: megamage Date: Mon, 2 Mar 2009 17:09:59 -0600 Subject: [7371] Correctly select closest graveyard in Player::RepoopAtGraveyard(). Patch provided by balrok Thx. --HG-- branch : trunk --- src/game/Player.cpp | 8 ++++---- src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6ce7e9c356a..5290e2521b0 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -4366,11 +4366,11 @@ void Player::RepopAtGraveyard() WorldSafeLocsEntry const *ClosestGrave = NULL; // Special handle for battleground maps - BattleGround *bg = sBattleGroundMgr.GetBattleGround(GetBattleGroundId(), m_bgTypeID); + if( GetBattleGroundTypeId() == BATTLEGROUND_AB || GetBattleGroundTypeId() == BATTLEGROUND_EY || GetBattleGroundTypeId() == BATTLEGROUND_AV) + if( BattleGround *bg = GetBattleGround() ) + ClosestGrave = bg->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetTeam()); - if(bg && (bg->GetTypeID() == BATTLEGROUND_AB || bg->GetTypeID() == BATTLEGROUND_EY || bg->GetTypeID() == BATTLEGROUND_AV)) - ClosestGrave = bg->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetTeam()); - else + if(!ClosestGrave) ClosestGrave = objmgr.GetClosestGraveYard( GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam() ); // stop countdown until repop diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index bd0712af763..43c6b8e0d46 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7370" + #define REVISION_NR "7371" #endif // __REVISION_NR_H__ -- cgit v1.2.3