diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-21 03:19:14 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-21 03:19:14 +0200 |
| commit | afc242211caba4eace65abfcd3345ff0478ecbdc (patch) | |
| tree | 5ec73cf4fbcc1a21b89b497cdf0aa04f6425d011 | |
| parent | 0d0de8bb7a5dc821a3bfbe92faa55e32d49d7e9c (diff) | |
Core/Spells: Fix warlock talent "Aftermath"
| -rw-r--r-- | sql/updates/world/2013_07_21_01_world_spell_script_misc_434.sql | 13 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 1 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 50 |
3 files changed, 64 insertions, 0 deletions
diff --git a/sql/updates/world/2013_07_21_01_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_21_01_world_spell_script_misc_434.sql new file mode 100644 index 00000000000..6833b3cb548 --- /dev/null +++ b/sql/updates/world/2013_07_21_01_world_spell_script_misc_434.sql @@ -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); diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 19d8cde542a..3335442b106 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -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 { diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 098724ac260..7698bec5111 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -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(); |
