TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WhoPackets.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 WhoPackets_h__
19 #define WhoPackets_h__
20 
21 #include "Packet.h"
22 #include "ObjectGuid.h"
23 #include "QueryPackets.h"
24 
25 namespace WorldPackets
26 {
27  namespace Who
28  {
29  class WhoIsRequest final : public ClientPacket
30  {
31  public:
32  WhoIsRequest(WorldPacket&& packet) : ClientPacket(CMSG_WHO_IS, std::move(packet)) { }
33 
34  void Read() override;
35 
36  std::string CharName;
37  };
38 
39  class WhoIsResponse final : public ServerPacket
40  {
41  public:
43 
44  WorldPacket const* Write() override;
45 
46  std::string AccountName;
47  };
48 
49  struct WhoWord
50  {
51  std::string Word;
52  };
53 
55  {
59  };
60 
61  struct WhoRequest
62  {
65  std::string Name;
66  std::string VirtualRealmName;
67  std::string Guild;
68  std::string GuildVirtualRealmName;
71  std::vector<WhoWord> Words;
72  bool ShowEnemies = false;
73  bool ShowArenaPlayers = false;
74  bool ExactName = false;
76  };
77 
78  class WhoRequestPkt final : public ClientPacket
79  {
80  public:
81  WhoRequestPkt(WorldPacket&& packet) : ClientPacket(CMSG_WHO, std::move(packet)) { }
82 
83  void Read() override;
84 
86  std::vector<int32> Areas;
87  };
88 
89  struct WhoEntry
90  {
94  std::string GuildName;
96  bool IsGM = false;
97  };
98 
99  struct WhoResponse
100  {
101  std::vector<WhoEntry> Entries;
102  };
103 
104  class WhoResponsePkt final : public ServerPacket
105  {
106  public:
108 
109  WorldPacket const* Write() override;
110 
112  };
113  }
114 }
115 
116 #endif // WhoPackets_h__
Definition: Opcodes.h:718
Definition: Opcodes.h:1627
std::string Guild
Definition: WhoPackets.h:67
std::string GuildVirtualRealmName
Definition: WhoPackets.h:68
WorldPacket const * Write() override
Definition: WhoPackets.cpp:25
uint32 RequesterVirtualRealmAddress
Definition: WhoPackets.h:58
Definition: Opcodes.h:1628
STL namespace.
bool ShowEnemies
Definition: WhoPackets.h:72
Definition: WhoPackets.h:39
Optional< WhoRequestServerInfo > ServerInfo
Definition: WhoPackets.h:75
std::string CharName
Definition: WhoPackets.h:36
std::vector< WhoEntry > Entries
Definition: WhoPackets.h:101
bool IsGM
Definition: WhoPackets.h:96
int32 MaxLevel
Definition: WhoPackets.h:64
bool ExactName
Definition: WhoPackets.h:74
uint32 GuildVirtualRealmAddress
Definition: WhoPackets.h:93
ObjectGuid GuildGUID
Definition: WhoPackets.h:92
std::string GuildName
Definition: WhoPackets.h:94
Definition: Packet.h:59
WhoRequestPkt(WorldPacket &&packet)
Definition: WhoPackets.h:81
Definition: QueryPackets.h:92
WhoResponse Response
Definition: WhoPackets.h:111
int32 FactionGroup
Definition: WhoPackets.h:56
Definition: WhoPackets.h:54
Definition: WhoPackets.h:89
Definition: WhoPackets.h:29
Definition: Packet.h:46
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
int32 RaceFilter
Definition: WhoPackets.h:69
int32 AreaID
Definition: WhoPackets.h:95
bool ShowArenaPlayers
Definition: WhoPackets.h:73
boost::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Common.h:170
int32 ClassFilter
Definition: WhoPackets.h:70
std::string Name
Definition: WhoPackets.h:65
Query::PlayerGuidLookupData PlayerData
Definition: WhoPackets.h:91
WorldPacket const * Write() override
Definition: WhoPackets.cpp:124
std::vector< WhoWord > Words
Definition: WhoPackets.h:71
Definition: BattlegroundMgr.h:57
void Read() override
Definition: WhoPackets.cpp:86
void Read() override
Definition: WhoPackets.cpp:20
std::vector< int32 > Areas
Definition: WhoPackets.h:86
WhoRequest Request
Definition: WhoPackets.h:85
std::string VirtualRealmName
Definition: WhoPackets.h:66
Definition: WhoPackets.h:61
int32 Locale
Definition: WhoPackets.h:57
Definition: ObjectGuid.h:189
Definition: WhoPackets.h:104
std::string Word
Definition: WhoPackets.h:51
WhoIsRequest(WorldPacket &&packet)
Definition: WhoPackets.h:32
int32 MinLevel
Definition: WhoPackets.h:63
Definition: WorldPacket.h:26
WhoResponsePkt()
Definition: WhoPackets.h:107
std::string AccountName
Definition: WhoPackets.h:46
Definition: WhoPackets.h:49
Definition: Opcodes.h:719
Definition: WhoPackets.h:99
WhoIsResponse()
Definition: WhoPackets.h:42
Definition: WhoPackets.h:78