Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura
Port From (https://github.com/TrinityCore/TrinityCore/commit/9d865f7536ae6feda6fba77785e4548f95ca5d03)
This commit is contained in:
@@ -2799,7 +2799,18 @@ namespace Game.Spells
|
||||
}
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target.AddUnitFlag(UnitFlags.Immune);
|
||||
target.GetThreatManager().EvaluateSuppressed();
|
||||
}
|
||||
else
|
||||
{
|
||||
// do not remove unit flag if there are more than this auraEffect of that kind on unit
|
||||
if (target.HasAuraType(GetAuraType()))
|
||||
return;
|
||||
|
||||
target.RemoveUnitFlag(UnitFlags.Immune);
|
||||
}
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.DamageImmunity)]
|
||||
|
||||
Reference in New Issue
Block a user