mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Loot: fix some other cases where a creature should not be able to set focus. (#23415)
(cherry picked from commit d50be8e020)
This commit is contained in:
@@ -546,7 +546,7 @@ bool Creature::InitEntry(uint32 entry, CreatureData const* data /*= nullptr*/)
|
||||
LoadEquipment(); // use default equipment (if available) for summons
|
||||
else if (data->equipmentId == 0)
|
||||
LoadEquipment(0); // 0 means no equipment for creature table
|
||||
else
|
||||
else
|
||||
{
|
||||
m_originalEquipmentId = data->equipmentId;
|
||||
LoadEquipment(data->equipmentId);
|
||||
@@ -3175,8 +3175,12 @@ void Creature::FocusTarget(Spell const* focusSpell, WorldObject const* target)
|
||||
if (m_focusSpell)
|
||||
return;
|
||||
|
||||
// Prevent dead creatures from setting a focus target, so they won't turn
|
||||
if (!IsAlive())
|
||||
// Prevent dead/feigning death creatures from setting a focus target, so they won't turn
|
||||
if (!IsAlive() || HasUnitFlag2(UNIT_FLAG2_FEIGN_DEATH) || HasAuraType(SPELL_AURA_FEIGN_DEATH))
|
||||
return;
|
||||
|
||||
// Don't allow stunned creatures to set a focus target
|
||||
if (HasUnitFlag(UNIT_FLAG_STUNNED))
|
||||
return;
|
||||
|
||||
// some spells shouldn't track targets
|
||||
|
||||
Reference in New Issue
Block a user