TrinityCore
LFGPlayerData.cpp
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#include "LFGPlayerData.h"
19
20namespace lfg
21{
22
24 m_Team(0), m_Group(), m_Roles(0), m_NumberOfPartyMembersAtJoin(0)
25{ }
26
28
30{
31 m_Ticket = ticket;
32}
33
35{
36 switch (state)
37 {
38 case LFG_STATE_NONE:
40 m_Roles = 0;
41 m_SelectedDungeons.clear();
42 [[fallthrough]];
44 m_OldState = state;
45 [[fallthrough]];
46 default:
47 m_State = state;
48 }
49}
50
52{
54 {
55 m_SelectedDungeons.clear();
56 m_Roles = 0;
57 }
59}
60
62{
63 m_Team = team;
64}
65
67{
68 m_Group = group;
69}
70
72{
73 m_Roles = roles;
74}
75
77{
78 m_SelectedDungeons = dungeons;
79}
80
82{
83 return m_Ticket;
84}
85
87{
88 return m_State;
89}
90
92{
93 return m_OldState;
94}
95
97{
98 return m_Team;
99}
100
102{
103 return m_Group;
104}
105
107{
108 return m_Roles;
109}
110
112{
113 return m_SelectedDungeons;
114}
115
117{
119}
120
122{
124}
125
126} // namespace lfg
uint8_t uint8
Definition: Define.h:144
uint8 m_Team
Player team - determines the queue to join.
Definition: LFGPlayerData.h:68
LfgState m_OldState
Old State - Used to restore state after failed Rolecheck/Proposal.
Definition: LFGPlayerData.h:66
LfgState GetOldState() const
uint8 GetNumberOfPartyMembersAtJoin()
uint8 m_Roles
Roles the player selected when joined LFG.
Definition: LFGPlayerData.h:72
ObjectGuid GetGroup() const
void SetSelectedDungeons(LfgDungeonSet const &dungeons)
WorldPackets::LFG::RideTicket const & GetTicket() const
void SetState(LfgState state)
ObjectGuid m_Group
Original group of player when joined LFG.
Definition: LFGPlayerData.h:69
LfgState m_State
State if group in LFG.
Definition: LFGPlayerData.h:65
void SetGroup(ObjectGuid group)
uint8 m_NumberOfPartyMembersAtJoin
Definition: LFGPlayerData.h:76
void SetTicket(WorldPackets::LFG::RideTicket const &ticket)
LfgDungeonSet m_SelectedDungeons
Selected Dungeons when joined LFG.
Definition: LFGPlayerData.h:73
void SetTeam(uint8 team)
uint8 GetTeam() const
void SetNumberOfPartyMembersAtJoin(uint8 count)
uint8 GetRoles() const
LfgState GetState() const
void SetRoles(uint8 roles)
LfgDungeonSet const & GetSelectedDungeons() const
WorldPackets::LFG::RideTicket m_Ticket
Join ticket.
Definition: LFGPlayerData.h:64
Definition: LFG.cpp:24
std::set< uint32 > LfgDungeonSet
Definition: LFG.h:132
LfgState
Definition: LFG.h:74
@ LFG_STATE_FINISHED_DUNGEON
Definition: LFG.h:81
@ LFG_STATE_DUNGEON
Definition: LFG.h:80
@ LFG_STATE_NONE
Definition: LFG.h:75