mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
refactor(Core/Packet): Combat log (#9673)
This commit is contained in:
committed by
GitHub
parent
a331698c5b
commit
aaf85d0984
@@ -35,6 +35,7 @@
|
||||
#include "Common.h"
|
||||
#include "ConditionMgr.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "CombatLogPackets.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "DisableMgr.h"
|
||||
#include "Formulas.h"
|
||||
@@ -784,13 +785,13 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
|
||||
|
||||
Unit::DealDamageMods(this, damage, &absorb);
|
||||
|
||||
WorldPacket data(SMSG_ENVIRONMENTALDAMAGELOG, (21));
|
||||
data << GetGUID();
|
||||
data << uint8(type != DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL);
|
||||
data << uint32(damage);
|
||||
data << uint32(absorb);
|
||||
data << uint32(resist);
|
||||
SendMessageToSet(&data, true);
|
||||
WorldPackets::CombatLog::EnvironmentalDamageLog packet;
|
||||
packet.Victim = GetGUID();
|
||||
packet.Type = type != DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL;
|
||||
packet.Amount = damage;
|
||||
packet.Absorbed = absorb;
|
||||
packet.Resisted = resist;
|
||||
SendMessageToSet(packet.Write(), true);
|
||||
|
||||
uint32 final_damage = Unit::DealDamage(this, this, damage, nullptr, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user