Scripts/Spells: Updated some warlock spellscripts to 4.3.4
This commit is contained in:
1 parent
1b43240512
commit
963aa5a159
2 files changed
+44
-40
No files matched your search
@@ -40,11 +40,16 @@ enum WarlockSpells
|
||||
WARLOCK_HAUNT = 48181,
|
||||
WARLOCK_HAUNT_HEAL = 48210,
|
||||
WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117,
|
||||
WARLOCK_CURSE_OF_DOOM_EFFECT = 18662,
|
||||
WARLOCK_BANE_OF_DOOM_EFFECT = 18662,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_R1 = 18703,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_R2 = 18704,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1 = 60955,
|
||||
WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956,
|
||||
WARLOCK_SOULSHATTER = 32835,
|
||||
WARLOCK_LIFE_TAP_ENERGIZE = 31818,
|
||||
WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553,
|
||||
WARLOCK_IMPROVED_LIFE_TAP_ICON_ID = 208,
|
||||
WARLOCK_MANA_FEED_ICON_ID = 1982,
|
||||
};
|
||||
|
||||
/// Updated 4.3.4
|
||||
@@ -244,6 +249,7 @@ uint32 const spell_warl_create_healthstone::spell_warl_create_healthstone_SpellS
|
||||
};
|
||||
|
||||
// 47422 Everlasting Affliction
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_everlasting_affliction : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -273,6 +279,8 @@ class spell_warl_everlasting_affliction : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 27285 Seed of Corruption
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_seed_of_corruption : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -300,11 +308,8 @@ class spell_warl_seed_of_corruption : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum Soulshatter
|
||||
{
|
||||
SPELL_SOULSHATTER = 32835,
|
||||
};
|
||||
|
||||
// 29858 Soulshatter
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_soulshatter : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -316,7 +321,7 @@ class spell_warl_soulshatter : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SOULSHATTER))
|
||||
if (!sSpellMgr->GetSpellInfo(WARLOCK_SOULSHATTER))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -325,10 +330,8 @@ class spell_warl_soulshatter : public SpellScriptLoader
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (target->CanHaveThreatList() && target->getThreatManager().getThreat(caster) > 0.0f)
|
||||
caster->CastSpell(target, SPELL_SOULSHATTER, true);
|
||||
}
|
||||
caster->CastSpell(target, WARLOCK_SOULSHATTER, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -343,14 +346,8 @@ class spell_warl_soulshatter : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum LifeTap
|
||||
{
|
||||
SPELL_LIFE_TAP_ENERGIZE = 31818,
|
||||
SPELL_LIFE_TAP_ENERGIZE_2 = 32553,
|
||||
ICON_ID_IMPROVED_LIFE_TAP = 208,
|
||||
ICON_ID_MANA_FEED = 1982,
|
||||
};
|
||||
|
||||
// 1454 Life Tap
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_life_tap : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -367,7 +364,7 @@ class spell_warl_life_tap : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_ENERGIZE) || !sSpellMgr->GetSpellInfo(SPELL_LIFE_TAP_ENERGIZE_2))
|
||||
if (!sSpellMgr->GetSpellInfo(WARLOCK_LIFE_TAP_ENERGIZE) || !sSpellMgr->GetSpellInfo(WARLOCK_LIFE_TAP_ENERGIZE_2))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -377,34 +374,31 @@ class spell_warl_life_tap : public SpellScriptLoader
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
int32 damage = GetEffectValue();
|
||||
int32 mana = int32(damage + (caster->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+SPELL_SCHOOL_SHADOW) * 0.5f));
|
||||
int32 damage = caster->CountPctFromMaxHealth(GetSpellInfo()->Effects[EFFECT_2].CalcValue());
|
||||
int32 mana = CalculatePct(damage, GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
||||
|
||||
// Shouldn't Appear in Combat Log
|
||||
target->ModifyHealth(-damage);
|
||||
|
||||
// Improved Life Tap mod
|
||||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, ICON_ID_IMPROVED_LIFE_TAP, 0))
|
||||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, WARLOCK_IMPROVED_LIFE_TAP_ICON_ID, 0))
|
||||
AddPct(mana, aurEff->GetAmount());
|
||||
|
||||
caster->CastCustomSpell(target, SPELL_LIFE_TAP_ENERGIZE, &mana, NULL, NULL, false);
|
||||
caster->CastCustomSpell(target, WARLOCK_LIFE_TAP_ENERGIZE, &mana, NULL, NULL, false);
|
||||
|
||||
// Mana Feed
|
||||
int32 manaFeedVal = 0;
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, ICON_ID_MANA_FEED, 0))
|
||||
manaFeedVal = aurEff->GetAmount();
|
||||
|
||||
if (manaFeedVal > 0)
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARLOCK, WARLOCK_MANA_FEED_ICON_ID, 0))
|
||||
{
|
||||
int32 manaFeedVal = aurEff->GetAmount();
|
||||
ApplyPct(manaFeedVal, mana);
|
||||
caster->CastCustomSpell(caster, SPELL_LIFE_TAP_ENERGIZE_2, &manaFeedVal, NULL, NULL, true, NULL);
|
||||
caster->CastCustomSpell(caster, WARLOCK_LIFE_TAP_ENERGIZE_2, &manaFeedVal, NULL, NULL, true, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
if ((int32(GetCaster()->GetHealth()) > int32(GetSpellInfo()->Effects[EFFECT_0].CalcValue() + (6.3875 * GetSpellInfo()->BaseLevel))))
|
||||
if (int32(GetCaster()->GetHealth()) > int32(GetCaster()->CountPctFromMaxHealth(GetSpellInfo()->Effects[EFFECT_2].CalcValue())))
|
||||
return SPELL_CAST_OK;
|
||||
return SPELL_FAILED_FIZZLE;
|
||||
}
|
||||
@@ -422,6 +416,8 @@ class spell_warl_life_tap : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 48018 Demonic Circle: Summon
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_demonic_circle_summon : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -473,6 +469,8 @@ class spell_warl_demonic_circle_summon : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 48020 Demonic Circle: Teleport
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_demonic_circle_teleport : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -506,6 +504,8 @@ class spell_warl_demonic_circle_teleport : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 48181 Haunt
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_haunt : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -565,6 +565,7 @@ class spell_warl_haunt : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_unstable_affliction : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -604,10 +605,12 @@ class spell_warl_unstable_affliction : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_warl_curse_of_doom : public SpellScriptLoader
|
||||
// 603 Bane of Doom
|
||||
/// Updated 4.3.4
|
||||
class spell_warl_bane_of_doom : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_warl_curse_of_doom() : SpellScriptLoader("spell_warl_curse_of_doom") { }
|
||||
spell_warl_bane_of_doom() : SpellScriptLoader("spell_warl_bane_of_doom") { }
|
||||
|
||||
class spell_warl_curse_of_doom_AuraScript : public AuraScript
|
||||
{
|
||||
@@ -615,7 +618,7 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(WARLOCK_CURSE_OF_DOOM_EFFECT))
|
||||
if (!sSpellMgr->GetSpellInfo(WARLOCK_BANE_OF_DOOM_EFFECT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -635,7 +638,7 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (GetCaster()->ToPlayer()->isHonorOrXPTarget(GetTarget()))
|
||||
GetCaster()->CastSpell(GetTarget(), WARLOCK_CURSE_OF_DOOM_EFFECT, true, NULL, aurEff);
|
||||
GetCaster()->CastSpell(GetTarget(), WARLOCK_BANE_OF_DOOM_EFFECT, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -650,6 +653,7 @@ class spell_warl_curse_of_doom : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 755 Health Funnel
|
||||
class spell_warl_health_funnel : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -705,6 +709,6 @@ void AddSC_warlock_spell_scripts()
|
||||
new spell_warl_demonic_circle_teleport();
|
||||
new spell_warl_haunt();
|
||||
new spell_warl_unstable_affliction();
|
||||
new spell_warl_curse_of_doom();
|
||||
new spell_warl_bane_of_doom();
|
||||
new spell_warl_health_funnel();
|
||||
}
|
||||
Reference in new issue
Block a user