Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Instances/InstanceScript.cpp src/server/game/Server/Protocol/Opcodes.cpp src/server/game/Server/WorldSession.h src/server/scripts/Spells/spell_priest.cpp src/server/scripts/Spells/spell_rogue.cpp
This commit is contained in:
commit
66e8d8c69e
48 files changed
+10028
-1669
No files matched your search
@@ -29,27 +29,32 @@
|
||||
|
||||
enum PriestSpells
|
||||
{
|
||||
PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL = 48153,
|
||||
PRIEST_SPELL_PENANCE_R1 = 47540,
|
||||
PRIEST_SPELL_PENANCE_R1_DAMAGE = 47758,
|
||||
PRIEST_SPELL_PENANCE_R1_HEAL = 47757,
|
||||
PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED = 33619,
|
||||
PRIEST_SPELL_REFLECTIVE_SHIELD_R1 = 33201,
|
||||
PRIEST_SPELL_VAMPIRIC_TOUCH_DISPEL = 64085,
|
||||
PRIEST_SPELL_EMPOWERED_RENEW = 63544,
|
||||
PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021,
|
||||
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874,
|
||||
PRIEST_SHADOW_WORD_DEATH = 32409,
|
||||
PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH = 107903,
|
||||
PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH = 107904,
|
||||
PRIEST_GLYPH_OF_SHADOW = 107906,
|
||||
PRIEST_LEAP_OF_FAITH = 73325,
|
||||
PRIEST_LEAP_OF_FAITH_TRIGGERED = 92572,
|
||||
PRIEST_LEAP_OF_FAITH_EFFECT_TRIGGER = 92833,
|
||||
PRIEST_LEAP_OF_FAITH_EFFECT = 92832
|
||||
SPELL_PRIEST_EMPOWERED_RENEW = 63544,
|
||||
SPELL_PRIEST_GLYPH_OF_SHADOW = 107906,
|
||||
SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL = 48153,
|
||||
SPELL_PRIEST_LEAP_OF_FAITH = 73325,
|
||||
SPELL_PRIEST_LEAP_OF_FAITH_TRIGGERED = 92572,
|
||||
SPELL_PRIEST_LEAP_OF_FAITH_EFFECT_TRIGGER = 92833,
|
||||
SPELL_PRIEST_LEAP_OF_FAITH_EFFECT = 92832,
|
||||
SPELL_PRIEST_PENANCE_R1 = 47540,
|
||||
SPELL_PRIEST_PENANCE_R1_DAMAGE = 47758,
|
||||
SPELL_PRIEST_PENANCE_R1_HEAL = 47757,
|
||||
SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED = 33619,
|
||||
SPELL_PRIEST_REFLECTIVE_SHIELD_R1 = 33201,
|
||||
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409,
|
||||
SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH = 107903,
|
||||
SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH = 107904,
|
||||
SPELL_PRIEST_T9_HEALING_2P = 67201,
|
||||
SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085
|
||||
};
|
||||
|
||||
// Guardian Spirit
|
||||
enum PriestSpellIcons
|
||||
{
|
||||
PRIEST_ICON_ID_EMPOWERED_RENEW_TALENT = 3021,
|
||||
PRIEST_ICON_ID_PAIN_AND_SUFFERING = 2874
|
||||
};
|
||||
|
||||
// 47788 - Guardian Spirit
|
||||
class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -61,9 +66,9 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
|
||||
uint32 healPct;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -89,7 +94,7 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
int32 healAmount = int32(target->CountPctFromMaxHealth(healPct));
|
||||
// remove the aura now, we don't want 40% healing bonus
|
||||
Remove(AURA_REMOVE_BY_ENEMY_SPELL);
|
||||
target->CastCustomSpell(target, PRIEST_SPELL_GUARDIAN_SPIRIT_HEAL, &healAmount, NULL, NULL, true);
|
||||
target->CastCustomSpell(target, SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL, &healAmount, NULL, NULL, true);
|
||||
absorbAmount = dmgInfo.GetDamage();
|
||||
}
|
||||
|
||||
@@ -106,45 +111,47 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 92833 - Leap of Faith
|
||||
class spell_pri_leap_of_faith_effect_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_leap_of_faith_effect_trigger() : SpellScriptLoader("spell_pri_leap_of_faith_effect_trigger") { }
|
||||
public:
|
||||
spell_pri_leap_of_faith_effect_trigger() : SpellScriptLoader("spell_pri_leap_of_faith_effect_trigger") { }
|
||||
|
||||
class spell_pri_leap_of_faith_effect_trigger_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_leap_of_faith_effect_trigger_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*entry*/)
|
||||
class spell_pri_leap_of_faith_effect_trigger_SpellScript : public SpellScript
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_LEAP_OF_FAITH_EFFECT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
PrepareSpellScript(spell_pri_leap_of_faith_effect_trigger_SpellScript);
|
||||
|
||||
void HandleEffectDummy(SpellEffIndex /*effIndex*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_LEAP_OF_FAITH_EFFECT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Position destPos;
|
||||
GetHitDest()->GetPosition(&destPos);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.SetDst(destPos);
|
||||
targets.SetUnitTarget(GetCaster());
|
||||
GetHitUnit()->CastSpell(targets, sSpellMgr->GetSpellInfo(GetEffectValue()), NULL);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_leap_of_faith_effect_trigger_SpellScript::HandleEffectDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
Position destPos;
|
||||
GetHitDest()->GetPosition(&destPos);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.SetDst(destPos);
|
||||
targets.SetUnitTarget(GetCaster());
|
||||
GetHitUnit()->CastSpell(targets, sSpellMgr->GetSpellInfo(GetEffectValue()), NULL);
|
||||
return new spell_pri_leap_of_faith_effect_trigger_SpellScript();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_leap_of_faith_effect_trigger_SpellScript::HandleEffectDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_pri_leap_of_faith_effect_trigger_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 8129 - Mana Burn
|
||||
class spell_pri_mana_burn : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -172,6 +179,7 @@ class spell_pri_mana_burn : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 49821 - Mind Sear
|
||||
class spell_pri_mind_sear : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -198,12 +206,12 @@ class spell_pri_mind_sear : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 47948 - Pain and Suffering (Proc)
|
||||
class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_pain_and_suffering_proc() : SpellScriptLoader("spell_pri_pain_and_suffering_proc") { }
|
||||
|
||||
// 47948 Pain and Suffering (proc)
|
||||
class spell_pri_pain_and_suffering_proc_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_pain_and_suffering_proc_SpellScript);
|
||||
@@ -228,6 +236,7 @@ class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 47540 - Penance
|
||||
class spell_pri_penance : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -242,18 +251,18 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* spellEntry)
|
||||
bool Validate(SpellInfo const* spellInfo)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_PENANCE_R1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_PENANCE_R1))
|
||||
return false;
|
||||
// can't use other spell than this penance due to spell_ranks dependency
|
||||
if (sSpellMgr->GetFirstSpellInChain(PRIEST_SPELL_PENANCE_R1) != sSpellMgr->GetFirstSpellInChain(spellEntry->Id))
|
||||
if (sSpellMgr->GetFirstSpellInChain(SPELL_PRIEST_PENANCE_R1) != sSpellMgr->GetFirstSpellInChain(spellInfo->Id))
|
||||
return false;
|
||||
|
||||
uint8 rank = sSpellMgr->GetSpellRank(spellEntry->Id);
|
||||
if (!sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_DAMAGE, rank, true))
|
||||
uint8 rank = sSpellMgr->GetSpellRank(spellInfo->Id);
|
||||
if (!sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_DAMAGE, rank, true))
|
||||
return false;
|
||||
if (!sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_HEAL, rank, true))
|
||||
if (!sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_HEAL, rank, true))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -270,9 +279,9 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
uint8 rank = sSpellMgr->GetSpellRank(GetSpellInfo()->Id);
|
||||
|
||||
if (caster->IsFriendlyTo(unitTarget))
|
||||
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_HEAL, rank), false, 0);
|
||||
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_HEAL, rank), false, 0);
|
||||
else
|
||||
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(PRIEST_SPELL_PENANCE_R1_DAMAGE, rank), false, 0);
|
||||
caster->CastSpell(unitTarget, sSpellMgr->GetSpellWithRank(SPELL_PRIEST_PENANCE_R1_DAMAGE, rank), false, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +296,6 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
|
||||
void Register()
|
||||
{
|
||||
// add dummy effect spell handler to Penance
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_penance_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
OnCheckCast += SpellCheckCastFn(spell_pri_penance_SpellScript::CheckCast);
|
||||
}
|
||||
@@ -299,7 +307,42 @@ class spell_pri_penance : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// Reflective Shield
|
||||
// 33110 - Prayer of Mending Heal
|
||||
class spell_pri_prayer_of_mending_heal : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_prayer_of_mending_heal() : SpellScriptLoader("spell_pri_prayer_of_mending_heal") { }
|
||||
|
||||
class spell_pri_prayer_of_mending_heal_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_prayer_of_mending_heal_SpellScript);
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetOriginalCaster())
|
||||
{
|
||||
if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_PRIEST_T9_HEALING_2P, EFFECT_0))
|
||||
{
|
||||
int32 heal = GetHitHeal();
|
||||
AddPct(heal, aurEff->GetAmount());
|
||||
SetHitHeal(heal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_prayer_of_mending_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_pri_prayer_of_mending_heal_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 17 - Reflective Shield
|
||||
class spell_pri_reflective_shield_trigger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -309,9 +352,9 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_reflective_shield_trigger_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellEntry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED) || !sSpellMgr->GetSpellInfo(PRIEST_SPELL_REFLECTIVE_SHIELD_R1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED) || !sSpellMgr->GetSpellInfo(SPELL_PRIEST_REFLECTIVE_SHIELD_R1))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -323,10 +366,10 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
|
||||
return;
|
||||
|
||||
if (GetCaster())
|
||||
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(PRIEST_SPELL_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||
{
|
||||
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), PRIEST_SPELL_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,87 +385,7 @@ class spell_pri_reflective_shield_trigger : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum PrayerOfMending
|
||||
{
|
||||
SPELL_T9_HEALING_2_PIECE = 67201,
|
||||
};
|
||||
|
||||
// Prayer of Mending Heal
|
||||
class spell_pri_prayer_of_mending_heal : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_prayer_of_mending_heal() : SpellScriptLoader("spell_pri_prayer_of_mending_heal") { }
|
||||
|
||||
class spell_pri_prayer_of_mending_heal_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_prayer_of_mending_heal_SpellScript);
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetOriginalCaster())
|
||||
{
|
||||
if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_T9_HEALING_2_PIECE, EFFECT_0))
|
||||
{
|
||||
int32 heal = GetHitHeal();
|
||||
AddPct(heal, aurEff->GetAmount());
|
||||
SetHitHeal(heal);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pri_prayer_of_mending_heal_SpellScript::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_pri_prayer_of_mending_heal_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_vampiric_touch() : SpellScriptLoader("spell_pri_vampiric_touch") { }
|
||||
|
||||
class spell_pri_vampiric_touch_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_SPELL_VAMPIRIC_TOUCH_DISPEL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* /*dispelInfo*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = GetUnitOwner())
|
||||
if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
|
||||
{
|
||||
int32 damage = aurEff->GetAmount() * 8;
|
||||
// backfire damage
|
||||
caster->CastCustomSpell(target, PRIEST_SPELL_VAMPIRIC_TOUCH_DISPEL, &damage, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterDispel += AuraDispelFn(spell_pri_vampiric_touch_AuraScript::HandleDispel);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_pri_vampiric_touch_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 139 - Renew
|
||||
class spell_pri_renew : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -448,7 +411,7 @@ class spell_pri_renew : public SpellScriptLoader
|
||||
heal = GetTarget()->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT);
|
||||
|
||||
int32 basepoints0 = empoweredRenewAurEff->GetAmount() * GetEffect(EFFECT_0)->GetTotalTicks() * int32(heal) / 100;
|
||||
caster->CastCustomSpell(GetTarget(), PRIEST_SPELL_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff);
|
||||
caster->CastCustomSpell(GetTarget(), SPELL_PRIEST_EMPOWERED_RENEW, &basepoints0, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -465,6 +428,7 @@ class spell_pri_renew : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 32379 - Shadow Word Death
|
||||
class spell_pri_shadow_word_death : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -482,7 +446,7 @@ class spell_pri_shadow_word_death : public SpellScriptLoader
|
||||
if (AuraEffect* aurEff = GetCaster()->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_PAIN_AND_SUFFERING, EFFECT_1))
|
||||
AddPct(damage, aurEff->GetAmount());
|
||||
|
||||
GetCaster()->CastCustomSpell(GetCaster(), PRIEST_SHADOW_WORD_DEATH, &damage, 0, 0, true);
|
||||
GetCaster()->CastCustomSpell(GetCaster(), SPELL_PRIEST_SHADOW_WORD_DEATH, &damage, 0, 0, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -497,6 +461,7 @@ class spell_pri_shadow_word_death : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 15473 - Shadowform
|
||||
class spell_pri_shadowform : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -506,22 +471,22 @@ class spell_pri_shadowform : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_shadowform_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*entry*/)
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH) ||
|
||||
!sSpellMgr->GetSpellInfo(PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), GetTarget()->HasAura(PRIEST_GLYPH_OF_SHADOW) ? PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH : PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH, true);
|
||||
GetTarget()->CastSpell(GetTarget(), GetTarget()->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOW) ? SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH : SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH, true);
|
||||
}
|
||||
|
||||
void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->RemoveAurasDueToSpell(GetTarget()->HasAura(PRIEST_GLYPH_OF_SHADOW) ? PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH : PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH);
|
||||
GetTarget()->RemoveAurasDueToSpell(GetTarget()->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOW) ? SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH : SPELL_PRIEST_SHADOWFORM_VISUAL_WITHOUT_GLYPH);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -537,18 +502,59 @@ class spell_pri_shadowform : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 34914 - Vampiric Touch
|
||||
class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_vampiric_touch() : SpellScriptLoader("spell_pri_vampiric_touch") { }
|
||||
|
||||
class spell_pri_vampiric_touch_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDispel(DispelInfo* /*dispelInfo*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Unit* target = GetUnitOwner())
|
||||
if (AuraEffect const* aurEff = GetEffect(EFFECT_1))
|
||||
{
|
||||
int32 damage = aurEff->GetAmount() * 8;
|
||||
// backfire damage
|
||||
caster->CastCustomSpell(target, SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL, &damage, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
AfterDispel += AuraDispelFn(spell_pri_vampiric_touch_AuraScript::HandleDispel);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_pri_vampiric_touch_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_priest_spell_scripts()
|
||||
{
|
||||
new spell_pri_guardian_spirit();
|
||||
new spell_pri_leap_of_faith_effect_trigger();
|
||||
new spell_pri_mana_burn();
|
||||
new spell_pri_mind_sear();
|
||||
new spell_pri_pain_and_suffering_proc();
|
||||
new spell_pri_penance();
|
||||
new spell_pri_reflective_shield_trigger();
|
||||
new spell_pri_mind_sear();
|
||||
new spell_pri_prayer_of_mending_heal();
|
||||
new spell_pri_vampiric_touch();
|
||||
new spell_pri_reflective_shield_trigger();
|
||||
new spell_pri_renew();
|
||||
new spell_pri_shadow_word_death();
|
||||
new spell_pri_shadowform();
|
||||
new spell_pri_vampiric_touch();
|
||||
}
|
||||
Reference in new issue
Block a user