aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-13 19:56:22 -0600
committermegamage <none@none>2009-02-13 19:56:22 -0600
commit8eb1f455a101df2316e75f247a3c96d7debbbc36 (patch)
treeb9b190483173e2d36d322a6be8d4b43a35a27fdb /src/game/BattleGround.cpp
parentf2c663a363966eeb49b0a69cf3e482af891e4d1d (diff)
[7269] Use enum type for battleground queue type ids, and related cleanups.
* renamed a variable to make the content of it more clear: type->arenaslot * renamed BattleGroundQueueTypeId-variables to bgQueueTypeId just to make it easier reading the code (cause there existed 3 different names for this..) * renamed GetBattleGroundQueueId to GetBattleGroundQueueTypeId again this is just for better understanding * Renamed [GS]etQueueType and m_Queue_type * Renamed to [GS]etQueueId and m_QueueId Author: balrok --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index cb122fddbcf..2dae960f404 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -41,7 +41,7 @@ BattleGround::BattleGround()
m_Status = 0;
m_EndTime = 0;
m_LastResurrectTime = 0;
- m_Queue_type = MAX_BATTLEGROUND_QUEUES;
+ m_QueueId = MAX_BATTLEGROUND_QUEUES;
m_InvitedAlliance = 0;
m_InvitedHorde = 0;
m_ArenaType = 0;
@@ -575,7 +575,7 @@ void BattleGround::EndBattleGround(uint32 winner)
sBattleGroundMgr.BuildPvpLogDataPacket(&data, this);
plr->GetSession()->SendPacket(&data);
- uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
+ BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, this, plr->GetTeam(), plr->GetBattleGroundQueueIndex(bgQueueTypeId), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime());
plr->GetSession()->SendPacket(&data);
plr->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, 1);
@@ -792,7 +792,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if(!team) team = plr->GetTeam();
BattleGroundTypeId bgTypeId = GetTypeID();
- uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
+ BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
// if arena, remove the specific arena auras
if(isArena())
{
@@ -843,8 +843,8 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
DecreaseInvitedCount(team);
//we should update battleground queue, but only if bg isn't ending
- if (GetQueueType() < MAX_BATTLEGROUND_QUEUES)
- sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, GetQueueType());
+ if (GetQueueId() < MAX_BATTLEGROUND_QUEUES)
+ sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, GetQueueId());
Group * group = plr->GetGroup();
// remove from raid group if exist
@@ -890,7 +890,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
// this method is called when no players remains in battleground
void BattleGround::Reset()
{
- SetQueueType(MAX_BATTLEGROUND_QUEUES);
+ SetQueueId(MAX_BATTLEGROUND_QUEUES);
SetWinner(WINNER_NONE);
SetStatus(STATUS_WAIT_QUEUE);
SetStartTime(0);
@@ -1553,7 +1553,7 @@ void BattleGround::PlayerRelogin(Player* plr)
return;
WorldPacket data;
- uint32 bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
+ BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(GetTypeID(), GetArenaType());
BlockMovement(plr);