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
23namespace lfg
24{
25
30
35{
36 public:
38 LfgGroupData(LfgGroupData const&) = delete;
39 LfgGroupData(LfgGroupData&& other) noexcept;
43
44 bool IsLfgGroup();
45
46 // General
47 void SetState(LfgState state);
48 void RestoreState();
49 void AddPlayer(ObjectGuid guid);
50 uint8 RemovePlayer(ObjectGuid guid);
51 void RemoveAllPlayers();
52 void SetLeader(ObjectGuid guid);
53
54 // Dungeon
55 void SetDungeon(uint32 dungeon);
56
57 // VoteKick
58 void DecreaseKicksLeft();
59
60 // General
61 LfgState GetState() const;
62 LfgState GetOldState() const;
63 GuidSet const& GetPlayers() const;
64 uint8 GetPlayerCount() const;
65 ObjectGuid GetLeader() const;
66
67 // Dungeon
68 uint32 GetDungeon(bool asId = true) const;
69
70 // VoteKick
71 uint8 GetKicksLeft() const;
72
73 void SetVoteKick(bool active);
74 bool IsVoteKickActive() const;
75
76 private:
77 // General
82 // Dungeon
84 // Vote Kick
87};
88
89} // namespace lfg
90
91#endif
#define TC_GAME_API
Definition Define.h:129
uint8_t uint8
Definition Define.h:156
uint32_t uint32
Definition Define.h:154
std::set< ObjectGuid > GuidSet
Definition ObjectGuid.h:432
uint8 m_KicksLeft
Number of kicks left.
LfgGroupData(LfgGroupData &&other) noexcept
LfgGroupData & operator=(LfgGroupData &&right) noexcept
LfgGroupData & operator=(LfgGroupData const &)=delete
uint32 m_Dungeon
Dungeon entry.
GuidSet m_Players
Players in group.
ObjectGuid m_Leader
Leader GUID.
LfgState m_State
State if group in LFG.
LfgGroupData(LfgGroupData const &)=delete
LfgState m_OldState
Old State.
Definition LFG.cpp:24
LfgGroupEnum
@ LFG_GROUP_MAX_KICKS
LfgState
Definition LFG.h:74