TrinityCore
Loading...
Searching...
No Matches
QueryPackets.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_QUERY_PACKETS_H
19#define TRINITYCORE_QUERY_PACKETS_H
20
21#include "CreatureData.h"
22#include "GameObjectData.h"
23#include "ItemTemplate.h"
24#include "NPCHandler.h"
25#include "ObjectGuid.h"
26#include "Optional.h"
27#include "Packet.h"
28#include "QuestDef.h"
29#include "SharedDefines.h"
30
31namespace WorldPackets
32{
33 namespace Query
34 {
36 {
37 public:
39
40 void Read() override;
41
44 };
45
63
65 {
66 public:
68
69 WorldPacket const* Write() override;
70
71 bool Allow = false;
74 };
75
77 {
78 public:
80
81 void Read() override;
82
84 };
85
87 {
88 std::string_view Name;
89 std::string_view RealmName;
93 DeclinedName const* DeclinedNames = nullptr;
94 };
95
97 {
98 public:
100
101 WorldPacket const* Write() override;
102
104 uint8 Result = 0; // 0 - full packet, != 0 - only guid
106 };
107
109 {
110 public:
112
113 void Read() override;
114
117 };
118
120 {
121 public:
123
124 WorldPacket const* Write() override;
125
127 {
129 std::string Text;
130 };
131
133 bool Allow = false;
135 };
136
138 {
139 public:
141
142 void Read() override;
143
146 };
147
148 struct NPCText
149 {
150 float Probability = 0.0f;
151 std::string_view Text;
152 std::string_view Text1;
154 std::array<uint32, MAX_GOSSIP_TEXT_EMOTES> EmoteDelay = { };
155 std::array<uint32, MAX_GOSSIP_TEXT_EMOTES> EmoteID = { };
156 };
157
159 {
160 public:
162
163 WorldPacket const* Write() override;
164
166 bool Allow = false;
167 std::array<NPCText, MAX_GOSSIP_TEXT_OPTIONS> Options;
168 };
169
171 {
172 public:
174
175 void Read() override;
176
179 };
180
182 {
183 std::string Name;
184 std::string IconName;
185 std::string CastBarCaption;
186 std::string UnkString;
190 float Size = 0.0f;
192 };
193
195 {
196 public:
198
199 WorldPacket const* Write() override;
200
202 bool Allow = false;
204 };
205
207 {
208 public:
210
211 void Read() override { }
212 };
213
215 {
216 public:
217 explicit CorpseLocation() : ServerPacket(MSG_CORPSE_QUERY, 1 + 4 + 4 + 4 + 4 + 4 + 4) { }
218
219 WorldPacket const* Write() override;
220
225 bool Valid = false;
226 };
227
229 {
230 public:
232
233 void Read() override;
234
236 };
237
239 {
240 public:
242
243 WorldPacket const* Write() override;
244
246 float Facing = 0.0f;
247 };
248
250 {
251 public:
253
254 void Read() override { }
255 };
256
258 {
259 public:
261
262 WorldPacket const* Write() override;
263
266 };
267
269 {
270 public:
272
273 void Read() override;
274
276 };
277
279 {
280 float DamageMin = 0.0f;
281 float DamageMax = 0.0f;
283 };
284
290
300
302 {
305 };
306
308 {
312 std::string_view Name;
315 std::array<uint32, MAX_ITEM_PROTO_FLAGS> Flags = { };
341 float RangedModRange = 0.0f;
344 std::string_view Description;
369 };
370
372 {
373 public:
375
376 WorldPacket const* Write() override;
377
379 bool Allow = false;
381 };
382
384 {
385 public:
387
388 void Read() override;
389
392 };
393 }
394}
395
396#endif // TRINITYCORE_QUERY_PACKETS_H
static const uint32 MAX_CREATURE_QUEST_ITEMS
static const uint8 MAX_KILL_CREDIT
static const uint32 MAX_CREATURE_MODELS
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
#define MAX_GAMEOBJECT_QUEST_ITEMS
#define MAX_ITEM_PROTO_SOCKETS
#define MAX_ITEM_PROTO_DAMAGES
#define MAX_ITEM_PROTO_SPELLS
#define MAX_ITEM_PROTO_STATS
InventoryType
Spells
Definition PlayerAI.cpp:32
#define MAX_QUEST_LOG_SIZE
Definition QuestDef.h:36
@ MAX_SPELL_SCHOOL
@ GENDER_NONE
CreatureFamily
CreatureType
@ CLASS_NONE
#define MAX_GAMEOBJECT_DATA
TotemCategory
@ RACE_NONE
SpellCategory
Data
Definition Map.h:302
WorldPacket const * Write() override
TaggedPosition<::Position::XYZ > Position
TaggedPosition<::Position::XYZ > Position
WorldPacket const * Write() override
WorldPacket const * Write() override
QueryCreature(WorldPacket &&packet)
QueryGameObject(WorldPacket &&packet)
QueryItemSingle(WorldPacket &&packet)
WorldPacket const * Write() override
std::array< NPCText, MAX_GOSSIP_TEXT_OPTIONS > Options
QueryNPCText(WorldPacket &&packet)
WorldPacket const * Write() override
QueryPageText(WorldPacket &&packet)
WorldPacket const * Write() override
Optional< PlayerGuidLookupData > Data
QueryPlayerName(WorldPacket &&packet)
WorldPacket const * Write() override
QueryTime(WorldPacket &&packet)
QuestPOIQuery(WorldPacket &&packet)
uint32 MissingQuestPOIs[MAX_QUEST_LOG_SIZE]
@ SMSG_CREATURE_QUERY_RESPONSE
Definition Opcodes.h:126
@ SMSG_PAGE_TEXT_QUERY_RESPONSE
Definition Opcodes.h:120
@ CMSG_CREATURE_QUERY
Definition Opcodes.h:125
@ SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE
Definition Opcodes.h:1236
@ CMSG_QUEST_POI_QUERY
Definition Opcodes.h:512
@ SMSG_NAME_QUERY_RESPONSE
Definition Opcodes.h:110
@ CMSG_NAME_QUERY
Definition Opcodes.h:109
@ SMSG_ITEM_QUERY_SINGLE_RESPONSE
Definition Opcodes.h:117
@ SMSG_NPC_TEXT_UPDATE
Definition Opcodes.h:413
@ SMSG_GAMEOBJECT_QUERY_RESPONSE
Definition Opcodes.h:124
@ CMSG_GAMEOBJECT_QUERY
Definition Opcodes.h:123
@ SMSG_QUERY_TIME_RESPONSE
Definition Opcodes.h:492
@ CMSG_QUERY_TIME
Definition Opcodes.h:491
@ MSG_CORPSE_QUERY
Definition Opcodes.h:563
@ CMSG_PAGE_TEXT_QUERY
Definition Opcodes.h:119
@ CMSG_CORPSE_MAP_POSITION_QUERY
Definition Opcodes.h:1235
@ CMSG_NPC_TEXT_QUERY
Definition Opcodes.h:412
@ CMSG_ITEM_QUERY_SINGLE
Definition Opcodes.h:115
STL namespace.
uint32 QuestItems[MAX_CREATURE_QUEST_ITEMS]
uint32 ProxyCreatureID[MAX_KILL_CREDIT]
uint32 CreatureDisplayID[MAX_CREATURE_MODELS]
uint32 QuestItems[MAX_GAMEOBJECT_QUEST_ITEMS]
ItemStatData ItemStat[MAX_ITEM_PROTO_STATS]
uint32 Resistance[MAX_SPELL_SCHOOL]
std::array< uint32, MAX_ITEM_PROTO_FLAGS > Flags
ItemSocketData Socket[MAX_ITEM_PROTO_SOCKETS]
ItemDamageData Damage[MAX_ITEM_PROTO_DAMAGES]
std::array< uint32, MAX_GOSSIP_TEXT_EMOTES > EmoteID
std::array< uint32, MAX_GOSSIP_TEXT_EMOTES > EmoteDelay