TrinityCore
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
23namespace lfg
24{
25
27{
29};
30
35{
36 public:
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
78 // Dungeon
80 // Vote Kick
83};
84
85} // namespace lfg
86
87#endif
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:393
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
ObjectGuid m_Leader
Leader GUID.
Definition: LFGGroupData.h:76
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
Definition: LFG.cpp:24
LfgGroupEnum
Definition: LFGGroupData.h:27
@ LFG_GROUP_MAX_KICKS
Definition: LFGGroupData.h:28
LfgState
Definition: LFG.h:74