TrinityCore
Loading...
Searching...
No Matches
WhoPackets.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 TRINITYCORE_WHO_PACKETS_H
19
#define TRINITYCORE_WHO_PACKETS_H
20
21
#include "
Packet.h
"
22
#include "
PacketUtilities.h
"
23
#include "
SharedDefines.h
"
24
25
namespace
WorldPackets
26
{
27
namespace
Who
28
{
29
class
WhoIsRequest
final
:
public
ClientPacket
30
{
31
public
:
32
explicit
WhoIsRequest
(
WorldPacket
&&
packet
) :
ClientPacket
(
CMSG_WHOIS
,
std
::move(
packet
)) { }
33
34
void
Read
()
override
;
35
36
std::string
CharName
;
37
};
38
39
class
WhoIsResponse
final
:
public
ServerPacket
40
{
41
public
:
42
explicit
WhoIsResponse
() :
ServerPacket
(
SMSG_WHOIS
, 2) { }
43
44
WorldPacket
const
*
Write
()
override
;
45
46
std::string
AccountName
;
47
};
48
49
struct
WhoWord
50
{
51
std::string
Word
;
52
};
53
54
struct
WhoRequest
55
{
56
int32
MinLevel
= 0;
57
int32
MaxLevel
= 0;
58
std::string
Name
;
59
std::string
Guild
;
60
int32
RaceFilter
= -1;
61
int32
ClassFilter
= -1;
62
Array<int32, 10>
Areas
;
63
Array<WhoWord, 4>
Words
;
64
};
65
66
class
WhoRequestPkt
final
:
public
ClientPacket
67
{
68
public
:
69
explicit
WhoRequestPkt
(
WorldPacket
&&
packet
) :
ClientPacket
(
CMSG_WHO
,
std
::move(
packet
)) { }
70
71
void
Read
()
override
;
72
73
WhoRequest
Request
;
74
};
75
76
struct
WhoEntry
77
{
78
std::string_view
Name
;
79
std::string_view
GuildName
;
80
int32
Level
= 0;
81
int32
ClassID
=
CLASS_NONE
;
82
int32
Race
=
RACE_NONE
;
83
uint8
Sex
=
GENDER_NONE
;
84
int32
AreaID
= 0;
85
};
86
87
struct
WhoResponse
88
{
89
std::vector<WhoEntry>
Entries
;
90
uint32
TotalMatches
= 0;
91
};
92
93
class
WhoResponsePkt
final
:
public
ServerPacket
94
{
95
public
:
96
explicit
WhoResponsePkt
() :
ServerPacket
(
SMSG_WHO
, 1) { }
97
98
WorldPacket
const
*
Write
()
override
;
99
100
WhoResponse
Response
;
101
};
102
}
103
}
104
105
#endif
// TRINITYCORE_WHO_PACKETS_H
uint8
uint8_t uint8
Definition
Define.h:135
int32
int32_t int32
Definition
Define.h:129
uint32
uint32_t uint32
Definition
Define.h:133
PacketUtilities.h
Packet.h
SharedDefines.h
GENDER_NONE
@ GENDER_NONE
Definition
SharedDefines.h:79
CLASS_NONE
@ CLASS_NONE
Definition
SharedDefines.h:138
RACE_NONE
@ RACE_NONE
Definition
SharedDefines.h:86
WorldPacket
Definition
WorldPacket.h:27
WorldPackets::Array
Definition
PacketUtilities.h:120
WorldPackets::ClientPacket
Definition
Packet.h:60
WorldPackets::ServerPacket
Definition
Packet.h:46
WorldPackets::Who::WhoIsRequest
Definition
WhoPackets.h:30
WorldPackets::Who::WhoIsRequest::WhoIsRequest
WhoIsRequest(WorldPacket &&packet)
Definition
WhoPackets.h:32
WorldPackets::Who::WhoIsRequest::CharName
std::string CharName
Definition
WhoPackets.h:36
WorldPackets::Who::WhoIsRequest::Read
void Read() override
Definition
WhoPackets.cpp:22
WorldPackets::Who::WhoIsResponse
Definition
WhoPackets.h:40
WorldPackets::Who::WhoIsResponse::AccountName
std::string AccountName
Definition
WhoPackets.h:46
WorldPackets::Who::WhoIsResponse::Write
WorldPacket const * Write() override
Definition
WhoPackets.cpp:27
WorldPackets::Who::WhoIsResponse::WhoIsResponse
WhoIsResponse()
Definition
WhoPackets.h:42
WorldPackets::Who::WhoRequestPkt
Definition
WhoPackets.h:67
WorldPackets::Who::WhoRequestPkt::Request
WhoRequest Request
Definition
WhoPackets.h:73
WorldPackets::Who::WhoRequestPkt::Read
void Read() override
Definition
WhoPackets.cpp:61
WorldPackets::Who::WhoRequestPkt::WhoRequestPkt
WhoRequestPkt(WorldPacket &&packet)
Definition
WhoPackets.h:69
WorldPackets::Who::WhoResponsePkt
Definition
WhoPackets.h:94
WorldPackets::Who::WhoResponsePkt::Response
WhoResponse Response
Definition
WhoPackets.h:100
WorldPackets::Who::WhoResponsePkt::WhoResponsePkt
WhoResponsePkt()
Definition
WhoPackets.h:96
WorldPackets::Who::WhoResponsePkt::Write
WorldPacket const * Write() override
Definition
WhoPackets.cpp:90
SMSG_WHO
@ SMSG_WHO
Definition
Opcodes.h:128
SMSG_WHOIS
@ SMSG_WHOIS
Definition
Opcodes.h:130
CMSG_WHOIS
@ CMSG_WHOIS
Definition
Opcodes.h:129
CMSG_WHO
@ CMSG_WHO
Definition
Opcodes.h:127
WorldPackets
Definition
AchievementMgr.h:35
std
STL namespace.
WorldPackets::Who::WhoEntry
Definition
WhoPackets.h:77
WorldPackets::Who::WhoEntry::AreaID
int32 AreaID
Definition
WhoPackets.h:84
WorldPackets::Who::WhoEntry::Sex
uint8 Sex
Definition
WhoPackets.h:83
WorldPackets::Who::WhoEntry::Name
std::string_view Name
Definition
WhoPackets.h:78
WorldPackets::Who::WhoEntry::Race
int32 Race
Definition
WhoPackets.h:82
WorldPackets::Who::WhoEntry::Level
int32 Level
Definition
WhoPackets.h:80
WorldPackets::Who::WhoEntry::ClassID
int32 ClassID
Definition
WhoPackets.h:81
WorldPackets::Who::WhoEntry::GuildName
std::string_view GuildName
Definition
WhoPackets.h:79
WorldPackets::Who::WhoRequest
Definition
WhoPackets.h:55
WorldPackets::Who::WhoRequest::MaxLevel
int32 MaxLevel
Definition
WhoPackets.h:57
WorldPackets::Who::WhoRequest::Guild
std::string Guild
Definition
WhoPackets.h:59
WorldPackets::Who::WhoRequest::RaceFilter
int32 RaceFilter
Definition
WhoPackets.h:60
WorldPackets::Who::WhoRequest::ClassFilter
int32 ClassFilter
Definition
WhoPackets.h:61
WorldPackets::Who::WhoRequest::Name
std::string Name
Definition
WhoPackets.h:58
WorldPackets::Who::WhoRequest::Areas
Array< int32, 10 > Areas
Definition
WhoPackets.h:62
WorldPackets::Who::WhoRequest::MinLevel
int32 MinLevel
Definition
WhoPackets.h:56
WorldPackets::Who::WhoRequest::Words
Array< WhoWord, 4 > Words
Definition
WhoPackets.h:63
WorldPackets::Who::WhoResponse
Definition
WhoPackets.h:88
WorldPackets::Who::WhoResponse::Entries
std::vector< WhoEntry > Entries
Definition
WhoPackets.h:89
WorldPackets::Who::WhoResponse::TotalMatches
uint32 TotalMatches
Definition
WhoPackets.h:90
WorldPackets::Who::WhoWord
Definition
WhoPackets.h:50
WorldPackets::Who::WhoWord::Word
std::string Word
Definition
WhoPackets.h:51
server
game
Server
Packets
WhoPackets.h
Generated by
1.9.8