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)
This commit is contained in:
1 parent
46ffea86e3
commit
adef15cd0f
8 files changed
+147
-40
No files matched your search
@@ -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();
|
||||
}
|
||||
Reference in new issue
Block a user