diff options
Diffstat (limited to 'src/server/game/Groups/Group.h')
-rw-r--r-- | src/server/game/Groups/Group.h | 81 |
1 files changed, 40 insertions, 41 deletions
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h index 59f77a06308..6abfd5b667d 100644 --- a/src/server/game/Groups/Group.h +++ b/src/server/game/Groups/Group.h @@ -127,18 +127,18 @@ static const uint8 GroupUpdateLength[GROUP_UPDATE_FLAGS_COUNT] = { 0, 2, 2, 2, 1 class Roll : public LootValidatorRef { public: - Roll(uint64 _guid, LootItem const& li); + Roll(ObjectGuid _guid, LootItem const& li); ~Roll(); void setLoot(Loot* pLoot); Loot* getLoot(); void targetObjectBuildLink() override; - uint64 itemGUID; + ObjectGuid itemGUID; uint32 itemid; int32 itemRandomPropId; uint32 itemRandomSuffix; uint8 itemCount; - typedef std::map<uint64, RollVote> PlayerVote; + typedef std::map<ObjectGuid, RollVote> PlayerVote; PlayerVote playerVote; //vote position correspond with player position (in group) uint8 totalPlayersRolling; uint8 totalNeed; @@ -164,7 +164,7 @@ class Group public: struct MemberSlot { - uint64 guid; + ObjectGuid guid; std::string name; uint8 group; uint8 flags; @@ -193,15 +193,15 @@ class Group void RemoveAllInvites(); bool AddLeaderInvite(Player* player); bool AddMember(Player* player); - bool RemoveMember(uint64 guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL); - void ChangeLeader(uint64 guid); + bool RemoveMember(ObjectGuid guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, ObjectGuid kicker = ObjectGuid::Empty, const char* reason = NULL); + void ChangeLeader(ObjectGuid guid); void SetLootMethod(LootMethod method); - void SetLooterGuid(uint64 guid); - void SetMasterLooterGuid(uint64 guid); + void SetLooterGuid(ObjectGuid guid); + void SetMasterLooterGuid(ObjectGuid 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 Disband(bool hideDestroy = false); + void SetLfgRoles(ObjectGuid guid, uint8 roles); // properties accessories bool IsFull() const; @@ -210,28 +210,28 @@ class Group bool isBGGroup() const; bool isBFGroup() const; bool IsCreated() const; - uint64 GetLeaderGUID() const; - uint64 GetGUID() const; + ObjectGuid GetLeaderGUID() const; + ObjectGuid GetGUID() const; uint32 GetLowGUID() const; const char * GetLeaderName() const; LootMethod GetLootMethod() const; - uint64 GetLooterGuid() const; - uint64 GetMasterLooterGuid() const; + ObjectGuid GetLooterGuid() const; + ObjectGuid GetMasterLooterGuid() const; ItemQualities GetLootThreshold() const; uint32 GetDbStoreId() const { return m_dbStoreId; }; // member manipulation methods - bool IsMember(uint64 guid) const; - bool IsLeader(uint64 guid) const; - uint64 GetMemberGUID(const std::string& name); - bool IsAssistant(uint64 guid) const; + bool IsMember(ObjectGuid guid) const; + bool IsLeader(ObjectGuid guid) const; + ObjectGuid GetMemberGUID(const std::string& name); + bool IsAssistant(ObjectGuid guid) const; - Player* GetInvited(uint64 guid) const; + Player* GetInvited(ObjectGuid guid) const; Player* GetInvited(const std::string& name) const; - bool SameSubGroup(uint64 guid1, uint64 guid2) const; - bool SameSubGroup(uint64 guid1, MemberSlot const* slot2) const; + bool SameSubGroup(ObjectGuid guid1, ObjectGuid guid2) const; + bool SameSubGroup(ObjectGuid guid1, MemberSlot const* slot2) const; bool SameSubGroup(Player const* member1, Player const* member2) const; bool HasFreeSlotSubGroup(uint8 subgroup) const; @@ -240,7 +240,7 @@ class Group GroupReference const* GetFirstMember() const { return m_memberMgr.getFirst(); } uint32 GetMembersCount() const { return m_memberSlots.size(); } - uint8 GetMemberGroup(uint64 guid) const; + uint8 GetMemberGroup(ObjectGuid guid) const; void ConvertToLFG(); void ConvertToRaid(); @@ -249,10 +249,9 @@ class Group void SetBattlefieldGroup(Battlefield* bf); GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot); - void ChangeMembersGroup(uint64 guid, uint8 group); - void ChangeMembersGroup(Player* player, uint8 group); - void SetTargetIcon(uint8 id, uint64 whoGuid, uint64 targetGuid); - void SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag); + void ChangeMembersGroup(ObjectGuid guid, uint8 group); + void SetTargetIcon(uint8 id, ObjectGuid whoGuid, ObjectGuid targetGuid); + void SetGroupMemberFlag(ObjectGuid guid, bool apply, GroupMemberFlags flag); void RemoveUniqueGroupMemberFlag(GroupMemberFlags flag); Difficulty GetDifficulty(bool isRaid) const; @@ -268,10 +267,10 @@ class Group //void SendInit(WorldSession* session); void SendTargetIconList(WorldSession* session); void SendUpdate(); - void SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot = NULL); + void SendUpdateToPlayer(ObjectGuid playerGUID, MemberSlot* slot = NULL); void UpdatePlayerOutOfRange(Player* player); // ignore: GUID of player that will be ignored - void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group = -1, uint64 ignore = 0); + void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group = -1, ObjectGuid ignore = ObjectGuid::Empty); void BroadcastReadyCheck(WorldPacket* packet); void OfflineReadyCheck(); @@ -282,23 +281,23 @@ class Group bool isRollLootActive() const; void SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r); void SendLootStartRollToPlayer(uint32 countDown, uint32 mapId, Player* p, bool canNeed, Roll const& r); - void SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); - void SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); + void SendLootRoll(ObjectGuid SourceGuid, ObjectGuid TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); + void SendLootRollWon(ObjectGuid SourceGuid, ObjectGuid TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r); void SendLootAllPassed(Roll const& roll); void SendLooter(Creature* creature, Player* pLooter); void GroupLoot(Loot* loot, WorldObject* pLootedObject); void NeedBeforeGreed(Loot* loot, WorldObject* pLootedObject); void MasterLoot(Loot* loot, WorldObject* pLootedObject); - Rolls::iterator GetRoll(uint64 Guid); + Rolls::iterator GetRoll(ObjectGuid Guid); void CountTheRoll(Rolls::iterator roll); - void CountRollVote(uint64 playerGUID, uint64 Guid, uint8 Choise); + void CountRollVote(ObjectGuid playerGUID, ObjectGuid Guid, uint8 Choise); void EndRoll(Loot* loot); // related to disenchant rolls void ResetMaxEnchantingLevel(); void LinkMember(GroupReference* pRef); - void DelinkMember(uint64 guid); + void DelinkMember(ObjectGuid guid); InstanceGroupBind* BindToInstance(InstanceSave* save, bool permanent, bool load = false); void UnbindInstance(uint32 mapid, uint8 difficulty, bool unload = false); @@ -312,12 +311,12 @@ class Group void BroadcastGroupUpdate(void); protected: - bool _setMembersGroup(uint64 guid, uint8 group); + bool _setMembersGroup(ObjectGuid guid, uint8 group); void _homebindIfInstance(Player* player); void _initRaidSubGroupsCounter(); - member_citerator _getMemberCSlot(uint64 Guid) const; - member_witerator _getMemberWSlot(uint64 Guid); + member_citerator _getMemberCSlot(ObjectGuid Guid) const; + member_witerator _getMemberWSlot(ObjectGuid Guid); void SubGroupCounterIncrease(uint8 subgroup); void SubGroupCounterDecrease(uint8 subgroup); void ToggleGroupMemberFlag(member_witerator slot, uint8 flag, bool apply); @@ -325,22 +324,22 @@ class Group MemberSlotList m_memberSlots; GroupRefManager m_memberMgr; InvitesList m_invitees; - uint64 m_leaderGuid; + ObjectGuid m_leaderGuid; std::string m_leaderName; GroupType m_groupType; Difficulty m_dungeonDifficulty; Difficulty m_raidDifficulty; Battleground* m_bgGroup; Battlefield* m_bfGroup; - uint64 m_targetIcons[TARGETICONCOUNT]; + ObjectGuid m_targetIcons[TARGETICONCOUNT]; LootMethod m_lootMethod; ItemQualities m_lootThreshold; - uint64 m_looterGuid; - uint64 m_masterLooterGuid; + ObjectGuid m_looterGuid; + ObjectGuid m_masterLooterGuid; Rolls RollId; BoundInstancesMap m_boundInstances[MAX_DIFFICULTY]; uint8* m_subGroupsCounts; - uint64 m_guid; + ObjectGuid m_guid; uint32 m_counter; // used only in SMSG_GROUP_LIST uint32 m_maxEnchantingLevel; uint32 m_dbStoreId; // Represents the ID used in database (Can be reused by other groups if group was disbanded) |