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
This commit is contained in:
Sorikoff
2019-08-08 12:12:49 +00:00
committed by Giacomo Pozzoni
parent 996d4f7cc4
commit 382f563571
3 changed files with 26 additions and 7 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_item_runic_healing_injector';
INSERT INTO `spell_script_names` VALUES
(67489,'spell_item_runic_healing_injector');

View File

@@ -1242,13 +1242,6 @@ void Spell::EffectHeal(SpellEffIndex effIndex)
addhealth += damageAmount;
}
// Runic Healing Injector (heal increased by 25% for engineers - 3.2.0 patch change)
else if (m_spellInfo->Id == 67489)
{
if (Player* player = unitCaster->ToPlayer())
if (player->HasSkill(SKILL_ENGINEERING))
AddPct(addhealth, 25);
}
// Swiftmend - consumes Regrowth or Rejuvenation
else if (m_spellInfo->TargetAuraState == AURA_STATE_SWIFTMEND && unitTarget->HasAuraState(AURA_STATE_SWIFTMEND, m_spellInfo, unitCaster))
{

View File

@@ -3209,6 +3209,28 @@ class spell_item_rocket_boots : public SpellScript
}
};
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,
@@ -4332,6 +4354,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);