[7371] Correctly select closest graveyard in Player::RepoopAtGraveyard(). Patch provided by balrok Thx.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-02 17:09:59 -06:00
parent 0b32a2c751
commit 27cf8127b4
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -4366,11 +4366,11 @@ void Player::RepopAtGraveyard()
WorldSafeLocsEntry const *ClosestGrave = NULL;
// Special handle for battleground maps
BattleGround *bg = sBattleGroundMgr.GetBattleGround(GetBattleGroundId(), m_bgTypeID);
if(bg && (bg->GetTypeID() == BATTLEGROUND_AB || bg->GetTypeID() == BATTLEGROUND_EY || bg->GetTypeID() == BATTLEGROUND_AV))
if( GetBattleGroundTypeId() == BATTLEGROUND_AB || GetBattleGroundTypeId() == BATTLEGROUND_EY || GetBattleGroundTypeId() == BATTLEGROUND_AV)
if( BattleGround *bg = GetBattleGround() )
ClosestGrave = bg->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetTeam());
else
if(!ClosestGrave)
ClosestGrave = objmgr.GetClosestGraveYard( GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam() );
// stop countdown until repop
+1 -1
View File
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7370"
#define REVISION_NR "7371"
#endif // __REVISION_NR_H__