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
21#include "Packet.h"
22#include "Player.h"
23
24namespace WorldPackets
25{
26 namespace CombatLog
27 {
29 {
30 public:
31 explicit SpellNonMeleeDamageLog() : ServerPacket(SMSG_SPELLNONMELEEDAMAGELOG, 16 + 4 + 4 + 4 + 1 + 4 + 4 + 1 + 1 + 4 + 4 + 1) { }
32
33 WorldPacket const* Write() override;
34
43 bool Periodic = false;
46 // Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
47 };
48
62
63 struct SubDamage
64 {
66 float FDamage = 0.0f; // Float damage (Most of the time equals to Damage)
70 };
71
73 {
75 float CritRollNeeded = 0.0f;
76 float CombatRoll = 0.0f;
77 float MissChance = 0.0f;
78 float DodgeChance = 0.0f;
79 float ParryChance = 0.0f;
80 float BlockChance = 0.0f;
81 float GlanceChance = 0.0f;
82 float CrushChance = 0.0f;
83 float MinDamage[2] = { };
84 float MaxDamage[2] = { };
86 };
87
89 {
90 public:
91 explicit AttackerStateUpdate() : ServerPacket(SMSG_ATTACKERSTATEUPDATE, 4 + 5 + 5 + 4 + 4 + 1 + (4 + 4 + 4) * 2 + 4 * 2 + 4 * 2 + 1 + 4 + 4 + 4 + 4 + 4 * 12) { }
92
93 WorldPacket const* Write() override;
94
95 uint32 Flags = 0; // Flags
99 int32 OverDamage = -1; // (damage - health) or -1 if unit is still alive
100 std::array<SubDamage, 2> SubDmg;
108 };
109 }
110}
111
112#endif // TRINITYCORE_COMBAT_LOG_PACKETS_H
uint8_t uint8
Definition Define.h:135
int32_t int32
Definition Define.h:129
uint32_t uint32
Definition Define.h:133
EnviromentalDamage
Type of environmental damages.
Definition Player.h:678
@ DAMAGE_EXHAUSTED
Definition Player.h:679
VictimState
Definition Unit.h:45
@ SMSG_SPELLNONMELEEDAMAGELOG
Definition Opcodes.h:621
@ SMSG_ENVIRONMENTAL_DAMAGE_LOG
Definition Opcodes.h:537
@ SMSG_ATTACKERSTATEUPDATE
Definition Opcodes.h:359