TrinityCore
Loading...
Searching...
No Matches
LFGGroupData.h
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef _LFGGROUPDATA_H
19
#define _LFGGROUPDATA_H
20
21
#include "
LFG.h
"
22
23
namespace
lfg
24
{
25
26
enum
LfgGroupEnum
27
{
28
LFG_GROUP_MAX_KICKS
= 3,
29
};
30
34
class
TC_GAME_API
LfgGroupData
35
{
36
public
:
37
LfgGroupData
();
38
~LfgGroupData
();
39
40
bool
IsLfgGroup();
41
42
// General
43
void
SetState(
LfgState
state);
44
void
RestoreState();
45
void
AddPlayer(
ObjectGuid
guid);
46
uint8
RemovePlayer(
ObjectGuid
guid);
47
void
RemoveAllPlayers();
48
void
SetLeader(
ObjectGuid
guid);
49
50
// Dungeon
51
void
SetDungeon(
uint32
dungeon);
52
53
// VoteKick
54
void
DecreaseKicksLeft();
55
56
// General
57
LfgState
GetState()
const
;
58
LfgState
GetOldState()
const
;
59
GuidSet
const
& GetPlayers()
const
;
60
uint8
GetPlayerCount()
const
;
61
ObjectGuid
GetLeader()
const
;
62
63
// Dungeon
64
uint32
GetDungeon(
bool
asId =
true
)
const
;
65
66
// VoteKick
67
uint8
GetKicksLeft()
const
;
68
69
void
SetVoteKick(
bool
active);
70
bool
IsVoteKickActive()
const
;
71
72
private
:
73
// General
74
LfgState
m_State
;
75
LfgState
m_OldState
;
76
ObjectGuid
m_Leader
;
77
GuidSet
m_Players
;
78
// Dungeon
79
uint32
m_Dungeon
;
80
// Vote Kick
81
uint8
m_KicksLeft
;
82
bool
m_VoteKickActive
;
83
};
84
85
}
// namespace lfg
86
87
#endif
TC_GAME_API
#define TC_GAME_API
Definition
Define.h:114
uint8
uint8_t uint8
Definition
Define.h:135
uint32
uint32_t uint32
Definition
Define.h:133
LFG.h
GuidSet
std::set< ObjectGuid > GuidSet
Definition
ObjectGuid.h:260
ObjectGuid
Definition
ObjectGuid.h:138
lfg::LfgGroupData
Definition
LFGGroupData.h:35
lfg::LfgGroupData::m_KicksLeft
uint8 m_KicksLeft
Number of kicks left.
Definition
LFGGroupData.h:81
lfg::LfgGroupData::m_VoteKickActive
bool m_VoteKickActive
Definition
LFGGroupData.h:82
lfg::LfgGroupData::m_Dungeon
uint32 m_Dungeon
Dungeon entry.
Definition
LFGGroupData.h:79
lfg::LfgGroupData::m_Players
GuidSet m_Players
Players in group.
Definition
LFGGroupData.h:77
lfg::LfgGroupData::m_Leader
ObjectGuid m_Leader
Leader GUID.
Definition
LFGGroupData.h:76
lfg::LfgGroupData::m_State
LfgState m_State
State if group in LFG.
Definition
LFGGroupData.h:74
lfg::LfgGroupData::m_OldState
LfgState m_OldState
Old State.
Definition
LFGGroupData.h:75
lfg
Definition
LFG.cpp:24
lfg::LfgState
LfgState
Definition
LFG.h:66
lfg::LfgGroupEnum
LfgGroupEnum
Definition
LFGGroupData.h:27
lfg::LFG_GROUP_MAX_KICKS
@ LFG_GROUP_MAX_KICKS
Definition
LFGGroupData.h:28
server
game
DungeonFinding
LFGGroupData.h
Generated on Sun May 10 2026 02:30:14 for TrinityCore by
1.9.8