fix(Core/Spells): Implemented SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT. (#7178)

* fix(Core/Spells): Implemented SPELL_ATTR3_NO_PROC_EQUIP_REQUIREMENT.

Fixed #6559.

* Excluded shoot spells.

Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
UltraNix
2021-08-05 23:44:14 +02:00
committed by GitHub
parent 5a93dce915
commit 32650b61ee

View File

@@ -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)