fix(Scripts/Spells): Move Curse of Mending (7098 & 39647) to spell sc… (#21117)

This commit is contained in:
Andrew
2025-01-09 16:15:50 -03:00
committed by GitHub
parent 42e0ab5a5d
commit fb3749718e
3 changed files with 26 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
--
DELETE FROM `spell_script_names` WHERE `spell_id` IN (7098, 39647);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(7098, 'spell_gen_proc_on_victim'),
(39647, 'spell_gen_proc_on_victim');

View File

@@ -9673,8 +9673,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false; return false;
} }
// Cast positive spell on enemy target // Cast positive spell on enemy target
case 7099: // Curse of Mending
case 39703: // Curse of Mending
case 20233: // Improved Lay on Hands (cast on target) case 20233: // Improved Lay on Hands (cast on target)
{ {
target = victim; target = victim;

View File

@@ -5379,6 +5379,26 @@ class spell_pet_spellhit_expertise_spellpen_scaling : public AuraScript
} }
}; };
// 7098 - Curse of Mending
// 39647 - Curse of Mending
class spell_gen_proc_on_victim : public AuraScript
{
PrepareAuraScript(spell_gen_proc_on_victim);
void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
if (Unit* target = eventInfo.GetActionTarget())
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_gen_proc_on_victim::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_generic_spell_scripts() void AddSC_generic_spell_scripts()
{ {
RegisterSpellScript(spell_silithyst); RegisterSpellScript(spell_silithyst);
@@ -5538,4 +5558,5 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_steal_weapon); RegisterSpellScript(spell_gen_steal_weapon);
RegisterSpellScript(spell_gen_set_health); RegisterSpellScript(spell_gen_set_health);
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling); RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
RegisterSpellScript(spell_gen_proc_on_victim);
} }