mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[7110] Make some methods in BattleGroundMgr static.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
5d63453deb
commit
d469a604eb
5 changed files with 79 additions and 85 deletions
|
|
@ -552,7 +552,7 @@ void BattleGround::EndBattleGround(uint32 winner)
|
||||||
sBattleGroundMgr.BuildPvpLogDataPacket(&data, this);
|
sBattleGroundMgr.BuildPvpLogDataPacket(&data, this);
|
||||||
plr->GetSession()->SendPacket(&data);
|
plr->GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(GetTypeID(), GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
|
||||||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, this, plr->GetTeam(), plr->GetBattleGroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime());
|
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, this, plr->GetTeam(), plr->GetBattleGroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime());
|
||||||
plr->GetSession()->SendPacket(&data);
|
plr->GetSession()->SendPacket(&data);
|
||||||
plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
|
plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
|
||||||
|
|
@ -573,7 +573,7 @@ void BattleGround::EndBattleGround(uint32 winner)
|
||||||
}
|
}
|
||||||
|
|
||||||
// inform invited players about the removal
|
// inform invited players about the removal
|
||||||
sBattleGroundMgr.m_BattleGroundQueues[sBattleGroundMgr.BGQueueTypeId(GetTypeID(), GetArenaType())].BGEndedRemoveInvites(this);
|
sBattleGroundMgr.m_BattleGroundQueues[BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType())].BGEndedRemoveInvites(this);
|
||||||
|
|
||||||
if(Source)
|
if(Source)
|
||||||
{
|
{
|
||||||
|
|
@ -769,7 +769,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
|
||||||
if(!team) team = plr->GetTeam();
|
if(!team) team = plr->GetTeam();
|
||||||
|
|
||||||
uint32 bgTypeId = GetTypeID();
|
uint32 bgTypeId = GetTypeID();
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(GetTypeID(), GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
|
||||||
// if arena, remove the specific arena auras
|
// if arena, remove the specific arena auras
|
||||||
if(isArena())
|
if(isArena())
|
||||||
{
|
{
|
||||||
|
|
@ -1403,7 +1403,7 @@ void BattleGround::EndNow()
|
||||||
SetStatus(STATUS_WAIT_LEAVE);
|
SetStatus(STATUS_WAIT_LEAVE);
|
||||||
SetEndTime(TIME_TO_AUTOREMOVE);
|
SetEndTime(TIME_TO_AUTOREMOVE);
|
||||||
// inform invited players about the removal
|
// inform invited players about the removal
|
||||||
sBattleGroundMgr.m_BattleGroundQueues[sBattleGroundMgr.BGQueueTypeId(GetTypeID(), GetArenaType())].BGEndedRemoveInvites(this);
|
sBattleGroundMgr.m_BattleGroundQueues[BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType())].BGEndedRemoveInvites(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Battleground messages are localized using the dbc lang, they are not client language dependent
|
// Battleground messages are localized using the dbc lang, they are not client language dependent
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data )
|
||||||
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from: " I64FMT, guid);
|
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from: " I64FMT, guid);
|
||||||
|
|
||||||
// can do this, since it's battleground, not arena
|
// can do this, since it's battleground, not arena
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bgTypeId, 0);
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, 0);
|
||||||
|
|
||||||
// ignore if player is already in BG
|
// ignore if player is already in BG
|
||||||
if(_player->InBattleGround())
|
if(_player->InBattleGround())
|
||||||
|
|
@ -368,7 +368,7 @@ void WorldSession::HandleBattleGroundPlayerPortOpcode( WorldPacket &recv_data )
|
||||||
uint32 bgQueueTypeId = 0;
|
uint32 bgQueueTypeId = 0;
|
||||||
// get the bg what we were invited to
|
// get the bg what we were invited to
|
||||||
BattleGroundQueue::QueuedPlayersMap::iterator itrPlayerStatus;
|
BattleGroundQueue::QueuedPlayersMap::iterator itrPlayerStatus;
|
||||||
bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bgTypeId,type);
|
bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId,type);
|
||||||
itrPlayerStatus = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].find(_player->GetGUID());
|
itrPlayerStatus = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].find(_player->GetGUID());
|
||||||
|
|
||||||
if(itrPlayerStatus == sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].end())
|
if(itrPlayerStatus == sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].end())
|
||||||
|
|
@ -529,7 +529,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
||||||
BattleGround *bg = _player->GetBattleGround();
|
BattleGround *bg = _player->GetBattleGround();
|
||||||
if(bg)
|
if(bg)
|
||||||
{
|
{
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
||||||
uint32 queueSlot = _player->GetBattleGroundQueueIndex(bgQueueTypeId);
|
uint32 queueSlot = _player->GetBattleGroundQueueIndex(bgQueueTypeId);
|
||||||
if((bg->GetStatus() <= STATUS_IN_PROGRESS))
|
if((bg->GetStatus() <= STATUS_IN_PROGRESS))
|
||||||
{
|
{
|
||||||
|
|
@ -539,7 +539,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
||||||
for (uint32 i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
|
for (uint32 i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
|
||||||
{
|
{
|
||||||
uint32 queue_id = _player->GetBattleGroundQueueId(i); // battlegroundqueueid stores the type id, not the instance id, so this is definitely wrong
|
uint32 queue_id = _player->GetBattleGroundQueueId(i); // battlegroundqueueid stores the type id, not the instance id, so this is definitely wrong
|
||||||
uint8 arenatype = sBattleGroundMgr.BGArenaType(queue_id);
|
uint8 arenatype = BattleGroundMgr::BGArenaType(queue_id);
|
||||||
uint8 isRated = 0;
|
uint8 isRated = 0;
|
||||||
if (i == queueSlot || !queue_id) // we need to get the instance ids
|
if (i == queueSlot || !queue_id) // we need to get the instance ids
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -551,7 +551,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
||||||
arenatype = itrPlayerStatus->second.GroupInfo->ArenaType;
|
arenatype = itrPlayerStatus->second.GroupInfo->ArenaType;
|
||||||
isRated = itrPlayerStatus->second.GroupInfo->IsRated;
|
isRated = itrPlayerStatus->second.GroupInfo->IsRated;
|
||||||
}
|
}
|
||||||
BattleGround *bg2 = sBattleGroundMgr.GetBattleGroundTemplate(sBattleGroundMgr.BGTemplateId(queue_id)); // try this
|
BattleGround *bg2 = sBattleGroundMgr.GetBattleGroundTemplate(BattleGroundMgr::BGTemplateId(queue_id)); // try this
|
||||||
if(bg2)
|
if(bg2)
|
||||||
{
|
{
|
||||||
//in this call is small bug, this call should be filled by player's waiting time in queue
|
//in this call is small bug, this call should be filled by player's waiting time in queue
|
||||||
|
|
@ -570,8 +570,8 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
|
||||||
uint32 queue_id = _player->GetBattleGroundQueueId(i);
|
uint32 queue_id = _player->GetBattleGroundQueueId(i);
|
||||||
if(!queue_id)
|
if(!queue_id)
|
||||||
continue;
|
continue;
|
||||||
uint32 bgTypeId = sBattleGroundMgr.BGTemplateId(queue_id);
|
uint32 bgTypeId = BattleGroundMgr::BGTemplateId(queue_id);
|
||||||
uint8 arenatype = sBattleGroundMgr.BGArenaType(queue_id);
|
uint8 arenatype = BattleGroundMgr::BGArenaType(queue_id);
|
||||||
uint8 isRated = 0;
|
uint8 isRated = 0;
|
||||||
BattleGround *bg = sBattleGroundMgr.GetBattleGroundTemplate(bgTypeId);
|
BattleGround *bg = sBattleGroundMgr.GetBattleGroundTemplate(bgTypeId);
|
||||||
BattleGroundQueue::QueuedPlayersMap::iterator itrPlayerStatus = sBattleGroundMgr.m_BattleGroundQueues[queue_id].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].find(_player->GetGUID());
|
BattleGroundQueue::QueuedPlayersMap::iterator itrPlayerStatus = sBattleGroundMgr.m_BattleGroundQueues[queue_id].m_QueuedPlayers[_player->GetBattleGroundQueueIdFromLevel()].find(_player->GetGUID());
|
||||||
|
|
@ -699,7 +699,7 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 bgTypeId = bg->GetTypeID();
|
uint8 bgTypeId = bg->GetTypeID();
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bgTypeId, arenatype);
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, arenatype);
|
||||||
|
|
||||||
// check queueing conditions
|
// check queueing conditions
|
||||||
if(!asGroup)
|
if(!asGroup)
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
|
||||||
if(Player *plr2 = objmgr.GetPlayer(group->Players.begin()->first))
|
if(Player *plr2 = objmgr.GetPlayer(group->Players.begin()->first))
|
||||||
{
|
{
|
||||||
BattleGround * bg = sBattleGroundMgr.GetBattleGroundTemplate(group->BgTypeId);
|
BattleGround * bg = sBattleGroundMgr.GetBattleGroundTemplate(group->BgTypeId);
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(group->BgTypeId,group->ArenaType);
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(group->BgTypeId,group->ArenaType);
|
||||||
uint32 queueSlot = plr2->GetBattleGroundQueueIndex(bgQueueTypeId);
|
uint32 queueSlot = plr2->GetBattleGroundQueueIndex(bgQueueTypeId);
|
||||||
plr2->RemoveBattleGroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
|
plr2->RemoveBattleGroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
|
|
@ -451,7 +451,7 @@ bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * b
|
||||||
// not yet invited
|
// not yet invited
|
||||||
// set invitation
|
// set invitation
|
||||||
ginfo->IsInvitedToBGInstanceGUID = bg->GetInstanceID();
|
ginfo->IsInvitedToBGInstanceGUID = bg->GetInstanceID();
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
||||||
// loop through the players
|
// loop through the players
|
||||||
for(std::map<uint64,PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
|
for(std::map<uint64,PlayerQueueInfo*>::iterator itr = ginfo->Players.begin(); itr != ginfo->Players.end(); ++itr)
|
||||||
{
|
{
|
||||||
|
|
@ -546,7 +546,7 @@ void BattleGroundQueue::BGEndedRemoveInvites(BattleGround *bg)
|
||||||
{
|
{
|
||||||
uint32 queue_id = bg->GetQueueType();
|
uint32 queue_id = bg->GetQueueType();
|
||||||
uint32 bgInstanceId = bg->GetInstanceID();
|
uint32 bgInstanceId = bg->GetInstanceID();
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
||||||
QueuedGroupsList::iterator itr, next;
|
QueuedGroupsList::iterator itr, next;
|
||||||
for(itr = m_QueuedGroups[queue_id].begin(); itr != m_QueuedGroups[queue_id].end(); itr = next)
|
for(itr = m_QueuedGroups[queue_id].begin(); itr != m_QueuedGroups[queue_id].end(); itr = next)
|
||||||
{
|
{
|
||||||
|
|
@ -616,7 +616,7 @@ void BattleGroundQueue::Update(uint32 bgTypeId, uint32 queue_id, uint8 arenatype
|
||||||
if (m_QueuedGroups[queue_id].empty())
|
if (m_QueuedGroups[queue_id].empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bgTypeId, arenatype);
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, arenatype);
|
||||||
|
|
||||||
//battleground with free slot for player should be always the last in this queue
|
//battleground with free slot for player should be always the last in this queue
|
||||||
BGFreeSlotQueueType::iterator itr, next;
|
BGFreeSlotQueueType::iterator itr, next;
|
||||||
|
|
@ -994,7 +994,7 @@ bool BGQueueInviteEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||||
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bg->GetTypeID());
|
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bg->GetTypeID());
|
||||||
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
||||||
{
|
{
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
||||||
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bgQueueTypeId);
|
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bgQueueTypeId);
|
||||||
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
||||||
{
|
{
|
||||||
|
|
@ -1031,7 +1031,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||||
|
|
||||||
sLog.outDebug("Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID);
|
sLog.outDebug("Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID);
|
||||||
|
|
||||||
uint32 bgQueueTypeId = sBattleGroundMgr.BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bg->GetTypeID(), bg->GetArenaType());
|
||||||
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bgQueueTypeId);
|
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bgQueueTypeId);
|
||||||
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
if (queueSlot < PLAYER_MAX_BATTLEGROUND_QUEUES) // player is in queue
|
||||||
{
|
{
|
||||||
|
|
@ -1820,7 +1820,7 @@ void BattleGroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, BattleGround *
|
||||||
pl->GetSession()->SendPacket(&data);
|
pl->GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattleGroundMgr::IsArenaType(uint32 bgTypeId) const
|
bool BattleGroundMgr::IsArenaType(uint32 bgTypeId)
|
||||||
{
|
{
|
||||||
return ( bgTypeId == BATTLEGROUND_AA ||
|
return ( bgTypeId == BATTLEGROUND_AA ||
|
||||||
bgTypeId == BATTLEGROUND_BE ||
|
bgTypeId == BATTLEGROUND_BE ||
|
||||||
|
|
@ -1828,82 +1828,77 @@ bool BattleGroundMgr::IsArenaType(uint32 bgTypeId) const
|
||||||
bgTypeId == BATTLEGROUND_RL );
|
bgTypeId == BATTLEGROUND_RL );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattleGroundMgr::IsBattleGroundType(uint32 bgTypeId) const
|
uint32 BattleGroundMgr::BGQueueTypeId(uint32 bgTypeId, uint8 arenaType)
|
||||||
{
|
|
||||||
return !IsArenaType(bgTypeId);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 BattleGroundMgr::BGQueueTypeId(uint32 bgTypeId, uint8 arenaType) const
|
|
||||||
{
|
{
|
||||||
switch(bgTypeId)
|
switch(bgTypeId)
|
||||||
{
|
{
|
||||||
case BATTLEGROUND_WS:
|
case BATTLEGROUND_WS:
|
||||||
return BATTLEGROUND_QUEUE_WS;
|
return BATTLEGROUND_QUEUE_WS;
|
||||||
case BATTLEGROUND_AB:
|
case BATTLEGROUND_AB:
|
||||||
return BATTLEGROUND_QUEUE_AB;
|
return BATTLEGROUND_QUEUE_AB;
|
||||||
case BATTLEGROUND_AV:
|
case BATTLEGROUND_AV:
|
||||||
return BATTLEGROUND_QUEUE_AV;
|
return BATTLEGROUND_QUEUE_AV;
|
||||||
case BATTLEGROUND_EY:
|
case BATTLEGROUND_EY:
|
||||||
return BATTLEGROUND_QUEUE_EY;
|
return BATTLEGROUND_QUEUE_EY;
|
||||||
case BATTLEGROUND_SA:
|
case BATTLEGROUND_SA:
|
||||||
return BATTLEGROUND_QUEUE_SA;
|
return BATTLEGROUND_QUEUE_SA;
|
||||||
case BATTLEGROUND_AA:
|
case BATTLEGROUND_AA:
|
||||||
case BATTLEGROUND_NA:
|
case BATTLEGROUND_NA:
|
||||||
case BATTLEGROUND_RL:
|
case BATTLEGROUND_RL:
|
||||||
case BATTLEGROUND_BE:
|
case BATTLEGROUND_BE:
|
||||||
case BATTLEGROUND_DS:
|
case BATTLEGROUND_DS:
|
||||||
case BATTLEGROUND_RV:
|
case BATTLEGROUND_RV:
|
||||||
switch(arenaType)
|
switch(arenaType)
|
||||||
{
|
{
|
||||||
case ARENA_TYPE_2v2:
|
case ARENA_TYPE_2v2:
|
||||||
return BATTLEGROUND_QUEUE_2v2;
|
return BATTLEGROUND_QUEUE_2v2;
|
||||||
case ARENA_TYPE_3v3:
|
case ARENA_TYPE_3v3:
|
||||||
return BATTLEGROUND_QUEUE_3v3;
|
return BATTLEGROUND_QUEUE_3v3;
|
||||||
case ARENA_TYPE_5v5:
|
case ARENA_TYPE_5v5:
|
||||||
return BATTLEGROUND_QUEUE_5v5;
|
return BATTLEGROUND_QUEUE_5v5;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 BattleGroundMgr::BGTemplateId(uint32 bgQueueTypeId) const
|
uint32 BattleGroundMgr::BGTemplateId(uint32 bgQueueTypeId)
|
||||||
{
|
{
|
||||||
switch(bgQueueTypeId)
|
switch(bgQueueTypeId)
|
||||||
{
|
{
|
||||||
case BATTLEGROUND_QUEUE_WS:
|
case BATTLEGROUND_QUEUE_WS:
|
||||||
return BATTLEGROUND_WS;
|
return BATTLEGROUND_WS;
|
||||||
case BATTLEGROUND_QUEUE_AB:
|
case BATTLEGROUND_QUEUE_AB:
|
||||||
return BATTLEGROUND_AB;
|
return BATTLEGROUND_AB;
|
||||||
case BATTLEGROUND_QUEUE_AV:
|
case BATTLEGROUND_QUEUE_AV:
|
||||||
return BATTLEGROUND_AV;
|
return BATTLEGROUND_AV;
|
||||||
case BATTLEGROUND_QUEUE_EY:
|
case BATTLEGROUND_QUEUE_EY:
|
||||||
return BATTLEGROUND_EY;
|
return BATTLEGROUND_EY;
|
||||||
case BATTLEGROUND_QUEUE_SA:
|
case BATTLEGROUND_QUEUE_SA:
|
||||||
return BATTLEGROUND_SA;
|
return BATTLEGROUND_SA;
|
||||||
case BATTLEGROUND_QUEUE_2v2:
|
case BATTLEGROUND_QUEUE_2v2:
|
||||||
case BATTLEGROUND_QUEUE_3v3:
|
case BATTLEGROUND_QUEUE_3v3:
|
||||||
case BATTLEGROUND_QUEUE_5v5:
|
case BATTLEGROUND_QUEUE_5v5:
|
||||||
return BATTLEGROUND_AA;
|
return BATTLEGROUND_AA;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 BattleGroundMgr::BGArenaType(uint32 bgQueueTypeId) const
|
uint8 BattleGroundMgr::BGArenaType(uint32 bgQueueTypeId)
|
||||||
{
|
{
|
||||||
switch(bgQueueTypeId)
|
switch(bgQueueTypeId)
|
||||||
{
|
{
|
||||||
case BATTLEGROUND_QUEUE_2v2:
|
case BATTLEGROUND_QUEUE_2v2:
|
||||||
return ARENA_TYPE_2v2;
|
return ARENA_TYPE_2v2;
|
||||||
case BATTLEGROUND_QUEUE_3v3:
|
case BATTLEGROUND_QUEUE_3v3:
|
||||||
return ARENA_TYPE_3v3;
|
return ARENA_TYPE_3v3;
|
||||||
case BATTLEGROUND_QUEUE_5v5:
|
case BATTLEGROUND_QUEUE_5v5:
|
||||||
return ARENA_TYPE_5v5;
|
return ARENA_TYPE_5v5;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -218,12 +218,6 @@ class BattleGroundMgr
|
||||||
|
|
||||||
BGFreeSlotQueueType BGFreeSlotQueue[MAX_BATTLEGROUND_TYPES];
|
BGFreeSlotQueueType BGFreeSlotQueue[MAX_BATTLEGROUND_TYPES];
|
||||||
|
|
||||||
bool IsArenaType(uint32 bgTypeId) const;
|
|
||||||
bool IsBattleGroundType(uint32 bgTypeId) const;
|
|
||||||
uint32 BGQueueTypeId(uint32 bgTypeId, uint8 arenaType) const;
|
|
||||||
uint32 BGTemplateId(uint32 bgQueueTypeId) const;
|
|
||||||
uint8 BGArenaType(uint32 bgQueueTypeId) const;
|
|
||||||
|
|
||||||
uint32 GetMaxRatingDifference() const { return sWorld.getConfig(CONFIG_ARENA_MAX_RATING_DIFFERENCE); }
|
uint32 GetMaxRatingDifference() const { return sWorld.getConfig(CONFIG_ARENA_MAX_RATING_DIFFERENCE); }
|
||||||
uint32 GetRatingDiscardTimer() const { return sWorld.getConfig(CONFIG_ARENA_RATING_DISCARD_TIMER); }
|
uint32 GetRatingDiscardTimer() const { return sWorld.getConfig(CONFIG_ARENA_RATING_DISCARD_TIMER); }
|
||||||
uint32 GetPrematureFinishTime() const { return sWorld.getConfig(CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER); }
|
uint32 GetPrematureFinishTime() const { return sWorld.getConfig(CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER); }
|
||||||
|
|
@ -234,6 +228,11 @@ class BattleGroundMgr
|
||||||
|
|
||||||
bool isArenaTesting() const { return m_ArenaTesting; }
|
bool isArenaTesting() const { return m_ArenaTesting; }
|
||||||
|
|
||||||
|
static bool IsArenaType(uint32 bgTypeId);
|
||||||
|
static bool IsBattleGroundType(uint32 bgTypeId) { return !BattleGroundMgr::IsArenaType(bgTypeId); }
|
||||||
|
static uint32 BGQueueTypeId(uint32 bgTypeId, uint8 arenaType);
|
||||||
|
static uint32 BGTemplateId(uint32 bgQueueTypeId);
|
||||||
|
static uint8 BGArenaType(uint32 bgQueueTypeId);
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/* Battlegrounds */
|
/* Battlegrounds */
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7109"
|
#define REVISION_NR "7110"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue