aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index b1ab38a8020..e019cb9cc8e 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -723,6 +723,46 @@ class spell_gen_cancel_aura : public SpellScript
}
};
+class spell_gen_cast_caster_to_target : public SpellScript
+{
+ PrepareSpellScript(spell_gen_cast_caster_to_target);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()));
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_cast_caster_to_target::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
+class spell_gen_cast_target_to_target : public SpellScript
+{
+ PrepareSpellScript(spell_gen_cast_target_to_target);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), uint32(GetEffectValue()));
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_cast_target_to_target::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
enum CannibalizeSpells
{
SPELL_CANNIBALIZE_TRIGGERED = 20578
@@ -1453,6 +1493,32 @@ class spell_gen_divine_storm_cd_reset : public SpellScript
}
};
+enum DreamingGlory
+{
+ SPELL_DREAMING_GLORY = 28694
+};
+
+// 28698 - Dreaming Glory
+class spell_gen_dreaming_glory : public SpellScript
+{
+ PrepareSpellScript(spell_gen_dreaming_glory);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DREAMING_GLORY });
+ }
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetHitUnit()->CastSpell(GetHitUnit(), SPELL_DREAMING_GLORY, true);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_gen_dreaming_glory::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+};
+
class spell_gen_ds_flush_knockback : public SpellScript
{
PrepareSpellScript(spell_gen_ds_flush_knockback);
@@ -4606,6 +4672,8 @@ void AddSC_generic_spell_scripts()
RegisterSpellScriptWithArgs(spell_gen_break_shield, "spell_gen_tournament_counterattack");
RegisterSpellScript(spell_gen_burning_depths_necrolyte_image);
RegisterSpellScript(spell_gen_cancel_aura);
+ RegisterSpellScript(spell_gen_cast_caster_to_target);
+ RegisterSpellScript(spell_gen_cast_target_to_target);
RegisterSpellScript(spell_gen_cannibalize);
RegisterSpellScript(spell_gen_chains_of_ice);
RegisterSpellScript(spell_gen_chaos_blast);
@@ -4628,6 +4696,7 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_despawn_self);
RegisterSpellScript(spell_gen_despawn_target);
RegisterSpellScript(spell_gen_divine_storm_cd_reset);
+ RegisterSpellScript(spell_gen_dreaming_glory);
RegisterSpellScript(spell_gen_ds_flush_knockback);
RegisterSpellScript(spell_gen_dungeon_credit);
RegisterSpellScript(spell_ethereal_pet_aura);