mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spells: Fix warlock talent "Aftermath"
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=-85113;
|
||||
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
|
||||
(-85113,'spell_warl_aftermath');
|
||||
|
||||
DELETE FROM `spell_ranks` WHERE `first_spell_id`=85113;
|
||||
INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
|
||||
(85113, 85113, 1),
|
||||
(85113, 85114, 2);
|
||||
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (85113,85114);
|
||||
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
|
||||
(85113, 0, 5, 0x20, 0x800000, 0, 0, 0, 0, 0, 0),
|
||||
(85114, 0, 5, 0x20, 0x800000, 0, 0, 0, 0, 0, 0);
|
||||
@@ -314,6 +314,7 @@ class spell_hun_improved_mend_pet : public SpellScriptLoader
|
||||
return new spell_hun_improved_mend_pet_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 53412 - Invigoration
|
||||
class spell_hun_invigoration : public SpellScriptLoader
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
enum WarlockSpells
|
||||
{
|
||||
SPELL_WARLOCK_AFTERMATH_STUN = 85387,
|
||||
SPELL_WARLOCK_BANE_OF_DOOM_EFFECT = 18662,
|
||||
SPELL_WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
|
||||
SPELL_WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST = 62388,
|
||||
@@ -59,6 +60,7 @@ enum WarlockSpells
|
||||
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
|
||||
SPELL_WARLOCK_LIFE_TAP_ENERGIZE = 31818,
|
||||
SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553,
|
||||
SPELL_WARLOCK_RAIN_OF_FIRE = 42223,
|
||||
SPELL_WARLOCK_SHADOW_TRANCE = 17941,
|
||||
SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106,
|
||||
SPELL_WARLOCK_SOULSHATTER = 32835,
|
||||
@@ -78,6 +80,53 @@ enum MiscSpells
|
||||
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409
|
||||
};
|
||||
|
||||
|
||||
// -85113 - Aftermath
|
||||
class spell_warl_aftermath : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_warl_aftermath() : SpellScriptLoader("spell_warl_aftermath") { }
|
||||
|
||||
class spell_warl_aftermath_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_warl_aftermath_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_AFTERMATH_STUN))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
if (eventInfo.GetDamageInfo()->GetSpellInfo()->Id == SPELL_WARLOCK_RAIN_OF_FIRE)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u - blub", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
|
||||
if (roll_chance_i(aurEff->GetAmount()))
|
||||
{
|
||||
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_WARLOCK_AFTERMATH_STUN, true, NULL, aurEff);
|
||||
TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u -- proc", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u - xxx", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_warl_aftermath_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_warl_aftermath_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 710 - Banish
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_banish : public SpellScriptLoader
|
||||
@@ -1177,6 +1226,7 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
|
||||
|
||||
void AddSC_warlock_spell_scripts()
|
||||
{
|
||||
new spell_warl_aftermath();
|
||||
new spell_warl_bane_of_doom();
|
||||
new spell_warl_banish();
|
||||
new spell_warl_conflagrate();
|
||||
|
||||
Reference in New Issue
Block a user