TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lfg::LfgGroupData Class Reference

#include <LFGGroupData.h>

Public Member Functions

 LfgGroupData ()
 
 ~LfgGroupData ()
 
bool IsLfgGroup ()
 
void SetState (LfgState state)
 
void RestoreState ()
 
void AddPlayer (ObjectGuid guid)
 
uint8 RemovePlayer (ObjectGuid guid)
 
void RemoveAllPlayers ()
 
void SetLeader (ObjectGuid guid)
 
void SetDungeon (uint32 dungeon)
 
void DecreaseKicksLeft ()
 
LfgState GetState () const
 
LfgState GetOldState () const
 
GuidSet constGetPlayers () const
 
uint8 GetPlayerCount () const
 
ObjectGuid GetLeader () const
 
uint32 GetDungeon (bool asId=true) const
 
uint8 GetKicksLeft () const
 
void SetVoteKick (bool active)
 
bool IsVoteKickActive () const
 

Private Attributes

LfgState m_State
 State if group in LFG. More...
 
LfgState m_OldState
 Old State. More...
 
ObjectGuid m_Leader
 Leader GUID. More...
 
GuidSet m_Players
 Players in group. More...
 
uint32 m_Dungeon
 Dungeon entry. More...
 
uint8 m_KicksLeft
 Number of kicks left. More...
 
bool m_VoteKickActive
 

Detailed Description

Stores all lfg data needed about a group.

Constructor & Destructor Documentation

lfg::LfgGroupData::LfgGroupData ( )
26 { }
Definition: LFG.h:67
ObjectGuid m_Leader
Leader GUID.
Definition: LFGGroupData.h:76
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74
Definition: LFGGroupData.h:28
bool m_VoteKickActive
Definition: LFGGroupData.h:82
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75
lfg::LfgGroupData::~LfgGroupData ( )
29 { }

Member Function Documentation

void lfg::LfgGroupData::AddPlayer ( ObjectGuid  guid)
58 {
59  m_Players.insert(guid);
60 }
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
void lfg::LfgGroupData::DecreaseKicksLeft ( )
86 {
87  if (m_KicksLeft)
88  --m_KicksLeft;
89 }
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
uint32 lfg::LfgGroupData::GetDungeon ( bool  asId = true) const
117 {
118  if (asId)
119  return (m_Dungeon & 0x00FFFFFF);
120  else
121  return m_Dungeon;
122 }
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
uint8 lfg::LfgGroupData::GetKicksLeft ( ) const
125 {
126  return m_KicksLeft;
127 }
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
ObjectGuid lfg::LfgGroupData::GetLeader ( ) const
112 {
113  return m_Leader;
114 }
ObjectGuid m_Leader
Leader GUID.
Definition: LFGGroupData.h:76
LfgState lfg::LfgGroupData::GetOldState ( ) const
97 {
98  return m_OldState;
99 }
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75

+ Here is the caller graph for this function:

uint8 lfg::LfgGroupData::GetPlayerCount ( ) const
107 {
108  return m_Players.size();
109 }
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
GuidSet const & lfg::LfgGroupData::GetPlayers ( ) const
102 {
103  return m_Players;
104 }
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
LfgState lfg::LfgGroupData::GetState ( ) const
92 {
93  return m_State;
94 }
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74

+ Here is the caller graph for this function:

bool lfg::LfgGroupData::IsLfgGroup ( )
32 {
33  return m_OldState != LFG_STATE_NONE;
34 }
Definition: LFG.h:67
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75
bool lfg::LfgGroupData::IsVoteKickActive ( ) const
135 {
136  return m_VoteKickActive;
137 }
bool m_VoteKickActive
Definition: LFGGroupData.h:82
void lfg::LfgGroupData::RemoveAllPlayers ( )
71 {
72  m_Players.clear();
73 }
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
uint8 lfg::LfgGroupData::RemovePlayer ( ObjectGuid  guid)
63 {
64  GuidSet::iterator it = m_Players.find(guid);
65  if (it != m_Players.end())
66  m_Players.erase(it);
67  return uint8(m_Players.size());
68 }
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
uint8_t uint8
Definition: g3dmath.h:164
void lfg::LfgGroupData::RestoreState ( )
53 {
55 }
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75

+ Here is the caller graph for this function:

void lfg::LfgGroupData::SetDungeon ( uint32  dungeon)
81 {
82  m_Dungeon = dungeon;
83 }
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
void lfg::LfgGroupData::SetLeader ( ObjectGuid  guid)
76 {
77  m_Leader = guid;
78 }
ObjectGuid m_Leader
Leader GUID.
Definition: LFGGroupData.h:76
void lfg::LfgGroupData::SetState ( LfgState  state)
37 {
38  switch (state)
39  {
40  case LFG_STATE_NONE:
41  m_Dungeon = 0;
44  case LFG_STATE_DUNGEON:
45  m_OldState = state;
46  // No break on purpose
47  default:
48  m_State = state;
49  }
50 }
Definition: LFG.h:67
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
Definition: LFG.h:72
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74
Definition: LFGGroupData.h:28
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75

+ Here is the caller graph for this function:

void lfg::LfgGroupData::SetVoteKick ( bool  active)
130 {
131  m_VoteKickActive = active;
132 }
bool m_VoteKickActive
Definition: LFGGroupData.h:82

Member Data Documentation

uint32 lfg::LfgGroupData::m_Dungeon
private

Dungeon entry.

uint8 lfg::LfgGroupData::m_KicksLeft
private

Number of kicks left.

ObjectGuid lfg::LfgGroupData::m_Leader
private

Leader GUID.

LfgState lfg::LfgGroupData::m_OldState
private

Old State.

GuidSet lfg::LfgGroupData::m_Players
private

Players in group.

LfgState lfg::LfgGroupData::m_State
private

State if group in LFG.

bool lfg::LfgGroupData::m_VoteKickActive
private

The documentation for this class was generated from the following files: