From 66f5275d2683a292afae3acdded4d252e29a2703 Mon Sep 17 00:00:00 2001 From: Sorikoff <46191832+Sorikoff@users.noreply.github.com> Date: Thu, 8 Aug 2019 12:12:49 +0000 Subject: Scripts/Spells: Runic Healing Injector (#23690) * Scripts/Spells: Runic Healing Injector * Rename 9999_99_99_99_world.sql to 2019_08_08_00_world.sql (cherry picked from commit 382f563571d39f9ec02a0df899dbdaaf1745af83) --- src/server/scripts/Spells/spell_item.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 10afd8b97c1..82f42a2d496 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -3230,6 +3230,29 @@ class spell_item_rocket_boots : public SpellScript } }; +// 67489 - Runic Healing Injector +class spell_item_runic_healing_injector : public SpellScript +{ + PrepareSpellScript(spell_item_runic_healing_injector); + + bool Load() override + { + return GetCaster()->GetTypeId() == TYPEID_PLAYER; + } + + void HandleHeal(SpellEffIndex /*effIndex*/) + { + if (Player* caster = GetCaster()->ToPlayer()) + if (caster->HasSkill(SKILL_ENGINEERING)) + SetHitHeal(GetHitHeal() * 1.25f); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_item_runic_healing_injector::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL); + } +}; + enum PygmyOil { SPELL_PYGMY_OIL_PYGMY_AURA = 53806, @@ -4514,6 +4537,7 @@ void AddSC_item_spell_scripts() RegisterAuraScript(spell_item_nitro_boosts_backfire); RegisterSpellScript(spell_item_teach_language); RegisterSpellScript(spell_item_rocket_boots); + RegisterSpellScript(spell_item_runic_healing_injector); RegisterSpellScript(spell_item_pygmy_oil); RegisterSpellScript(spell_item_unusual_compass); RegisterSpellScript(spell_item_chicken_cover); -- cgit v1.2.3