Merge 9c4101fce9478f9a820af9752954c2552a184dd8 into 28f5ead7f308a6a301d3dd8798c5031e8a52dcb1

This commit is contained in:
Andrew 2025-02-19 21:05:41 -03:00 committed by GitHub
commit 67ca0e9c5b
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_DUMMY);
}
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();
}