mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Scripts/Spells: Nourish (#24057)
* Scripts/Spells: Nourish * Rename 9999_99_99_99_world.sql to 2020_02_08_02_world.sql * Update 2020_02_08_02_world.sql Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
@@ -90,7 +90,8 @@ enum DruidSpells
|
||||
SPELL_DRUID_BALANCE_T10_BONUS_PROC = 70721,
|
||||
SPELL_DRUID_BARKSKIN_01 = 63058,
|
||||
SPELL_DRUID_RESTORATION_T10_2P_BONUS = 70658,
|
||||
SPELL_DRUID_FRENZIED_REGENERATION_HEAL = 22845
|
||||
SPELL_DRUID_FRENZIED_REGENERATION_HEAL = 22845,
|
||||
SPELL_DRUID_GLYPH_OF_NOURISH = 62971
|
||||
};
|
||||
|
||||
enum MiscSpells
|
||||
@@ -967,6 +968,39 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
// 50464 - Nourish
|
||||
class spell_dru_nourish : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_dru_nourish);
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
// Glyph of Nourish
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_DRUID_GLYPH_OF_NOURISH, EFFECT_0))
|
||||
{
|
||||
uint32 auraCount = 0;
|
||||
int32 heal = GetHitHeal();
|
||||
|
||||
Unit::AuraEffectList const& periodicHeals = GetHitUnit()->GetAuraEffectsByType(SPELL_AURA_PERIODIC_HEAL);
|
||||
for (AuraEffect const* hot : periodicHeals)
|
||||
{
|
||||
if (caster->GetGUID() == hot->GetCasterGUID())
|
||||
++auraCount;
|
||||
}
|
||||
|
||||
AddPct(heal, aurEff->GetAmount() * auraCount);
|
||||
SetHitHeal(heal);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_dru_nourish::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 16864 - Omen of Clarity
|
||||
class spell_dru_omen_of_clarity : public AuraScript
|
||||
{
|
||||
@@ -1884,6 +1918,7 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterAuraScript(spell_dru_living_seed);
|
||||
RegisterAuraScript(spell_dru_living_seed_proc);
|
||||
RegisterAuraScript(spell_dru_moonkin_form_passive);
|
||||
RegisterSpellScript(spell_dru_nourish);
|
||||
RegisterAuraScript(spell_dru_omen_of_clarity);
|
||||
RegisterAuraScript(spell_dru_owlkin_frenzy);
|
||||
RegisterAuraScript(spell_dru_predatory_strikes);
|
||||
|
||||
Reference in New Issue
Block a user