From 32650b61eee49a7d81436e242d13eede9e8f4ce0 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 5 Aug 2021 23:44:14 +0200 Subject: [PATCH] fix(Core/Spells): Implemented SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT. (#7178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Core/Spells): Implemented SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT. Fixed #6559. * Excluded shoot spells. Co-authored-by: Stefano Borzì --- src/server/game/Entities/Unit/Unit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 967112d6f..af2b5c5f0 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -16677,8 +16677,10 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const // Xinef: additional check for player auras - only player spells can trigger player proc auras // Xinef: skip victim auras + // Excluded player shoot spells if (!isVictim && GetTypeId() == TYPEID_PLAYER) //spellProto->SpellFamilyName != SPELLFAMILY_GENERIC) - if (!(EventProcFlag & (PROC_FLAG_KILL | PROC_FLAG_DEATH)) && procSpell && procSpell->SpellFamilyName == SPELLFAMILY_GENERIC && (!eventInfo.GetTriggerAuraSpell() || eventInfo.GetTriggerAuraSpell()->SpellFamilyName == SPELLFAMILY_GENERIC)) + if (!(EventProcFlag & (PROC_FLAG_KILL | PROC_FLAG_DEATH)) && procSpell && procSpell->SpellFamilyName == SPELLFAMILY_GENERIC && procSpell->GetCategory() != 76 && + (!eventInfo.GetTriggerAuraSpell() || eventInfo.GetTriggerAuraSpell()->SpellFamilyName == SPELLFAMILY_GENERIC)) return false; // Check spellProcEvent data requirements @@ -16705,7 +16707,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const return false; // Check if current equipment allows aura to proc - if (!isVictim && GetTypeId() == TYPEID_PLAYER) + if (!isVictim && GetTypeId() == TYPEID_PLAYER && !spellProto->HasAttribute(SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT)) { Player* player = ToPlayer(); if (spellProto->EquippedItemClass == ITEM_CLASS_WEAPON)