Scripts/Spells: Fix priest Mind Bomb

Port From (https://github.com/TrinityCore/TrinityCore/commit/01ac538cd252151f0db16748aa81a813a23b18b7)
This commit is contained in:
hondacrx
2022-01-01 17:17:39 -05:00
parent a2dcceb4f2
commit 23ee2b5a48
2 changed files with 25 additions and 2 deletions
+22 -2
View File
@@ -50,6 +50,7 @@ namespace Scripts.Spells.Priest
public const uint ItemEfficiency = 37595;
public const uint LeapOfFaithEffect = 92832;
public const uint LevitateEffect = 111759;
public const uint MindBombStun = 226943;
public const uint OracularHeal = 26170;
public const uint PenanceR1 = 47540;
public const uint PenanceR1Damage = 47758;
@@ -402,8 +403,27 @@ namespace Scripts.Spells.Priest
}
}
// 47540 - Penance
[Script]
[Script] // 205369 - Mind Bomb
class spell_pri_mind_bomb : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SpellIds.MindBombStun);
}
void RemoveEffect(AuraEffect aurEff, AuraEffectHandleModes mode)
{
if (GetTargetApplication().GetRemoveMode() == AuraRemoveMode.Death || GetTargetApplication().GetRemoveMode() == AuraRemoveMode.Expire)
GetCaster()?.CastSpell(GetTarget().GetPosition(), SpellIds.MindBombStun, new CastSpellExtraArgs(true));
}
public override void Register()
{
AfterEffectRemove.Add(new EffectApplyHandler(RemoveEffect, 0, AuraType.Dummy, AuraEffectHandleModes.Real));
}
}
[Script] // 47540 - Penance
class spell_pri_penance : SpellScript
{
public override bool Load()
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_pri_mind_bomb';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(205369, 'spell_pri_mind_bomb');