Core/Spell: Properly remove REACT_PASSIVE on permanent feign death unapply.

Port From (https://github.com/TrinityCore/TrinityCore/commit/ffce2c1f9a416eddad2e45ab2e03df964d5e39cd)
This commit is contained in:
hondacrx
2021-06-23 22:33:07 -04:00
parent 9af3e3adf2
commit de6b8b0240
+7 -2
View File
@@ -1203,8 +1203,9 @@ namespace Scripts.Spells.Generic
target.AddDynamicFlag(UnitDynFlags.Dead);
target.AddUnitFlag2(UnitFlags2.FeignDeath);
if (target.IsTypeId(TypeId.Unit))
target.ToCreature().SetReactState(ReactStates.Passive);
Creature creature = target.ToCreature();
if (creature != null)
creature.SetReactState(ReactStates.Passive);
}
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
@@ -1212,6 +1213,10 @@ namespace Scripts.Spells.Generic
Unit target = GetTarget();
target.RemoveDynamicFlag(UnitDynFlags.Dead);
target.RemoveUnitFlag2(UnitFlags2.FeignDeath);
Creature creature = target.ToCreature();
if (creature != null)
creature.InitializeReactState();
}
public override void Register()