Core/Spells: Fix warrior talent "Sudden Death" for 4.3.4

This commit is contained in:
Vincent-Michael
2013-07-24 23:08:35 +02:00
parent 75db5f8c17
commit 2963b44e3d
2 changed files with 41 additions and 0 deletions

View File

@@ -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');

View File

@@ -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();