TrinityCore
Loading...
Searching...
No Matches
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 TRINITYCORE_COMBAT_LOG_PACKETS_H
19#define TRINITYCORE_COMBAT_LOG_PACKETS_H
20
22#include "Optional.h"
23
24struct SpellLogEffect;
25
26namespace WorldPackets
27{
28 namespace CombatLog
29 {
36
38 {
39 public:
41
42 WorldPacket const* Write() override;
43
56 bool Periodic = false;
59 // Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
61 std::vector<CombatWorldTextViewerInfo> WorldTextViewers;
62 std::vector<Spells::SpellSupportInfo> Supporters;
63 };
64
78
80 {
81 public:
83
84 WorldPacket const* Write() override;
85
88 std::vector<SpellLogEffect> const* Effects = nullptr;
89 };
90
111
113 {
114 float CritRollMade = 0.0f;
115 float CritRollNeeded = 0.0f;
116 };
117
132
134 {
135 public:
137
138 WorldPacket const* Write() override;
139
143 std::vector<PeriodicAuraLogEffect> Effects;
144 };
145
146 class SpellInterruptLog final : public ServerPacket
147 {
148 public:
149 explicit SpellInterruptLog() : ServerPacket(SMSG_SPELL_INTERRUPT_LOG, 16 + 16 + 4 + 4) { }
150
151 WorldPacket const* Write() override;
152
157 bool HideFromCombatLog = false;
158 };
159
167
169 {
170 public:
171 explicit SpellDispellLog() : ServerPacket(SMSG_SPELL_DISPELL_LOG, 1 + 16 + 16 + 4 + 4 + 20) { }
172
173 WorldPacket const* Write() override;
174
175 std::vector<SpellDispellData> DispellData;
179 bool IsBreak = false;
180 bool IsSteal = false;
181 };
182
184 {
185 public:
186 explicit SpellEnergizeLog() : CombatLogServerPacket(SMSG_SPELL_ENERGIZE_LOG, 16 + 16 + 4 + 4 + 4 + 1) { }
187
188 WorldPacket const* Write() override;
189
196 };
197
199 {
200 public:
202
203 WorldPacket const* Write() override;
204
207 int32 SpellID = 0;
208 };
209
211 {
212 float HitRoll = 0.0f;
213 float HitRollNeeded = 0.0f;
214 };
215
224
225 class SpellMissLog final : public ServerPacket
226 {
227 public:
229
230 WorldPacket const* Write() override;
231
234 std::vector<SpellLogMissEntry> Entries;
235 bool HideFromCombatLog = false;
236 };
237
238 class ProcResist final : public ServerPacket
239 {
240 public:
241 explicit ProcResist() : ServerPacket(SMSG_PROC_RESIST, 16 + 4 + 4 + 4 + 16) { }
242
243 WorldPacket const* Write() override;
244
250 };
251
253 {
254 public:
256
257 WorldPacket const* Write() override;
258
262 bool IsPeriodic = false;
263 };
264
281
283 {
285 float FDamage = 0.0f; // Float damage (Most of the time equals to Damage)
289 };
290
292 {
294 float CritRollNeeded = 0.0f;
295 float CombatRoll = 0.0f;
296 float MissChance = 0.0f;
297 float DodgeChance = 0.0f;
298 float ParryChance = 0.0f;
299 float BlockChance = 0.0f;
300 float GlanceChance = 0.0f;
301 float CrushChance = 0.0f;
302 float MinDamage = 0.0f;
303 float MaxDamage = 0.0f;
305 };
306
330
332 {
333 public:
335
336 WorldPacket const* Write() override;
337
345 bool Crit = false;
346 std::vector<Spells::SpellSupportInfo> Supporters;
347 };
348
365 }
366}
367
368#endif // TRINITYCORE_COMBAT_LOG_PACKETS_H
#define TC_GAME_API
Definition Define.h:129
uint8_t uint8
Definition Define.h:156
int8_t int8
Definition Define.h:152
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ SMSG_PROC_RESIST
Definition Opcodes.h:2124
@ SMSG_SPELL_EXECUTE_LOG
Definition Opcodes.h:2331
@ SMSG_SPELL_INTERRUPT_LOG
Definition Opcodes.h:2339
@ SMSG_SPELL_NON_MELEE_DAMAGE_LOG
Definition Opcodes.h:2341
@ SMSG_SPELL_MISS_LOG
Definition Opcodes.h:2340
@ SMSG_SPELL_PERIODIC_AURA_LOG
Definition Opcodes.h:2343
@ SMSG_ATTACKER_STATE_UPDATE
Definition Opcodes.h:1148
@ SMSG_SPELL_DISPELL_LOG
Definition Opcodes.h:2326
@ SMSG_SPELL_ENERGIZE_LOG
Definition Opcodes.h:2330
@ SMSG_SPELL_INSTAKILL_LOG
Definition Opcodes.h:2338
@ SMSG_SPELL_HEAL_ABSORB_LOG
Definition Opcodes.h:2336
@ SMSG_ENVIRONMENTAL_DAMAGE_LOG
Definition Opcodes.h:1444
@ SMSG_SPELL_ABSORB_LOG
Definition Opcodes.h:2319
@ SMSG_SPELL_DAMAGE_SHIELD
Definition Opcodes.h:2324
@ SMSG_SPELL_HEAL_LOG
Definition Opcodes.h:2337
@ SMSG_SPELL_OR_DAMAGE_IMMUNE
Definition Opcodes.h:2342
std::optional< T > Optional
Optional helper class to wrap optional values within.
Definition Optional.h:25
VictimState
Definition Unit.h:48
WorldPacket const * Write() override
WorldPacket const * Write() override
std::vector< Spells::SpellSupportInfo > Supporters
std::vector< SpellDispellData > DispellData
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
std::vector< PeriodicAuraLogEffect > Effects
std::vector< Spells::SpellSupportInfo > Supporters
Optional< Spells::ContentTuningParams > ContentTuning
Optional< PeriodicalAuraLogEffectDebugInfo > DebugInfo
SpellLogMissEntry(ObjectGuid const &victim, uint8 missReason)