TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LFG.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 _LFG_H
19 #define _LFG_H
20 
21 #include "Common.h"
22 #include "ObjectGuid.h"
23 
24 namespace lfg
25 {
26 
27 enum LFGEnum
28 {
32 };
33 
35 {
41 };
42 
44 {
45  LFG_UPDATETYPE_DEFAULT = 0, // Internal Use
46  LFG_UPDATETYPE_LEADER_UNK1 = 1, // FIXME: At group leave
58  LFG_UPDATETYPE_GROUP_DISBAND_UNK16 = 17, // FIXME: Sometimes at group disband
63 };
64 
66 {
67  LFG_STATE_NONE, // Not using LFG / LFR
68  LFG_STATE_ROLECHECK, // Rolecheck active
69  LFG_STATE_QUEUED, // Queued
70  LFG_STATE_PROPOSAL, // Proposal active
71  //LFG_STATE_BOOT, // Vote kick active
72  LFG_STATE_DUNGEON = 5, // In LFG Group, in a Dungeon
73  LFG_STATE_FINISHED_DUNGEON, // In LFG Group, in a finished Dungeon
74  LFG_STATE_RAIDBROWSER // Using Raid finder
75 };
76 
79 {
92 };
93 
96 {
100 };
101 
103 {
104  LfgLockInfoData(uint32 _lockStatus = 0, uint16 _requiredItemLevel = 0, float _currentItemLevel = 0) :
105  lockStatus(_lockStatus), requiredItemLevel(_requiredItemLevel), currentItemLevel(_currentItemLevel) { }
106 
110 };
111 
112 typedef std::set<uint32> LfgDungeonSet;
113 typedef std::map<uint32, LfgLockInfoData> LfgLockMap;
114 typedef std::map<ObjectGuid, LfgLockMap> LfgLockPartyMap;
115 typedef std::map<ObjectGuid, uint8> LfgRolesMap;
116 typedef std::map<ObjectGuid, ObjectGuid> LfgGroupsMap;
117 
118 TC_GAME_API std::string ConcatenateDungeons(LfgDungeonSet const& dungeons);
119 TC_GAME_API std::string GetRolesString(uint8 roles);
120 TC_GAME_API std::string GetStateString(LfgState state);
121 
122 } // namespace lfg
123 
124 #endif
Definition: LFG.h:39
Definition: LFG.h:68
Definition: LFG.h:97
Definition: LFG.h:37
Definition: LFG.h:36
std::string ConcatenateDungeons(LfgDungeonSet const &dungeons)
Definition: LFG.cpp:25
LfgLockInfoData(uint32 _lockStatus=0, uint16 _requiredItemLevel=0, float _currentItemLevel=0)
Definition: LFG.h:104
std::map< ObjectGuid, ObjectGuid > LfgGroupsMap
Definition: LFG.h:116
Definition: LFG.h:40
Definition: LFG.h:48
uint32 lockStatus
Definition: LFG.h:107
Definition: LFG.h:67
LfgState
Definition: LFG.h:65
Definition: LFG.h:98
uint16 requiredItemLevel
Definition: LFG.h:108
Definition: LFG.h:72
Definition: LFG.h:69
Definition: LFG.h:70
Definition: LFG.cpp:22
Definition: LFG.h:29
LfgAnswer
Answer state (Also used to check compatibilites)
Definition: LFG.h:95
Definition: LFG.h:74
std::map< uint32, LfgLockInfoData > LfgLockMap
Definition: LFG.h:113
std::string GetStateString(LfgState state)
Definition: LFG.cpp:74
Definition: LFG.h:30
std::set< uint32 > LfgDungeonSet
Definition: LFG.h:112
std::map< ObjectGuid, uint8 > LfgRolesMap
Definition: LFG.h:115
std::string GetRolesString(uint8 roles)
Definition: LFG.cpp:40
uint32_t uint32
Definition: Define.h:150
std::map< ObjectGuid, LfgLockMap > LfgLockPartyMap
Definition: LFG.h:114
uint16_t uint16
Definition: Define.h:151
LfgUpdateType
Definition: LFG.h:43
Definition: LFG.h:45
Definition: LFG.h:99
LfgLockStatusType
Instance lock types.
Definition: LFG.h:78
Definition: LFG.h:102
Definition: LFG.h:31
#define TC_GAME_API
Definition: Define.h:134
Definition: LFG.h:38
uint8_t uint8
Definition: Define.h:152
LfgRoles
Definition: LFG.h:34
float currentItemLevel
Definition: LFG.h:109
LFGEnum
Definition: LFG.h:27