mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
Little clean up in BattleGroundMgr.h
Changed uint64 in method parameters to be passed by const reference. Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
c4dba30b51
commit
aa2a454ca1
2 changed files with 15 additions and 15 deletions
|
|
@ -1754,7 +1754,7 @@ void BattleGroundMgr::DistributeArenaPoints()
|
||||||
sWorld.SendGlobalText("Done flushing Arena points.", NULL);
|
sWorld.SendGlobalText("Done flushing Arena points.", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, uint64 guid, Player* plr, uint32 bgTypeId)
|
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player* plr, uint32 bgTypeId)
|
||||||
{
|
{
|
||||||
uint32 PlayerLevel = 10;
|
uint32 PlayerLevel = 10;
|
||||||
|
|
||||||
|
|
@ -1810,7 +1810,7 @@ void BattleGroundMgr::SendToBattleGround(Player *pl, uint32 instanceId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BattleGroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, BattleGround *bg, uint64 guid)
|
void BattleGroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, BattleGround *bg, const uint64& guid)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
|
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
|
||||||
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
|
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,10 @@ class BGQueueInviteEvent : public BasicEvent
|
||||||
class BGQueueRemoveEvent : public BasicEvent
|
class BGQueueRemoveEvent : public BasicEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BGQueueRemoveEvent(uint64 pl_guid, uint32 bgInstanceGUID, uint32 playersTeam) : m_PlayerGuid(pl_guid), m_BgInstanceGUID(bgInstanceGUID), m_PlayersTeam(playersTeam) {};
|
BGQueueRemoveEvent(const uint64& pl_guid, uint32 bgInstanceGUID, uint32 playersTeam) :
|
||||||
|
m_PlayerGuid(pl_guid), m_BgInstanceGUID(bgInstanceGUID), m_PlayersTeam(playersTeam)
|
||||||
|
{
|
||||||
|
};
|
||||||
virtual ~BGQueueRemoveEvent() {};
|
virtual ~BGQueueRemoveEvent() {};
|
||||||
|
|
||||||
virtual bool Execute(uint64 e_time, uint32 p_time);
|
virtual bool Execute(uint64 e_time, uint32 p_time);
|
||||||
|
|
@ -175,28 +178,26 @@ class BattleGroundMgr
|
||||||
/* Packet Building */
|
/* Packet Building */
|
||||||
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
|
void BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr);
|
||||||
void BuildPlayerLeftBattleGroundPacket(WorldPacket *data, Player *plr);
|
void BuildPlayerLeftBattleGroundPacket(WorldPacket *data, Player *plr);
|
||||||
void BuildBattleGroundListPacket(WorldPacket *data, uint64 guid, Player *plr, uint32 bgTypeId);
|
void BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player *plr, uint32 bgTypeId);
|
||||||
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, uint32 bgTypeId);
|
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, uint32 bgTypeId);
|
||||||
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
|
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
|
||||||
void BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg);
|
void BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg);
|
||||||
void BuildBattleGroundStatusPacket(WorldPacket *data, BattleGround *bg, uint32 team, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint32 arenatype = 0, uint8 israted = 0);
|
void BuildBattleGroundStatusPacket(WorldPacket *data, BattleGround *bg, uint32 team, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint32 arenatype = 0, uint8 israted = 0);
|
||||||
void BuildPlaySoundPacket(WorldPacket *data, uint32 soundid);
|
void BuildPlaySoundPacket(WorldPacket *data, uint32 soundid);
|
||||||
|
|
||||||
|
void SendAreaSpiritHealerQueryOpcode(Player *pl, BattleGround *bg, const uint64& guid);
|
||||||
/* Player invitation */
|
/* Player invitation */
|
||||||
// called from Queue update, or from Addplayer to queue
|
// called from Queue update, or from Addplayer to queue
|
||||||
void InvitePlayer(Player* plr, uint32 bgInstanceGUID, uint32 team);
|
void InvitePlayer(Player* plr, uint32 bgInstanceGUID, uint32 team);
|
||||||
|
|
||||||
/* Battlegrounds */
|
/* Battlegrounds */
|
||||||
BattleGroundSet::iterator GetBattleGroundsBegin() { return m_BattleGrounds.begin(); };
|
BattleGroundSet::iterator GetBattleGroundsBegin() { return m_BattleGrounds.begin(); };
|
||||||
BattleGroundSet::iterator GetBattleGroundsEnd() { return m_BattleGrounds.end(); };
|
BattleGroundSet::iterator GetBattleGroundsEnd() { return m_BattleGrounds.end(); };
|
||||||
|
|
||||||
BattleGround* GetBattleGround(uint32 ID)
|
BattleGround* GetBattleGround(uint32 ID)
|
||||||
{
|
{
|
||||||
BattleGroundSet::iterator i = m_BattleGrounds.find(ID);
|
BattleGroundSet::iterator i = m_BattleGrounds.find(ID);
|
||||||
if(i != m_BattleGrounds.end())
|
return ( (i != m_BattleGrounds.end()) ? i->second : NULL );
|
||||||
return i->second;
|
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
BattleGround * GetBattleGroundTemplate(uint32 bgTypeId);
|
BattleGround * GetBattleGroundTemplate(uint32 bgTypeId);
|
||||||
|
|
@ -217,22 +218,21 @@ class BattleGroundMgr
|
||||||
|
|
||||||
BGFreeSlotQueueType BGFreeSlotQueue[MAX_BATTLEGROUND_TYPES];
|
BGFreeSlotQueueType BGFreeSlotQueue[MAX_BATTLEGROUND_TYPES];
|
||||||
|
|
||||||
void SendAreaSpiritHealerQueryOpcode(Player *pl, BattleGround *bg, uint64 guid);
|
|
||||||
|
|
||||||
bool IsArenaType(uint32 bgTypeId) const;
|
bool IsArenaType(uint32 bgTypeId) const;
|
||||||
bool IsBattleGroundType(uint32 bgTypeId) const;
|
bool IsBattleGroundType(uint32 bgTypeId) const;
|
||||||
uint32 BGQueueTypeId(uint32 bgTypeId, uint8 arenaType) const;
|
uint32 BGQueueTypeId(uint32 bgTypeId, uint8 arenaType) const;
|
||||||
uint32 BGTemplateId(uint32 bgQueueTypeId) const;
|
uint32 BGTemplateId(uint32 bgQueueTypeId) const;
|
||||||
uint8 BGArenaType(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); }
|
||||||
|
|
||||||
void InitAutomaticArenaPointDistribution();
|
void InitAutomaticArenaPointDistribution();
|
||||||
void DistributeArenaPoints();
|
void DistributeArenaPoints();
|
||||||
uint32 GetPrematureFinishTime() const {return sWorld.getConfig(CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER);}
|
|
||||||
void ToggleArenaTesting();
|
void ToggleArenaTesting();
|
||||||
const bool isArenaTesting() const { return m_ArenaTesting; }
|
|
||||||
|
bool isArenaTesting() const { return m_ArenaTesting; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue