fix(DB/Items): Unhatched Jubling Egg obtaining + RP (#17478)

This commit is contained in:
avarishd
2023-10-21 02:39:04 +03:00
committed by GitHub
parent 359985dd4c
commit 2c28cc0eb7
2 changed files with 68 additions and 0 deletions

View File

@@ -5047,6 +5047,35 @@ class spell_gen_planting_scourge_banner : public SpellScript
}
};
enum Jubling
{
SPELL_JUBLING_COOLDOWN_1_WEEK = 23852
};
// 23853 - Jubling Cooldown
class spell_gen_jubling_cooldown : public SpellScript
{
PrepareSpellScript(spell_gen_jubling_cooldown);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_JUBLING_COOLDOWN_1_WEEK });
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Player* target = GetHitPlayer())
{
target->CastSpell(target, SPELL_JUBLING_COOLDOWN_1_WEEK); // 1 week
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_gen_jubling_cooldown::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -5197,4 +5226,5 @@ void AddSC_generic_spell_scripts()
RegisterSpellScript(spell_gen_spirit_of_competition_winner);
RegisterSpellScript(spell_gen_valthalak_amulet);
RegisterSpellScript(spell_gen_planting_scourge_banner);
RegisterSpellScript(spell_gen_jubling_cooldown);
}