From 502864e86c0a29ac4e64b20ee0c2e853cecd0401 Mon Sep 17 00:00:00 2001 From: Keader Date: Fri, 29 Dec 2017 14:16:53 -0300 Subject: [PATCH] Core/Scripts: Val'anyr Hammer of Ancient Kings should proc only with effective heal --- .../world/3.3.5/2017_12_29_00_world.sql.sql | 3 +++ src/server/scripts/Spells/spell_item.cpp | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sql/updates/world/3.3.5/2017_12_29_00_world.sql.sql diff --git a/sql/updates/world/3.3.5/2017_12_29_00_world.sql.sql b/sql/updates/world/3.3.5/2017_12_29_00_world.sql.sql new file mode 100644 index 00000000000..b6c0dd3bcb6 --- /dev/null +++ b/sql/updates/world/3.3.5/2017_12_29_00_world.sql.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_valanyr_hammer_of_ancient_kings'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) 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 a2f5acf5be3..a3ec935866d 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -444,6 +444,22 @@ class spell_item_blessing_of_ancient_kings : public AuraScript } }; +// 64415 Val'anyr Hammer of Ancient Kings - Equip Effect +class spell_item_valanyr_hammer_of_ancient_kings : public AuraScript +{ + PrepareAuraScript(spell_item_valanyr_hammer_of_ancient_kings); + + bool CheckProc(ProcEventInfo& eventInfo) + { + return eventInfo.GetHealInfo() && eventInfo.GetHealInfo()->GetEffectiveHeal() > 0; + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_item_valanyr_hammer_of_ancient_kings::CheckProc); + } +}; + enum DeadlyPrecision { SPELL_DEADLY_PRECISION = 71564 @@ -3880,6 +3896,7 @@ void AddSC_item_spell_scripts() RegisterAuraScript(spell_item_aura_of_madness); RegisterAuraScript(spell_item_dementia); RegisterAuraScript(spell_item_blessing_of_ancient_kings); + RegisterAuraScript(spell_item_valanyr_hammer_of_ancient_kings); RegisterAuraScript(spell_item_deadly_precision); RegisterSpellScript(spell_item_deadly_precision_dummy); new spell_item_deathbringers_will("spell_item_deathbringers_will_normal");