fix(Scripts/BoreanTundra): Script Soul Deflection spell (#22931)
This commit is contained in:
parent
f31a7281bd
commit
56f2a8e4f3
2 changed files with 33 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 51009;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(51009, 'spell_soul_deflection');
|
||||
|
|
@ -2143,6 +2143,34 @@ class spell_necropolis_beam: public SpellScript
|
|||
}
|
||||
};
|
||||
|
||||
enum SoulDeflectionSpells
|
||||
{
|
||||
SPELL_SOUL_DEFLECTION_DAMAGE = 51011
|
||||
};
|
||||
|
||||
class spell_soul_deflection : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_soul_deflection);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_SOUL_DEFLECTION_DAMAGE });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (!eventInfo.GetDamageInfo() || !eventInfo.GetDamageInfo()->GetDamage() || !GetTarget())
|
||||
return;
|
||||
|
||||
GetCaster()->CastCustomSpell(SPELL_SOUL_DEFLECTION_DAMAGE, SPELLVALUE_BASE_POINT0, eventInfo.GetDamageInfo()->GetDamage(), GetTarget(), true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_soul_deflection::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_borean_tundra()
|
||||
{
|
||||
RegisterSpellScript(spell_q11919_q11940_drake_hunt_aura);
|
||||
|
|
@ -2168,4 +2196,5 @@ void AddSC_borean_tundra()
|
|||
new npc_bloodmage_laurith();
|
||||
RegisterCreatureAI(npc_jenny);
|
||||
RegisterSpellScript(spell_necropolis_beam);
|
||||
RegisterSpellScript(spell_soul_deflection);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue