AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Group.h File Reference
#include "DBCEnums.h"
#include "DataMap.h"
#include "GroupRefMgr.h"
#include "LootMgr.h"
#include "QueryResult.h"
#include "SharedDefines.h"
#include <functional>

Go to the source code of this file.

Classes

class  Roll
 
class  Group
 
struct  Group::MemberSlot
 

Macros

#define MAXGROUPSIZE   5
 
#define MAXRAIDSIZE   40
 
#define MAX_RAID_SUBGROUPS   MAXRAIDSIZE/MAXGROUPSIZE
 
#define TARGETICONCOUNT   8
 
#define GROUP_UPDATE_FLAGS_COUNT   20
 

Enumerations

enum  RollVote : uint8 {
  PASS = 0 ,
  NEED = 1 ,
  GREED = 2 ,
  DISENCHANT = 3 ,
  NOT_EMITED_YET = 4 ,
  NOT_VALID = 5
}
 
enum  GroupMemberOnlineStatus {
  MEMBER_STATUS_OFFLINE = 0x0000 ,
  MEMBER_STATUS_ONLINE = 0x0001 ,
  MEMBER_STATUS_PVP = 0x0002 ,
  MEMBER_STATUS_DEAD = 0x0004 ,
  MEMBER_STATUS_GHOST = 0x0008 ,
  MEMBER_STATUS_PVP_FFA = 0x0010 ,
  MEMBER_STATUS_UNK3 = 0x0020 ,
  MEMBER_STATUS_AFK = 0x0040 ,
  MEMBER_STATUS_DND = 0x0080
}
 
enum  GroupMemberFlags {
  MEMBER_FLAG_ASSISTANT = 0x01 ,
  MEMBER_FLAG_MAINTANK = 0x02 ,
  MEMBER_FLAG_MAINASSIST = 0x04
}
 
enum  GroupMemberAssignment {
  GROUP_ASSIGN_MAINTANK = 0 ,
  GROUP_ASSIGN_MAINASSIST = 1
}
 
enum  GroupType {
  GROUPTYPE_NORMAL = 0x00 ,
  GROUPTYPE_BG = 0x01 ,
  GROUPTYPE_RAID = 0x02 ,
  GROUPTYPE_BGRAID = GROUPTYPE_BG | GROUPTYPE_RAID ,
  GROUPTYPE_LFG_RESTRICTED = 0x04 ,
  GROUPTYPE_LFG = 0x08
}
 
enum  GroupUpdateFlags {
  GROUP_UPDATE_FLAG_NONE = 0x00000000 ,
  GROUP_UPDATE_FLAG_STATUS = 0x00000001 ,
  GROUP_UPDATE_FLAG_CUR_HP = 0x00000002 ,
  GROUP_UPDATE_FLAG_MAX_HP = 0x00000004 ,
  GROUP_UPDATE_FLAG_POWER_TYPE = 0x00000008 ,
  GROUP_UPDATE_FLAG_CUR_POWER = 0x00000010 ,
  GROUP_UPDATE_FLAG_MAX_POWER = 0x00000020 ,
  GROUP_UPDATE_FLAG_LEVEL = 0x00000040 ,
  GROUP_UPDATE_FLAG_ZONE = 0x00000080 ,
  GROUP_UPDATE_FLAG_POSITION = 0x00000100 ,
  GROUP_UPDATE_FLAG_AURAS = 0x00000200 ,
  GROUP_UPDATE_FLAG_PET_GUID = 0x00000400 ,
  GROUP_UPDATE_FLAG_PET_NAME = 0x00000800 ,
  GROUP_UPDATE_FLAG_PET_MODEL_ID = 0x00001000 ,
  GROUP_UPDATE_FLAG_PET_CUR_HP = 0x00002000 ,
  GROUP_UPDATE_FLAG_PET_MAX_HP = 0x00004000 ,
  GROUP_UPDATE_FLAG_PET_POWER_TYPE = 0x00008000 ,
  GROUP_UPDATE_FLAG_PET_CUR_POWER = 0x00010000 ,
  GROUP_UPDATE_FLAG_PET_MAX_POWER = 0x00020000 ,
  GROUP_UPDATE_FLAG_PET_AURAS = 0x00040000 ,
  GROUP_UPDATE_FLAG_VEHICLE_SEAT = 0x00080000 ,
  GROUP_UPDATE_PET = 0x0007FC00 ,
  GROUP_UPDATE_FULL = 0x0007FFFF
}
 
enum  lfgGroupFlags {
  GROUP_LFG_FLAG_APPLY_RANDOM_BUFF = 0x001 ,
  GROUP_LFG_FLAG_IS_RANDOM_INSTANCE = 0x002 ,
  GROUP_LFG_FLAG_IS_HEROIC = 0x004
}
 
enum  DifficultyPreventionChangeType {
  DIFFICULTY_PREVENTION_CHANGE_NONE = 0 ,
  DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED = 1 ,
  DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED = 2
}
 

Variables

static const uint8 GroupUpdateLength [GROUP_UPDATE_FLAGS_COUNT] = { 0, 2, 2, 2, 1, 2, 2, 2, 2, 4, 8, 8, 1, 2, 2, 2, 1, 2, 2, 8}
 

Macro Definition Documentation

◆ GROUP_UPDATE_FLAGS_COUNT

#define GROUP_UPDATE_FLAGS_COUNT   20

◆ MAX_RAID_SUBGROUPS

#define MAX_RAID_SUBGROUPS   MAXRAIDSIZE/MAXGROUPSIZE

◆ MAXGROUPSIZE

#define MAXGROUPSIZE   5

◆ MAXRAIDSIZE

#define MAXRAIDSIZE   40

◆ TARGETICONCOUNT

#define TARGETICONCOUNT   8

Enumeration Type Documentation

◆ DifficultyPreventionChangeType

Enumerator
DIFFICULTY_PREVENTION_CHANGE_NONE 
DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED 
DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED 
132{
136};
@ DIFFICULTY_PREVENTION_CHANGE_NONE
Definition: Group.h:133
@ DIFFICULTY_PREVENTION_CHANGE_RECENTLY_CHANGED
Definition: Group.h:134
@ DIFFICULTY_PREVENTION_CHANGE_BOSS_KILLED
Definition: Group.h:135

◆ GroupMemberAssignment

Enumerator
GROUP_ASSIGN_MAINTANK 
GROUP_ASSIGN_MAINASSIST 
79{
82};
@ GROUP_ASSIGN_MAINASSIST
Definition: Group.h:81
@ GROUP_ASSIGN_MAINTANK
Definition: Group.h:80

◆ GroupMemberFlags

Enumerator
MEMBER_FLAG_ASSISTANT 
MEMBER_FLAG_MAINTANK 
MEMBER_FLAG_MAINASSIST 
72{
76};
@ MEMBER_FLAG_ASSISTANT
Definition: Group.h:73
@ MEMBER_FLAG_MAINASSIST
Definition: Group.h:75
@ MEMBER_FLAG_MAINTANK
Definition: Group.h:74

◆ GroupMemberOnlineStatus

Enumerator
MEMBER_STATUS_OFFLINE 
MEMBER_STATUS_ONLINE 
MEMBER_STATUS_PVP 
MEMBER_STATUS_DEAD 
MEMBER_STATUS_GHOST 
MEMBER_STATUS_PVP_FFA 
MEMBER_STATUS_UNK3 
MEMBER_STATUS_AFK 
MEMBER_STATUS_DND 
59{
60 MEMBER_STATUS_OFFLINE = 0x0000,
61 MEMBER_STATUS_ONLINE = 0x0001, // Lua_UnitIsConnected
62 MEMBER_STATUS_PVP = 0x0002, // Lua_UnitIsPVP
63 MEMBER_STATUS_DEAD = 0x0004, // Lua_UnitIsDead
64 MEMBER_STATUS_GHOST = 0x0008, // Lua_UnitIsGhost
65 MEMBER_STATUS_PVP_FFA = 0x0010, // Lua_UnitIsPVPFreeForAll
66 MEMBER_STATUS_UNK3 = 0x0020, // used in calls from Lua_GetPlayerMapPosition/Lua_GetBattlefieldFlagPosition
67 MEMBER_STATUS_AFK = 0x0040, // Lua_UnitIsAFK
68 MEMBER_STATUS_DND = 0x0080, // Lua_UnitIsDND
69};
@ MEMBER_STATUS_AFK
Definition: Group.h:67
@ MEMBER_STATUS_OFFLINE
Definition: Group.h:60
@ MEMBER_STATUS_PVP
Definition: Group.h:62
@ MEMBER_STATUS_ONLINE
Definition: Group.h:61
@ MEMBER_STATUS_DEAD
Definition: Group.h:63
@ MEMBER_STATUS_UNK3
Definition: Group.h:66
@ MEMBER_STATUS_GHOST
Definition: Group.h:64
@ MEMBER_STATUS_DND
Definition: Group.h:68
@ MEMBER_STATUS_PVP_FFA
Definition: Group.h:65

◆ GroupType

enum GroupType
Enumerator
GROUPTYPE_NORMAL 
GROUPTYPE_BG 
GROUPTYPE_RAID 
GROUPTYPE_BGRAID 
GROUPTYPE_LFG_RESTRICTED 
GROUPTYPE_LFG 
85{
86 GROUPTYPE_NORMAL = 0x00,
87 GROUPTYPE_BG = 0x01,
88 GROUPTYPE_RAID = 0x02,
90 GROUPTYPE_LFG_RESTRICTED = 0x04, // Script_HasLFGRestrictions()
91 GROUPTYPE_LFG = 0x08,
92 // 0x10, leave/change group?, I saw this flag when leaving group and after leaving BG while in group
93 // GROUPTYPE_ONE_PERSON_PARTY = 0x20, 4.x Script_IsOnePersonParty()
94 // GROUPTYPE_EVERYONE_ASSISTANT = 0x40 4.x Script_IsEveryoneAssistant()
95};
@ GROUPTYPE_NORMAL
Definition: Group.h:86
@ GROUPTYPE_LFG_RESTRICTED
Definition: Group.h:90
@ GROUPTYPE_RAID
Definition: Group.h:88
@ GROUPTYPE_LFG
Definition: Group.h:91
@ GROUPTYPE_BGRAID
Definition: Group.h:89
@ GROUPTYPE_BG
Definition: Group.h:87

◆ GroupUpdateFlags

Enumerator
GROUP_UPDATE_FLAG_NONE 
GROUP_UPDATE_FLAG_STATUS 
GROUP_UPDATE_FLAG_CUR_HP 
GROUP_UPDATE_FLAG_MAX_HP 
GROUP_UPDATE_FLAG_POWER_TYPE 
GROUP_UPDATE_FLAG_CUR_POWER 
GROUP_UPDATE_FLAG_MAX_POWER 
GROUP_UPDATE_FLAG_LEVEL 
GROUP_UPDATE_FLAG_ZONE 
GROUP_UPDATE_FLAG_POSITION 
GROUP_UPDATE_FLAG_AURAS 
GROUP_UPDATE_FLAG_PET_GUID 
GROUP_UPDATE_FLAG_PET_NAME 
GROUP_UPDATE_FLAG_PET_MODEL_ID 
GROUP_UPDATE_FLAG_PET_CUR_HP 
GROUP_UPDATE_FLAG_PET_MAX_HP 
GROUP_UPDATE_FLAG_PET_POWER_TYPE 
GROUP_UPDATE_FLAG_PET_CUR_POWER 
GROUP_UPDATE_FLAG_PET_MAX_POWER 
GROUP_UPDATE_FLAG_PET_AURAS 
GROUP_UPDATE_FLAG_VEHICLE_SEAT 
GROUP_UPDATE_PET 
GROUP_UPDATE_FULL 
98{
99 GROUP_UPDATE_FLAG_NONE = 0x00000000, // nothing
100 GROUP_UPDATE_FLAG_STATUS = 0x00000001, // uint16, flags
101 GROUP_UPDATE_FLAG_CUR_HP = 0x00000002, // uint32
102 GROUP_UPDATE_FLAG_MAX_HP = 0x00000004, // uint32
103 GROUP_UPDATE_FLAG_POWER_TYPE = 0x00000008, // uint8
104 GROUP_UPDATE_FLAG_CUR_POWER = 0x00000010, // uint16
105 GROUP_UPDATE_FLAG_MAX_POWER = 0x00000020, // uint16
106 GROUP_UPDATE_FLAG_LEVEL = 0x00000040, // uint16
107 GROUP_UPDATE_FLAG_ZONE = 0x00000080, // uint16
108 GROUP_UPDATE_FLAG_POSITION = 0x00000100, // uint16, uint16
109 GROUP_UPDATE_FLAG_AURAS = 0x00000200, // uint64 mask, for each bit set uint32 spellid + uint8 unk
110 GROUP_UPDATE_FLAG_PET_GUID = 0x00000400, // uint64 pet guid
111 GROUP_UPDATE_FLAG_PET_NAME = 0x00000800, // pet name, nullptr terminated string
112 GROUP_UPDATE_FLAG_PET_MODEL_ID = 0x00001000, // uint16, model id
113 GROUP_UPDATE_FLAG_PET_CUR_HP = 0x00002000, // uint32 pet cur health
114 GROUP_UPDATE_FLAG_PET_MAX_HP = 0x00004000, // uint32 pet max health
115 GROUP_UPDATE_FLAG_PET_POWER_TYPE = 0x00008000, // uint8 pet power type
116 GROUP_UPDATE_FLAG_PET_CUR_POWER = 0x00010000, // uint16 pet cur power
117 GROUP_UPDATE_FLAG_PET_MAX_POWER = 0x00020000, // uint16 pet max power
118 GROUP_UPDATE_FLAG_PET_AURAS = 0x00040000, // uint64 mask, for each bit set uint32 spellid + uint8 unk, pet auras...
119 GROUP_UPDATE_FLAG_VEHICLE_SEAT = 0x00080000, // uint32 vehicle_seat_id (index from VehicleSeat.dbc)
120 GROUP_UPDATE_PET = 0x0007FC00, // all pet flags
121 GROUP_UPDATE_FULL = 0x0007FFFF, // all known flags
122};
@ GROUP_UPDATE_FLAG_CUR_HP
Definition: Group.h:101
@ GROUP_UPDATE_FLAG_PET_CUR_HP
Definition: Group.h:113
@ GROUP_UPDATE_FLAG_POWER_TYPE
Definition: Group.h:103
@ GROUP_UPDATE_FULL
Definition: Group.h:121
@ GROUP_UPDATE_FLAG_PET_CUR_POWER
Definition: Group.h:116
@ GROUP_UPDATE_FLAG_PET_MAX_POWER
Definition: Group.h:117
@ GROUP_UPDATE_FLAG_MAX_HP
Definition: Group.h:102
@ GROUP_UPDATE_FLAG_VEHICLE_SEAT
Definition: Group.h:119
@ GROUP_UPDATE_FLAG_STATUS
Definition: Group.h:100
@ GROUP_UPDATE_FLAG_PET_POWER_TYPE
Definition: Group.h:115
@ GROUP_UPDATE_FLAG_MAX_POWER
Definition: Group.h:105
@ GROUP_UPDATE_FLAG_ZONE
Definition: Group.h:107
@ GROUP_UPDATE_FLAG_NONE
Definition: Group.h:99
@ GROUP_UPDATE_FLAG_POSITION
Definition: Group.h:108
@ GROUP_UPDATE_FLAG_PET_MODEL_ID
Definition: Group.h:112
@ GROUP_UPDATE_FLAG_PET_NAME
Definition: Group.h:111
@ GROUP_UPDATE_FLAG_PET_AURAS
Definition: Group.h:118
@ GROUP_UPDATE_FLAG_AURAS
Definition: Group.h:109
@ GROUP_UPDATE_FLAG_LEVEL
Definition: Group.h:106
@ GROUP_UPDATE_PET
Definition: Group.h:120
@ GROUP_UPDATE_FLAG_PET_GUID
Definition: Group.h:110
@ GROUP_UPDATE_FLAG_PET_MAX_HP
Definition: Group.h:114
@ GROUP_UPDATE_FLAG_CUR_POWER
Definition: Group.h:104

◆ lfgGroupFlags

Enumerator
GROUP_LFG_FLAG_APPLY_RANDOM_BUFF 
GROUP_LFG_FLAG_IS_RANDOM_INSTANCE 
GROUP_LFG_FLAG_IS_HEROIC 
125{
129};
@ GROUP_LFG_FLAG_IS_HEROIC
Definition: Group.h:128
@ GROUP_LFG_FLAG_APPLY_RANDOM_BUFF
Definition: Group.h:126
@ GROUP_LFG_FLAG_IS_RANDOM_INSTANCE
Definition: Group.h:127

◆ RollVote

enum RollVote : uint8
Enumerator
PASS 
NEED 
GREED 
DISENCHANT 
NOT_EMITED_YET 
NOT_VALID 
49{
50 PASS = 0,
51 NEED = 1,
52 GREED = 2,
53 DISENCHANT = 3,
55 NOT_VALID = 5
56};
@ PASS
Definition: Group.h:50
@ NOT_EMITED_YET
Definition: Group.h:54
@ NEED
Definition: Group.h:51
@ NOT_VALID
Definition: Group.h:55
@ DISENCHANT
Definition: Group.h:53
@ GREED
Definition: Group.h:52

Variable Documentation

◆ GroupUpdateLength

const uint8 GroupUpdateLength[GROUP_UPDATE_FLAGS_COUNT] = { 0, 2, 2, 2, 1, 2, 2, 2, 2, 4, 8, 8, 1, 2, 2, 2, 1, 2, 2, 8}
static