Core: Pass by const reference for simple objects replaced with pass by value
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user