mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 15:27:47 -04:00
Core/Objects: Fixup SMSG_UPDATE_OBJECT related refactors
* Object::BuildValuesUpdateWithFlag is actually unused
* Restore UF::UpdateFieldFlag::Owner for players (self packet)
(cherry picked from commit 963eb6b80c)
This commit is contained in:
@@ -13770,6 +13770,19 @@ bool Unit::IsSplineEnabled() const
|
||||
return movespline->Initialized() && !movespline->Finalized();
|
||||
}
|
||||
|
||||
UF::UpdateFieldFlag Unit::GetUpdateFieldFlagsFor(Player const* target) const
|
||||
{
|
||||
UF::UpdateFieldFlag flags = UF::UpdateFieldFlag::None;
|
||||
if (target == this || GetOwnerGUID() == target->GetGUID())
|
||||
flags |= UF::UpdateFieldFlag::Owner;
|
||||
|
||||
if (HasDynamicFlag(UNIT_DYNFLAG_SPECIALINFO))
|
||||
if (HasAuraTypeWithCaster(SPELL_AURA_EMPATHY, target->GetGUID()))
|
||||
flags |= UF::UpdateFieldFlag::Empath;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
void Unit::DestroyForPlayer(Player* target) const
|
||||
{
|
||||
if (Battleground* bg = target->GetBattleground())
|
||||
|
||||
Reference in New Issue
Block a user