Core/Auras: Implemented SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES
Port From (https://github.com/TrinityCore/TrinityCore/commit/ac1ef5efbe0a8c4cf25f4bdf154d5b4e86827c06)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user