Skip to content

Commit

Permalink
Icecrown: Implement s57385 and s57412
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Jul 5, 2024
1 parent f6721bd commit 547c0eb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,8 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(57082,'spell_crystal_spikes'),
(57083,'spell_crystal_spikes'),
(57283,'spell_remove_mushroom_power'),
(57385,'spell_argent_cannon'),
(57412,'spell_reckoning_bomb'),
(57418,'spell_to_icecrown_air_ship_h_summon_vehicle'),
(57473,'spell_arcane_storm'),
(57491,'spell_flame_tsunami_damage'),
Expand Down
35 changes: 35 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/northrend/icecrown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,39 @@ struct FrozenSiegebolt : public SpellScript
}
};

// 57385 - Argent Cannon
struct ArgentCannon : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
{
if (effIdx != EFFECT_INDEX_0)
return;

uint32 damage = spell->GetDamage();
Position pos = spell->m_targets.getDestination();
SpellCastArgs args;
args.SetDestination(pos);
spell->GetCaster()->CastSpell(args, damage, TRIGGERED_OLD_TRIGGERED);

spell->GetCaster()->CastSpell(nullptr, 57608, TRIGGERED_OLD_TRIGGERED); // Powering Up The Core
}
};

// 57412 - Reckoning Bomb
struct ReckoningBomb : public SpellScript
{
void OnEffectExecute(Spell* spell, SpellEffectIndex effIdx) const override
{
if (effIdx != EFFECT_INDEX_0)
return;

uint32 damage = spell->GetDamage();
Position pos = spell->m_targets.getDestination();
SpellCastArgs args;
args.SetDestination(pos);
spell->GetCaster()->CastSpell(args, damage, TRIGGERED_OLD_TRIGGERED);
}
};

void AddSC_icecrown()
{
Expand Down Expand Up @@ -1101,4 +1134,6 @@ void AddSC_icecrown()
RegisterSpellScript<ToIcecrownAirshipASummonVehicle>("spell_to_icecrown_air_ship_a_summon_vehicle");
RegisterSpellScript<ToIcecrownAirshipHSummonVehicle>("spell_to_icecrown_air_ship_h_summon_vehicle");
RegisterSpellScript<FrozenSiegebolt>("spell_frozen_siegebolt");
RegisterSpellScript<ArgentCannon>("spell_argent_cannon");
RegisterSpellScript<ReckoningBomb>("spell_reckoning_bomb");
}

0 comments on commit 547c0eb

Please sign in to comment.