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
24
namespace
WorldPackets
25
{
26
namespace
CombatLog
27
{
28
class
SpellNonMeleeDamageLog
final
:
public
ServerPacket
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
35
ObjectGuid
Me
;
36
ObjectGuid
CasterGUID
;
37
int32
SpellID
= 0;
38
int32
Damage
= 0;
39
int32
Overkill
= 0;
40
uint8
SchoolMask
= 0;
41
int32
ShieldBlock
= 0;
42
int32
Resisted
= 0;
43
bool
Periodic
=
false
;
44
int32
Absorbed
= 0;
45
int32
Flags
= 0;
46
// Optional<SpellNonMeleeDamageLogDebugInfo> DebugInfo;
47
};
48
49
class
EnvironmentalDamageLog
final
:
public
ServerPacket
50
{
51
public
:
52
explicit
EnvironmentalDamageLog
() :
ServerPacket
(
SMSG_ENVIRONMENTAL_DAMAGE_LOG
, 21) { }
53
54
WorldPacket
const
*
Write
()
override
;
55
56
ObjectGuid
Victim
;
57
EnviromentalDamage
Type
=
DAMAGE_EXHAUSTED
;
58
uint32
Amount
= 0;
59
uint32
Resisted
= 0;
60
uint32
Absorbed
= 0;
61
};
62
63
struct
SubDamage
64
{
65
int32
SchoolMask
= 0;
66
float
FDamage
= 0.0f;
// Float damage (Most of the time equals to Damage)
67
int32
Damage
= 0;
68
int32
Absorbed
= 0;
69
int32
Resisted
= 0;
70
};
71
72
struct
HitInfoData
73
{
74
uint32
ArmorReduction
= 0;
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] = { };
85
uint32
SinceLastSwing
= 0;
86
};
87
88
class
AttackerStateUpdate
final
:
public
ServerPacket
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
96
ObjectGuid
AttackerGUID
;
97
ObjectGuid
VictimGUID
;
98
int32
Damage
= 0;
99
int32
OverDamage
= -1;
// (damage - health) or -1 if unit is still alive
100
std::array<SubDamage, 2>
SubDmg
;
101
uint8
SubDmgCount
= 1;
102
uint8
VictimState
= 0;
103
uint32
AttackerState
= 0;
104
uint32
MeleeSpellID
= 0;
105
int32
BlockAmount
= 0;
106
int32
RageGained
= 0;
107
HitInfoData
HitInfo
;
108
};
109
}
110
}
111
112
#endif
// TRINITYCORE_COMBAT_LOG_PACKETS_H
uint8
uint8_t uint8
Definition
Define.h:135
int32
int32_t int32
Definition
Define.h:129
uint32
uint32_t uint32
Definition
Define.h:133
Packet.h
Player.h
EnviromentalDamage
EnviromentalDamage
Type of environmental damages.
Definition
Player.h:678
DAMAGE_EXHAUSTED
@ DAMAGE_EXHAUSTED
Definition
Player.h:679
VictimState
VictimState
Definition
Unit.h:45
ObjectGuid
Definition
ObjectGuid.h:138
WorldPacket
Definition
WorldPacket.h:27
WorldPackets::Array
Definition
PacketUtilities.h:120
WorldPackets::CombatLog::AttackerStateUpdate
Definition
CombatLogPackets.h:89
WorldPackets::CombatLog::AttackerStateUpdate::AttackerGUID
ObjectGuid AttackerGUID
Definition
CombatLogPackets.h:96
WorldPackets::CombatLog::AttackerStateUpdate::OverDamage
int32 OverDamage
Definition
CombatLogPackets.h:99
WorldPackets::CombatLog::AttackerStateUpdate::BlockAmount
int32 BlockAmount
Definition
CombatLogPackets.h:105
WorldPackets::CombatLog::AttackerStateUpdate::SubDmgCount
uint8 SubDmgCount
Definition
CombatLogPackets.h:101
WorldPackets::CombatLog::AttackerStateUpdate::AttackerStateUpdate
AttackerStateUpdate()
Definition
CombatLogPackets.h:91
WorldPackets::CombatLog::AttackerStateUpdate::VictimGUID
ObjectGuid VictimGUID
Definition
CombatLogPackets.h:97
WorldPackets::CombatLog::AttackerStateUpdate::AttackerState
uint32 AttackerState
Definition
CombatLogPackets.h:103
WorldPackets::CombatLog::AttackerStateUpdate::Flags
uint32 Flags
Definition
CombatLogPackets.h:95
WorldPackets::CombatLog::AttackerStateUpdate::Write
WorldPacket const * Write() override
Definition
CombatLogPackets.cpp:73
WorldPackets::CombatLog::AttackerStateUpdate::SubDmg
std::array< SubDamage, 2 > SubDmg
Definition
CombatLogPackets.h:100
WorldPackets::CombatLog::AttackerStateUpdate::MeleeSpellID
uint32 MeleeSpellID
Definition
CombatLogPackets.h:104
WorldPackets::CombatLog::AttackerStateUpdate::RageGained
int32 RageGained
Definition
CombatLogPackets.h:106
WorldPackets::CombatLog::AttackerStateUpdate::HitInfo
HitInfoData HitInfo
Definition
CombatLogPackets.h:107
WorldPackets::CombatLog::AttackerStateUpdate::Damage
int32 Damage
Definition
CombatLogPackets.h:98
WorldPackets::CombatLog::EnvironmentalDamageLog
Definition
CombatLogPackets.h:50
WorldPackets::CombatLog::EnvironmentalDamageLog::Victim
ObjectGuid Victim
Definition
CombatLogPackets.h:56
WorldPackets::CombatLog::EnvironmentalDamageLog::Amount
uint32 Amount
Definition
CombatLogPackets.h:58
WorldPackets::CombatLog::EnvironmentalDamageLog::Absorbed
uint32 Absorbed
Definition
CombatLogPackets.h:60
WorldPackets::CombatLog::EnvironmentalDamageLog::Type
EnviromentalDamage Type
Definition
CombatLogPackets.h:57
WorldPackets::CombatLog::EnvironmentalDamageLog::EnvironmentalDamageLog
EnvironmentalDamageLog()
Definition
CombatLogPackets.h:52
WorldPackets::CombatLog::EnvironmentalDamageLog::Resisted
uint32 Resisted
Definition
CombatLogPackets.h:59
WorldPackets::CombatLog::EnvironmentalDamageLog::Write
WorldPacket const * Write() override
Definition
CombatLogPackets.cpp:62
WorldPackets::CombatLog::SpellNonMeleeDamageLog
Definition
CombatLogPackets.h:29
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Periodic
bool Periodic
Definition
CombatLogPackets.h:43
WorldPackets::CombatLog::SpellNonMeleeDamageLog::SpellID
int32 SpellID
Definition
CombatLogPackets.h:37
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Absorbed
int32 Absorbed
Definition
CombatLogPackets.h:44
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Damage
int32 Damage
Definition
CombatLogPackets.h:38
WorldPackets::CombatLog::SpellNonMeleeDamageLog::SchoolMask
uint8 SchoolMask
Definition
CombatLogPackets.h:40
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Flags
int32 Flags
Definition
CombatLogPackets.h:45
WorldPackets::CombatLog::SpellNonMeleeDamageLog::SpellNonMeleeDamageLog
SpellNonMeleeDamageLog()
Definition
CombatLogPackets.h:31
WorldPackets::CombatLog::SpellNonMeleeDamageLog::CasterGUID
ObjectGuid CasterGUID
Definition
CombatLogPackets.h:36
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Me
ObjectGuid Me
Definition
CombatLogPackets.h:35
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Overkill
int32 Overkill
Definition
CombatLogPackets.h:39
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Write
WorldPacket const * Write() override
Definition
CombatLogPackets.cpp:20
WorldPackets::CombatLog::SpellNonMeleeDamageLog::ShieldBlock
int32 ShieldBlock
Definition
CombatLogPackets.h:41
WorldPackets::CombatLog::SpellNonMeleeDamageLog::Resisted
int32 Resisted
Definition
CombatLogPackets.h:42
WorldPackets::ServerPacket
Definition
Packet.h:46
SMSG_SPELLNONMELEEDAMAGELOG
@ SMSG_SPELLNONMELEEDAMAGELOG
Definition
Opcodes.h:621
SMSG_ENVIRONMENTAL_DAMAGE_LOG
@ SMSG_ENVIRONMENTAL_DAMAGE_LOG
Definition
Opcodes.h:537
SMSG_ATTACKERSTATEUPDATE
@ SMSG_ATTACKERSTATEUPDATE
Definition
Opcodes.h:359
WorldPackets
Definition
AchievementMgr.h:35
WorldPackets::CombatLog::HitInfoData
Definition
CombatLogPackets.h:73
WorldPackets::CombatLog::HitInfoData::CombatRoll
float CombatRoll
Definition
CombatLogPackets.h:76
WorldPackets::CombatLog::HitInfoData::CrushChance
float CrushChance
Definition
CombatLogPackets.h:82
WorldPackets::CombatLog::HitInfoData::ArmorReduction
uint32 ArmorReduction
Definition
CombatLogPackets.h:74
WorldPackets::CombatLog::HitInfoData::MinDamage
float MinDamage[2]
Definition
CombatLogPackets.h:83
WorldPackets::CombatLog::HitInfoData::BlockChance
float BlockChance
Definition
CombatLogPackets.h:80
WorldPackets::CombatLog::HitInfoData::MissChance
float MissChance
Definition
CombatLogPackets.h:77
WorldPackets::CombatLog::HitInfoData::SinceLastSwing
uint32 SinceLastSwing
Definition
CombatLogPackets.h:85
WorldPackets::CombatLog::HitInfoData::GlanceChance
float GlanceChance
Definition
CombatLogPackets.h:81
WorldPackets::CombatLog::HitInfoData::CritRollNeeded
float CritRollNeeded
Definition
CombatLogPackets.h:75
WorldPackets::CombatLog::HitInfoData::ParryChance
float ParryChance
Definition
CombatLogPackets.h:79
WorldPackets::CombatLog::HitInfoData::DodgeChance
float DodgeChance
Definition
CombatLogPackets.h:78
WorldPackets::CombatLog::HitInfoData::MaxDamage
float MaxDamage[2]
Definition
CombatLogPackets.h:84
WorldPackets::CombatLog::SubDamage
Definition
CombatLogPackets.h:64
WorldPackets::CombatLog::SubDamage::Absorbed
int32 Absorbed
Definition
CombatLogPackets.h:68
WorldPackets::CombatLog::SubDamage::Resisted
int32 Resisted
Definition
CombatLogPackets.h:69
WorldPackets::CombatLog::SubDamage::Damage
int32 Damage
Definition
CombatLogPackets.h:67
WorldPackets::CombatLog::SubDamage::SchoolMask
int32 SchoolMask
Definition
CombatLogPackets.h:65
WorldPackets::CombatLog::SubDamage::FDamage
float FDamage
Definition
CombatLogPackets.h:66
server
game
Server
Packets
CombatLogPackets.h
Generated by
1.9.8