Scripts/Spells: Implement hunter talent Rejuvenating Wind (#30839)

This commit is contained in:
Aqua Deus
2025-05-05 20:50:41 +02:00
committed by GitHub
parent b0cfe7e948
commit f7e1004586
2 changed files with 39 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ enum HunterSpells
SPELL_HUNTER_RAPID_FIRE = 257044,
SPELL_HUNTER_RAPID_FIRE_DAMAGE = 257045,
SPELL_HUNTER_RAPID_FIRE_ENERGIZE = 263585,
SPELL_HUNTER_REJUVENATING_WIND_HEAL = 385540,
SPELL_HUNTER_SCOUTS_INSTINCTS = 459455,
SPELL_HUNTER_STEADY_SHOT = 56641,
SPELL_HUNTER_STEADY_SHOT_FOCUS = 77443,
@@ -773,6 +774,36 @@ class spell_hun_rapid_fire_damage : public SpellScript
}
};
// 385539 - Rejuvenating Wind
class spell_hun_rejuvenating_wind : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_REJUVENATING_WIND_HEAL })
&& sSpellMgr->AssertSpellInfo(SPELL_HUNTER_REJUVENATING_WIND_HEAL, DIFFICULTY_NONE)->GetMaxTicks() > 0;
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo const& /*procEvent*/)
{
PreventDefaultAction();
Unit* caster = GetTarget();
uint32 ticks = sSpellMgr->AssertSpellInfo(SPELL_HUNTER_REJUVENATING_WIND_HEAL, DIFFICULTY_NONE)->GetMaxTicks();
int32 heal = CalculatePct(caster->GetMaxHealth(), aurEff->GetAmount()) / ticks;
caster->CastSpell(caster, SPELL_HUNTER_REJUVENATING_WIND_HEAL, CastSpellExtraArgsInit{
.TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
.SpellValueOverrides = { { SPELLVALUE_BASE_POINT0, heal } }
});
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_hun_rejuvenating_wind::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// 53480 - Roar of Sacrifice
class spell_hun_roar_of_sacrifice : public AuraScript
{
@@ -1176,6 +1207,7 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_posthaste);
RegisterSpellScript(spell_hun_rapid_fire);
RegisterSpellScript(spell_hun_rapid_fire_damage);
RegisterSpellScript(spell_hun_rejuvenating_wind);
RegisterSpellScript(spell_hun_roar_of_sacrifice);
RegisterSpellScript(spell_hun_scatter_shot);
RegisterSpellScript(spell_hun_scouts_instincts);