diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-24 23:08:35 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-24 23:09:25 +0200 |
commit | 2963b44e3db88aea4a4e70ffac285c9945202266 (patch) | |
tree | e1518ef42b17649746b8a07a66c16f4aa5daa1d3 | |
parent | 75db5f8c17224579d0990f97fd60e85d12ec5a86 (diff) |
Core/Spells: Fix warrior talent "Sudden Death" for 4.3.4
-rw-r--r-- | sql/updates/world/2013_07_24_05_world_spell_script_names_434.sql | 3 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 38 |
2 files changed, 41 insertions, 0 deletions
diff --git a/sql/updates/world/2013_07_24_05_world_spell_script_names_434.sql b/sql/updates/world/2013_07_24_05_world_spell_script_names_434.sql new file mode 100644 index 00000000000..cfed3bc8f00 --- /dev/null +++ b/sql/updates/world/2013_07_24_05_world_spell_script_names_434.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=52437; +INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES +(52437,'spell_warr_sudden_death'); diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index af136235fd6..edc43772d41 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -31,6 +31,7 @@ enum WarriorSpells SPELL_WARRIOR_BLOODTHIRST = 23885, SPELL_WARRIOR_BLOODTHIRST_DAMAGE = 23881, SPELL_WARRIOR_CHARGE = 34846, + SPELL_WARRIOR_COLOSSUS_SMASH = 86346, SPELL_WARRIOR_DEEP_WOUNDS_RANK_1 = 12162, SPELL_WARRIOR_DEEP_WOUNDS_RANK_2 = 12850, SPELL_WARRIOR_DEEP_WOUNDS_RANK_3 = 12868, @@ -776,6 +777,42 @@ class spell_warr_second_wind_trigger : public SpellScriptLoader } }; +// 52437 - Sudden Death +class spell_warr_sudden_death : public SpellScriptLoader +{ + public: + spell_warr_sudden_death() : SpellScriptLoader("spell_warr_sudden_death") { } + + class spell_warr_sudden_death_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warr_sudden_death_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_COLOSSUS_SMASH)) + return false; + return true; + } + + void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + // Remove cooldown on Colossus Smash + if (Player* player = GetTarget()->ToPlayer()) + player->RemoveSpellCooldown(SPELL_WARRIOR_COLOSSUS_SMASH, true); + } + + void Register() OVERRIDE + { + AfterEffectApply += AuraEffectRemoveFn(spell_warr_sudden_death_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); // correct? + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warr_sudden_death_AuraScript(); + } +}; + // 12328, 18765, 35429 - Sweeping Strikes class spell_warr_sweeping_strikes : public SpellScriptLoader { @@ -1036,6 +1073,7 @@ void AddSC_warrior_spell_scripts() new spell_warr_second_wind_trigger(); new spell_warr_shattering_throw(); new spell_warr_slam(); + new spell_warr_sudden_death(); new spell_warr_sweeping_strikes(); new spell_warr_sword_and_board(); new spell_warr_victorious(); |