mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Spells: Fix warrior talent "Sudden Death" for 4.3.4
This commit is contained in:
@@ -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');
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user