Merge pull request #10336 from joschiwald/spellscripts5
Scripts/Spells: backport some SpellScripts from 4.3.4 branch
This commit is contained in:
commit
a522be8108
9 files changed
+416
-94
No files matched your search
@@ -34,6 +34,7 @@ enum PriestSpells
|
||||
SPELL_PRIEST_GLYPH_OF_LIGHTWELL = 55673,
|
||||
SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL = 56161,
|
||||
SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL = 48153,
|
||||
SPELL_PRIEST_ITEM_EFFICIENCY = 37595,
|
||||
SPELL_PRIEST_MANA_LEECH_PROC = 34650,
|
||||
SPELL_PRIEST_PENANCE_R1 = 47540,
|
||||
SPELL_PRIEST_PENANCE_R1_DAMAGE = 47758,
|
||||
@@ -197,6 +198,41 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 37594 - Greater Heal Refund
|
||||
class spell_pri_item_greater_heal_refund : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_item_greater_heal_refund() : SpellScriptLoader("spell_pri_item_greater_heal_refund") { }
|
||||
|
||||
class spell_pri_item_greater_heal_refund_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_ITEM_EFFICIENCY))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_pri_item_greater_heal_refund_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -7001 - Lightwell Renew
|
||||
class spell_pri_lightwell_renew : public SpellScriptLoader
|
||||
{
|
||||
@@ -493,12 +529,11 @@ class spell_pri_power_word_shield : public SpellScriptLoader
|
||||
if (dmgInfo.GetAttacker() == target)
|
||||
return;
|
||||
|
||||
if (Unit* caster = GetCaster())
|
||||
if (AuraEffect* talentAurEff = caster->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||
{
|
||||
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_PRIEST_REFLECTIVE_SHIELD_R1, EFFECT_0))
|
||||
{
|
||||
int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
|
||||
target->CastCustomSpell(dmgInfo.GetAttacker(), SPELL_PRIEST_REFLECTIVE_SHIELD_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -635,7 +670,7 @@ class spell_pri_vampiric_touch : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_vampiric_touch_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) OVERRIDE
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL))
|
||||
return false;
|
||||
@@ -671,6 +706,7 @@ void AddSC_priest_spell_scripts()
|
||||
new spell_pri_divine_aegis();
|
||||
new spell_pri_glyph_of_prayer_of_healing();
|
||||
new spell_pri_guardian_spirit();
|
||||
new spell_pri_item_greater_heal_refund();
|
||||
new spell_pri_lightwell_renew();
|
||||
new spell_pri_mana_burn();
|
||||
new spell_pri_mana_leech();
|
||||
|
||||
Reference in new issue
Block a user