fix(Scripts/Spells): Omen of Clarity should proc off from more spells. (#9344)
This commit is contained in:
parent
41d5f68440
commit
79c0beeb51
2 changed files with 23 additions and 6 deletions
|
|
@ -0,0 +1,3 @@
|
|||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1637867412352266700');
|
||||
|
||||
UPDATE `spell_proc_event` SET `procFlags`=0x00015414 WHERE `entry`=16864;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue