Skip to content

Commit

Permalink
Ulduar: Correct more oopsies on Iron Council
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Jan 20, 2023
1 parent 03b56e7 commit 529691e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES
(61883,'spell_lightning_tendrils_visual'),
(61887,'spell_lightning_tendrils'),
(61888,'spell_overwhelming_power'),
(61900,'spell_electrical_charge_council'),
(61915,'spell_lightning_whirl_trigger'),
(61916,'spell_lightning_whirl'),
(61920,'spell_supercharge_iron_council'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,24 @@ struct SuperChargeIronCouncil : public SpellScript
}
return;
}
Unit* target = spell->GetUnitTarget();
}

bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override
{
if (eff != EFFECT_INDEX_2)
return true;
if (!target || !target->IsAlive())
return;
return false;
if (target->GetEntry() == NPC_BRUNDIR && target->GetAuraCount(SPELL_SUPERCHARGE) == 1)
target->CastSpell(nullptr, SPELL_STORMSHIELD, TRIGGERED_OLD_TRIGGERED);
if (target->GetEntry() == NPC_STEELBREAKER && target->GetAuraCount(SPELL_SUPERCHARGE) == 1)
{
target->CastSpell(nullptr, SPELL_ELECTRICAL_CHARGE, TRIGGERED_OLD_TRIGGERED);
}
target->SetHealthPercent(100.f);
if (target->AI())
target->AI()->SpellListChanged();
return true;
}
};

Expand Down Expand Up @@ -637,6 +647,24 @@ struct RuneOfPowerCouncil : public SpellScript
}
};

struct ElectricalChargeCouncil : public AuraScript
{
void OnApply(Aura* aura, bool apply) const override
{
if (apply)
return;
if (aura->GetRemoveMode() != AURA_REMOVE_BY_DEATH)
return;
Unit* target = aura->GetTarget();
if (!target)
return;
Unit* caster = aura->GetCaster();
if (!caster)
return;
target->CastSpell(aura->GetCaster(), aura->GetBasePoints(), TRIGGERED_OLD_TRIGGERED);
}
};

void AddSC_boss_assembly_of_iron()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -665,4 +693,5 @@ void AddSC_boss_assembly_of_iron()
RegisterSpellScript<LightningTendrils>("spell_lightning_tendrils");
RegisterSpellScript<LightningWhirlTrigger>("spell_lightning_whirl_trigger");
RegisterSpellScript<RuneOfPowerCouncil>("spell_rune_of_power_council");
RegisterSpellScript<ElectricalChargeCouncil>("spell_electrical_charge_council");
}

0 comments on commit 529691e

Please sign in to comment.