diff --git a/Source/Game/Entities/Player/Player.Items.cs b/Source/Game/Entities/Player/Player.Items.cs index eb4a7404e..a7ca7bd1a 100644 --- a/Source/Game/Entities/Player/Player.Items.cs +++ b/Source/Game/Entities/Player/Player.Items.cs @@ -3889,6 +3889,9 @@ namespace Game.Entities foreach (ItemEffectRecord effectData in pItem.GetEffects()) { SpellInfo effectSpellInfo = Global.SpellMgr.GetSpellInfo((uint)effectData.SpellID, Difficulty.None); + if (effectSpellInfo == null) + continue; + // apply proc cooldown to equip auras if we have any if (effectData.TriggerType == ItemSpelltriggerType.OnEquip) { diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index d13e44544..e167edc20 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -1468,6 +1468,10 @@ namespace Game.Spells bool CanBeAppliedOn(Unit target) { + foreach (uint label in GetSpellInfo().Labels) + if (target.HasAuraTypeWithMiscvalue(AuraType.SuppressItemPassiveEffectBySpellLabel, (int)label)) + return false; + // unit not in world or during remove from world if (!target.IsInWorld || target.IsDuringRemoveFromWorld()) { diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index ad2401980..b67c6e2ca 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5772,6 +5772,22 @@ namespace Game.Spells playerTarget.SendMovementSetCollisionHeight(playerTarget.GetCollisionHeight(), UpdateCollisionHeightReason.Force); } + + [AuraEffectHandler(AuraType.SuppressItemPassiveEffectBySpellLabel)] + void HandleSuppressItemPassiveEffectBySpellLabel(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply) + { + if (!mode.HasAnyFlag(AuraEffectHandleModes.Real)) + return; + + List suppressedAuras = new(); + foreach (var appliedAura in aurApp.GetTarget().GetOwnedAuras()) + if (appliedAura.Value.GetSpellInfo().HasLabel((uint)GetMiscValue())) + suppressedAuras.Add(appliedAura.Value); + + // Refresh applications + foreach (Aura aura in suppressedAuras) + aura.ApplyForTargets(); + } #endregion }