TrinityCore
CombatLogPackets.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 CombatLogPackets_h__
19#define CombatLogPackets_h__
20
22#include "Optional.h"
23#include "Spell.h"
24
25namespace WorldPackets
26{
27 namespace CombatLog
28 {
30 {
34 };
35
37 {
38 public:
40
41 WorldPacket const* Write() override;
42
54 bool Periodic = false;
57 // Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
59 std::vector<CombatWorldTextViewerInfo> WorldTextViewers;
60 std::vector<Spells::SpellSupportInfo> Supporters;
61 };
62
64 {
65 public:
67
68 WorldPacket const* Write() override;
69
71 uint8 Type = 0;
75 };
76
78 {
79 public:
81
82 WorldPacket const* Write() override;
83
86 std::vector<SpellLogEffect> const* Effects = nullptr;
87 };
88
90 {
91 public:
93
94 WorldPacket const* Write() override;
95
103 bool Crit = false;
107 std::vector<Spells::SpellSupportInfo> Supporters;
108 };
109
111 {
112 public:
114 {
115 float CritRollMade = 0.0f;
116 float CritRollNeeded = 0.0f;
117 };
118
120 {
128 bool Crit = false;
131 std::vector<Spells::SpellSupportInfo> Supporters;
132 };
133
135
136 WorldPacket const* Write() override;
137
141 std::vector<SpellLogEffect> Effects;
142 };
143
144 class SpellInterruptLog final : public ServerPacket
145 {
146 public:
148
149 WorldPacket const* Write() override;
150
155 };
156
158 {
160 bool Harmful = false;
163 };
164
166 {
167 public:
168 SpellDispellLog() : ServerPacket(SMSG_SPELL_DISPELL_LOG, 1 + 16 + 16 + 4 + 4 + 20) { }
169
170 WorldPacket const* Write() override;
171
172 std::vector<SpellDispellData> DispellData;
176 bool IsBreak = false;
177 bool IsSteal = false;
178 };
179
181 {
182 public:
184
185 WorldPacket const* Write() override;
186
193 };
194
196 {
197 public:
199
200 WorldPacket const* Write() override;
201
204 int32 SpellID = 0;
205 };
206
208 {
209 float HitRoll = 0.0f;
210 float HitRollNeeded = 0.0f;
211 };
212
214 {
215 SpellLogMissEntry(ObjectGuid const& victim, uint8 missReason) : Victim(victim), MissReason(missReason) { }
216
220 };
221
222 class SpellMissLog final : public ServerPacket
223 {
224 public:
226
227 WorldPacket const* Write() override;
228
231 std::vector<SpellLogMissEntry> Entries;
232 };
233
234 class ProcResist final : public ServerPacket
235 {
236 public:
237 ProcResist() : ServerPacket(SMSG_PROC_RESIST, 16 + 4 + 4 + 4 + 16) { }
238
239 WorldPacket const* Write() override;
240
246 };
247
249 {
250 public:
252
253 WorldPacket const* Write() override;
254
258 bool IsPeriodic = false;
259 };
260
262 {
263 public:
264 SpellDamageShield() : CombatLogServerPacket(SMSG_SPELL_DAMAGE_SHIELD, 4 + 16 + 4 + 4 + 16 + 4 + 4 + 1) { }
265
266 WorldPacket const* Write() override;
267
276 };
277
279 {
281 float FDamage = 0.0f; // Float damage (Most of the time equals to Damage)
285 };
286
288 {
290 float State2 = 0.0f;
291 float State3 = 0.0f;
292 float State4 = 0.0f;
293 float State5 = 0.0f;
294 float State6 = 0.0f;
295 float State7 = 0.0f;
296 float State8 = 0.0f;
297 float State9 = 0.0f;
298 float State10 = 0.0f;
299 float State11 = 0.0f;
301 };
302
304 {
305 public:
307
308 WorldPacket const* Write() override;
309
310 uint32 HitInfo = 0; // Flags
315 int32 OverDamage = -1; // (damage - health) or -1 if unit is still alive
323 float Unk = 0.0f;
325 };
326
328 {
329 public:
331
332 WorldPacket const* Write() override;
333
341 bool Unk = false;
342 std::vector<Spells::SpellSupportInfo> Supporters;
343 };
344
345 class SpellHealAbsorbLog final : public ServerPacket
346 {
347 public:
349
350 WorldPacket const* Write() override;
351
360 };
361 }
362}
363
364#endif // CombatLogPackets_h__
#define TC_GAME_API
Definition: Define.h:123
uint8_t uint8
Definition: Define.h:144
int32_t int32
Definition: Define.h:138
uint32_t uint32
Definition: Define.h:142
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition: Optional.h:25
HitInfo
Definition: UnitDefines.h:447
VictimState
Definition: Unit.h:47
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< Spells::SpellSupportInfo > Supporters
WorldPacket const * Write() override
std::vector< SpellDispellData > DispellData
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< SpellLogEffect > const * Effects
Optional< Spells::ContentTuningParams > ContentTuning
std::vector< Spells::SpellSupportInfo > Supporters
WorldPacket const * Write() override
Optional< Spells::ContentTuningParams > ContentTuning
std::vector< SpellLogMissEntry > Entries
WorldPacket const * Write() override
std::vector< CombatWorldTextViewerInfo > WorldTextViewers
Optional< Spells::ContentTuningParams > ContentTuning
std::vector< Spells::SpellSupportInfo > Supporters
@ SMSG_PROC_RESIST
Definition: Opcodes.h:1763
@ SMSG_SPELL_EXECUTE_LOG
Definition: Opcodes.h:1953
@ SMSG_SPELL_INTERRUPT_LOG
Definition: Opcodes.h:1961
@ SMSG_SPELL_NON_MELEE_DAMAGE_LOG
Definition: Opcodes.h:1963
@ SMSG_SPELL_MISS_LOG
Definition: Opcodes.h:1962
@ SMSG_SPELL_PERIODIC_AURA_LOG
Definition: Opcodes.h:1965
@ SMSG_ATTACKER_STATE_UPDATE
Definition: Opcodes.h:954
@ SMSG_SPELL_DISPELL_LOG
Definition: Opcodes.h:1948
@ SMSG_SPELL_ENERGIZE_LOG
Definition: Opcodes.h:1952
@ SMSG_SPELL_INSTAKILL_LOG
Definition: Opcodes.h:1960
@ SMSG_SPELL_HEAL_ABSORB_LOG
Definition: Opcodes.h:1958
@ SMSG_ENVIRONMENTAL_DAMAGE_LOG
Definition: Opcodes.h:1233
@ SMSG_SPELL_ABSORB_LOG
Definition: Opcodes.h:1941
@ SMSG_SPELL_DAMAGE_SHIELD
Definition: Opcodes.h:1946
@ SMSG_SPELL_HEAL_LOG
Definition: Opcodes.h:1959
@ SMSG_SPELL_OR_DAMAGE_IMMUNE
Definition: Opcodes.h:1964
SpellLogMissEntry(ObjectGuid const &victim, uint8 missReason)
Optional< PeriodicalAuraLogEffectDebugInfo > DebugInfo