mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Spells: Reset Mangle cooldown in Berserk
This commit is contained in:
3
sql/updates/world/3.3.5/2018_06_04_00_world.sql
Normal file
3
sql/updates/world/3.3.5/2018_06_04_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_berserk';
|
||||
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
|
||||
(-50334,'spell_dru_berserk');
|
||||
@@ -67,6 +67,32 @@ enum DruidSpells
|
||||
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178
|
||||
};
|
||||
|
||||
enum MiscSpells
|
||||
{
|
||||
SPELL_CATEGORY_MANGLE_BEAR = 971
|
||||
};
|
||||
|
||||
// -50334 - Berserk
|
||||
class spell_dru_berserk : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_berserk);
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
// Remove cooldown on Mangle (bear)
|
||||
GetTarget()->GetSpellHistory()->ResetCooldowns([](SpellHistory::CooldownStorageType::iterator itr) -> bool
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
return spellInfo && spellInfo->GetCategory() == SPELL_CATEGORY_MANGLE_BEAR;
|
||||
}, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_dru_berserk::HandleEffectApply, EFFECT_1, SPELL_AURA_ADD_FLAT_MODIFIER, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 1850 - Dash
|
||||
class spell_dru_dash : public SpellScriptLoader
|
||||
{
|
||||
@@ -1283,6 +1309,7 @@ class spell_dru_wild_growth : public SpellScriptLoader
|
||||
|
||||
void AddSC_druid_spell_scripts()
|
||||
{
|
||||
RegisterAuraScript(spell_dru_berserk);
|
||||
new spell_dru_dash();
|
||||
new spell_dru_eclipse("spell_dru_eclipse_lunar");
|
||||
new spell_dru_eclipse("spell_dru_eclipse_solar");
|
||||
|
||||
Reference in New Issue
Block a user