Core/Objects: Fixup SMSG_UPDATE_OBJECT related refactors

Port From (https://github.com/TrinityCore/TrinityCore/commit/963eb6b80c1231ebaadd29806666c9ae5b79a985)
This commit is contained in:
Hondacrx
2024-11-11 14:14:43 -05:00
parent 6fcce1a6e4
commit 5909e7ba98
4 changed files with 50 additions and 51 deletions
+13
View File
@@ -2460,6 +2460,19 @@ namespace Game.Entities
base.ClearUpdateMask(remove);
}
public override UpdateFieldFlag GetUpdateFieldFlagsFor(Player target)
{
UpdateFieldFlag flags = UpdateFieldFlag.None;
if (target == this || GetOwnerGUID() == target.GetGUID())
flags |= UpdateFieldFlag.Owner;
if (HasDynamicFlag(UnitDynFlags.SpecialInfo))
if (HasAuraTypeWithCaster(AuraType.Empathy, target.GetGUID()))
flags |= UpdateFieldFlag.Empath;
return flags;
}
public override void DestroyForPlayer(Player target)
{
Battleground bg = target.GetBattleground();