From 55148a9ca4e474e8c9688e1658885a004329ca56 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 23 May 2023 07:49:28 -0400 Subject: [PATCH] Scripts/Warrior: Implement Shield Block Port From (https://github.com/TrinityCore/TrinityCore/commit/48820532e42b60566d9995e41eef280d64c6f452) --- Source/Scripts/Spells/Warrior.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Source/Scripts/Spells/Warrior.cs b/Source/Scripts/Spells/Warrior.cs index 99144db5c..fc271221f 100644 --- a/Source/Scripts/Spells/Warrior.cs +++ b/Source/Scripts/Spells/Warrior.cs @@ -39,6 +39,7 @@ namespace Scripts.Spells.Warrior public const uint MortalStrike = 12294; public const uint MortalWounds = 213667; public const uint RallyingCry = 97463; + public const uint ShieldBlockAura = 132404; public const uint ShieldChargeEffect = 385953; public const uint Shockwave = 46968; public const uint ShockwaveStun = 132168; @@ -456,6 +457,25 @@ namespace Scripts.Spells.Warrior } } + [Script] // 2565 - Shield Block + class spell_warr_shield_block : SpellScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.ShieldBlockAura); + } + + void HandleHitTarget(uint effIndex) + { + GetCaster().CastSpell(null, SpellIds.ShieldBlockAura, true); + } + + public override void Register() + { + OnEffectHitTarget.Add(new EffectHandler(HandleHitTarget, 0, SpellEffectName.Dummy)); + } + } + [Script] // 385952 - Shield Charge class spell_warr_shield_charge : SpellScript {