mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
fix(Scripts/Spells): Move Curse of Mending (7098 & 39647) to spell sc… (#21117)
This commit is contained in:
@@ -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');
|
||||
@@ -9673,8 +9673,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
return false;
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
target = victim;
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5538,4 +5558,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_steal_weapon);
|
||||
RegisterSpellScript(spell_gen_set_health);
|
||||
RegisterSpellScript(spell_pet_spellhit_expertise_spellpen_scaling);
|
||||
RegisterSpellScript(spell_gen_proc_on_victim);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user