diff --git a/Source/Game/Entities/Unit/Unit.Combat.cs b/Source/Game/Entities/Unit/Unit.Combat.cs index 96ac747ad..757a2b932 100644 --- a/Source/Game/Entities/Unit/Unit.Combat.cs +++ b/Source/Game/Entities/Unit/Unit.Combat.cs @@ -382,6 +382,9 @@ namespace Game.Entities if (HasUnitFlag(UnitFlags.Pacified)) return false; + if (HasAuraType(AuraType.DisableAttackingExceptAbilities)) + return false; + // nobody can attack GM in GM-mode if (victim.IsTypeId(TypeId.Player)) { diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index c1fb1d509..0da90fb6c 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -1913,6 +1913,16 @@ namespace Game.Spells HandleAuraModSilence(aurApp, mode, apply); } + [AuraEffectHandler(AuraType.DisableAttackingExceptAbilities)] + void HandleAuraDisableAttackingExceptAbilities(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) + { + if (!mode.HasAnyFlag(AuraEffectHandleModes.SendForClientMask)) + return; + + if (apply) + aurApp.GetTarget().AttackStop(); + } + [AuraEffectHandler(AuraType.ModNoActions)] void HandleAuraModNoActions(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) {