From 1e222484181cee628ef643ae50c850c0eebf5a6d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 7 Nov 2017 18:29:50 -0500 Subject: [PATCH] Added warrior Mortal Strike & Colossus Smash Effect --- Source/Scripts/Spells/Warrior.cs | 53 +++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/Source/Scripts/Spells/Warrior.cs b/Source/Scripts/Spells/Warrior.cs index 38227a2e2..146a26b90 100644 --- a/Source/Scripts/Spells/Warrior.cs +++ b/Source/Scripts/Spells/Warrior.cs @@ -36,7 +36,8 @@ namespace Scripts.Spells.Warrior public const uint ChargePauseRageDecay = 109128; public const uint ChargeRootEffect = 105771; public const uint ChargeSlowEffect = 236027; - public const uint ColossusSmash = 86346; + public const uint ColossusSmash = 167105; + public const uint ColossusSmashEffect = 208086; public const uint Execute = 20647; public const uint GlyphOfTheBlazingTrail = 123779; public const uint GlyphOfHeroicLeap = 159708; @@ -49,6 +50,7 @@ namespace Scripts.Spells.Warrior public const uint JuggernautCritBonusTalent = 64976; public const uint LastStandTriggered = 12976; public const uint MortalStrike = 12294; + public const uint MortalWounds = 213667; public const uint RallyingCry = 97463; public const uint Rend = 94009; public const uint RetaliationDamage = 22858; @@ -169,6 +171,27 @@ namespace Scripts.Spells.Warrior } } + [Script] // 167105 - Colossus Smash 7.1.5 + class spell_warr_colossus_smash_SpellScript : SpellScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.ColossusSmashEffect); + } + + void HandleOnHit() + { + Unit target = GetHitUnit(); + if (target) + GetCaster().CastSpell(target, SpellIds.ColossusSmashEffect, true); + } + + public override void Register() + { + OnHit.Add(new HitHandler(HandleOnHit)); + } + } + // Updated 4.3.4 [Script] class spell_warr_concussion_blow : SpellScript @@ -414,8 +437,28 @@ namespace Scripts.Spells.Warrior } } - // 7384 - Overpower - [Script] + [Script] // 12294 - Mortal Strike 7.1.5 + class spell_warr_mortal_strike_SpellScript : SpellScript + { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellInfo(SpellIds.MortalWounds); + } + + void HandleDummy(uint effIndex) + { + Unit target = GetHitUnit(); + if (target) + GetCaster().CastSpell(target, SpellIds.MortalWounds, true); + } + + public override void Register() + { + OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy)); + } + } + + [Script] // 7384 - Overpower class spell_warr_overpower : SpellScript { void HandleEffect(uint effIndex) @@ -441,8 +484,8 @@ namespace Scripts.Spells.Warrior } } - // 97462 - Rallying Cry - [Script] + + [Script] // 97462 - Rallying Cry class spell_warr_rallying_cry : SpellScript { public override bool Validate(SpellInfo spellInfo)