diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-22 00:13:58 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-22 00:13:58 +0200 |
| commit | 6c21bbaaa47ba0701790dbcbdc34c9794a9bd7d9 (patch) | |
| tree | 3a39e4c24380c8623c3543ea405949dd5b8e1cdc /src/server/scripts | |
| parent | b684cd60797924478ebaa66a7edfdeb1f6b97c4a (diff) | |
Core/Spells: Conver/Update warrior "Retaliation" for 4.3.4
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 46 |
2 files changed, 47 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 9578c246c94..9ee4075bd38 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -94,6 +94,7 @@ class spell_pri_body_and_soul : public SpellScriptLoader void HandleEffectSpeedProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); + // Proc only with Power Word: Shield or Leap of Faith if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[0] & 0x1 || eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[2] & 0x80000)) return; @@ -103,6 +104,7 @@ class spell_pri_body_and_soul : public SpellScriptLoader void HandleEffectDispelProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); + // Proc only with Cure Disease if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id != SPELL_PRIEST_CURE_DISEASE || eventInfo.GetProcTarget() != GetTarget()) return; diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 9688554f4f9..ad287e04a6d 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -42,11 +42,12 @@ enum WarriorSpells SPELL_WARRIOR_JUGGERNAUT_CRIT_BONUS_TALENT = 64976, SPELL_WARRIOR_LAST_STAND_TRIGGERED = 12976, SPELL_WARRIOR_RALLYING_CRY = 97463, + SPELL_WARRIOR_RETALIATION_DAMAGE = 22858, SPELL_WARRIOR_SECOUND_WIND_PROC_RANK_1 = 29834, SPELL_WARRIOR_SECOUND_WIND_PROC_RANK_2 = 29838, SPELL_WARRIOR_SECOUND_WIND_TRIGGER_RANK_1 = 29841, SPELL_WARRIOR_SECOUND_WIND_TRIGGER_RANK_2 = 29842, - SPELL_WARRIOR_SHIELD_SLAM = 23922 , + SPELL_WARRIOR_SHIELD_SLAM = 23922, SPELL_WARRIOR_SLAM = 50782, SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK = 26654, SPELL_WARRIOR_TAUNT = 355, @@ -529,6 +530,48 @@ class spell_warr_rend : public SpellScriptLoader } }; +// 20230 - Retaliation +class spell_warr_retaliation : public SpellScriptLoader +{ + public: + spell_warr_retaliation() : SpellScriptLoader("spell_warr_retaliation") { } + + class spell_warr_retaliation_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warr_retaliation_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_RETALIATION_DAMAGE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + // check attack comes not from behind + return GetTarget()->isInFront(eventInfo.GetProcTarget(), M_PI); + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_WARRIOR_RETALIATION_DAMAGE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + DoCheckProc += AuraCheckProcFn(spell_warr_retaliation_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_warr_retaliation_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warr_retaliation_AuraScript(); + } +}; + // 64380, 65941 - Shattering Throw class spell_warr_shattering_throw : public SpellScriptLoader { @@ -934,6 +977,7 @@ void AddSC_warrior_spell_scripts() new spell_warr_overpower(); new spell_warr_rallying_cry(); new spell_warr_rend(); + new spell_warr_retaliation(); new spell_warr_second_wind_proc(); new spell_warr_second_wind_trigger(); new spell_warr_shattering_throw(); |
