[Core/ Spell] Val'anyr Hammer of Ancient Kings Fix (#1388)

* [Core / Spell] Fixed Val'anyr Hammer of Ancient Kings

Fixed issue with Val'anyr Hammer of Ancient Kings procing on non healing spells such as buffs
This commit is contained in:
Lee
2019-02-01 01:59:19 +00:00
committed by GitHub
parent 0e154c4dba
commit d172c43459
2 changed files with 37 additions and 0 deletions

View File

@@ -1501,6 +1501,39 @@ class spell_item_arcane_shroud : public SpellScriptLoader
}
};
// 64415 - Val'anyr Hammer of Ancient Kings - Equip Effect
class spell_item_valanyr_hammer_of_ancient_kings : public SpellScriptLoader
{
public:
spell_item_valanyr_hammer_of_ancient_kings() : SpellScriptLoader("spell_item_valanyr_hammer_of_ancient_kings") { }
class spell_item_valanyr_hammer_of_ancient_kingsAuraScript : public AuraScript
{
PrepareAuraScript(spell_item_valanyr_hammer_of_ancient_kingsAuraScript);
bool CheckProc(ProcEventInfo& eventInfo)
{
SpellInfo const* spellInfo = eventInfo.GetHealInfo()->GetSpellInfo();
if (!spellInfo || !spellInfo->HasEffect(SPELL_EFFECT_HEAL))
return false;
return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetHeal() > 0;
}
void Register()
{
DoCheckProc += AuraCheckProcFn(spell_item_valanyr_hammer_of_ancient_kingsAuraScript::CheckProc);
}
};
AuraScript* GetAuraScript() const
{
return new spell_item_valanyr_hammer_of_ancient_kingsAuraScript();
}
};
// 64411 - Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
enum BlessingOfAncientKings
{
@@ -3935,6 +3968,7 @@ void AddSC_item_spell_scripts()
new spell_item_aegis_of_preservation();
new spell_item_arcane_shroud();
new spell_item_blessing_of_ancient_kings();
new spell_item_valanyr_hammer_of_ancient_kings();
new spell_item_defibrillate("spell_item_goblin_jumper_cables", 67, SPELL_GOBLIN_JUMPER_CABLES_FAIL);
new spell_item_defibrillate("spell_item_goblin_jumper_cables_xl", 50, SPELL_GOBLIN_JUMPER_CABLES_XL_FAIL);
new spell_item_defibrillate("spell_item_gnomish_army_knife", 33);