Core: Pass by const reference for simple objects replaced with pass by value
This commit is contained in:
@@ -687,7 +687,7 @@ void SmartAI::SetData(uint32 id, uint32 value)
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_DATA_SET, NULL, id, value);
|
||||
}
|
||||
|
||||
void SmartAI::SetGUID(const uint64& /*guid*/, int32 /*id*/)
|
||||
void SmartAI::SetGUID(const uint64 /*guid*/, int32 /*id*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ class SmartAI : public CreatureAI
|
||||
void SetData(uint32 id, uint32 value);
|
||||
|
||||
// Used in scripts to share variables
|
||||
void SetGUID(const uint64 &guid, int32 id = 0);
|
||||
void SetGUID(const uint64 guid, int32 id = 0);
|
||||
|
||||
// Used in scripts to share variables
|
||||
uint64 GetGUID(int32 id = 0);
|
||||
|
||||
@@ -2845,7 +2845,7 @@ void SmartScript::SetData(uint32 id, uint32 value)
|
||||
{
|
||||
}
|
||||
|
||||
void SmartScript::SetGUID(const uint64& guid, int32 id)
|
||||
void SmartScript::SetGUID(const uint64 guid, int32 id)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ bool ArenaTeam::Create(uint32 captainGuid, uint8 type, std::string teamName, uin
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ArenaTeam::AddMember(const uint64& playerGuid)
|
||||
bool ArenaTeam::AddMember(const uint64 playerGuid)
|
||||
{
|
||||
std::string playerName;
|
||||
uint8 playerClass;
|
||||
@@ -276,7 +276,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ArenaTeam::SetCaptain(const uint64& guid)
|
||||
void ArenaTeam::SetCaptain(const uint64 guid)
|
||||
{
|
||||
// Disable remove/promote buttons
|
||||
Player* oldCaptain = ObjectAccessor::FindPlayer(GetCaptain());
|
||||
@@ -537,7 +537,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
bool ArenaTeam::IsMember(const uint64& guid) const
|
||||
bool ArenaTeam::IsMember(const uint64 guid) const
|
||||
{
|
||||
for (MemberList::const_iterator itr = Members.begin(); itr != Members.end(); ++itr)
|
||||
if (itr->Guid == guid)
|
||||
@@ -901,7 +901,7 @@ ArenaTeamMember* ArenaTeam::GetMember(const std::string& name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ArenaTeamMember* ArenaTeam::GetMember(const uint64& guid)
|
||||
ArenaTeamMember* ArenaTeam::GetMember(const uint64 guid)
|
||||
{
|
||||
for (MemberList::iterator itr = Members.begin(); itr != Members.end(); ++itr)
|
||||
if (itr->Guid == guid)
|
||||
|
||||
@@ -124,17 +124,17 @@ class ArenaTeam
|
||||
uint32 GetType() const { return Type; }
|
||||
uint8 GetSlot() const { return GetSlotByType(GetType()); }
|
||||
static uint8 GetSlotByType(uint32 type);
|
||||
const uint64& GetCaptain() const { return CaptainGuid; }
|
||||
const uint64 GetCaptain() const { return CaptainGuid; }
|
||||
std::string GetName() const { return TeamName; }
|
||||
const ArenaTeamStats& GetStats() const { return Stats; }
|
||||
|
||||
uint32 GetRating() const { return Stats.Rating; }
|
||||
uint32 GetAverageMMR(Group* group) const;
|
||||
|
||||
void SetCaptain(const uint64& guid);
|
||||
bool AddMember(const uint64& PlayerGuid);
|
||||
void SetCaptain(const uint64 guid);
|
||||
bool AddMember(const uint64 PlayerGuid);
|
||||
|
||||
// Shouldn't be const uint64& ed, because than can reference guid from members on Disband
|
||||
// Shouldn't be const uint64 ed, because than can reference guid from members on Disband
|
||||
// and this method removes given record from list. So invalid reference can happen.
|
||||
void DelMember(uint64 guid, bool cleanDb);
|
||||
|
||||
@@ -142,9 +142,9 @@ class ArenaTeam
|
||||
bool Empty() const { return Members.empty(); }
|
||||
MemberList::iterator m_membersBegin() { return Members.begin(); }
|
||||
MemberList::iterator m_membersEnd() { return Members.end(); }
|
||||
bool IsMember(const uint64& guid) const;
|
||||
bool IsMember(const uint64 guid) const;
|
||||
|
||||
ArenaTeamMember* GetMember(const uint64& guid);
|
||||
ArenaTeamMember* GetMember(const uint64 guid);
|
||||
ArenaTeamMember* GetMember(const std::string& name);
|
||||
|
||||
bool IsFighting() const;
|
||||
|
||||
@@ -514,7 +514,7 @@ inline void Battleground::_ProcessLeave(uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
inline Player* Battleground::_GetPlayer(const uint64& guid, bool offlineRemove, const char* context) const
|
||||
inline Player* Battleground::_GetPlayer(const uint64 guid, bool offlineRemove, const char* context) const
|
||||
{
|
||||
Player* player = NULL;
|
||||
if (!offlineRemove)
|
||||
@@ -874,7 +874,7 @@ void Battleground::BlockMovement(Player* plr)
|
||||
plr->SetClientControl(plr, 0); // movement disabled NOTE: the effect will be automatically removed by client when the player is teleported from the battleground, so no need to send with uint8(1) in RemovePlayerAtLeave()
|
||||
}
|
||||
|
||||
void Battleground::RemovePlayerAtLeave(const uint64& guid, bool Transport, bool SendPacket)
|
||||
void Battleground::RemovePlayerAtLeave(const uint64 guid, bool Transport, bool SendPacket)
|
||||
{
|
||||
uint32 team = GetPlayerTeam(guid);
|
||||
bool participant = false;
|
||||
@@ -1337,7 +1337,7 @@ void Battleground::UpdatePlayerScore(Player* Source, uint32 type, uint32 value,
|
||||
}
|
||||
}
|
||||
|
||||
void Battleground::AddPlayerToResurrectQueue(const uint64& npc_guid, const uint64& player_guid)
|
||||
void Battleground::AddPlayerToResurrectQueue(const uint64 npc_guid, const uint64 player_guid)
|
||||
{
|
||||
m_ReviveQueue[npc_guid].push_back(player_guid);
|
||||
|
||||
@@ -1348,7 +1348,7 @@ void Battleground::AddPlayerToResurrectQueue(const uint64& npc_guid, const uint6
|
||||
plr->CastSpell(plr, SPELL_WAITING_FOR_RESURRECT, true);
|
||||
}
|
||||
|
||||
void Battleground::RemovePlayerFromResurrectQueue(const uint64& player_guid)
|
||||
void Battleground::RemovePlayerFromResurrectQueue(const uint64 player_guid)
|
||||
{
|
||||
for (std::map<uint64, std::vector<uint64> >::iterator itr = m_ReviveQueue.begin(); itr != m_ReviveQueue.end(); ++itr)
|
||||
{
|
||||
@@ -1656,7 +1656,7 @@ const char* Battleground::GetTrinityString(int32 entry)
|
||||
// IMPORTANT NOTICE:
|
||||
// buffs aren't spawned/despawned when players captures anything
|
||||
// buffs are in their positions when battleground starts
|
||||
void Battleground::HandleTriggerBuff(const uint64& go_guid)
|
||||
void Battleground::HandleTriggerBuff(const uint64 go_guid)
|
||||
{
|
||||
GameObject *obj = GetBgMap()->GetGameObject(go_guid);
|
||||
if (!obj || obj->GetGoType() != GAMEOBJECT_TYPE_TRAP || !obj->isSpawned())
|
||||
@@ -1725,7 +1725,7 @@ void Battleground::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
// Return the player's team based on battlegroundplayer info
|
||||
// Used in same faction arena matches mainly
|
||||
uint32 Battleground::GetPlayerTeam(const uint64& guid) const
|
||||
uint32 Battleground::GetPlayerTeam(const uint64 guid) const
|
||||
{
|
||||
BattlegroundPlayerMap::const_iterator itr = m_Players.find(guid);
|
||||
if (itr != m_Players.end())
|
||||
@@ -1738,7 +1738,7 @@ uint32 Battleground::GetOtherTeam(uint32 teamId) const
|
||||
return teamId ? ((teamId == ALLIANCE) ? HORDE : ALLIANCE) : 0;
|
||||
}
|
||||
|
||||
bool Battleground::IsPlayerInBattleground(const uint64& guid) const
|
||||
bool Battleground::IsPlayerInBattleground(const uint64 guid) const
|
||||
{
|
||||
BattlegroundPlayerMap::const_iterator itr = m_Players.find(guid);
|
||||
if (itr != m_Players.end())
|
||||
@@ -1783,7 +1783,7 @@ void Battleground::SetHoliday(bool is_holiday)
|
||||
m_HonorMode = is_holiday ? BG_HOLIDAY : BG_NORMAL;
|
||||
}
|
||||
|
||||
int32 Battleground::GetObjectType(const uint64& guid)
|
||||
int32 Battleground::GetObjectType(const uint64 guid)
|
||||
{
|
||||
for (uint32 i = 0; i < m_BgObjects.size(); ++i)
|
||||
if (m_BgObjects[i] == guid)
|
||||
|
||||
@@ -419,8 +419,8 @@ class Battleground
|
||||
|
||||
uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); }
|
||||
|
||||
void AddPlayerToResurrectQueue(const uint64& npc_guid, const uint64& player_guid);
|
||||
void RemovePlayerFromResurrectQueue(const uint64& player_guid);
|
||||
void AddPlayerToResurrectQueue(const uint64 npc_guid, const uint64 player_guid);
|
||||
void RemovePlayerFromResurrectQueue(const uint64 player_guid);
|
||||
|
||||
void StartBattleground();
|
||||
|
||||
@@ -522,7 +522,7 @@ class Battleground
|
||||
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
|
||||
|
||||
// this function can be used by spell to interact with the BG map
|
||||
virtual void DoAction(uint32 /*action*/, const uint64& /*var*/) {}
|
||||
virtual void DoAction(uint32 /*action*/, const uint64 /*var*/) {}
|
||||
|
||||
virtual void HandlePlayerResurrect(Player* /*player*/) {}
|
||||
|
||||
@@ -533,10 +533,10 @@ class Battleground
|
||||
|
||||
void AddOrSetPlayerToCorrectBgGroup(Player* player, uint32 team);
|
||||
|
||||
virtual void RemovePlayerAtLeave(const uint64& guid, bool Transport, bool SendPacket);
|
||||
virtual void RemovePlayerAtLeave(const uint64 guid, bool Transport, bool SendPacket);
|
||||
// can be extended in in BG subclass
|
||||
|
||||
void HandleTriggerBuff(const uint64& go_guid);
|
||||
void HandleTriggerBuff(const uint64 go_guid);
|
||||
void SetHoliday(bool is_holiday);
|
||||
|
||||
// TODO: make this protected:
|
||||
@@ -550,7 +550,7 @@ class Battleground
|
||||
bool DelCreature(uint32 type);
|
||||
bool DelObject(uint32 type);
|
||||
bool AddSpiritGuide(uint32 type, float x, float y, float z, float o, uint32 team);
|
||||
int32 GetObjectType(const uint64& guid);
|
||||
int32 GetObjectType(const uint64 guid);
|
||||
|
||||
void DoorOpen(uint32 type);
|
||||
void DoorClose(uint32 type);
|
||||
@@ -560,9 +560,9 @@ class Battleground
|
||||
virtual bool HandlePlayerUnderMap(Player* /*plr*/) { return false; }
|
||||
|
||||
// since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
|
||||
uint32 GetPlayerTeam(const uint64& guid) const;
|
||||
uint32 GetPlayerTeam(const uint64 guid) const;
|
||||
uint32 GetOtherTeam(uint32 teamId) const;
|
||||
bool IsPlayerInBattleground(const uint64& guid) const;
|
||||
bool IsPlayerInBattleground(const uint64 guid) const;
|
||||
|
||||
void SetDeleteThis() { m_SetDeleteThis = true; }
|
||||
|
||||
@@ -577,7 +577,7 @@ class Battleground
|
||||
void EndNow();
|
||||
void PlayerAddedToBGCheckIfBGIsRunning(Player* plr);
|
||||
|
||||
Player* _GetPlayer(const uint64& guid, bool offlineRemove, const char* context) const;
|
||||
Player* _GetPlayer(const uint64 guid, bool offlineRemove, const char* context) const;
|
||||
Player* _GetPlayer(BattlegroundPlayerMap::iterator itr, const char* context);
|
||||
Player* _GetPlayer(BattlegroundPlayerMap::const_iterator itr, const char* context) const;
|
||||
Player* _GetPlayerForTeam(uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char* context) const;
|
||||
|
||||
@@ -417,7 +417,7 @@ void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket *data, uint32 soundid)
|
||||
*data << uint32(soundid);
|
||||
}
|
||||
|
||||
void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket *data, const uint64& guid)
|
||||
void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket *data, const uint64 guid)
|
||||
{
|
||||
data->Initialize(SMSG_BATTLEGROUND_PLAYER_LEFT, 8);
|
||||
*data << uint64(guid);
|
||||
@@ -816,7 +816,7 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
|
||||
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Automatic Arena Point Distribution initialized.");
|
||||
}
|
||||
|
||||
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, const uint64& guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere)
|
||||
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, const uint64 guid, Player* plr, BattlegroundTypeId bgTypeId, uint8 fromWhere)
|
||||
{
|
||||
if (!plr)
|
||||
return;
|
||||
@@ -901,7 +901,7 @@ void BattlegroundMgr::SendToBattleground(Player *pl, uint32 instanceId, Battlegr
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, const uint64& guid)
|
||||
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, const uint64 guid)
|
||||
{
|
||||
WorldPacket data(SMSG_AREA_SPIRIT_HEALER_TIME, 12);
|
||||
uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
|
||||
|
||||
@@ -45,14 +45,14 @@ class BattlegroundMgr
|
||||
|
||||
/* Packet Building */
|
||||
void BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, Player *plr);
|
||||
void BuildPlayerLeftBattlegroundPacket(WorldPacket *data, const uint64& guid);
|
||||
void BuildBattlegroundListPacket(WorldPacket *data, const uint64& guid, Player *plr, BattlegroundTypeId bgTypeId, uint8 fromWhere);
|
||||
void BuildPlayerLeftBattlegroundPacket(WorldPacket *data, const uint64 guid);
|
||||
void BuildBattlegroundListPacket(WorldPacket *data, const uint64 guid, Player *plr, BattlegroundTypeId bgTypeId, uint8 fromWhere);
|
||||
void BuildGroupJoinedBattlegroundPacket(WorldPacket *data, GroupJoinBattlegroundResult result);
|
||||
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value);
|
||||
void BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg);
|
||||
void BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, uint8 QueueSlot, uint8 StatusID, uint32 Time1, uint32 Time2, uint8 arenatype, uint8 uiFrame = 1);
|
||||
void BuildPlaySoundPacket(WorldPacket *data, uint32 soundid);
|
||||
void SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, const uint64& guid);
|
||||
void SendAreaSpiritHealerQueryOpcode(Player *pl, Battleground *bg, const uint64 guid);
|
||||
|
||||
/* Battlegrounds */
|
||||
Battleground* GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId);
|
||||
|
||||
@@ -281,7 +281,7 @@ uint32 BattlegroundQueue::GetAverageQueueWaitTime(GroupQueueInfo* ginfo, Battleg
|
||||
}
|
||||
|
||||
//remove player from queue and from group info, if group info is empty then remove it too
|
||||
void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCount)
|
||||
void BattlegroundQueue::RemovePlayer(const uint64 guid, bool decreaseInvitedCount)
|
||||
{
|
||||
//Player *plr = ObjectAccessor::FindPlayer(guid);
|
||||
|
||||
@@ -405,7 +405,7 @@ void BattlegroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
|
||||
}
|
||||
|
||||
//returns true when player pl_guid is in queue and is invited to bgInstanceGuid
|
||||
bool BattlegroundQueue::IsPlayerInvited(const uint64& pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime)
|
||||
bool BattlegroundQueue::IsPlayerInvited(const uint64 pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime)
|
||||
{
|
||||
QueuedPlayersMap::const_iterator qItr = m_QueuedPlayers.find(pl_guid);
|
||||
return (qItr != m_QueuedPlayers.end()
|
||||
@@ -413,7 +413,7 @@ bool BattlegroundQueue::IsPlayerInvited(const uint64& pl_guid, const uint32 bgIn
|
||||
&& qItr->second.GroupInfo->RemoveInviteTime == removeTime);
|
||||
}
|
||||
|
||||
bool BattlegroundQueue::GetPlayerGroupInfoData(const uint64& guid, GroupQueueInfo* ginfo)
|
||||
bool BattlegroundQueue::GetPlayerGroupInfoData(const uint64 guid, GroupQueueInfo* ginfo)
|
||||
{
|
||||
QueuedPlayersMap::const_iterator qItr = m_QueuedPlayers.find(guid);
|
||||
if (qItr == m_QueuedPlayers.end())
|
||||
|
||||
@@ -76,9 +76,9 @@ class BattlegroundQueue
|
||||
bool CheckNormalMatch(Battleground* bg_template, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers);
|
||||
bool CheckSkirmishForSameFaction(BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam);
|
||||
GroupQueueInfo * AddGroup(Player* leader, Group* group, BattlegroundTypeId bgTypeId, PvPDifficultyEntry const* bracketEntry, uint8 ArenaType, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId = 0);
|
||||
void RemovePlayer(const uint64& guid, bool decreaseInvitedCount);
|
||||
bool IsPlayerInvited(const uint64& pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime);
|
||||
bool GetPlayerGroupInfoData(const uint64& guid, GroupQueueInfo* ginfo);
|
||||
void RemovePlayer(const uint64 guid, bool decreaseInvitedCount);
|
||||
bool IsPlayerInvited(const uint64 pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime);
|
||||
bool GetPlayerGroupInfoData(const uint64 guid, GroupQueueInfo* ginfo);
|
||||
void PlayerInvitedToBGUpdateAverageWaitTime(GroupQueueInfo* ginfo, BattlegroundBracketId bracket_id);
|
||||
uint32 GetAverageQueueWaitTime(GroupQueueInfo* ginfo, BattlegroundBracketId bracket_id) const;
|
||||
|
||||
@@ -131,7 +131,7 @@ class BattlegroundQueue
|
||||
class BGQueueInviteEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
BGQueueInviteEvent(const uint64& pl_guid, uint32 BgInstanceGUID, BattlegroundTypeId BgTypeId, uint8 arenaType, uint32 removeTime) :
|
||||
BGQueueInviteEvent(const uint64 pl_guid, uint32 BgInstanceGUID, BattlegroundTypeId BgTypeId, uint8 arenaType, uint32 removeTime) :
|
||||
m_PlayerGuid(pl_guid), m_BgInstanceGUID(BgInstanceGUID), m_BgTypeId(BgTypeId), m_ArenaType(arenaType), m_RemoveTime(removeTime)
|
||||
{
|
||||
};
|
||||
@@ -155,7 +155,7 @@ class BGQueueInviteEvent : public BasicEvent
|
||||
class BGQueueRemoveEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
BGQueueRemoveEvent(const uint64& pl_guid, uint32 bgInstanceGUID, BattlegroundTypeId BgTypeId, BattlegroundQueueTypeId bgQueueTypeId, uint32 removeTime)
|
||||
BGQueueRemoveEvent(const uint64 pl_guid, uint32 bgInstanceGUID, BattlegroundTypeId BgTypeId, BattlegroundQueueTypeId bgQueueTypeId, uint32 removeTime)
|
||||
: m_PlayerGuid(pl_guid), m_BgInstanceGUID(bgInstanceGUID), m_RemoveTime(removeTime), m_BgTypeId(BgTypeId), m_BgQueueTypeId(bgQueueTypeId)
|
||||
{}
|
||||
|
||||
|
||||
@@ -308,7 +308,7 @@ void LFGMgr::Update(uint32 diff)
|
||||
@param[in] guid Player or group guid to add to queue
|
||||
@param[in] queueId Queue Id to add player/group to
|
||||
*/
|
||||
void LFGMgr::AddToQueue(const uint64& guid, uint8 queueId)
|
||||
void LFGMgr::AddToQueue(const uint64 guid, uint8 queueId)
|
||||
{
|
||||
if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
|
||||
queueId = 0;
|
||||
@@ -329,7 +329,7 @@ void LFGMgr::AddToQueue(const uint64& guid, uint8 queueId)
|
||||
@param[in] guid Player or group guid to add to queue
|
||||
@return true if guid was found in main queue.
|
||||
*/
|
||||
bool LFGMgr::RemoveFromQueue(const uint64& guid)
|
||||
bool LFGMgr::RemoveFromQueue(const uint64 guid)
|
||||
{
|
||||
for (LfgGuidListMap::iterator it = m_currentQueue.begin(); it != m_currentQueue.end(); ++it)
|
||||
it->second.remove(guid);
|
||||
@@ -982,7 +982,7 @@ bool LFGMgr::CheckCompatibility(LfgGuidList check, LfgProposal*& pProposal)
|
||||
@param[in] guid Player guid (0 = rolecheck failed)
|
||||
@param[in] roles Player selected roles
|
||||
*/
|
||||
void LFGMgr::UpdateRoleCheck(uint64& gguid, uint64 guid /* = 0 */, uint8 roles /* = ROLE_NONE */)
|
||||
void LFGMgr::UpdateRoleCheck(uint64 gguid, uint64 guid /* = 0 */, uint8 roles /* = ROLE_NONE */)
|
||||
{
|
||||
if (!gguid)
|
||||
return;
|
||||
@@ -1247,7 +1247,7 @@ bool LFGMgr::CheckGroupRoles(LfgRolesMap& groles, bool removeLeaderFlag /*= true
|
||||
@param[in] guid Player guid to update answer
|
||||
@param[in] accept Player answer
|
||||
*/
|
||||
void LFGMgr::UpdateProposal(uint32 proposalId, const uint64& guid, bool accept)
|
||||
void LFGMgr::UpdateProposal(uint32 proposalId, const uint64 guid, bool accept)
|
||||
{
|
||||
// Check if the proposal exists
|
||||
LfgProposalMap::iterator itProposal = m_Proposals.find(proposalId);
|
||||
@@ -1516,7 +1516,7 @@ void LFGMgr::RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType t
|
||||
@param[in] victim Victim guid
|
||||
@param[in] reason Kick reason
|
||||
*/
|
||||
void LFGMgr::InitBoot(Group* grp, const uint64& kicker, const uint64& victim, std::string reason)
|
||||
void LFGMgr::InitBoot(Group* grp, const uint64 kicker, const uint64 victim, std::string reason)
|
||||
{
|
||||
if (!grp)
|
||||
return;
|
||||
@@ -1886,7 +1886,7 @@ std::string LFGMgr::ConcatenateGuids(LfgGuidList check)
|
||||
return o.str();
|
||||
}
|
||||
|
||||
LfgState LFGMgr::GetState(const uint64& guid)
|
||||
LfgState LFGMgr::GetState(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetState: [" UI64FMTD "]", guid);
|
||||
if (IS_GROUP(guid))
|
||||
@@ -1895,61 +1895,61 @@ LfgState LFGMgr::GetState(const uint64& guid)
|
||||
return m_Players[guid].GetState();
|
||||
}
|
||||
|
||||
uint32 LFGMgr::GetDungeon(const uint64& guid, bool asId /*= true*/)
|
||||
uint32 LFGMgr::GetDungeon(const uint64 guid, bool asId /*= true*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetDungeon: [" UI64FMTD "] asId: %u", guid, asId);
|
||||
return m_Groups[guid].GetDungeon(asId);
|
||||
}
|
||||
|
||||
uint8 LFGMgr::GetRoles(const uint64& guid)
|
||||
uint8 LFGMgr::GetRoles(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetRoles: [" UI64FMTD "]", guid);
|
||||
return m_Players[guid].GetRoles();
|
||||
}
|
||||
|
||||
const std::string& LFGMgr::GetComment(const uint64& guid)
|
||||
const std::string& LFGMgr::GetComment(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetComment: [" UI64FMTD "]", guid);
|
||||
return m_Players[guid].GetComment();
|
||||
}
|
||||
|
||||
const LfgDungeonSet& LFGMgr::GetSelectedDungeons(const uint64& guid)
|
||||
const LfgDungeonSet& LFGMgr::GetSelectedDungeons(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetSelectedDungeons: [" UI64FMTD "]", guid);
|
||||
return m_Players[guid].GetSelectedDungeons();
|
||||
}
|
||||
|
||||
const LfgLockMap& LFGMgr::GetLockedDungeons(const uint64& guid)
|
||||
const LfgLockMap& LFGMgr::GetLockedDungeons(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetLockedDungeons: [" UI64FMTD "]", guid);
|
||||
return m_Players[guid].GetLockedDungeons();
|
||||
}
|
||||
|
||||
uint8 LFGMgr::GetKicksLeft(const uint64& guid)
|
||||
uint8 LFGMgr::GetKicksLeft(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetKicksLeft: [" UI64FMTD "]", guid);
|
||||
return m_Groups[guid].GetKicksLeft();
|
||||
}
|
||||
|
||||
uint8 LFGMgr::GetVotesNeeded(const uint64& guid)
|
||||
uint8 LFGMgr::GetVotesNeeded(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::GetVotesNeeded: [" UI64FMTD "]", guid);
|
||||
return m_Groups[guid].GetVotesNeeded();
|
||||
}
|
||||
|
||||
void LFGMgr::RestoreState(const uint64& guid)
|
||||
void LFGMgr::RestoreState(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RestoreState: [" UI64FMTD "]", guid);
|
||||
m_Groups[guid].RestoreState();
|
||||
}
|
||||
|
||||
void LFGMgr::ClearState(const uint64& guid)
|
||||
void LFGMgr::ClearState(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::ClearState: [" UI64FMTD "]", guid);
|
||||
m_Players[guid].ClearState();
|
||||
}
|
||||
|
||||
void LFGMgr::SetState(const uint64& guid, LfgState state)
|
||||
void LFGMgr::SetState(const uint64 guid, LfgState state)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetState: [" UI64FMTD "] state %u", guid, state);
|
||||
if (IS_GROUP(guid))
|
||||
@@ -1958,43 +1958,43 @@ void LFGMgr::SetState(const uint64& guid, LfgState state)
|
||||
m_Players[guid].SetState(state);
|
||||
}
|
||||
|
||||
void LFGMgr::SetDungeon(const uint64& guid, uint32 dungeon)
|
||||
void LFGMgr::SetDungeon(const uint64 guid, uint32 dungeon)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetDungeon: [" UI64FMTD "] dungeon %u", guid, dungeon);
|
||||
m_Groups[guid].SetDungeon(dungeon);
|
||||
}
|
||||
|
||||
void LFGMgr::SetRoles(const uint64& guid, uint8 roles)
|
||||
void LFGMgr::SetRoles(const uint64 guid, uint8 roles)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetRoles: [" UI64FMTD "] roles: %u", guid, roles);
|
||||
m_Players[guid].SetRoles(roles);
|
||||
}
|
||||
|
||||
void LFGMgr::SetComment(const uint64& guid, const std::string& comment)
|
||||
void LFGMgr::SetComment(const uint64 guid, const std::string& comment)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetComment: [" UI64FMTD "] comment: %s", guid, comment.c_str());
|
||||
m_Players[guid].SetComment(comment);
|
||||
}
|
||||
|
||||
void LFGMgr::SetSelectedDungeons(const uint64& guid, const LfgDungeonSet& dungeons)
|
||||
void LFGMgr::SetSelectedDungeons(const uint64 guid, const LfgDungeonSet& dungeons)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetSelectedDungeons: [" UI64FMTD "]", guid);
|
||||
m_Players[guid].SetSelectedDungeons(dungeons);
|
||||
}
|
||||
|
||||
void LFGMgr::SetLockedDungeons(const uint64& guid, const LfgLockMap& lock)
|
||||
void LFGMgr::SetLockedDungeons(const uint64 guid, const LfgLockMap& lock)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::SetLockedDungeons: [" UI64FMTD "]", guid);
|
||||
m_Players[guid].SetLockedDungeons(lock);
|
||||
}
|
||||
|
||||
void LFGMgr::DecreaseKicksLeft(const uint64& guid)
|
||||
void LFGMgr::DecreaseKicksLeft(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::DecreaseKicksLeft: [" UI64FMTD "]", guid);
|
||||
m_Groups[guid].DecreaseKicksLeft();
|
||||
}
|
||||
|
||||
void LFGMgr::RemovePlayerData(const uint64& guid)
|
||||
void LFGMgr::RemovePlayerData(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemovePlayerData: [" UI64FMTD "]", guid);
|
||||
LfgPlayerDataMap::iterator it = m_Players.find(guid);
|
||||
@@ -2002,7 +2002,7 @@ void LFGMgr::RemovePlayerData(const uint64& guid)
|
||||
m_Players.erase(it);
|
||||
}
|
||||
|
||||
void LFGMgr::RemoveGroupData(const uint64& guid)
|
||||
void LFGMgr::RemoveGroupData(const uint64 guid)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::RemoveGroupData: [" UI64FMTD "]", guid);
|
||||
LfgGroupDataMap::iterator it = m_Groups.find(guid);
|
||||
|
||||
@@ -269,48 +269,48 @@ class LFGMgr
|
||||
void Leave(Player* plr, Group* grp = NULL);
|
||||
|
||||
// Role Check
|
||||
void UpdateRoleCheck(uint64& gguid, uint64 guid = 0, uint8 roles = ROLE_NONE);
|
||||
void UpdateRoleCheck(uint64 gguid, uint64 guid = 0, uint8 roles = ROLE_NONE);
|
||||
|
||||
// Proposals
|
||||
void UpdateProposal(uint32 proposalId, const uint64& guid, bool accept);
|
||||
void UpdateProposal(uint32 proposalId, const uint64 guid, bool accept);
|
||||
|
||||
// Teleportation
|
||||
void TeleportPlayer(Player* plr, bool out, bool fromOpcode = false);
|
||||
|
||||
// Vote kick
|
||||
void InitBoot(Group* grp, const uint64& kguid, const uint64& vguid, std::string reason);
|
||||
void InitBoot(Group* grp, const uint64 kguid, const uint64 vguid, std::string reason);
|
||||
void UpdateBoot(Player* plr, bool accept);
|
||||
void OfferContinue(Group* grp);
|
||||
|
||||
void InitializeLockedDungeons(Player* plr);
|
||||
|
||||
void SetComment(const uint64& guid, const std::string& comment);
|
||||
const LfgLockMap& GetLockedDungeons(const uint64& guid);
|
||||
LfgState GetState(const uint64& guid);
|
||||
const LfgDungeonSet& GetSelectedDungeons(const uint64& guid);
|
||||
uint32 GetDungeon(const uint64& guid, bool asId = true);
|
||||
void ClearState(const uint64& guid);
|
||||
void RemovePlayerData(const uint64& guid);
|
||||
void RemoveGroupData(const uint64& guid);
|
||||
uint8 GetKicksLeft(const uint64& gguid);
|
||||
uint8 GetVotesNeeded(const uint64& gguid);
|
||||
void SetRoles(const uint64& guid, uint8 roles);
|
||||
void SetComment(const uint64 guid, const std::string& comment);
|
||||
const LfgLockMap& GetLockedDungeons(const uint64 guid);
|
||||
LfgState GetState(const uint64 guid);
|
||||
const LfgDungeonSet& GetSelectedDungeons(const uint64 guid);
|
||||
uint32 GetDungeon(const uint64 guid, bool asId = true);
|
||||
void ClearState(const uint64 guid);
|
||||
void RemovePlayerData(const uint64 guid);
|
||||
void RemoveGroupData(const uint64 guid);
|
||||
uint8 GetKicksLeft(const uint64 gguid);
|
||||
uint8 GetVotesNeeded(const uint64 gguid);
|
||||
void SetRoles(const uint64 guid, uint8 roles);
|
||||
|
||||
private:
|
||||
|
||||
uint8 GetRoles(const uint64& guid);
|
||||
const std::string& GetComment(const uint64& gguid);
|
||||
void RestoreState(const uint64& guid);
|
||||
void SetState(const uint64& guid, LfgState state);
|
||||
void SetDungeon(const uint64& guid, uint32 dungeon);
|
||||
void SetSelectedDungeons(const uint64& guid, const LfgDungeonSet& dungeons);
|
||||
void SetLockedDungeons(const uint64& guid, const LfgLockMap& lock);
|
||||
void DecreaseKicksLeft(const uint64& guid);
|
||||
uint8 GetRoles(const uint64 guid);
|
||||
const std::string& GetComment(const uint64 gguid);
|
||||
void RestoreState(const uint64 guid);
|
||||
void SetState(const uint64 guid, LfgState state);
|
||||
void SetDungeon(const uint64 guid, uint32 dungeon);
|
||||
void SetSelectedDungeons(const uint64 guid, const LfgDungeonSet& dungeons);
|
||||
void SetLockedDungeons(const uint64 guid, const LfgLockMap& lock);
|
||||
void DecreaseKicksLeft(const uint64 guid);
|
||||
void NoExiste(uint8 lala);
|
||||
|
||||
// Queue
|
||||
void AddToQueue(const uint64& guid, uint8 queueId);
|
||||
bool RemoveFromQueue(const uint64& guid);
|
||||
void AddToQueue(const uint64 guid, uint8 queueId);
|
||||
bool RemoveFromQueue(const uint64 guid);
|
||||
|
||||
// Proposals
|
||||
void RemoveProposal(LfgProposalMap::iterator itProposal, LfgUpdateType type);
|
||||
|
||||
@@ -740,10 +740,10 @@ class Creature : public Unit, public GridObject<Creature>
|
||||
class AssistDelayEvent : public BasicEvent
|
||||
{
|
||||
public:
|
||||
AssistDelayEvent(const uint64& victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
|
||||
AssistDelayEvent(const uint64 victim, Unit& owner) : BasicEvent(), m_victim(victim), m_owner(owner) { }
|
||||
|
||||
bool Execute(uint64 e_time, uint32 p_time);
|
||||
void AddAssistant(const uint64& guid) { m_assistants.push_back(guid); }
|
||||
void AddAssistant(const uint64 guid) { m_assistants.push_back(guid); }
|
||||
private:
|
||||
AssistDelayEvent();
|
||||
|
||||
|
||||
@@ -850,7 +850,7 @@ void Object::UpdateUInt32Value(uint16 index, uint32 value)
|
||||
m_uint32Values[ index ] = value;
|
||||
}
|
||||
|
||||
void Object::SetUInt64Value(uint16 index, const uint64 &value)
|
||||
void Object::SetUInt64Value(uint16 index, const uint64 value)
|
||||
{
|
||||
ASSERT(index + 1 < m_valuesCount || PrintIndexError(index, true));
|
||||
if (*((uint64*)&(m_uint32Values[ index ])) != value)
|
||||
@@ -869,7 +869,7 @@ void Object::SetUInt64Value(uint16 index, const uint64 &value)
|
||||
}
|
||||
}
|
||||
|
||||
bool Object::AddUInt64Value(uint16 index, const uint64 &value)
|
||||
bool Object::AddUInt64Value(uint16 index, const uint64 value)
|
||||
{
|
||||
ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
|
||||
if (value && !*((uint64*)&(m_uint32Values[index])))
|
||||
@@ -890,7 +890,7 @@ bool Object::AddUInt64Value(uint16 index, const uint64 &value)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Object::RemoveUInt64Value(uint16 index, const uint64 &value)
|
||||
bool Object::RemoveUInt64Value(uint16 index, const uint64 value)
|
||||
{
|
||||
ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , true));
|
||||
if (value && *((uint64*)&(m_uint32Values[index])) == value)
|
||||
|
||||
@@ -124,7 +124,7 @@ class Object
|
||||
public:
|
||||
virtual ~Object ();
|
||||
|
||||
const bool& IsInWorld() const { return m_inWorld; }
|
||||
bool IsInWorld() const { return m_inWorld; }
|
||||
virtual void AddToWorld()
|
||||
{
|
||||
if (m_inWorld)
|
||||
@@ -149,7 +149,7 @@ class Object
|
||||
ClearUpdateMask(true);
|
||||
}
|
||||
|
||||
const uint64& GetGUID() const { return GetUInt64Value(0); }
|
||||
const uint64 GetGUID() const { return GetUInt64Value(0); }
|
||||
uint32 GetGUIDLow() const { return GUID_LOPART(GetUInt64Value(0)); }
|
||||
uint32 GetGUIDMid() const { return GUID_ENPART(GetUInt64Value(0)); }
|
||||
uint32 GetGUIDHigh() const { return GUID_HIPART(GetUInt64Value(0)); }
|
||||
@@ -175,13 +175,13 @@ class Object
|
||||
return m_int32Values[ index ];
|
||||
}
|
||||
|
||||
const uint32& GetUInt32Value(uint16 index) const
|
||||
const uint32 GetUInt32Value(uint16 index) const
|
||||
{
|
||||
ASSERT(index < m_valuesCount || PrintIndexError(index , false));
|
||||
return m_uint32Values[ index ];
|
||||
}
|
||||
|
||||
const uint64& GetUInt64Value(uint16 index) const
|
||||
const uint64 GetUInt64Value(uint16 index) const
|
||||
{
|
||||
ASSERT(index + 1 < m_valuesCount || PrintIndexError(index , false));
|
||||
return *((uint64*)&(m_uint32Values[ index ]));
|
||||
@@ -210,7 +210,7 @@ class Object
|
||||
void SetInt32Value(uint16 index, int32 value);
|
||||
void SetUInt32Value(uint16 index, uint32 value);
|
||||
void UpdateUInt32Value(uint16 index, uint32 value);
|
||||
void SetUInt64Value(uint16 index, const uint64 &value);
|
||||
void SetUInt64Value(uint16 index, const uint64 value);
|
||||
void SetFloatValue(uint16 index, float value);
|
||||
void SetByteValue(uint16 index, uint8 offset, uint8 value);
|
||||
void SetUInt16Value(uint16 index, uint8 offset, uint16 value);
|
||||
@@ -218,8 +218,8 @@ class Object
|
||||
void SetStatFloatValue(uint16 index, float value);
|
||||
void SetStatInt32Value(uint16 index, int32 value);
|
||||
|
||||
bool AddUInt64Value(uint16 index, const uint64 &value);
|
||||
bool RemoveUInt64Value(uint16 index, const uint64 &value);
|
||||
bool AddUInt64Value(uint16 index, const uint64 value);
|
||||
bool RemoveUInt64Value(uint16 index, const uint64 value);
|
||||
|
||||
void ApplyModUInt32Value(uint16 index, int32 val, bool apply);
|
||||
void ApplyModInt32Value(uint16 index, int32 val, bool apply);
|
||||
|
||||
@@ -34,7 +34,7 @@ void UpdateData::AddOutOfRangeGUID(std::set<uint64>& guids)
|
||||
m_outOfRangeGUIDs.insert(guids.begin(), guids.end());
|
||||
}
|
||||
|
||||
void UpdateData::AddOutOfRangeGUID(const uint64 &guid)
|
||||
void UpdateData::AddOutOfRangeGUID(const uint64 guid)
|
||||
{
|
||||
m_outOfRangeGUIDs.insert(guid);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class UpdateData
|
||||
UpdateData();
|
||||
|
||||
void AddOutOfRangeGUID(std::set<uint64>& guids);
|
||||
void AddOutOfRangeGUID(const uint64 &guid);
|
||||
void AddOutOfRangeGUID(const uint64 guid);
|
||||
void AddUpdateBlock(const ByteBuffer &block);
|
||||
bool BuildPacket(WorldPacket* packet);
|
||||
bool HasData() { return m_blockCount > 0 || !m_outOfRangeGUIDs.empty(); }
|
||||
|
||||
@@ -215,7 +215,7 @@ class Pet : public Guardian
|
||||
|
||||
uint32 m_usedTalentCount;
|
||||
|
||||
const uint64& GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
|
||||
const uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
|
||||
void SetAuraUpdateMaskForRaid(uint8 slot) { m_auraRaidUpdateMask |= (uint64(1) << slot); }
|
||||
void ResetAuraUpdateMaskForRaid() { m_auraRaidUpdateMask = 0; }
|
||||
|
||||
|
||||
@@ -1537,13 +1537,13 @@ class Player : public Unit, public GridObject<Player>
|
||||
return m_RewardedQuests.find(quest_id) != m_RewardedQuests.end();
|
||||
}
|
||||
|
||||
const uint64& GetSelection() const { return m_curSelection; }
|
||||
const uint64 GetSelection() const { return m_curSelection; }
|
||||
Unit *GetSelectedUnit() const;
|
||||
Player *GetSelectedPlayer() const;
|
||||
void SetSelection(const uint64 &guid) { m_curSelection = guid; SetUInt64Value(UNIT_FIELD_TARGET, guid); }
|
||||
void SetSelection(const uint64 guid) { m_curSelection = guid; SetUInt64Value(UNIT_FIELD_TARGET, guid); }
|
||||
|
||||
uint8 GetComboPoints() { return m_comboPoints; }
|
||||
const uint64& GetComboTarget() const { return m_comboTarget; }
|
||||
const uint64 GetComboTarget() const { return m_comboTarget; }
|
||||
|
||||
void AddComboPoints(Unit* target, int8 count, Spell* spell = NULL);
|
||||
void GainSpellComboPoints(int8 count);
|
||||
@@ -1874,8 +1874,8 @@ class Player : public Unit, public GridObject<Player>
|
||||
void UpdateManaRegen();
|
||||
void UpdateRuneRegen(RuneType rune);
|
||||
|
||||
const uint64& GetLootGUID() const { return m_lootGuid; }
|
||||
void SetLootGUID(const uint64 &guid) { m_lootGuid = guid; }
|
||||
const uint64 GetLootGUID() const { return m_lootGuid; }
|
||||
void SetLootGUID(const uint64 guid) { m_lootGuid = guid; }
|
||||
|
||||
void RemovedInsignia(Player* looterPlr);
|
||||
|
||||
@@ -2378,7 +2378,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
uint8 GetSubGroup() const { return m_group.getSubGroup(); }
|
||||
uint32 GetGroupUpdateFlag() const { return m_groupUpdateMask; }
|
||||
void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; }
|
||||
const uint64& GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
|
||||
const uint64 GetAuraUpdateMaskForRaid() const { return m_auraRaidUpdateMask; }
|
||||
void SetAuraUpdateMaskForRaid(uint8 slot) { m_auraRaidUpdateMask |= (uint64(1) << slot); }
|
||||
Player* GetNextRandomRaidMember(float radius);
|
||||
PartyResult CanUninviteFromGroup() const;
|
||||
|
||||
@@ -2012,7 +2012,7 @@ uint64 ObjectMgr::GetPlayerGUIDByName(std::string name) const
|
||||
return guid;
|
||||
}
|
||||
|
||||
bool ObjectMgr::GetPlayerNameByGUID(const uint64 &guid, std::string &name) const
|
||||
bool ObjectMgr::GetPlayerNameByGUID(const uint64 guid, std::string &name) const
|
||||
{
|
||||
// prevent DB access for online player
|
||||
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
||||
@@ -2032,7 +2032,7 @@ bool ObjectMgr::GetPlayerNameByGUID(const uint64 &guid, std::string &name) const
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::GetPlayerTeamByGUID(const uint64 &guid) const
|
||||
uint32 ObjectMgr::GetPlayerTeamByGUID(const uint64 guid) const
|
||||
{
|
||||
// prevent DB access for online player
|
||||
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
||||
@@ -2051,7 +2051,7 @@ uint32 ObjectMgr::GetPlayerTeamByGUID(const uint64 &guid) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::GetPlayerAccountIdByGUID(const uint64 &guid) const
|
||||
uint32 ObjectMgr::GetPlayerAccountIdByGUID(const uint64 guid) const
|
||||
{
|
||||
// prevent DB access for online player
|
||||
if (Player* player = ObjectAccessor::FindPlayer(guid))
|
||||
|
||||
@@ -667,9 +667,9 @@ class ObjectMgr
|
||||
void GetPlayerLevelInfo(uint32 race, uint32 class_, uint8 level, PlayerLevelInfo* info) const;
|
||||
|
||||
uint64 GetPlayerGUIDByName(std::string name) const;
|
||||
bool GetPlayerNameByGUID(const uint64 &guid, std::string &name) const;
|
||||
uint32 GetPlayerTeamByGUID(const uint64 &guid) const;
|
||||
uint32 GetPlayerAccountIdByGUID(const uint64 &guid) const;
|
||||
bool GetPlayerNameByGUID(const uint64 guid, std::string &name) const;
|
||||
uint32 GetPlayerTeamByGUID(const uint64 guid) const;
|
||||
uint32 GetPlayerAccountIdByGUID(const uint64 guid) const;
|
||||
uint32 GetPlayerAccountIdByPlayerName(const std::string& name) const;
|
||||
|
||||
uint32 GetNearestTaxiNode(float x, float y, float z, uint32 mapid, uint32 team);
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
#include "Log.h"
|
||||
|
||||
void
|
||||
InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32 &/*x*/, const uint32 &/*y*/, const uint32 &) const
|
||||
InvalidState::Update(Map &, NGridType &, GridInfo &, const uint32 /*x*/, const uint32 /*y*/, const uint32) const
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 &x, const uint32 &y, const uint32 &t_diff) const
|
||||
ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 x, const uint32 y, const uint32 t_diff) const
|
||||
{
|
||||
// Only check grid activity every (grid_expiry/10) ms, because it's really useless to do it every cycle
|
||||
info.UpdateTimeTracker(t_diff);
|
||||
@@ -48,7 +48,7 @@ ActiveState::Update(Map &m, NGridType &grid, GridInfo & info, const uint32 &x, c
|
||||
}
|
||||
|
||||
void
|
||||
IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &) const
|
||||
IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 x, const uint32 y, const uint32) const
|
||||
{
|
||||
m.ResetGridExpiry(grid);
|
||||
grid.SetGridState(GRID_STATE_REMOVAL);
|
||||
@@ -56,7 +56,7 @@ IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 &x, const ui
|
||||
}
|
||||
|
||||
void
|
||||
RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 &x, const uint32 &y, const uint32 &t_diff) const
|
||||
RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 x, const uint32 y, const uint32 t_diff) const
|
||||
{
|
||||
if (!info.getUnloadLock())
|
||||
{
|
||||
|
||||
@@ -40,35 +40,35 @@ class GridState
|
||||
void setMagic() { i_Magic = MAGIC_TESTVAL; }
|
||||
unsigned int i_Magic;
|
||||
#endif
|
||||
virtual void Update(Map &, NGridType&, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &t_diff) const = 0;
|
||||
virtual void Update(Map &, NGridType&, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const = 0;
|
||||
};
|
||||
|
||||
class InvalidState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &t_diff) const;
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
|
||||
};
|
||||
|
||||
class ActiveState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &t_diff) const;
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
|
||||
};
|
||||
|
||||
class IdleState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &t_diff) const;
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
|
||||
};
|
||||
|
||||
class RemovalState : public GridState
|
||||
{
|
||||
public:
|
||||
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 &x, const uint32 &y, const uint32 &t_diff) const;
|
||||
void Update(Map &, NGridType &, GridInfo &, const uint32 x, const uint32 y, const uint32 t_diff) const;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ class NGrid
|
||||
return i_cells[x][y];
|
||||
}
|
||||
|
||||
const uint32& GetGridId(void) const { return i_gridId; }
|
||||
const uint32 GetGridId(void) const { return i_gridId; }
|
||||
void SetGridId(const uint32 id) const { i_gridId = id; }
|
||||
grid_state_t GetGridState(void) const { return i_cellstate; }
|
||||
void SetGridState(grid_state_t s) { i_cellstate = s; }
|
||||
@@ -140,7 +140,7 @@ class NGrid
|
||||
getGridType(x, y).Visit(visitor);
|
||||
}
|
||||
|
||||
template<class T, class TT> void Visit(const uint32 &x, const uint32 &y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
|
||||
template<class T, class TT> void Visit(const uint32 x, const uint32 y, TypeContainerVisitor<T, TypeMapContainer<TT> > &visitor)
|
||||
{
|
||||
getGridType(x, y).Visit(visitor);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ class NGrid
|
||||
|
||||
private:
|
||||
|
||||
GridType& getGridType(const uint32& x, const uint32& y)
|
||||
GridType& getGridType(const uint32 x, const uint32 y)
|
||||
{
|
||||
ASSERT(x < N);
|
||||
ASSERT(y < N);
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace Trinity
|
||||
struct ObjectUpdater
|
||||
{
|
||||
uint32 i_timeDiff;
|
||||
explicit ObjectUpdater(const uint32 &diff) : i_timeDiff(diff) {}
|
||||
explicit ObjectUpdater(const uint32 diff) : i_timeDiff(diff) {}
|
||||
template<class T> void Visit(GridRefManager<T> &m);
|
||||
void Visit(PlayerMapType &) {}
|
||||
void Visit(CorpseMapType &) {}
|
||||
|
||||
@@ -270,7 +270,7 @@ void Group::RemoveAllInvites()
|
||||
m_invitees.clear();
|
||||
}
|
||||
|
||||
Player* Group::GetInvited(const uint64& guid) const
|
||||
Player* Group::GetInvited(const uint64 guid) const
|
||||
{
|
||||
for (InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
|
||||
{
|
||||
@@ -387,7 +387,7 @@ bool Group::AddMember(Player* player)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Group::RemoveMember(const uint64 &guid, const RemoveMethod &method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
|
||||
bool Group::RemoveMember(const uint64 guid, const RemoveMethod &method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
|
||||
{
|
||||
BroadcastGroupUpdate();
|
||||
|
||||
@@ -498,7 +498,7 @@ bool Group::RemoveMember(const uint64 &guid, const RemoveMethod &method /*= GROU
|
||||
}
|
||||
}
|
||||
|
||||
void Group::ChangeLeader(const uint64 &guid)
|
||||
void Group::ChangeLeader(const uint64 guid)
|
||||
{
|
||||
member_witerator slot = _getMemberWSlot(guid);
|
||||
|
||||
@@ -652,7 +652,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r)
|
||||
}
|
||||
}
|
||||
|
||||
void Group::SendLootRoll(const uint64& SourceGuid, const uint64& TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
|
||||
void Group::SendLootRoll(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
|
||||
{
|
||||
WorldPacket data(SMSG_LOOT_ROLL, (8+4+8+4+4+4+1+1+1));
|
||||
data << uint64(SourceGuid); // guid of the item rolled
|
||||
@@ -676,7 +676,7 @@ void Group::SendLootRoll(const uint64& SourceGuid, const uint64& TargetGuid, uin
|
||||
}
|
||||
}
|
||||
|
||||
void Group::SendLootRollWon(const uint64& SourceGuid, const uint64& TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
|
||||
void Group::SendLootRollWon(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
|
||||
{
|
||||
WorldPacket data(SMSG_LOOT_ROLL_WON, (8+4+4+4+4+8+1+1));
|
||||
data << uint64(SourceGuid); // guid of the item rolled
|
||||
@@ -949,7 +949,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
|
||||
}
|
||||
}
|
||||
|
||||
void Group::CountRollVote(const uint64& playerGUID, const uint64& Guid, uint32 NumberOfPlayers, uint8 Choice)
|
||||
void Group::CountRollVote(const uint64 playerGUID, const uint64 Guid, uint32 NumberOfPlayers, uint8 Choice)
|
||||
{
|
||||
Rolls::iterator rollI = GetRoll(Guid);
|
||||
if (rollI == RollId.end())
|
||||
@@ -1295,7 +1295,7 @@ void Group::OfflineReadyCheck()
|
||||
}
|
||||
}
|
||||
|
||||
bool Group::_setMembersGroup(const uint64 &guid, const uint8 &group)
|
||||
bool Group::_setMembersGroup(const uint64 guid, uint8 group)
|
||||
{
|
||||
member_witerator slot = _getMemberWSlot(guid);
|
||||
if (slot == m_memberSlots.end())
|
||||
@@ -1322,7 +1322,7 @@ bool Group::SameSubGroup(Player const* member1, Player const* member2) const
|
||||
}
|
||||
|
||||
// Allows setting sub groups both for online or offline members
|
||||
void Group::ChangeMembersGroup(const uint64 &guid, const uint8 &group)
|
||||
void Group::ChangeMembersGroup(const uint64 guid, uint8 group)
|
||||
{
|
||||
// Only raid groups have sub groups
|
||||
if (!isRaidGroup())
|
||||
@@ -1767,7 +1767,7 @@ void Group::SetLootMethod(LootMethod method)
|
||||
m_lootMethod = method;
|
||||
}
|
||||
|
||||
void Group::SetLooterGuid(const uint64 &guid)
|
||||
void Group::SetLooterGuid(const uint64 guid)
|
||||
{
|
||||
m_looterGuid = guid;
|
||||
}
|
||||
@@ -1777,7 +1777,7 @@ void Group::SetLootThreshold(ItemQualities threshold)
|
||||
m_lootThreshold = threshold;
|
||||
}
|
||||
|
||||
void Group::SetLfgRoles(uint64& guid, const uint8 roles)
|
||||
void Group::SetLfgRoles(uint64 guid, const uint8 roles)
|
||||
{
|
||||
member_witerator slot = _getMemberWSlot(guid);
|
||||
if (slot == m_memberSlots.end())
|
||||
@@ -1812,12 +1812,12 @@ bool Group::IsCreated() const
|
||||
return GetMembersCount() > 0;
|
||||
}
|
||||
|
||||
const uint64& Group::GetLeaderGUID() const
|
||||
const uint64 Group::GetLeaderGUID() const
|
||||
{
|
||||
return m_leaderGuid;
|
||||
}
|
||||
|
||||
const uint64& Group::GetGUID() const
|
||||
const uint64 Group::GetGUID() const
|
||||
{
|
||||
return m_guid;
|
||||
}
|
||||
@@ -1837,7 +1837,7 @@ LootMethod Group::GetLootMethod() const
|
||||
return m_lootMethod;
|
||||
}
|
||||
|
||||
const uint64& Group::GetLooterGuid() const
|
||||
const uint64 Group::GetLooterGuid() const
|
||||
{
|
||||
return m_looterGuid;
|
||||
}
|
||||
@@ -1847,12 +1847,12 @@ ItemQualities Group::GetLootThreshold() const
|
||||
return m_lootThreshold;
|
||||
}
|
||||
|
||||
bool Group::IsMember(const uint64& guid) const
|
||||
bool Group::IsMember(const uint64 guid) const
|
||||
{
|
||||
return _getMemberCSlot(guid) != m_memberSlots.end();
|
||||
}
|
||||
|
||||
bool Group::IsLeader(const uint64& guid) const
|
||||
bool Group::IsLeader(const uint64 guid) const
|
||||
{
|
||||
return (GetLeaderGUID() == guid);
|
||||
}
|
||||
@@ -1873,7 +1873,7 @@ bool Group::IsAssistant(uint64 guid) const
|
||||
return mslot->flags & MEMBER_FLAG_ASSISTANT;
|
||||
}
|
||||
|
||||
bool Group::SameSubGroup(uint64 guid1, const uint64& guid2) const
|
||||
bool Group::SameSubGroup(uint64 guid1, const uint64 guid2) const
|
||||
{
|
||||
member_citerator mslot2 = _getMemberCSlot(guid2);
|
||||
if (mslot2 == m_memberSlots.end())
|
||||
@@ -1922,7 +1922,7 @@ void Group::SetBattlegroundGroup(Battleground *bg)
|
||||
m_bgGroup = bg;
|
||||
}
|
||||
|
||||
void Group::SetGroupMemberFlag(uint64 guid, const bool &apply, GroupMemberFlags flag)
|
||||
void Group::SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag)
|
||||
{
|
||||
// Assistants, main assistants and main tanks are only available in raid groups
|
||||
if (!isRaidGroup())
|
||||
|
||||
@@ -191,14 +191,14 @@ class Group
|
||||
void RemoveAllInvites();
|
||||
bool AddLeaderInvite(Player* player);
|
||||
bool AddMember(Player* player);
|
||||
bool RemoveMember(const uint64 &guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL);
|
||||
void ChangeLeader(const uint64 &guid);
|
||||
bool RemoveMember(const uint64 guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL);
|
||||
void ChangeLeader(const uint64 guid);
|
||||
void SetLootMethod(LootMethod method);
|
||||
void SetLooterGuid(const uint64 &guid);
|
||||
void SetLooterGuid(const uint64 guid);
|
||||
void UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed = false);
|
||||
void SetLootThreshold(ItemQualities threshold);
|
||||
void Disband(bool hideDestroy=false);
|
||||
void SetLfgRoles(uint64& guid, const uint8 roles);
|
||||
void SetLfgRoles(uint64 guid, const uint8 roles);
|
||||
|
||||
// properties accessories
|
||||
bool IsFull() const;
|
||||
@@ -206,26 +206,26 @@ class Group
|
||||
bool isRaidGroup() const;
|
||||
bool isBGGroup() const;
|
||||
bool IsCreated() const;
|
||||
const uint64& GetLeaderGUID() const;
|
||||
const uint64& GetGUID() const;
|
||||
const uint64 GetLeaderGUID() const;
|
||||
const uint64 GetGUID() const;
|
||||
uint32 GetLowGUID() const;
|
||||
const char * GetLeaderName() const;
|
||||
LootMethod GetLootMethod() const;
|
||||
const uint64& GetLooterGuid() const;
|
||||
const uint64 GetLooterGuid() const;
|
||||
ItemQualities GetLootThreshold() const;
|
||||
|
||||
uint32 GetDbStoreId() { return m_dbStoreId; };
|
||||
|
||||
// member manipulation methods
|
||||
bool IsMember(const uint64& guid) const;
|
||||
bool IsLeader(const uint64& guid) const;
|
||||
bool IsMember(const uint64 guid) const;
|
||||
bool IsLeader(const uint64 guid) const;
|
||||
uint64 GetMemberGUID(const std::string& name);
|
||||
bool IsAssistant(uint64 guid) const;
|
||||
|
||||
Player* GetInvited(const uint64& guid) const;
|
||||
Player* GetInvited(const uint64 guid) const;
|
||||
Player* GetInvited(const std::string& name) const;
|
||||
|
||||
bool SameSubGroup(uint64 guid1, const uint64& guid2) const;
|
||||
bool SameSubGroup(uint64 guid1, const uint64 guid2) const;
|
||||
bool SameSubGroup(uint64 guid1, MemberSlot const* slot2) const;
|
||||
bool SameSubGroup(Player const* member1, Player const* member2) const;
|
||||
bool HasFreeSlotSubGroup(uint8 subgroup) const;
|
||||
@@ -241,10 +241,10 @@ class Group
|
||||
void SetBattlegroundGroup(Battleground *bg);
|
||||
GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot);
|
||||
|
||||
void ChangeMembersGroup(const uint64 &guid, const uint8 &group);
|
||||
void ChangeMembersGroup(Player* player, const uint8 &group);
|
||||
void ChangeMembersGroup(const uint64 guid, uint8 group);
|
||||
void ChangeMembersGroup(Player* player, uint8 group);
|
||||
void SetTargetIcon(uint8 id, uint64 whoGuid, uint64 targetGuid);
|
||||
void SetGroupMemberFlag(uint64 guid, const bool &apply, GroupMemberFlags flag);
|
||||
void SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag);
|
||||
void RemoveUniqueGroupMemberFlag(GroupMemberFlags flag);
|
||||
|
||||
Difficulty GetDifficulty(bool isRaid) const;
|
||||
@@ -272,8 +272,8 @@ class Group
|
||||
|
||||
bool isRollLootActive() const;
|
||||
void SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r);
|
||||
void SendLootRoll(const uint64& SourceGuid, const uint64& TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
|
||||
void SendLootRollWon(const uint64& SourceGuid, const uint64& TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
|
||||
void SendLootRoll(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
|
||||
void SendLootRollWon(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
|
||||
void SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r);
|
||||
void SendLooter(Creature *pCreature, Player *pLooter);
|
||||
void GroupLoot(Loot *loot, WorldObject* pLootedObject);
|
||||
@@ -281,7 +281,7 @@ class Group
|
||||
void MasterLoot(Loot *loot, WorldObject* pLootedObject);
|
||||
Rolls::iterator GetRoll(uint64 Guid);
|
||||
void CountTheRoll(Rolls::iterator roll, uint32 NumberOfPlayers);
|
||||
void CountRollVote(const uint64& playerGUID, const uint64& Guid, uint32 NumberOfPlayers, uint8 Choise);
|
||||
void CountRollVote(const uint64 playerGUID, const uint64 Guid, uint32 NumberOfPlayers, uint8 Choise);
|
||||
void EndRoll(Loot *loot);
|
||||
|
||||
// related to disenchant rolls
|
||||
@@ -301,7 +301,7 @@ class Group
|
||||
void BroadcastGroupUpdate(void);
|
||||
|
||||
protected:
|
||||
bool _setMembersGroup(const uint64 &guid, const uint8 &group);
|
||||
bool _setMembersGroup(const uint64 guid, uint8 group);
|
||||
void _homebindIfInstance(Player* player);
|
||||
|
||||
void _initRaidSubGroupsCounter();
|
||||
|
||||
@@ -1508,7 +1508,7 @@ void Guild::HandleRemoveMember(WorldSession* session, const std::string& name)
|
||||
SendCommandResult(session, GUILD_QUIT_S, ERR_GUILD_RANK_TOO_HIGH_S, name);
|
||||
else
|
||||
{
|
||||
const uint64& guid = pMember->GetGUID();
|
||||
const uint64 guid = pMember->GetGUID();
|
||||
// After call to DeleteMember pointer to member becomes invalid
|
||||
DeleteMember(guid, false, true);
|
||||
_LogEvent(GUILD_EVENT_LOG_UNINVITE_PLAYER, player->GetGUIDLow(), GUID_LOPART(guid));
|
||||
@@ -1790,7 +1790,7 @@ void Guild::SendBankTabText(WorldSession *session, uint8 tabId) const
|
||||
|
||||
void Guild::SendPermissions(WorldSession *session) const
|
||||
{
|
||||
const uint64& guid = session->GetPlayer()->GetGUID();
|
||||
const uint64 guid = session->GetPlayer()->GetGUID();
|
||||
uint8 rankId = session->GetPlayer()->GetRank();
|
||||
|
||||
WorldPacket data(MSG_GUILD_PERMISSIONS, 4 * 15 + 1);
|
||||
@@ -2063,7 +2063,7 @@ void Guild::BroadcastPacket(WorldPacket* packet) const
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Members handling
|
||||
bool Guild::AddMember(const uint64& guid, uint8 rankId)
|
||||
bool Guild::AddMember(const uint64 guid, uint8 rankId)
|
||||
{
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
// Player cannot be in guild
|
||||
@@ -2132,7 +2132,7 @@ bool Guild::AddMember(const uint64& guid, uint8 rankId)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Guild::DeleteMember(const uint64& guid, bool isDisbanding, bool isKicked)
|
||||
void Guild::DeleteMember(const uint64 guid, bool isDisbanding, bool isKicked)
|
||||
{
|
||||
uint32 lowguid = GUID_LOPART(guid);
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
@@ -2188,7 +2188,7 @@ void Guild::DeleteMember(const uint64& guid, bool isDisbanding, bool isKicked)
|
||||
_UpdateAccountsNumber();
|
||||
}
|
||||
|
||||
bool Guild::ChangeMemberRank(const uint64& guid, uint8 newRank)
|
||||
bool Guild::ChangeMemberRank(const uint64 guid, uint8 newRank)
|
||||
{
|
||||
if (newRank <= _GetLowestRankId()) // Validate rank (allow only existing ranks)
|
||||
if (Member* pMember = GetMember(guid))
|
||||
@@ -2352,7 +2352,7 @@ void Guild::_DeleteBankItems(SQLTransaction& trans, bool removeItemsFromDB)
|
||||
m_bankTabs.clear();
|
||||
}
|
||||
|
||||
bool Guild::_ModifyBankMoney(SQLTransaction& trans, const uint64& amount, bool add)
|
||||
bool Guild::_ModifyBankMoney(SQLTransaction& trans, const uint64 amount, bool add)
|
||||
{
|
||||
if (add)
|
||||
m_bankMoney += amount;
|
||||
@@ -2448,21 +2448,21 @@ inline uint8 Guild::_GetRankBankTabRights(uint8 rankId, uint8 tabId) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline uint32 Guild::_GetMemberRemainingSlots(const uint64& guid, uint8 tabId) const
|
||||
inline uint32 Guild::_GetMemberRemainingSlots(const uint64 guid, uint8 tabId) const
|
||||
{
|
||||
if (const Member* pMember = GetMember(guid))
|
||||
return pMember->GetBankRemainingValue(tabId, this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline uint32 Guild::_GetMemberRemainingMoney(const uint64& guid) const
|
||||
inline uint32 Guild::_GetMemberRemainingMoney(const uint64 guid) const
|
||||
{
|
||||
if (const Member* pMember = GetMember(guid))
|
||||
return pMember->GetBankRemainingValue(GUILD_BANK_MAX_TABS, this);
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline void Guild::_DecreaseMemberRemainingSlots(SQLTransaction& trans, const uint64& guid, uint8 tabId)
|
||||
inline void Guild::_DecreaseMemberRemainingSlots(SQLTransaction& trans, const uint64 guid, uint8 tabId)
|
||||
{
|
||||
// Remaining slots must be more then 0
|
||||
if (uint32 remainingSlots = _GetMemberRemainingSlots(guid, tabId))
|
||||
@@ -2472,7 +2472,7 @@ inline void Guild::_DecreaseMemberRemainingSlots(SQLTransaction& trans, const ui
|
||||
pMember->DecreaseBankRemainingValue(trans, tabId, 1);
|
||||
}
|
||||
|
||||
inline bool Guild::_MemberHasTabRights(const uint64& guid, uint8 tabId, uint32 rights) const
|
||||
inline bool Guild::_MemberHasTabRights(const uint64 guid, uint8 tabId, uint32 rights) const
|
||||
{
|
||||
if (const Member* pMember = GetMember(guid))
|
||||
{
|
||||
@@ -2632,7 +2632,7 @@ bool Guild::_DoItemsMove(MoveItemData* pSrc, MoveItemData* pDest, bool sendError
|
||||
|
||||
void Guild::_SendBankContent(WorldSession *session, uint8 tabId) const
|
||||
{
|
||||
const uint64& guid = session->GetPlayer()->GetGUID();
|
||||
const uint64 guid = session->GetPlayer()->GetGUID();
|
||||
if (_MemberHasTabRights(guid, tabId, GUILD_BANK_RIGHT_VIEW_TAB))
|
||||
if (const BankTab* pTab = GetBankTab(tabId))
|
||||
{
|
||||
@@ -2726,7 +2726,7 @@ void Guild::_SendBankContentUpdate(uint8 tabId, SlotIds slots) const
|
||||
}
|
||||
}
|
||||
|
||||
void Guild::_BroadcastEvent(GuildEvents guildEvent, const uint64& guid, const char* param1, const char* param2, const char* param3) const
|
||||
void Guild::_BroadcastEvent(GuildEvents guildEvent, const uint64 guid, const char* param1, const char* param2, const char* param3) const
|
||||
{
|
||||
uint8 count = !param3 ? (!param2 ? (!param1 ? 0 : 1) : 2) : 3;
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
};
|
||||
|
||||
public:
|
||||
Member(uint32 guildId, const uint64& guid, uint8 rankId) : m_guildId(guildId), m_guid(guid), m_logoutTime(::time(NULL)), m_rankId(rankId) { }
|
||||
Member(uint32 guildId, const uint64 guid, uint8 rankId) : m_guildId(guildId), m_guid(guid), m_logoutTime(::time(NULL)), m_rankId(rankId) { }
|
||||
|
||||
void SetStats(Player* player);
|
||||
void SetStats(const std::string& name, uint8 level, uint8 _class, uint32 zoneId, uint32 accountId);
|
||||
@@ -270,7 +270,7 @@ private:
|
||||
void SaveToDB(SQLTransaction& trans) const;
|
||||
void WritePacket(WorldPacket& data) const;
|
||||
|
||||
const uint64& GetGUID() const { return m_guid; }
|
||||
const uint64 GetGUID() const { return m_guid; }
|
||||
std::string GetName() const { return m_name; }
|
||||
uint32 GetAccountId() const { return m_accountId; }
|
||||
uint8 GetRankId() const { return m_rankId; }
|
||||
@@ -280,7 +280,7 @@ private:
|
||||
inline void UpdateLogoutTime() { m_logoutTime = ::time(NULL); }
|
||||
inline bool IsRank(uint8 rankId) const { return m_rankId == rankId; }
|
||||
inline bool IsRankNotLower(uint8 rankId) const { return m_rankId <= rankId; }
|
||||
inline bool IsSamePlayer(const uint64& guid) const { return m_guid == guid; }
|
||||
inline bool IsSamePlayer(const uint64 guid) const { return m_guid == guid; }
|
||||
|
||||
void DecreaseBankRemainingValue(SQLTransaction& trans, uint8 tabId, uint32 amount);
|
||||
uint32 GetBankRemainingValue(uint8 tabId, const Guild* guild) const;
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
|
||||
// Getters
|
||||
uint32 GetId() const { return m_id; }
|
||||
const uint64& GetLeaderGUID() const { return m_leaderGuid; }
|
||||
const uint64 GetLeaderGUID() const { return m_leaderGuid; }
|
||||
const std::string& GetName() const { return m_name; }
|
||||
const std::string& GetMOTD() const { return m_motd; }
|
||||
const std::string& GetInfo() const { return m_info; }
|
||||
@@ -656,9 +656,9 @@ public:
|
||||
|
||||
// Members
|
||||
// Adds member to guild. If rankId == GUILD_RANK_NONE, lowest rank is assigned.
|
||||
bool AddMember(const uint64& guid, uint8 rankId = GUILD_RANK_NONE);
|
||||
void DeleteMember(const uint64& guid, bool isDisbanding = false, bool isKicked = false);
|
||||
bool ChangeMemberRank(const uint64& guid, uint8 newRank);
|
||||
bool AddMember(const uint64 guid, uint8 rankId = GUILD_RANK_NONE);
|
||||
void DeleteMember(const uint64 guid, bool isDisbanding = false, bool isKicked = false);
|
||||
bool ChangeMemberRank(const uint64 guid, uint8 newRank);
|
||||
|
||||
// Bank
|
||||
void SwapItems(Player* player, uint8 tabId, uint8 slotId, uint8 destTabId, uint8 destSlotId, uint32 splitedAmount);
|
||||
@@ -698,12 +698,12 @@ private:
|
||||
inline BankTab* GetBankTab(uint8 tabId) { return tabId < m_bankTabs.size() ? m_bankTabs[tabId] : NULL; }
|
||||
inline const BankTab* GetBankTab(uint8 tabId) const { return tabId < m_bankTabs.size() ? m_bankTabs[tabId] : NULL; }
|
||||
|
||||
inline const Member* GetMember(const uint64& guid) const
|
||||
inline const Member* GetMember(const uint64 guid) const
|
||||
{
|
||||
Members::const_iterator itr = m_members.find(GUID_LOPART(guid));
|
||||
return itr != m_members.end() ? itr->second : NULL;
|
||||
}
|
||||
inline Member* GetMember(const uint64& guid)
|
||||
inline Member* GetMember(const uint64 guid)
|
||||
{
|
||||
Members::iterator itr = m_members.find(GUID_LOPART(guid));
|
||||
return itr != m_members.end() ? itr->second : NULL;
|
||||
@@ -736,7 +736,7 @@ private:
|
||||
void _UpdateAccountsNumber();
|
||||
bool _IsLeader(Player* player) const;
|
||||
void _DeleteBankItems(SQLTransaction& trans, bool removeItemsFromDB = false);
|
||||
bool _ModifyBankMoney(SQLTransaction& trans, const uint64& amount, bool add);
|
||||
bool _ModifyBankMoney(SQLTransaction& trans, const uint64 amount, bool add);
|
||||
void _SetLeaderGUID(Member* pLeader);
|
||||
|
||||
void _SetRankBankMoneyPerDay(uint8 rankId, uint32 moneyPerDay);
|
||||
@@ -747,10 +747,10 @@ private:
|
||||
uint32 _GetRankBankTabSlotsPerDay(uint8 rankId, uint8 tabId) const;
|
||||
std::string _GetRankName(uint8 rankId) const;
|
||||
|
||||
uint32 _GetMemberRemainingSlots(const uint64& guid, uint8 tabId) const;
|
||||
uint32 _GetMemberRemainingMoney(const uint64& guid) const;
|
||||
void _DecreaseMemberRemainingSlots(SQLTransaction& trans, const uint64& guid, uint8 tabId);
|
||||
bool _MemberHasTabRights(const uint64& guid, uint8 tabId, uint32 rights) const;
|
||||
uint32 _GetMemberRemainingSlots(const uint64 guid, uint8 tabId) const;
|
||||
uint32 _GetMemberRemainingMoney(const uint64 guid) const;
|
||||
void _DecreaseMemberRemainingSlots(SQLTransaction& trans, const uint64 guid, uint8 tabId);
|
||||
bool _MemberHasTabRights(const uint64 guid, uint8 tabId, uint32 rights) const;
|
||||
|
||||
void _LogEvent(GuildEventLogTypes eventType, uint32 playerGuid1, uint32 playerGuid2 = 0, uint8 newRank = 0);
|
||||
void _LogBankEvent(SQLTransaction& trans, GuildBankEventLogTypes eventType, uint8 tabId, uint32 playerGuid, uint32 itemOrMoney, uint16 itemStackCount = 0, uint8 destTabId = 0);
|
||||
@@ -765,6 +765,6 @@ private:
|
||||
void _SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const;
|
||||
void _SendBankContentUpdate(uint8 tabId, SlotIds slots) const;
|
||||
|
||||
void _BroadcastEvent(GuildEvents guildEvent, const uint64& guid, const char* param1 = NULL, const char* param2 = NULL, const char* param3 = NULL) const;
|
||||
void _BroadcastEvent(GuildEvents guildEvent, const uint64 guid, const char* param1 = NULL, const char* param2 = NULL, const char* param3 = NULL) const;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -81,7 +81,7 @@ std::string GuildMgr::GetGuildNameById(uint32 guildId) const
|
||||
return "";
|
||||
}
|
||||
|
||||
Guild* GuildMgr::GetGuildByLeader(const uint64 &guid) const
|
||||
Guild* GuildMgr::GetGuildByLeader(const uint64 guid) const
|
||||
{
|
||||
for (GuildContainer::const_iterator itr = GuildStore.begin(); itr != GuildStore.end(); ++itr)
|
||||
if (itr->second->GetLeaderGUID() == guid)
|
||||
|
||||
@@ -515,7 +515,7 @@ void Map::VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::Obj
|
||||
}
|
||||
}
|
||||
|
||||
void Map::Update(const uint32 &t_diff)
|
||||
void Map::Update(const uint32 t_diff)
|
||||
{
|
||||
/// update worldsessions for existing players
|
||||
for (m_mapRefIter = m_mapRefManager.begin(); m_mapRefIter != m_mapRefManager.end(); ++m_mapRefIter)
|
||||
@@ -593,7 +593,7 @@ struct ResetNotifier
|
||||
void Visit(PlayerMapType &m) { resetNotify<Player>(m);}
|
||||
};
|
||||
|
||||
void Map::ProcessRelocationNotifies(const uint32 & diff)
|
||||
void Map::ProcessRelocationNotifies(const uint32 diff)
|
||||
{
|
||||
for (GridRefManager<NGridType>::iterator i = GridRefManager<NGridType>::begin(); i != GridRefManager<NGridType>::end(); ++i)
|
||||
{
|
||||
@@ -929,7 +929,7 @@ bool Map::CreatureRespawnRelocation(Creature *c)
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll)
|
||||
bool Map::UnloadGrid(const uint32 x, const uint32 y, bool unloadAll)
|
||||
{
|
||||
NGridType *grid = getNGrid(x, y);
|
||||
ASSERT(grid != NULL);
|
||||
@@ -2388,7 +2388,7 @@ bool InstanceMap::Add(Player* player)
|
||||
return true;
|
||||
}
|
||||
|
||||
void InstanceMap::Update(const uint32& t_diff)
|
||||
void InstanceMap::Update(const uint32 t_diff)
|
||||
{
|
||||
Map::Update(t_diff);
|
||||
|
||||
|
||||
@@ -260,7 +260,7 @@ class Map : public GridRefManager<NGridType>
|
||||
template<class T> void Remove(T *, bool);
|
||||
|
||||
void VisitNearbyCellsOf(WorldObject* obj, TypeContainerVisitor<Trinity::ObjectUpdater, GridTypeMapContainer> &gridVisitor, TypeContainerVisitor<Trinity::ObjectUpdater, WorldTypeMapContainer> &worldVisitor);
|
||||
virtual void Update(const uint32&);
|
||||
virtual void Update(const uint32);
|
||||
|
||||
float GetVisibilityRange() const { return m_VisibleDistance; }
|
||||
//function for setting up visibility distance for maps on per-type/per-Id basis
|
||||
@@ -286,7 +286,7 @@ class Map : public GridRefManager<NGridType>
|
||||
bool GetUnloadLock(const GridPair &p) const { return getNGrid(p.x_coord, p.y_coord)->getUnloadLock(); }
|
||||
void SetUnloadLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadExplicitLock(on); }
|
||||
void LoadGrid(float x, float y);
|
||||
bool UnloadGrid(const uint32 &x, const uint32 &y, bool pForce);
|
||||
bool UnloadGrid(const uint32 x, const uint32 y, bool pForce);
|
||||
virtual void UnloadAll();
|
||||
|
||||
void ResetGridExpiry(NGridType &grid, float factor = 1) const
|
||||
@@ -473,7 +473,7 @@ class Map : public GridRefManager<NGridType>
|
||||
void setNGrid(NGridType* grid, uint32 x, uint32 y);
|
||||
void ScriptsProcess();
|
||||
|
||||
void UpdateActiveCells(const float &x, const float &y, const uint32 &t_diff);
|
||||
void UpdateActiveCells(const float &x, const float &y, const uint32 t_diff);
|
||||
protected:
|
||||
void SetUnloadReferenceLock(const GridPair &p, bool on) { getNGrid(p.x_coord, p.y_coord)->setUnloadReferenceLock(on); }
|
||||
|
||||
@@ -516,7 +516,7 @@ class Map : public GridRefManager<NGridType>
|
||||
|
||||
//these functions used to process player/mob aggro reactions and
|
||||
//visibility calculations. Highly optimized for massive calculations
|
||||
void ProcessRelocationNotifies(const uint32 &diff);
|
||||
void ProcessRelocationNotifies(const uint32 diff);
|
||||
|
||||
bool i_scriptLock;
|
||||
std::set<WorldObject *> i_objectsToRemove;
|
||||
@@ -577,7 +577,7 @@ class InstanceMap : public Map
|
||||
~InstanceMap();
|
||||
bool Add(Player *);
|
||||
void Remove(Player *, bool);
|
||||
void Update(const uint32&);
|
||||
void Update(const uint32);
|
||||
void CreateInstanceData(bool load);
|
||||
bool Reset(uint8 method);
|
||||
uint32 GetScriptId() { return i_script_id; }
|
||||
|
||||
@@ -44,7 +44,7 @@ void MapInstanced::InitVisibilityDistance()
|
||||
}
|
||||
}
|
||||
|
||||
void MapInstanced::Update(const uint32& t)
|
||||
void MapInstanced::Update(const uint32 t)
|
||||
{
|
||||
// take care of loaded GridMaps (when unused, unload it!)
|
||||
Map::Update(t);
|
||||
|
||||
@@ -33,7 +33,7 @@ class MapInstanced : public Map
|
||||
~MapInstanced() {}
|
||||
|
||||
// functions overwrite Map versions
|
||||
void Update(const uint32&);
|
||||
void Update(const uint32);
|
||||
void DelayedUpdate(const uint32 diff);
|
||||
//void RelocationNotify();
|
||||
void UnloadAll();
|
||||
|
||||
@@ -38,7 +38,7 @@ class MovementGenerator
|
||||
|
||||
virtual void Reset(Unit &) = 0;
|
||||
|
||||
virtual bool Update(Unit &, const uint32 &time_diff) = 0;
|
||||
virtual bool Update(Unit &, const uint32 time_diff) = 0;
|
||||
|
||||
virtual MovementGeneratorType GetMovementGeneratorType() = 0;
|
||||
|
||||
@@ -66,7 +66,7 @@ class MovementGeneratorMedium : public MovementGenerator
|
||||
//u->AssertIsType<T>();
|
||||
(static_cast<D*>(this))->Reset(*((T*)&u));
|
||||
}
|
||||
bool Update(Unit &u, const uint32 &time_diff)
|
||||
bool Update(Unit &u, const uint32 time_diff)
|
||||
{
|
||||
//u->AssertIsType<T>();
|
||||
return (static_cast<D*>(this))->Update(*((T*)&u), time_diff);
|
||||
@@ -76,7 +76,7 @@ class MovementGeneratorMedium : public MovementGenerator
|
||||
void Initialize(T &u);
|
||||
void Finalize(T &u);
|
||||
void Reset(T &u);
|
||||
bool Update(T &u, const uint32 &time_diff);
|
||||
bool Update(T &u, const uint32 time_diff);
|
||||
};
|
||||
|
||||
struct SelectableMovement : public FactoryHolder<MovementGenerator, MovementGeneratorType>
|
||||
|
||||
@@ -121,7 +121,7 @@ ConfusedMovementGenerator<T>::Reset(T &unit)
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
ConfusedMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
ConfusedMovementGenerator<T>::Update(T &unit, const uint32 diff)
|
||||
{
|
||||
if (!&unit)
|
||||
return true;
|
||||
@@ -179,6 +179,6 @@ template void ConfusedMovementGenerator<Player>::Finalize(Player &player);
|
||||
template void ConfusedMovementGenerator<Creature>::Finalize(Creature &creature);
|
||||
template void ConfusedMovementGenerator<Player>::Reset(Player &player);
|
||||
template void ConfusedMovementGenerator<Creature>::Reset(Creature &creature);
|
||||
template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 &diff);
|
||||
template bool ConfusedMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff);
|
||||
template bool ConfusedMovementGenerator<Player>::Update(Player &player, const uint32 diff);
|
||||
template bool ConfusedMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class ConfusedMovementGenerator
|
||||
void Initialize(T &);
|
||||
void Finalize(T &);
|
||||
void Reset(T &);
|
||||
bool Update(T &, const uint32 &);
|
||||
bool Update(T &, const uint32);
|
||||
|
||||
bool GetDestination(float &x, float &y, float &z) const
|
||||
{
|
||||
|
||||
@@ -365,7 +365,7 @@ FleeingMovementGenerator<T>::Reset(T &owner)
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
FleeingMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
||||
FleeingMovementGenerator<T>::Update(T &owner, const uint32 time_diff)
|
||||
{
|
||||
if (!&owner || !owner.isAlive())
|
||||
return false;
|
||||
@@ -406,8 +406,8 @@ template void FleeingMovementGenerator<Player>::Finalize(Player &);
|
||||
template void FleeingMovementGenerator<Creature>::Finalize(Creature &);
|
||||
template void FleeingMovementGenerator<Player>::Reset(Player &);
|
||||
template void FleeingMovementGenerator<Creature>::Reset(Creature &);
|
||||
template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32 &);
|
||||
template bool FleeingMovementGenerator<Creature>::Update(Creature &, const uint32 &);
|
||||
template bool FleeingMovementGenerator<Player>::Update(Player &, const uint32);
|
||||
template bool FleeingMovementGenerator<Creature>::Update(Creature &, const uint32);
|
||||
|
||||
void TimedFleeingMovementGenerator::Finalize(Unit &owner)
|
||||
{
|
||||
@@ -423,7 +423,7 @@ void TimedFleeingMovementGenerator::Finalize(Unit &owner)
|
||||
}
|
||||
}
|
||||
|
||||
bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 & time_diff)
|
||||
bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 time_diff)
|
||||
{
|
||||
if (!owner.isAlive())
|
||||
return false;
|
||||
@@ -435,7 +435,7 @@ bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 & time_dif
|
||||
if (i_totalFleeTime.Passed())
|
||||
return false;
|
||||
|
||||
// This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32 &) version
|
||||
// This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32) version
|
||||
// This is done instead of casting Unit& to Creature& and call parent method, then we can use Unit directly
|
||||
return MovementGeneratorMedium< Creature, FleeingMovementGenerator<Creature> >::Update(owner, time_diff);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class FleeingMovementGenerator
|
||||
void Initialize(T &);
|
||||
void Finalize(T &);
|
||||
void Reset(T &);
|
||||
bool Update(T &, const uint32 &);
|
||||
bool Update(T &, const uint32);
|
||||
bool GetDestination(float &x, float &y, float &z) const;
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() { return FLEEING_MOTION_TYPE; }
|
||||
@@ -69,7 +69,7 @@ class TimedFleeingMovementGenerator
|
||||
i_totalFleeTime(time) {}
|
||||
|
||||
MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; }
|
||||
bool Update(Unit &, const uint32 &);
|
||||
bool Update(Unit &, const uint32);
|
||||
void Finalize(Unit &);
|
||||
|
||||
private:
|
||||
|
||||
@@ -57,7 +57,7 @@ void HomeMovementGenerator<Creature>::_setTargetLocation(Creature & owner)
|
||||
owner.ClearUnitState(uint32(UNIT_STAT_ALL_STATE & ~UNIT_STAT_EVADE));
|
||||
}
|
||||
|
||||
bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32& time_diff)
|
||||
bool HomeMovementGenerator<Creature>::Update(Creature &owner, const uint32 time_diff)
|
||||
{
|
||||
CreatureTraveller traveller(owner);
|
||||
i_destinationHolder.UpdateTraveller(traveller, time_diff);
|
||||
|
||||
@@ -40,7 +40,7 @@ class HomeMovementGenerator<Creature>
|
||||
void Initialize(Creature &);
|
||||
void Finalize(Creature &);
|
||||
void Reset(Creature &);
|
||||
bool Update(Creature &, const uint32 &);
|
||||
bool Update(Creature &, const uint32);
|
||||
void modifyTravelTime(uint32 travel_time) { i_travel_timer = travel_time; }
|
||||
MovementGeneratorType GetMovementGeneratorType() { return HOME_MOTION_TYPE; }
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ void RotateMovementGenerator::Initialize(Unit& owner)
|
||||
owner.AttackStop();
|
||||
}
|
||||
|
||||
bool RotateMovementGenerator::Update(Unit& owner, const uint32& diff)
|
||||
bool RotateMovementGenerator::Update(Unit& owner, const uint32 diff)
|
||||
{
|
||||
float angle = owner.GetOrientation();
|
||||
if (m_direction == ROTATE_DIRECTION_LEFT)
|
||||
@@ -93,7 +93,7 @@ DistractMovementGenerator::Finalize(Unit& owner)
|
||||
}
|
||||
|
||||
bool
|
||||
DistractMovementGenerator::Update(Unit& /*owner*/, const uint32& time_diff)
|
||||
DistractMovementGenerator::Update(Unit& /*owner*/, const uint32 time_diff)
|
||||
{
|
||||
if (time_diff > m_timer)
|
||||
return false;
|
||||
|
||||
@@ -28,7 +28,7 @@ class IdleMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit &);
|
||||
void Finalize(Unit &) { }
|
||||
void Reset(Unit &);
|
||||
bool Update(Unit &, const uint32 &) { return true; }
|
||||
bool Update(Unit &, const uint32) { return true; }
|
||||
MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ class RotateMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit& owner);
|
||||
void Finalize(Unit& owner);
|
||||
void Reset(Unit& owner) { Initialize(owner); }
|
||||
bool Update(Unit& owner, const uint32& time_diff);
|
||||
bool Update(Unit& owner, const uint32 time_diff);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
@@ -58,7 +58,7 @@ class DistractMovementGenerator : public MovementGenerator
|
||||
void Initialize(Unit& owner);
|
||||
void Finalize(Unit& owner);
|
||||
void Reset(Unit& owner) { Initialize(owner); }
|
||||
bool Update(Unit& owner, const uint32& time_diff);
|
||||
bool Update(Unit& owner, const uint32 time_diff);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return DISTRACT_MOTION_TYPE; }
|
||||
|
||||
private:
|
||||
|
||||
@@ -35,7 +35,7 @@ void PointMovementGenerator<T>::Initialize(T &unit)
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool PointMovementGenerator<T>::Update(T &unit, const uint32 &diff)
|
||||
bool PointMovementGenerator<T>::Update(T &unit, const uint32 diff)
|
||||
{
|
||||
if (!&unit)
|
||||
return false;
|
||||
@@ -87,12 +87,12 @@ template <> void PointMovementGenerator<Creature>::MovementInform(Creature &unit
|
||||
}
|
||||
|
||||
template void PointMovementGenerator<Player>::Initialize(Player&);
|
||||
template bool PointMovementGenerator<Player>::Update(Player &, const uint32 &diff);
|
||||
template bool PointMovementGenerator<Player>::Update(Player &, const uint32 diff);
|
||||
template void PointMovementGenerator<Player>::MovementInform(Player&);
|
||||
template void PointMovementGenerator<Player>::Finalize(Player&);
|
||||
|
||||
template void PointMovementGenerator<Creature>::Initialize(Creature&);
|
||||
template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 &diff);
|
||||
template bool PointMovementGenerator<Creature>::Update(Creature&, const uint32 diff);
|
||||
template void PointMovementGenerator<Creature>::Finalize(Creature&);
|
||||
|
||||
void AssistanceMovementGenerator::Finalize(Unit &unit)
|
||||
|
||||
@@ -35,7 +35,7 @@ class PointMovementGenerator
|
||||
void Initialize(T &);
|
||||
void Finalize(T &unit);
|
||||
void Reset(T &unit){unit.StopMoving();}
|
||||
bool Update(T &, const uint32 &diff);
|
||||
bool Update(T &, const uint32 diff);
|
||||
|
||||
void MovementInform(T &);
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ RandomMovementGenerator<Creature>::Finalize(Creature & /*creature*/){}
|
||||
|
||||
template<>
|
||||
bool
|
||||
RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff)
|
||||
RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 diff)
|
||||
{
|
||||
if (creature.HasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED | UNIT_STAT_DISTRACTED))
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ class RandomMovementGenerator
|
||||
void Initialize(T &);
|
||||
void Finalize(T &);
|
||||
void Reset(T &);
|
||||
bool Update(T &, const uint32 &);
|
||||
bool Update(T &, const uint32);
|
||||
bool GetDestination(float &x, float &y, float &z) const;
|
||||
void UpdateMapPosition(uint32 mapid, float &x , float &y, float &z)
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ TargetedMovementGenerator<T>::Reset(T &owner)
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
||||
TargetedMovementGenerator<T>::Update(T &owner, const uint32 time_diff)
|
||||
{
|
||||
if (!i_target.isValid() || !i_target->IsInWorld())
|
||||
return false;
|
||||
@@ -270,8 +270,8 @@ template void TargetedMovementGenerator<Player>::Finalize(Player &);
|
||||
template void TargetedMovementGenerator<Creature>::Finalize(Creature &);
|
||||
template void TargetedMovementGenerator<Player>::Reset(Player &);
|
||||
template void TargetedMovementGenerator<Creature>::Reset(Creature &);
|
||||
template bool TargetedMovementGenerator<Player>::Update(Player &, const uint32 &);
|
||||
template bool TargetedMovementGenerator<Creature>::Update(Creature &, const uint32 &);
|
||||
template bool TargetedMovementGenerator<Player>::Update(Player &, const uint32);
|
||||
template bool TargetedMovementGenerator<Creature>::Update(Creature &, const uint32);
|
||||
template Unit* TargetedMovementGenerator<Player>::GetTarget() const;
|
||||
template Unit* TargetedMovementGenerator<Creature>::GetTarget() const;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class TargetedMovementGenerator
|
||||
void Initialize(T &);
|
||||
void Finalize(T &);
|
||||
void Reset(T &);
|
||||
bool Update(T &, const uint32 &);
|
||||
bool Update(T &, const uint32);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return TARGETED_MOTION_TYPE; }
|
||||
|
||||
void MovementInform(T &);
|
||||
|
||||
@@ -126,14 +126,14 @@ void WaypointMovementGenerator<Player>::InitTraveller(Player & /*unit*/, const W
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
WaypointMovementGenerator<T>::Update(T & /*unit*/, const uint32 & /*diff*/)
|
||||
WaypointMovementGenerator<T>::Update(T & /*unit*/, const uint32 /*diff*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template<>
|
||||
bool
|
||||
WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 diff)
|
||||
{
|
||||
if (!&unit)
|
||||
return true;
|
||||
@@ -225,7 +225,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &unit, const uint32 &diff)
|
||||
}
|
||||
|
||||
template void WaypointMovementGenerator<Player>::Initialize(Player &);
|
||||
template bool WaypointMovementGenerator<Player>::Update(Player &, const uint32 &);
|
||||
template bool WaypointMovementGenerator<Player>::Update(Player &, const uint32);
|
||||
template void WaypointMovementGenerator<Player>::MovementInform(Player &);
|
||||
|
||||
//----------------------------------------------------//
|
||||
@@ -270,7 +270,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
|
||||
|
||||
}
|
||||
|
||||
bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
|
||||
bool FlightPathMovementGenerator::Update(Player &player, const uint32 diff)
|
||||
{
|
||||
if (MovementInProgress())
|
||||
{
|
||||
|
||||
@@ -77,7 +77,7 @@ class WaypointMovementGenerator
|
||||
void InitTraveller(T &, const WaypointData &);
|
||||
void GeneratePathId(T &);
|
||||
void Reset(T &unit);
|
||||
bool Update(T &, const uint32 &);
|
||||
bool Update(T &, const uint32);
|
||||
bool GetDestination(float &x, float &y, float &z) const;
|
||||
MovementGeneratorType GetMovementGeneratorType() { return WAYPOINT_MOTION_TYPE; }
|
||||
|
||||
@@ -105,7 +105,7 @@ public PathMovementBase<Player, TaxiPathNodeList const*>
|
||||
void Initialize(Player &);
|
||||
void Reset(Player & /*u*/){};
|
||||
void Finalize(Player &);
|
||||
bool Update(Player &, const uint32 &);
|
||||
bool Update(Player &, const uint32);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
|
||||
|
||||
TaxiPathNodeList const& GetPath() { return *i_path; }
|
||||
|
||||
@@ -770,7 +770,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
|
||||
|
||||
if (mask & GROUP_UPDATE_FLAG_AURAS)
|
||||
{
|
||||
const uint64& auramask = player->GetAuraUpdateMaskForRaid();
|
||||
const uint64 auramask = player->GetAuraUpdateMaskForRaid();
|
||||
*data << uint64(auramask);
|
||||
for (uint32 i = 0; i < MAX_AURAS; ++i)
|
||||
{
|
||||
@@ -860,7 +860,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
|
||||
{
|
||||
if (pet)
|
||||
{
|
||||
const uint64& auramask = pet->GetAuraUpdateMaskForRaid();
|
||||
const uint64 auramask = pet->GetAuraUpdateMaskForRaid();
|
||||
*data << uint64(auramask);
|
||||
for (uint32 i = 0; i < MAX_AURAS; ++i)
|
||||
{
|
||||
|
||||
@@ -84,17 +84,17 @@ public:
|
||||
|
||||
bool IsClosed() const { return _closedBy; }
|
||||
bool IsCompleted() const { return _completed; }
|
||||
bool IsFromPlayer(const uint64& guid) const { return guid == _playerGuid; }
|
||||
bool IsFromPlayer(const uint64 guid) const { return guid == _playerGuid; }
|
||||
bool IsAssigned() const { return _assignedTo != 0; }
|
||||
bool IsAssignedTo(const uint64& guid) const { return guid == _assignedTo; }
|
||||
bool IsAssignedNotTo(const uint64& guid) const { return IsAssigned() && !IsAssignedTo(guid); }
|
||||
bool IsAssignedTo(const uint64 guid) const { return guid == _assignedTo; }
|
||||
bool IsAssignedNotTo(const uint64 guid) const { return IsAssigned() && !IsAssignedTo(guid); }
|
||||
|
||||
uint32 GetId() const { return _id; }
|
||||
Player* GetPlayer() const { return ObjectAccessor::FindPlayer(_playerGuid); }
|
||||
std::string GetPlayerName() const { return _playerName; }
|
||||
std::string GetMessage() const { return _message; }
|
||||
Player* GetAssignedPlayer() const { return ObjectAccessor::FindPlayer(_assignedTo); }
|
||||
const uint64& GetAssignedToGUID() const { return _assignedTo; }
|
||||
const uint64 GetAssignedToGUID() const { return _assignedTo; }
|
||||
std::string GetAssignedToName() const
|
||||
{
|
||||
std::string name;
|
||||
@@ -104,11 +104,11 @@ public:
|
||||
|
||||
return name;
|
||||
}
|
||||
const uint64& GetLastModifiedTime() const { return _lastModifiedTime; }
|
||||
const uint64 GetLastModifiedTime() const { return _lastModifiedTime; }
|
||||
GMTicketEscalationStatus GetEscalatedStatus() const { return _escalatedStatus; }
|
||||
|
||||
void SetEscalatedStatus(GMTicketEscalationStatus escalatedStatus) { _escalatedStatus = escalatedStatus; }
|
||||
void SetAssignedTo(const uint64& guid, bool isAdmin)
|
||||
void SetAssignedTo(const uint64 guid, bool isAdmin)
|
||||
{
|
||||
_assignedTo = guid;
|
||||
if (isAdmin && _escalatedStatus == TICKET_IN_ESCALATION_QUEUE)
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GmTicket* GetTicketByPlayer(const uint64& playerGuid)
|
||||
GmTicket* GetTicketByPlayer(const uint64 playerGuid)
|
||||
{
|
||||
for (GmTicketList::const_iterator itr = _ticketList.begin(); itr != _ticketList.end(); ++itr)
|
||||
if (itr->second && itr->second->IsFromPlayer(playerGuid) && !itr->second->IsClosed())
|
||||
|
||||
@@ -297,7 +297,7 @@ public:
|
||||
|
||||
uint64 prisonerGUID;
|
||||
|
||||
void SetGUID(const uint64 &guid, int32 /*id*/)
|
||||
void SetGUID(const uint64 guid, int32 /*id*/)
|
||||
{
|
||||
if (!prisonerGUID)
|
||||
prisonerGUID = guid;
|
||||
@@ -883,7 +883,7 @@ public:
|
||||
|
||||
uint64 minerGUID;
|
||||
|
||||
void SetGUID(const uint64 &guid, int32 /*id*/)
|
||||
void SetGUID(const uint64 guid, int32 /*id*/)
|
||||
{
|
||||
minerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ class boss_rimefang : public CreatureScript
|
||||
_EnterEvadeMode();
|
||||
}
|
||||
|
||||
void SetGUID(const uint64& guid, int32 type)
|
||||
void SetGUID(const uint64 guid, int32 type)
|
||||
{
|
||||
if (type == GUID_HOARFROST)
|
||||
{
|
||||
@@ -383,7 +383,7 @@ class player_overlord_brandAI : public PlayerAI
|
||||
tyrannus = NULL;
|
||||
}
|
||||
|
||||
void SetGUID(const uint64& guid, int32 /*type*/)
|
||||
void SetGUID(const uint64 guid, int32 /*type*/)
|
||||
{
|
||||
tyrannus = ObjectAccessor::GetCreature(*me, guid);
|
||||
if (!tyrannus)
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
|
||||
uint64 victimGUID;
|
||||
|
||||
void SetGUID(const uint64 &guid, int32 /*param*/)
|
||||
void SetGUID(const uint64 guid, int32 /*param*/)
|
||||
{
|
||||
victimGUID = guid;
|
||||
if (me->m_spells[0] && victimGUID)
|
||||
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me);
|
||||
}
|
||||
|
||||
void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
|
||||
void DespawnBoatGhosts(uint64 m_uiCreatureGUID)
|
||||
{
|
||||
if (m_uiCreatureGUID)
|
||||
if (Creature* pTemp = Unit::GetCreature(*me, m_uiCreatureGUID))
|
||||
|
||||
@@ -2431,7 +2431,7 @@ public:
|
||||
uiEventPhase = 1;
|
||||
}
|
||||
|
||||
void SetGUID(const uint64 &uiGuid, int32 /*iId*/)
|
||||
void SetGUID(const uint64 uiGuid, int32 /*iId*/)
|
||||
{
|
||||
uiPlayerGUID = uiGuid;
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
bRemoveFlag = false;
|
||||
}
|
||||
|
||||
void SetGUID(const uint64 &guid, int32 /*id*/)
|
||||
void SetGUID(const uint64 guid, int32 /*id*/)
|
||||
{
|
||||
uiPlayerGUID = guid;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ class ByteBuffer
|
||||
_rpos += len;
|
||||
}
|
||||
|
||||
void readPackGUID(uint64& guid)
|
||||
void readPackGUID(uint64 guid)
|
||||
{
|
||||
if(rpos() + 1 > size())
|
||||
throw ByteBufferException(false, _rpos, 1, size());
|
||||
|
||||
@@ -172,7 +172,7 @@ struct PeriodicTimer
|
||||
{
|
||||
}
|
||||
|
||||
bool Update(const uint32 &diff)
|
||||
bool Update(const uint32 diff)
|
||||
{
|
||||
if ((i_expireTime -= diff) > 0)
|
||||
return false;
|
||||
|
||||
@@ -643,7 +643,7 @@ public:
|
||||
return (part[el]);
|
||||
};
|
||||
|
||||
inline const uint32 & operator[](uint8 el) const
|
||||
inline const uint32 operator[](uint8 el) const
|
||||
{
|
||||
return (part[el]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user