Core/Spells: Convert/Update some warlock spells in spell scripts for 4.3.4

This commit is contained in:
Vincent-Michael
2013-07-18 00:44:56 +02:00
parent 63675c3b0b
commit 177ecd6dac
3 changed files with 176 additions and 37 deletions

View File

@@ -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();
}