Core/PacketIO: Fixed combat log packets not being sent to self

Port From (https://github.com/TrinityCore/TrinityCore/commit/1cf5f6e82ed54ea95bb388a5c07e3f5a91a25e43)
This commit is contained in:
hondacrx
2021-05-05 16:15:56 -04:00
parent ba6cccfce7
commit 227100e012
+6 -2
View File
@@ -1548,8 +1548,12 @@ namespace Game.Entities
internal void SendCombatLogMessage(CombatLogServerPacket combatLog)
{
CombatLogSender combatLogCustomizer = new(combatLog);
var notifier = new MessageDistDeliverer<CombatLogSender>(this, combatLogCustomizer, GetVisibilityRange());
CombatLogSender combatLogSender = new(combatLog);
if (IsPlayer())
combatLogSender.Invoke(ToPlayer());
var notifier = new MessageDistDeliverer<CombatLogSender>(this, combatLogSender, GetVisibilityRange());
Cell.VisitWorldObjects(this, notifier, GetVisibilityRange());
}