19 #ifndef TRINITYCORE_GROUP_H
20 #define TRINITYCORE_GROUP_H
42 #define MAX_GROUP_SIZE 5
43 #define MAX_RAID_SIZE 40
44 #define MAX_RAID_SUBGROUPS MAX_RAID_SIZE / MAX_GROUP_SIZE
46 #define TARGET_ICONS_COUNT 8
47 #define RAID_MARKERS_COUNT 8
49 #define READYCHECK_DURATION 35000
184 Location.
WorldRelocate(mapId, positionX, positionY, positionZ);
185 TransportGUID = transportGuid;
219 bool Create(
Player* leader);
220 void LoadGroupFromDB(
Field* field);
222 bool AddInvite(
Player* player);
223 void RemoveInvite(
Player* player);
224 void RemoveAllInvites();
225 bool AddLeaderInvite(
Player* player);
226 bool AddMember(
Player* player);
229 static void ConvertLeaderInstancesToGroup(
Player* player,
Group* group,
bool switchLeader);
233 void UpdateLooterGuid(
WorldObject* pLootedObject,
bool ifneed =
false);
235 void Disband(
bool hideDestroy =
false);
238 void SetEveryoneIsAssistant(
bool apply);
242 void UpdateReadyCheck(uint32 diff);
246 void EndReadyCheck();
249 bool IsReadyCheckCompleted(
void)
const;
251 void SetOfflineMembersReadyChecked(
void);
252 void SetMemberReadyCheck(
ObjectGuid guid,
bool ready);
253 void SetMemberReadyCheck(MemberSlot* slot,
bool ready);
255 void SetMemberReadyChecked(MemberSlot* slot);
256 void ResetMemberReadyChecked(
void);
260 void DeleteRaidMarker(
uint8 markerId);
261 void SendRaidMarkersChanged(
WorldSession* session =
nullptr,
int8 partyIndex = 0);
265 bool isLFGGroup()
const;
266 bool isRaidGroup()
const;
267 bool isBGGroup()
const;
268 bool isBFGroup()
const;
269 bool IsCreated()
const;
272 const char * GetLeaderName()
const;
283 ObjectGuid GetMemberGUID(
const std::string& name);
287 Player* GetInvited(
const std::string& name)
const;
290 bool SameSubGroup(
ObjectGuid guid1, MemberSlot
const* slot2)
const;
291 bool SameSubGroup(
Player const* member1,
Player const* member2)
const;
292 bool HasFreeSlotSubGroup(
uint8 subgroup)
const;
303 void ConvertToRaid();
304 void ConvertToGroup();
316 void SetDungeonDifficultyID(
Difficulty difficulty);
317 void SetRaidDifficultyID(
Difficulty difficulty);
318 void SetLegacyRaidDifficultyID(
Difficulty difficulty);
323 void ResetInstances(
uint8 method,
bool isRaid,
bool isLegacy,
Player* SendMsgTo);
329 void SendUpdateToPlayer(
ObjectGuid playerGUID, MemberSlot* slot =
NULL);
330 void UpdatePlayerOutOfRange(
Player* player);
332 template<
class Worker>
336 worker(itr->GetSource());
339 template<
class Worker>
343 worker(itr->GetSource());
354 void SendLootStartRoll(uint32 CountDown, uint32 mapid,
const Roll &r);
355 void SendLootStartRollToPlayer(uint32 countDown, uint32 mapId,
Player* p,
bool canNeed,
Roll const& r);
358 void SendLootAllPassed(
Roll const& roll);
364 void CountTheRoll(Rolls::iterator roll);
366 void EndRoll(
Loot* loot);
369 void ResetMaxEnchantingLevel();
375 void UnbindInstance(uint32 mapid,
uint8 difficulty,
bool unload =
false);
380 BoundInstancesMap& GetBoundInstances(
Difficulty difficulty);
383 void BroadcastGroupUpdate(
void);
387 void _homebindIfInstance(
Player* player);
389 void _initRaidSubGroupsCounter();
390 member_citerator _getMemberCSlot(
ObjectGuid Guid)
const;
391 member_witerator _getMemberWSlot(
ObjectGuid Guid);
392 void SubGroupCounterIncrease(
uint8 subgroup);
393 void SubGroupCounterDecrease(
uint8 subgroup);
394 void ToggleGroupMemberFlag(member_witerator slot,
uint8 flag,
bool apply);
uint8 roles
Definition: Group.h:201
GroupUpdatePetFlags
Definition: Group.h:130
RollType
Definition: LootMgr.h:40
Roll(ObjectGuid _guid, LootItem const &li)
Definition: Group.cpp:41
InstanceSave * save
Definition: Group.h:170
#define TARGET_ICONS_COUNT
Definition: Group.h:46
RaidMarker(uint32 mapId, float positionX, float positionY, float positionZ, ObjectGuid transportGuid=ObjectGuid::Empty)
Definition: Group.h:182
Difficulty
Definition: DBCEnums.h:402
Definition: Position.h:228
uint32 m_dbStoreId
Definition: Group.h:418
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
int8_t int8
Definition: Define.h:148
MemberSlotList::iterator member_witerator
Definition: Group.h:209
Definition: LootMgr.h:288
std::set< Player * > InvitesList
Definition: Group.h:210
MemberSlotList::const_iterator member_citerator
Definition: Group.h:205
GroupMemberOnlineStatus
Definition: Group.h:61
Rolls RollId
Definition: Group.h:412
uint8 _class
Definition: Group.h:198
GroupType GetGroupType() const
Definition: Group.h:298
Difficulty m_dungeonDifficulty
Definition: Group.h:402
uint8 totalPlayersRolling
Definition: Group.h:160
std::unordered_map< uint32, InstanceGroupBind > BoundInstancesMap
Definition: Group.h:207
Loot * getLoot()
Definition: Group.cpp:53
uint32 itemRandomSuffix
Definition: Group.h:156
InvitesList m_invitees
Definition: Group.h:398
GroupMemberFlags
Definition: Group.h:74
uint8 group
Definition: Group.h:199
PlayerVote playerVote
Definition: Group.h:159
uint32 m_activeMarkers
Definition: Group.h:426
uint32 m_counter
Definition: Group.h:416
Class used to access individual fields of database query result.
Definition: Field.h:56
InstanceGroupBind()
Definition: Group.h:174
uint8 * m_subGroupsCounts
Definition: Group.h:414
std::list< MemberSlot > MemberSlotList
Definition: Group.h:204
Definition: DBCEnums.h:426
Definition: DBCStructure.h:830
uint8 rollVoteMask
Definition: Group.h:165
LootMethod m_lootMethod
Definition: Group.h:408
arena_t NULL
Definition: jemalloc_internal.h:624
#define false
Definition: CascPort.h:18
uint32 itemid
Definition: Group.h:154
ObjectGuid m_guid
Definition: Group.h:415
bool m_readyCheckStarted
Definition: Group.h:421
Definition: Creature.h:467
Battlefield * m_bfGroup
Definition: Group.h:406
ObjectGuid guid
Definition: Group.h:196
int32 itemRandomPropId
Definition: Group.h:155
uint64 LowType
Definition: ObjectGuid.h:199
void apply(T *val)
Definition: ByteConverter.h:41
Definition: GroupRefManager.h:28
RemoveMethod
Definition: SharedDefines.h:4685
Battleground * m_bgGroup
Definition: Group.h:405
ObjectGuid itemGUID
Definition: Group.h:153
ObjectGuid TransportGUID
Definition: Group.h:180
uint8 totalNeed
Definition: Group.h:161
Difficulty GetLegacyRaidDifficultyID() const
Definition: Group.h:322
GroupType
Definition: Group.h:87
int32 m_readyCheckTimer
Definition: Group.h:422
MemberSlotList m_memberSlots
Definition: Group.h:396
void targetObjectBuildLink() override
Definition: Group.cpp:2002
uint32 m_maxEnchantingLevel
Definition: Group.h:417
std::array< std::unique_ptr< RaidMarker >, RAID_MARKERS_COUNT > m_markers
Definition: Group.h:425
Definition: LootMgr.h:314
~Roll()
Definition: Group.cpp:46
GroupRefManager m_memberMgr
Definition: Group.h:397
ObjectGuid m_leaderGuid
Definition: Group.h:399
int32_t int32
Definition: Define.h:146
ObjectGuid m_looterGuid
Definition: Group.h:410
uint32_t uint32
Definition: Define.h:150
Definition: Battlefield.h:196
static Summons Group[]
Definition: boss_urom.cpp:77
uint8 itemCount
Definition: Group.h:157
uint8 flags
Definition: Group.h:200
bool IsReadyCheckStarted(void) const
Definition: Group.h:248
GroupReference * GetFirstMember()
Definition: Group.h:295
std::string name
Definition: Group.h:197
#define READYCHECK_DURATION
Definition: Group.h:49
#define RAID_MARKERS_COUNT
Definition: Group.h:47
ObjectGuid m_masterLooterGuid
Definition: Group.h:411
uint32 GetDbStoreId() const
Definition: Group.h:278
void setLoot(Loot *pLoot)
Definition: Group.cpp:48
Definition: InstanceSaveMgr.h:44
Difficulty GetRaidDifficultyID() const
Definition: Group.h:321
Difficulty GetDungeonDifficultyID() const
Definition: Group.h:320
GroupReference * next()
Definition: GroupReference.h:37
std::map< ObjectGuid, RollVote > PlayerVote
Definition: Group.h:158
GroupType m_groupType
Definition: Group.h:401
MemberSlotList const & GetMemberSlots() const
Definition: Group.h:294
Definition: LootMgr.h:157
ItemQualities
Definition: SharedDefines.h:318
BattlegroundQueueTypeId
Definition: SharedDefines.h:4732
GroupReference const * GetFirstMember() const
Definition: Group.h:296
bool readyChecked
Definition: Group.h:202
bool isRollLootActive() const
Definition: Group.h:353
uint32 GetMembersCount() const
Definition: Group.h:297
#define TC_GAME_API
Definition: Define.h:134
GroupUpdateFlags
Definition: Group.h:100
LootMethod
Definition: LootMgr.h:65
Definition: SharedDefines.h:4687
ItemQualities m_lootThreshold
Definition: Group.h:409
uint8_t uint8
Definition: Define.h:152
Definition: Battleground.h:235
Difficulty m_legacyRaidDifficulty
Definition: Group.h:404
WorldLocation Location
Definition: Group.h:179
Player session in the World.
Definition: WorldSession.h:882
Definition: ObjectGuid.h:189
uint32_t uint32
Definition: g3dmath.h:168
GroupJoinBattlegroundResult
Definition: SharedDefines.h:4750
void BroadcastWorker(Worker &worker)
Definition: Group.h:333
std::string m_leaderName
Definition: Group.h:400
uint8 itemSlot
Definition: Group.h:164
std::vector< Roll * > Rolls
Definition: Group.h:212
bool perm
Definition: Group.h:171
Definition: WorldPacket.h:26
void WorldRelocate(WorldLocation const &loc)
Definition: Position.h:237
Difficulty m_raidDifficulty
Definition: Group.h:403
uint8 totalPass
Definition: Group.h:163
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
Definition: GroupReference.h:27
GroupMemberAssignment
Definition: Group.h:81
RollVote
Definition: Group.h:51
void BroadcastWorker(Worker const &worker) const
Definition: Group.h:340
uint8 totalGreed
Definition: Group.h:162