TrinityCore
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 WhoPackets_h__
19
#define WhoPackets_h__
20
21
#include "
Packet.h
"
22
#include "
ObjectGuid.h
"
23
#include "
QueryPackets.h
"
24
#include "
RaceMask.h
"
25
26
namespace
WorldPackets
27
{
28
namespace
Who
29
{
30
class
WhoIsRequest
final :
public
ClientPacket
31
{
32
public
:
33
WhoIsRequest
(
WorldPacket
&& packet) :
ClientPacket
(
CMSG_WHO_IS
,
std
::move(packet)) { }
34
35
void
Read
()
override
;
36
37
std::string
CharName
;
38
};
39
40
class
WhoIsResponse
final :
public
ServerPacket
41
{
42
public
:
43
WhoIsResponse
() :
ServerPacket
(
SMSG_WHO_IS
, 2) { }
44
45
WorldPacket
const
*
Write
()
override
;
46
47
std::string
AccountName
;
48
};
49
50
struct
WhoWord
51
{
52
std::string
Word
;
53
};
54
55
struct
WhoRequestServerInfo
56
{
57
int32
FactionGroup
= 0;
58
int32
Locale
= 0;
59
uint32
RequesterVirtualRealmAddress
= 0;
60
};
61
62
struct
WhoRequest
63
{
64
int32
MinLevel
= 0;
65
int32
MaxLevel
= 0;
66
std::string
Name
;
67
std::string
VirtualRealmName
;
68
std::string
Guild
;
69
std::string
GuildVirtualRealmName
;
70
Trinity::RaceMask<int64>
RaceFilter
= {
SI64LIT
(0) };
71
int32
ClassFilter
= -1;
72
std::vector<WhoWord>
Words
;
73
bool
ShowEnemies
=
false
;
74
bool
ShowArenaPlayers
=
false
;
75
bool
ExactName
=
false
;
76
Optional<WhoRequestServerInfo>
ServerInfo
;
77
};
78
79
class
WhoRequestPkt
final :
public
ClientPacket
80
{
81
public
:
82
WhoRequestPkt
(
WorldPacket
&& packet) :
ClientPacket
(
CMSG_WHO
,
std
::move(packet)) { }
83
84
void
Read
()
override
;
85
86
WhoRequest
Request
;
87
uint32
RequestID
= 0;
88
uint8
Origin
= 0;
// 1 = Social, 2 = Chat, 3 = Item
89
bool
IsFromAddOn
=
false
;
90
Array<int32, 10>
Areas
;
91
};
92
93
struct
WhoEntry
94
{
95
Query::PlayerGuidLookupData
PlayerData
;
96
ObjectGuid
GuildGUID
;
97
uint32
GuildVirtualRealmAddress
= 0;
98
std::string
GuildName
;
99
int32
AreaID
= 0;
100
bool
IsGM
=
false
;
101
};
102
103
struct
WhoResponse
104
{
105
std::vector<WhoEntry>
Entries
;
106
};
107
108
class
WhoResponsePkt
final :
public
ServerPacket
109
{
110
public
:
111
WhoResponsePkt
() :
ServerPacket
(
SMSG_WHO
, 1) { }
112
113
WorldPacket
const
*
Write
()
override
;
114
115
uint32
RequestID
= 0;
116
WhoResponse
Response
;
117
};
118
}
119
}
120
121
#endif
// WhoPackets_h__
uint8
uint8_t uint8
Definition:
Define.h:144
SI64LIT
#define SI64LIT(N)
Definition:
Define.h:130
int32
int32_t int32
Definition:
Define.h:138
uint32
uint32_t uint32
Definition:
Define.h:142
ObjectGuid.h
Optional
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition:
Optional.h:25
Packet.h
QueryPackets.h
RaceMask.h
ObjectGuid
Definition:
ObjectGuid.h:268
WorldPacket
Definition:
WorldPacket.h:26
WorldPackets::Array< int32, 10 >
WorldPackets::ClientPacket
Definition:
Packet.h:61
WorldPackets::ServerPacket
Definition:
Packet.h:47
WorldPackets::Who::WhoIsRequest
Definition:
WhoPackets.h:31
WorldPackets::Who::WhoIsRequest::WhoIsRequest
WhoIsRequest(WorldPacket &&packet)
Definition:
WhoPackets.h:33
WorldPackets::Who::WhoIsRequest::CharName
std::string CharName
Definition:
WhoPackets.h:37
WorldPackets::Who::WhoIsRequest::Read
void Read() override
Definition:
WhoPackets.cpp:20
WorldPackets::Who::WhoIsResponse
Definition:
WhoPackets.h:41
WorldPackets::Who::WhoIsResponse::AccountName
std::string AccountName
Definition:
WhoPackets.h:47
WorldPackets::Who::WhoIsResponse::Write
WorldPacket const * Write() override
Definition:
WhoPackets.cpp:25
WorldPackets::Who::WhoIsResponse::WhoIsResponse
WhoIsResponse()
Definition:
WhoPackets.h:43
WorldPackets::Who::WhoRequestPkt
Definition:
WhoPackets.h:80
WorldPackets::Who::WhoRequestPkt::RequestID
uint32 RequestID
Definition:
WhoPackets.h:87
WorldPackets::Who::WhoRequestPkt::Areas
Array< int32, 10 > Areas
Definition:
WhoPackets.h:90
WorldPackets::Who::WhoRequestPkt::Request
WhoRequest Request
Definition:
WhoPackets.h:86
WorldPackets::Who::WhoRequestPkt::Read
void Read() override
Definition:
WhoPackets.cpp:88
WorldPackets::Who::WhoRequestPkt::Origin
uint8 Origin
Definition:
WhoPackets.h:88
WorldPackets::Who::WhoRequestPkt::IsFromAddOn
bool IsFromAddOn
Definition:
WhoPackets.h:89
WorldPackets::Who::WhoRequestPkt::WhoRequestPkt
WhoRequestPkt(WorldPacket &&packet)
Definition:
WhoPackets.h:82
WorldPackets::Who::WhoResponsePkt
Definition:
WhoPackets.h:109
WorldPackets::Who::WhoResponsePkt::Response
WhoResponse Response
Definition:
WhoPackets.h:116
WorldPackets::Who::WhoResponsePkt::WhoResponsePkt
WhoResponsePkt()
Definition:
WhoPackets.h:111
WorldPackets::Who::WhoResponsePkt::Write
WorldPacket const * Write() override
Definition:
WhoPackets.cpp:129
WorldPackets::Who::WhoResponsePkt::RequestID
uint32 RequestID
Definition:
WhoPackets.h:115
CMSG_WHO
@ CMSG_WHO
Definition:
Opcodes.h:894
CMSG_WHO_IS
@ CMSG_WHO_IS
Definition:
Opcodes.h:895
SMSG_WHO
@ SMSG_WHO
Definition:
Opcodes.h:2073
SMSG_WHO_IS
@ SMSG_WHO_IS
Definition:
Opcodes.h:2074
WorldPackets
Definition:
GameObjectAI.h:36
std
STL namespace.
Trinity::RaceMask< int64 >
WorldPackets::Query::PlayerGuidLookupData
Definition:
QueryPackets.h:119
WorldPackets::Who::WhoEntry
Definition:
WhoPackets.h:94
WorldPackets::Who::WhoEntry::AreaID
int32 AreaID
Definition:
WhoPackets.h:99
WorldPackets::Who::WhoEntry::GuildVirtualRealmAddress
uint32 GuildVirtualRealmAddress
Definition:
WhoPackets.h:97
WorldPackets::Who::WhoEntry::PlayerData
Query::PlayerGuidLookupData PlayerData
Definition:
WhoPackets.h:95
WorldPackets::Who::WhoEntry::GuildGUID
ObjectGuid GuildGUID
Definition:
WhoPackets.h:96
WorldPackets::Who::WhoEntry::GuildName
std::string GuildName
Definition:
WhoPackets.h:98
WorldPackets::Who::WhoEntry::IsGM
bool IsGM
Definition:
WhoPackets.h:100
WorldPackets::Who::WhoRequestServerInfo
Definition:
WhoPackets.h:56
WorldPackets::Who::WhoRequestServerInfo::Locale
int32 Locale
Definition:
WhoPackets.h:58
WorldPackets::Who::WhoRequestServerInfo::RequesterVirtualRealmAddress
uint32 RequesterVirtualRealmAddress
Definition:
WhoPackets.h:59
WorldPackets::Who::WhoRequestServerInfo::FactionGroup
int32 FactionGroup
Definition:
WhoPackets.h:57
WorldPackets::Who::WhoRequest
Definition:
WhoPackets.h:63
WorldPackets::Who::WhoRequest::Words
std::vector< WhoWord > Words
Definition:
WhoPackets.h:72
WorldPackets::Who::WhoRequest::MaxLevel
int32 MaxLevel
Definition:
WhoPackets.h:65
WorldPackets::Who::WhoRequest::Guild
std::string Guild
Definition:
WhoPackets.h:68
WorldPackets::Who::WhoRequest::ExactName
bool ExactName
Definition:
WhoPackets.h:75
WorldPackets::Who::WhoRequest::RaceFilter
Trinity::RaceMask< int64 > RaceFilter
Definition:
WhoPackets.h:70
WorldPackets::Who::WhoRequest::VirtualRealmName
std::string VirtualRealmName
Definition:
WhoPackets.h:67
WorldPackets::Who::WhoRequest::ClassFilter
int32 ClassFilter
Definition:
WhoPackets.h:71
WorldPackets::Who::WhoRequest::Name
std::string Name
Definition:
WhoPackets.h:66
WorldPackets::Who::WhoRequest::ShowArenaPlayers
bool ShowArenaPlayers
Definition:
WhoPackets.h:74
WorldPackets::Who::WhoRequest::ShowEnemies
bool ShowEnemies
Definition:
WhoPackets.h:73
WorldPackets::Who::WhoRequest::ServerInfo
Optional< WhoRequestServerInfo > ServerInfo
Definition:
WhoPackets.h:76
WorldPackets::Who::WhoRequest::MinLevel
int32 MinLevel
Definition:
WhoPackets.h:64
WorldPackets::Who::WhoRequest::GuildVirtualRealmName
std::string GuildVirtualRealmName
Definition:
WhoPackets.h:69
WorldPackets::Who::WhoResponse
Definition:
WhoPackets.h:104
WorldPackets::Who::WhoResponse::Entries
std::vector< WhoEntry > Entries
Definition:
WhoPackets.h:105
WorldPackets::Who::WhoWord
Definition:
WhoPackets.h:51
WorldPackets::Who::WhoWord::Word
std::string Word
Definition:
WhoPackets.h:52
server
game
Server
Packets
WhoPackets.h
Generated on Thu Mar 14 2024 23:39:19 for TrinityCore by
1.9.4