aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorjoschiwald <joschiwald@online.de>2013-09-06 20:57:38 +0200
committerjoschiwald <joschiwald@online.de>2013-09-06 20:57:38 +0200
commitadef15cd0f0b80d618fd7c0d9094f95940ab1c52 (patch)
treef9407d905d20013cdcdf7e0692856136750c2640 /src/server/scripts/Spells
parent46ffea86e3f4d7ccf9c402d1b3253e6981fe3f9c (diff)
Core/Spells: add an other condition to SpellInfo::NeedsToBeTriggeredByCaster to correct spells with are wrongly triggered by target instead of caster
- convert archavons rock shards to spellscript (now it works properly) - add a spellscript for one spell that can't be corrected by this (and delete the sai hack, now i uses the correct spell)
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_quest.cpp57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp
index 919046d3c38..4c4fc366d64 100644
--- a/src/server/scripts/Spells/spell_quest.cpp
+++ b/src/server/scripts/Spells/spell_quest.cpp
@@ -2105,6 +2105,61 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader
}
};
+// 51769 - Emblazon Runeblade
+class spell_q12619_emblazon_runeblade : public SpellScriptLoader
+{
+ public:
+ spell_q12619_emblazon_runeblade() : SpellScriptLoader("spell_q12619_emblazon_runeblade") { }
+
+ class spell_q12619_emblazon_runeblade_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_q12619_emblazon_runeblade_AuraScript);
+
+ void HandleEffectPeriodic(AuraEffect const* aurEff)
+ {
+ PreventDefaultAction();
+ GetCaster()->CastSpell(GetCaster(), GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectPeriodic += AuraEffectPeriodicFn(spell_q12619_emblazon_runeblade_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_HEAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_q12619_emblazon_runeblade_AuraScript();
+ }
+};
+
+// 51770 - Emblazon Runeblade
+class spell_q12619_emblazon_runeblade_effect : public SpellScriptLoader
+{
+ public:
+ spell_q12619_emblazon_runeblade_effect() : SpellScriptLoader("spell_q12619_emblazon_runeblade_effect") { }
+
+ class spell_q12619_emblazon_runeblade_effect_SpellScript : public SpellScript
+ {
+ PrepareSpellScript(spell_q12619_emblazon_runeblade_effect_SpellScript);
+
+ void HandleScript(SpellEffIndex /*effIndex*/)
+ {
+ GetCaster()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectHit += SpellEffectFn(spell_q12619_emblazon_runeblade_effect_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
+ }
+ };
+
+ SpellScript* GetSpellScript() const OVERRIDE
+ {
+ return new spell_q12619_emblazon_runeblade_effect_SpellScript();
+ }
+};
+
void AddSC_quest_spell_scripts()
{
new spell_q55_sacred_cleansing();
@@ -2155,4 +2210,6 @@ void AddSC_quest_spell_scripts()
new spell_q12308_escape_from_silverbrook_summon_worgen();
new spell_q12308_escape_from_silverbrook();
new spell_q12641_death_comes_from_on_high();
+ new spell_q12619_emblazon_runeblade();
+ new spell_q12619_emblazon_runeblade_effect();
}