TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LFGGroupData.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
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 
27 {
29 };
30 
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
78  // Dungeon
80  // Vote Kick
83 };
84 
85 } // namespace lfg
86 
87 #endif
LfgGroupEnum
Definition: LFGGroupData.h:26
ObjectGuid m_Leader
Leader GUID.
Definition: LFGGroupData.h:76
uint8 m_KicksLeft
Number of kicks left.
Definition: LFGGroupData.h:81
LfgState
Definition: LFG.h:65
uint32 m_Dungeon
Dungeon entry.
Definition: LFGGroupData.h:79
TC_GAME_API HashMapHolder< Player >::MapType const & GetPlayers()
Definition: ObjectAccessor.cpp:258
LfgState m_State
State if group in LFG.
Definition: LFGGroupData.h:74
Definition: LFG.cpp:22
GuidSet m_Players
Players in group.
Definition: LFGGroupData.h:77
uint32_t uint32
Definition: Define.h:150
Definition: LFGGroupData.h:28
bool m_VoteKickActive
Definition: LFGGroupData.h:82
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:332
#define TC_GAME_API
Definition: Define.h:134
uint8_t uint8
Definition: Define.h:152
Definition: LFGGroupData.h:34
Definition: ObjectGuid.h:189
LfgState m_OldState
Old State.
Definition: LFGGroupData.h:75