diff --git a/data/sql/updates/pending_db_world/rev_1548850930086940600.sql b/data/sql/updates/pending_db_world/rev_1548850930086940600.sql new file mode 100644 index 000000000..5d5611a64 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1548850930086940600.sql @@ -0,0 +1,3 @@ +INSERT INTO version_db_world (`sql_rev`) VALUES ('1548850930086940600'); + +INSERT INTO `spell_script_names` VALUES (64415, 'spell_item_valanyr_hammer_of_ancient_kings'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index c57678bdf..3d5b2c787 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -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);