fix(Scripts/Spells): Omen of Clarity should proc off from more spells. (#9344)

This commit is contained in:
UltraNix
2021-11-30 16:48:19 +01:00
committed by GitHub
parent 41d5f68440
commit 79c0beeb51
2 changed files with 23 additions and 6 deletions

View File

@@ -190,16 +190,30 @@ class spell_dru_omen_of_clarity : public AuraScript
bool CheckProc(ProcEventInfo& eventInfo)
{
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo)
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || spellInfo->IsPassive())
{
return true;
}
if (eventInfo.GetTypeMask() & PROC_FLAG_DONE_SPELL_MELEE_DMG_CLASS)
{
return spellInfo->HasAttribute(SPELL_ATTR0_ON_NEXT_SWING) || spellInfo->HasAttribute(SPELL_ATTR0_ON_NEXT_SWING_NO_DAMAGE);
}
// Non-damaged/Non-healing spells - only druid abilities
if (!spellInfo->HasAttribute(SpellCustomAttributes(SPELL_ATTR0_CU_DIRECT_DAMAGE | SPELL_ATTR0_CU_NO_INITIAL_THREAT)))
{
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID)
{
// Exclude shapeshifting
return !spellInfo->HasAura(SPELL_AURA_MOD_SHAPESHIFT);
}
// xinef: no mana cost
if (spellInfo->ManaCost == 0 && spellInfo->ManaCostPercentage == 0)
return false;
}
// xinef: SPELL_ATTR0_CU_NO_INITIAL_THREAT and SPELL_ATTR0_CU_DIRECT_DAMAGE contains spells capable of healing and damaging + some others, but this is taken care of above
return spellInfo->HasAttribute(SpellCustomAttributes(SPELL_ATTR0_CU_DIRECT_DAMAGE | SPELL_ATTR0_CU_NO_INITIAL_THREAT));
return true;
}
void Register() override