mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Spell: Properly remove REACT_PASSIVE on permanent feign death unapply. Fixes and closes #21156.
This commit is contained in:
@@ -1095,8 +1095,8 @@ class spell_gen_creature_permanent_feign_death : public AuraScript
|
||||
target->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
target->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
|
||||
|
||||
if (target->GetTypeId() == TYPEID_UNIT)
|
||||
target->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
if (Creature* creature = target->ToCreature())
|
||||
creature->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
@@ -1104,6 +1104,9 @@ class spell_gen_creature_permanent_feign_death : public AuraScript
|
||||
Unit* target = GetTarget();
|
||||
target->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
target->RemoveFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
|
||||
|
||||
if (Creature* creature = target->ToCreature())
|
||||
creature->InitializeReactState();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user