Core/Spells:

* fixed Protector of the Innocent talent
* fixed Tower of Radiance talent
* fixed Blessed Life talent
* fixed Gift of the Earthmother Rejuvenation instant heal effect
This commit is contained in:
Ovahlord committed 2020-08-29 21:33:16 +02:00
1 parent 6a8ecc3ee3
commit 27bbba32aa
4 files changed
+97 -2

No files matched your search

+20 -2
View File
@@ -103,6 +103,7 @@ enum DruidSpells
SPELL_DRUID_STRENGTH_OF_THE_PANTHER = 90166,
SPELL_DRUID_SUNFIRE = 93402,
SPELL_DRUID_SUNFIRE_TALENT = 93401,
SPELL_DRUID_REJUVENATION_DIRECT_HEAL = 64801,
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178,
SPELL_DRUID_TREE_OF_LIFE = 33891,
SPELL_DRUID_TREE_OF_LIFE_PASSIVE_1 = 5420,
@@ -123,7 +124,8 @@ enum DruidSpellIconIds
SPELL_ICON_ID_EUPHORIA = 4431,
SPELL_ICON_ID_SAVAGE_DEFENDER = 146,
SPELL_ICON_ID_GLYPH_OF_FEROCIOUS_BITE = 1680,
SPELL_ICON_ID_GLYPH_OF_FRENZIED_REGENERATION = 50
SPELL_ICON_ID_GLYPH_OF_FRENZIED_REGENERATION = 50,
SPELL_ICON_ID_GIFT_OF_THE_EARTHMOTHER = 3186
};
enum MiscSpells
@@ -1252,7 +1254,11 @@ class spell_dru_rejuvenation : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_DRUID_NATURES_BOUNTY });
return ValidateSpellInfo(
{
SPELL_DRUID_NATURES_BOUNTY,
SPELL_DRUID_REJUVENATION_DIRECT_HEAL
});
}
void AfterApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
@@ -1272,6 +1278,17 @@ class spell_dru_rejuvenation : public AuraScript
}
}
void HandleGiftOfTheEarthmother(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
if (Unit* caster = GetCaster())
{
if (AuraEffect const* giftEffect = caster->GetDummyAuraEffect(SPELLFAMILY_DRUID, SPELL_ICON_ID_GIFT_OF_THE_EARTHMOTHER, EFFECT_1))
{
int32 bp = CalculatePct(aurEff->GetAmount() * aurEff->GetTotalTicks(), giftEffect->GetAmount());
caster->CastCustomSpell(SPELL_DRUID_REJUVENATION_DIRECT_HEAL, SPELLVALUE_BASE_POINT0, bp, GetTarget(), true);
}
}
}
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
@@ -1289,6 +1306,7 @@ class spell_dru_rejuvenation : public AuraScript
void Register() override
{
AfterEffectApply.Register(&spell_dru_rejuvenation::AfterApply, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply.Register(&spell_dru_rejuvenation::HandleGiftOfTheEarthmother, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove.Register(&spell_dru_rejuvenation::AfterRemove, EFFECT_0, SPELL_AURA_PERIODIC_HEAL, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -1955,6 +1955,39 @@ class spell_pal_divine_shield : public SpellScript
}
};
// -20138 - Protector of the Innocent
class spell_pal_protector_of_the_innocent : public AuraScript
{
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetHealInfo() && eventInfo.GetProcTarget() != GetTarget();
}
void Register() override
{
DoCheckProc.Register(&spell_pal_protector_of_the_innocent::CheckProc);
}
};
// -84800 - Tower of Radiance
class spell_pal_tower_of_radiance : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_PALADIN_BEACON_OF_LIGHT });
}
bool CheckProc(ProcEventInfo& eventInfo)
{
return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->HasAura(SPELL_PALADIN_BEACON_OF_LIGHT, GetTarget()->GetGUID());
}
void Register() override
{
DoCheckProc.Register(&spell_pal_tower_of_radiance::CheckProc);
}
};
void AddSC_paladin_spell_scripts()
{
RegisterSpellScript(spell_pal_ardent_defender);
@@ -1995,6 +2028,7 @@ void AddSC_paladin_spell_scripts()
RegisterSpellScript(spell_pal_lights_beacon);
RegisterSpellScript(spell_pal_light_of_dawn);
RegisterSpellScript(spell_pal_long_arm_of_the_law);
RegisterSpellScript(spell_pal_protector_of_the_innocent);
new spell_pal_righteous_defense();
RegisterSpellScript(spell_pal_sacred_shield);
RegisterSpellScript(spell_pal_seal_of_righteousness);
@@ -2002,5 +2036,6 @@ void AddSC_paladin_spell_scripts()
new spell_pal_shield_of_the_righteous();
RegisterSpellScript(spell_pal_selfless_healer);
RegisterSpellScript(spell_pal_templar_s_verdict);
RegisterSpellScript(spell_pal_tower_of_radiance);
RegisterSpellAndAuraScriptPair(spell_pal_word_of_glory, spell_pal_word_of_glory_AuraScript);
}