From 227100e0122e1fb421e8908b47718c5f995b185e Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 5 May 2021 16:15:56 -0400 Subject: [PATCH] Core/PacketIO: Fixed combat log packets not being sent to self Port From (https://github.com/TrinityCore/TrinityCore/commit/1cf5f6e82ed54ea95bb388a5c07e3f5a91a25e43) --- Source/Game/Entities/Unit/Unit.Combat.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.Combat.cs b/Source/Game/Entities/Unit/Unit.Combat.cs index 7177f96cb..5c57ccc54 100644 --- a/Source/Game/Entities/Unit/Unit.Combat.cs +++ b/Source/Game/Entities/Unit/Unit.Combat.cs @@ -1548,8 +1548,12 @@ namespace Game.Entities internal void SendCombatLogMessage(CombatLogServerPacket combatLog) { - CombatLogSender combatLogCustomizer = new(combatLog); - var notifier = new MessageDistDeliverer(this, combatLogCustomizer, GetVisibilityRange()); + CombatLogSender combatLogSender = new(combatLog); + + if (IsPlayer()) + combatLogSender.Invoke(ToPlayer()); + + var notifier = new MessageDistDeliverer(this, combatLogSender, GetVisibilityRange()); Cell.VisitWorldObjects(this, notifier, GetVisibilityRange()); }