diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 37 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 162 |
2 files changed, 162 insertions, 37 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 5c4e415d5d2..cb7c02d894c 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5594,33 +5594,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere } switch (dummySpell->Id) { - // Glyph of Shadowflame - case 63310: - { - triggered_spell_id = 63311; - break; - } - // Nightfall - case 18094: - case 18095: - // Glyph of corruption - case 56218: - { - target = this; - triggered_spell_id = 17941; - break; - } - // Soul Leech - case 30293: - case 30295: - { - basepoints0 = CalculatePct(int32(damage), triggerAmount); - target = this; - triggered_spell_id = 30294; - // Replenishment - CastSpell(this, 57669, true, castItem, triggeredByAura); - break; - } // Shadowflame (Voidheart Raiment set bonus) case 37377: { @@ -5645,16 +5618,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 37378; break; } - // Glyph of Succubus - case 56250: - { - if (!target) - return false; - target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(32409)); // SW:D shall not be removed. - target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); - target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); - return true; - } } break; } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index a18cfb99f31..2eff86bcfdd 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -45,7 +45,9 @@ enum WarlockSpells SPELL_WARLOCK_DEMON_SOUL_SUCCUBUS = 79453, SPELL_WARLOCK_DEMON_SOUL_VOIDWALKER = 79454, SPELL_WARLOCK_FEL_SYNERGY_HEAL = 54181, + SPELL_WARLOCK_GLYPH_OF_SHADOWFLAME = 63311, SPELL_WARLOCK_GLYPH_OF_SIPHON_LIFE = 63106, + SPELL_WARLOCK_GLYPH_OF_SUCCUBUS = 56250, SPELL_WARLOCK_HAUNT = 48181, SPELL_WARLOCK_HAUNT_HEAL = 48210, SPELL_WARLOCK_IMMOLATE = 348, @@ -57,6 +59,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_SHADOW_TRANCE = 17941, SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106, SPELL_WARLOCK_SOULSHATTER = 32835, SPELL_WARLOCK_UNSTABLE_AFFLICTION = 30108, @@ -69,6 +72,12 @@ enum WarlockSpellIcons WARLOCK_ICON_ID_MANA_FEED = 1982 }; +enum MiscSpells +{ + SPELL_GEN_REPLENISHMENT = 57669, + SPELL_PRIEST_SHADOW_WORD_DEATH = 32409 +}; + // 710 - Banish /// Updated 4.3.4 class spell_warl_banish : public SpellScriptLoader @@ -620,6 +629,41 @@ class spell_warl_fel_synergy : public SpellScriptLoader } }; +// 63310 - Glyph of Shadowflame +class spell_warl_glyph_of_shadowflame : public SpellScriptLoader +{ + public: + spell_warl_glyph_of_shadowflame() : SpellScriptLoader("spell_warl_glyph_of_shadowflame") { } + + class spell_warl_glyph_of_shadowflame_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warl_glyph_of_shadowflame_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_GLYPH_OF_SHADOWFLAME)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_WARLOCK_GLYPH_OF_SHADOWFLAME, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_warl_glyph_of_shadowflame_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warl_glyph_of_shadowflame_AuraScript(); + } +}; + // 48181 - Haunt /// Updated 4.3.4 class spell_warl_haunt : public SpellScriptLoader @@ -823,6 +867,50 @@ class spell_warl_ritual_of_doom_effect : public SpellScriptLoader } }; +// 6358 - Seduction (Special Ability) +class spell_warl_seduction : public SpellScriptLoader +{ + public: + spell_warl_seduction() : SpellScriptLoader("spell_warl_seduction") { } + + class spell_warl_seduction_SpellScript : public SpellScript + { + PrepareSpellScript(spell_warl_seduction_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_GLYPH_OF_SUCCUBUS) || + !sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOW_WORD_DEATH)) + return false; + return true; + } + + void HandleScriptEffect(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (Unit* target = GetHitUnit()) + { + if (caster->GetOwner() && caster->GetOwner()->HasAura(SPELL_WARLOCK_GLYPH_OF_SUCCUBUS)) + { + target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE, 0, target->GetAura(SPELL_PRIEST_SHADOW_WORD_DEATH)); // SW:D shall not be removed. + target->RemoveAurasByType(SPELL_AURA_PERIODIC_DAMAGE_PERCENT); + target->RemoveAurasByType(SPELL_AURA_PERIODIC_LEECH); + } + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_warl_seduction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_warl_seduction_SpellScript(); + } +}; + // 27285 - Seed of Corruption /// Updated 4.3.4 class spell_warl_seed_of_corruption : public SpellScriptLoader @@ -852,6 +940,42 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader } }; +// -18094 - Nightfall +// 56218 - Glyph of Corruption +class spell_warl_shadow_trance_proc : public SpellScriptLoader +{ + public: + spell_warl_shadow_trance_proc() : SpellScriptLoader("spell_warl_shadow_trance_proc") { } + + class spell_warl_shadow_trance_proc_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warl_shadow_trance_proc_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARLOCK_SHADOW_TRANCE)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_WARLOCK_SHADOW_TRANCE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_warl_shadow_trance_proc_AuraScript::OnProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warl_shadow_trance_proc_AuraScript(); + } +}; + // -7235 - Shadow Ward class spell_warl_shadow_ward : public SpellScriptLoader { @@ -938,6 +1062,40 @@ class spell_warl_siphon_life : public SpellScriptLoader } }; +// -30293 - Soul Leech +class spell_warl_soul_leech : public SpellScriptLoader +{ + public: + spell_warl_soul_leech() : SpellScriptLoader("spell_warl_soul_leech") { } + + class spell_warl_soul_leech_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warl_soul_leech_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_GEN_REPLENISHMENT)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) + { + GetTarget()->CastSpell((Unit*)NULL, SPELL_GEN_REPLENISHMENT, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_warl_soul_leech_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warl_soul_leech_AuraScript(); + } +}; + // 29858 - Soulshatter /// Updated 4.3.4 class spell_warl_soulshatter : public SpellScriptLoader @@ -1030,13 +1188,17 @@ void AddSC_warlock_spell_scripts() new spell_warl_everlasting_affliction(); new spell_warl_fel_flame(); new spell_warl_fel_synergy(); + new spell_warl_glyph_of_shadowflame(); new spell_warl_haunt(); new spell_warl_health_funnel(); new spell_warl_life_tap(); new spell_warl_ritual_of_doom_effect(); + new spell_warl_seduction(); new spell_warl_seed_of_corruption(); + new spell_warl_shadow_trance_proc(); new spell_warl_shadow_ward(); new spell_warl_siphon_life(); + new spell_warl_soul_leech(); new spell_warl_soulshatter(); new spell_warl_unstable_affliction(); } |
