fix(Scripts/Karazhan): Fix Temptation target (#17710)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 29494;
|
||||||
|
INSERT INTO `spell_script_names` VALUES
|
||||||
|
(29494, 'spell_karazhan_temptation');
|
||||||
@@ -9625,7 +9625,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
|||||||
// Cast positive spell on enemy target
|
// Cast positive spell on enemy target
|
||||||
case 7099: // Curse of Mending
|
case 7099: // Curse of Mending
|
||||||
case 39703: // Curse of Mending
|
case 39703: // Curse of Mending
|
||||||
case 29494: // Temptation
|
|
||||||
case 20233: // Improved Lay on Hands (cast on target)
|
case 20233: // Improved Lay on Hands (cast on target)
|
||||||
{
|
{
|
||||||
target = victim;
|
target = victim;
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ EndContentData */
|
|||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "ScriptedEscortAI.h"
|
#include "ScriptedEscortAI.h"
|
||||||
#include "ScriptedGossip.h"
|
#include "ScriptedGossip.h"
|
||||||
|
#include "SpellAuras.h"
|
||||||
|
#include "SpellAuraEffects.h"
|
||||||
|
#include "SpellScript.h"
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
@@ -585,9 +588,30 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class spell_karazhan_temptation : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_karazhan_temptation);
|
||||||
|
|
||||||
|
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||||
|
{
|
||||||
|
PreventDefaultAction();
|
||||||
|
|
||||||
|
if (eventInfo.GetActionTarget())
|
||||||
|
{
|
||||||
|
GetTarget()->CastSpell(eventInfo.GetActionTarget(), GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectProc += AuraEffectProcFn(spell_karazhan_temptation::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_karazhan()
|
void AddSC_karazhan()
|
||||||
{
|
{
|
||||||
new npc_barnes();
|
new npc_barnes();
|
||||||
new npc_image_of_medivh();
|
new npc_image_of_medivh();
|
||||||
new at_karazhan_side_entrance();
|
new at_karazhan_side_entrance();
|
||||||
|
RegisterSpellScript(spell_karazhan_temptation);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user