mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Check if unit has UNIT_DYNFLAG_TRACK_UNIT before checking auras to prevent prevent unnecessary operations, thanks you QAston for suggesting.
This commit is contained in:
@@ -626,9 +626,10 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask*
|
||||
if (!target->isAllowedToLoot(creature))
|
||||
dynamicFlags &= ~UNIT_DYNFLAG_LOOTABLE;
|
||||
}
|
||||
if (Unit const* unit = ToUnit())
|
||||
if (!unit->HasAuraTypeWithCaster(SPELL_AURA_MOD_STALKED, target->GetGUID()))
|
||||
dynamicFlags &= ~UNIT_DYNFLAG_TRACK_UNIT;
|
||||
if(dynamicFlags & UNIT_DYNFLAG_TRACK_UNIT)
|
||||
if (Unit const* unit = ToUnit())
|
||||
if (!unit->HasAuraTypeWithCaster(SPELL_AURA_MOD_STALKED, target->GetGUID()))
|
||||
dynamicFlags &= ~UNIT_DYNFLAG_TRACK_UNIT;
|
||||
*data << dynamicFlags;
|
||||
}
|
||||
// FG: pretend that OTHER players in own group are friendly ("blue")
|
||||
|
||||
Reference in New Issue
Block a user