TrinityCore
Loading...
Searching...
No Matches
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
27LfgPlayerData::LfgPlayerData(LfgPlayerData&& other) noexcept = default;
28LfgPlayerData& LfgPlayerData::operator=(LfgPlayerData&& right) noexcept = default;
30
32{
33 m_Ticket = ticket;
34}
35
37{
38 switch (state)
39 {
40 case LFG_STATE_NONE:
42 m_Roles = 0;
43 m_SelectedDungeons.clear();
44 [[fallthrough]];
46 m_OldState = state;
47 [[fallthrough]];
48 default:
49 m_State = state;
50 }
51}
52
54{
56 {
57 m_SelectedDungeons.clear();
58 m_Roles = 0;
59 }
61}
62
64{
65 m_Team = team;
66}
67
69{
70 m_Group = group;
71}
72
74{
75 m_Roles = roles;
76}
77
79{
80 m_SelectedDungeons = dungeons;
81}
82
87
89{
90 return m_State;
91}
92
97
99{
100 return m_Team;
101}
102
104{
105 return m_Group;
106}
107
109{
110 return m_Roles;
111}
112
117
122
127
128} // namespace lfg
uint8_t uint8
Definition Define.h:156
uint8 m_Team
Player team - determines the queue to join.
LfgState m_OldState
Old State - Used to restore state after failed Rolecheck/Proposal.
LfgPlayerData & operator=(LfgPlayerData const &)=delete
LfgState GetOldState() const
uint8 GetNumberOfPartyMembersAtJoin()
uint8 m_Roles
Roles the player selected when joined LFG.
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.
LfgState m_State
State if group in LFG.
void SetGroup(ObjectGuid group)
uint8 m_NumberOfPartyMembersAtJoin
void SetTicket(WorldPackets::LFG::RideTicket const &ticket)
LfgDungeonSet m_SelectedDungeons
Selected Dungeons when joined LFG.
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 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