TrinityCore
Loading...
Searching...
No Matches
SpellPackets.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 SpellPackets_h__
19#define SpellPackets_h__
20
21#include "Packet.h"
22#include "ObjectGuid.h"
23#include "Optional.h"
24#include "Position.h"
25#include "SharedDefines.h"
26
27namespace WorldPackets
28{
29 namespace Spells
30 {
32 {
33 public:
35
36 void Read() override;
37
39 };
40
48
50 {
51 public:
53
54 void Read() override;
55
57 };
58
60 {
61 public:
63
64 void Read() override { }
65 };
66
68 {
69 public:
71
72 void Read() override { }
73 };
74
76 {
77 public:
79
80 void Read() override;
81
84 };
85
87 {
89 uint16 ActionBarSlot = 0; // unused on client
90 };
91
101
103 {
104 public:
105 explicit InitialSpells() : ServerPacket(SMSG_INITIAL_SPELLS, 1 + 2 + 2) { }
106
107 WorldPacket const* Write() override;
108
109 bool InitialLogin = false;
110 std::vector<InitialSpell> Spells;
111 std::vector<SpellHistoryEntry> SpellHistory;
112 };
113
119
129
136
137 struct RuneData
138 {
141 std::vector<uint8> Cooldowns;
142 };
143
145 {
147 float Pitch = 0.0f;
148 };
149
155
157 {
160 };
161
181
183 {
184 public:
186
187 WorldPacket const* Write() override;
188
190 };
191
193 {
194 public:
196 {
197 Cast.HitTargets.emplace();
198 Cast.MissStatus.emplace();
199 }
200
201 WorldPacket const* Write() override;
202
204 };
205
216
218 {
219 public:
221
222 void Read() override;
223
226 };
227
229 {
232 };
233
235 {
236 public:
238
239 WorldPacket const* Write() override;
240
242 std::vector<ResyncRune> Runes;
243 };
244
246 {
247 public:
249
250 WorldPacket const* Write() override;
251
253 };
254 }
255}
256
257#endif // SpellPackets_h__
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint16_t uint16
Definition Define.h:134
uint32_t uint32
Definition Define.h:133
InventoryType
Spells
Definition PlayerAI.cpp:32
RuneType
Definition Player.h:287
#define MAX_RUNES
CancelAura(WorldPacket &&packet)
CancelCast(WorldPacket &&packet)
CancelChannelling(WorldPacket &&packet)
CancelGrowthAura(WorldPacket &&packet)
CancelMountAura(WorldPacket &&packet)
std::vector< InitialSpell > Spells
std::vector< SpellHistoryEntry > SpellHistory
WorldPacket const * Write() override
WorldPacket const * Write() override
PetCancelAura(WorldPacket &&packet)
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< ResyncRune > Runes
WorldPacket const * Write() override
WorldPacket const * Write() override
@ CMSG_CANCEL_AURA
Definition Opcodes.h:339
@ SMSG_PLAY_SPELL_VISUAL
Definition Opcodes.h:528
@ CMSG_CANCEL_GROWTH_AURA
Definition Opcodes.h:696
@ CMSG_CANCEL_CAST
Definition Opcodes.h:332
@ SMSG_PLAY_SPELL_IMPACT
Definition Opcodes.h:532
@ SMSG_INITIAL_SPELLS
Definition Opcodes.h:327
@ SMSG_SPELL_GO
Definition Opcodes.h:335
@ SMSG_RESYNC_RUNES
Definition Opcodes.h:1188
@ CMSG_CANCEL_CHANNELLING
Definition Opcodes.h:344
@ CMSG_CANCEL_AUTO_REPEAT_SPELL
Definition Opcodes.h:650
@ CMSG_PET_CANCEL_AURA
Definition Opcodes.h:648
@ SMSG_SPELL_START
Definition Opcodes.h:334
@ CMSG_CANCEL_MOUNT_AURA
Definition Opcodes.h:914
@ SMSG_MOUNT_RESULT
Definition Opcodes.h:395
STL namespace.
std::vector< uint8 > Cooldowns
Optional< std::vector< SpellMissStatus > > MissStatus
Optional< RuneData > RemainingRunes
Optional< std::vector< ObjectGuid > > HitTargets
Optional< CreatureImmunities > Immunities
Optional< MissileTrajectoryResult > MissileTrajectory
Optional< std::vector< TargetLocation > > TargetPoints
Optional< TargetLocation > SrcLocation
Optional< TargetLocation > DstLocation