diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index c654c9205..cb3434931 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1634,7 +1634,7 @@ namespace Framework.Constants public enum SpellAttr3 : uint { Unk0 = 0x01, // 0 - Unk1 = 0x02, // 1 + NoProcEquipRequirement = 0x02, // 1 Ignores subclass mask check when checking proc Unk2 = 0x04, // 2 BlockableSpell = 0x08, // 3 Only Dmg Class Melee In 3.1.3 IgnoreResurrectionTimer = 0x10, // 4 You Don'T Have To Wait To Be Resurrected With These Spells diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 7bad0f8af..d7f901d6f 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -1706,32 +1706,33 @@ namespace Game.Spells // do that only for passive spells // @todo this needs to be unified for all kinds of auras Unit target = aurApp.GetTarget(); - if (IsPassive() && target.IsTypeId(TypeId.Player)) + if (IsPassive() && target.IsPlayer() && GetSpellInfo().EquippedItemClass != ItemClass.None) { - if (GetSpellInfo().EquippedItemClass == ItemClass.Weapon) + if (!GetSpellInfo().HasAttribute(SpellAttr3.NoProcEquipRequirement)) { - if (target.ToPlayer().IsInFeralForm()) - return 0; - - DamageInfo damageInfo = eventInfo.GetDamageInfo(); - if (damageInfo != null) + Item item = null; + if (GetSpellInfo().EquippedItemClass == ItemClass.Weapon) { - WeaponAttackType attType = damageInfo.GetAttackType(); - Item item = null; - if (attType == WeaponAttackType.BaseAttack || attType == WeaponAttackType.RangedAttack) - item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.MainHand); - else if (attType == WeaponAttackType.OffAttack) - item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.OffHand); - - if (item == null || item.IsBroken() || item.GetTemplate().GetClass() != ItemClass.Weapon || !Convert.ToBoolean((1 << (int)item.GetTemplate().GetSubClass()) & GetSpellInfo().EquippedItemSubClassMask)) + if (target.ToPlayer().IsInFeralForm()) return 0; + + DamageInfo damageInfo = eventInfo.GetDamageInfo(); + if (damageInfo != null) + { + WeaponAttackType attType = damageInfo.GetAttackType(); + if (damageInfo.GetAttackType() != WeaponAttackType.OffAttack) + item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.MainHand); + else + item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.OffHand); + } } - } - else if (GetSpellInfo().EquippedItemClass == ItemClass.Armor) - { - // Check if player is wearing shield - Item item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.OffHand); - if (item == null || item.IsBroken() || item.GetTemplate().GetClass() != ItemClass.Armor || !Convert.ToBoolean((1 << (int)item.GetTemplate().GetSubClass()) & GetSpellInfo().EquippedItemSubClassMask)) + else if (GetSpellInfo().EquippedItemClass == ItemClass.Armor) + { + // Check if player is wearing shield + item = target.ToPlayer().GetUseableItemByPos(InventorySlots.Bag0, EquipmentSlot.OffHand); + } + + if (!item || item.IsBroken() || !item.IsFitToSpellRequirements(GetSpellInfo())) return 0; } }