Skip to content

Commit

Permalink
Icecrown: Script s.56578 to deal percentage damage
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Sep 24, 2024
1 parent b5e5217 commit 1b653c1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(56265,'spell_vortex_aura'),
(56266,'spell_vortex_aura'),
(56430,'spell_arcane_bomb'),
(56578,'spell_rapid_fire_harpoon'),
(56683,'spell_grab_captured_crusader'),
(56684,'spell_drop_off_captured_crusader'),
(56839,'spell_to_icecrown_air_ship_a_summon_vehicle'),
Expand Down
13 changes: 13 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,18 @@ struct InfraGreenShield : public AuraScript
}
};

// 56578 - Rapid-Fire Harpoon
struct RapidFireHarpoon : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
{
if (effIdx != EFFECT_INDEX_0)
return;

spell->SetDamage(spell->GetUnitTarget()->GetMaxHealth() * spell->GetDamage() / 100); // percentage of effect
}
};

void AddSC_icecrown()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1292,4 +1304,5 @@ void AddSC_icecrown()
RegisterSpellScript<FireSGM3>("spell_fire_sgm3");
RegisterSpellScript<Burning>("spell_burning");
RegisterSpellScript<InfraGreenShield>("spell_infragreenshield");
RegisterSpellScript<RapidFireHarpoon>("spell_rapid_fire_harpoon");
}

0 comments on commit 1b653c1

Please sign in to comment.