Merge b0d2702bcf54a562ed8112c10c4e355c31296776 into f6c4164765afe447476114e632ee3d70b04a1777

This commit is contained in:
Andrew 2025-02-20 13:24:52 +00:00 committed by GitHub
commit 66fd3fc912
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,6 @@
--
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_eredar_twins_handle_dark_touched_periodic', 'spell_eredar_twins_handle_flame_touched_periodic');
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(45432, 'spell_eredar_twins_handle_flame_touched_periodic'),
(45271, 'spell_eredar_twins_handle_dark_touched_periodic'),
(46771, 'spell_eredar_twins_handle_flame_touched_flame_sear');

View File

@ -377,6 +377,33 @@ class spell_eredar_twins_blaze : public SpellScript
}
};
class spell_eredar_twins_handle_touch_periodic : public AuraScript
{
PrepareAuraScript(spell_eredar_twins_handle_touch_periodic);
public:
spell_eredar_twins_handle_touch_periodic(uint32 touchSpell, uint8 effIndex) : AuraScript(), _touchSpell(touchSpell), _effectIndex(effIndex) {}
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ _touchSpell });
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
GetTarget()->CastSpell(GetTarget(), _touchSpell, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_eredar_twins_handle_touch_periodic::OnPeriodic, _effectIndex, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
private:
uint32 _touchSpell;
uint32 _effectIndex;
};
class at_sunwell_eredar_twins : public OnlyOnceAreaTriggerScript
{
public:
@ -404,5 +431,8 @@ void AddSC_boss_eredar_twins()
RegisterSpellScriptWithArgs(spell_eredar_twins_apply_touch, "spell_eredar_twins_apply_flame_touched", SPELL_FLAME_TOUCHED);
RegisterSpellScript(spell_eredar_twins_handle_touch);
RegisterSpellScript(spell_eredar_twins_blaze);
RegisterSpellScriptWithArgs(spell_eredar_twins_handle_touch_periodic, "spell_eredar_twins_handle_dark_touched_periodic", SPELL_DARK_TOUCHED, EFFECT_0);
RegisterSpellScriptWithArgs(spell_eredar_twins_handle_touch_periodic, "spell_eredar_twins_handle_flame_touched_periodic", SPELL_FLAME_TOUCHED, EFFECT_2);
RegisterSpellScriptWithArgs(spell_eredar_twins_handle_touch_periodic, "spell_eredar_twins_handle_flame_touched_flame_sear", SPELL_FLAME_TOUCHED, EFFECT_0);
new at_sunwell_eredar_twins();
}