mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7353] Fixed problem with joining rated arena matches. Thanks to balrok for help.
Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
0be003ac90
commit
a81d174288
10 changed files with 99 additions and 72 deletions
|
|
@ -366,6 +366,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this)
|
|||
m_DetectInvTimer = 1000;
|
||||
|
||||
m_bgBattleGroundID = 0;
|
||||
m_bgTypeID = BATTLEGROUND_TYPE_NONE;
|
||||
for (int j=0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; j++)
|
||||
{
|
||||
m_bgBattleGroundQueueID[j].bgQueueTypeId = BATTLEGROUND_QUEUE_NONE;
|
||||
|
|
@ -4242,7 +4243,7 @@ void Player::RepopAtGraveyard()
|
|||
WorldSafeLocsEntry const *ClosestGrave = NULL;
|
||||
|
||||
// Special handle for battleground maps
|
||||
BattleGround *bg = sBattleGroundMgr.GetBattleGround(GetBattleGroundId());
|
||||
BattleGround *bg = sBattleGroundMgr.GetBattleGround(GetBattleGroundId(), m_bgTypeID);
|
||||
|
||||
if(bg && (bg->GetTypeID() == BATTLEGROUND_AB || bg->GetTypeID() == BATTLEGROUND_EY))
|
||||
ClosestGrave = bg->GetClosestGraveYard(GetPositionX(), GetPositionY(), GetPositionZ(), GetTeam());
|
||||
|
|
@ -14251,14 +14252,14 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
if(!mapEntry || mapEntry->Instanceable() || !MapManager::IsValidMapCoord(m_bgEntryPoint))
|
||||
SetBattleGroundEntryPoint(m_homebindMapId,m_homebindX,m_homebindY,m_homebindZ,0.0f);
|
||||
|
||||
BattleGround *currentBg = sBattleGroundMgr.GetBattleGround(bgid);
|
||||
BattleGround *currentBg = sBattleGroundMgr.GetBattleGround(bgid, BATTLEGROUND_TYPE_NONE);
|
||||
|
||||
if(currentBg && currentBg->IsPlayerInBattleGround(GetGUID()))
|
||||
{
|
||||
BattleGroundQueueTypeId bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(currentBg->GetTypeID(), currentBg->GetArenaType());
|
||||
uint32 queueSlot = AddBattleGroundQueueId(bgQueueTypeId);
|
||||
|
||||
SetBattleGroundId(currentBg->GetInstanceID());
|
||||
SetBattleGroundId(currentBg->GetInstanceID(), currentBg->GetTypeID());
|
||||
SetBGTeam(bgteam);
|
||||
|
||||
//join player to battleground group
|
||||
|
|
@ -18490,7 +18491,7 @@ BattleGround* Player::GetBattleGround() const
|
|||
if(GetBattleGroundId()==0)
|
||||
return NULL;
|
||||
|
||||
return sBattleGroundMgr.GetBattleGround(GetBattleGroundId());
|
||||
return sBattleGroundMgr.GetBattleGround(GetBattleGroundId(), m_bgTypeID);
|
||||
}
|
||||
|
||||
bool Player::InArena() const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue