Scripts/Achievements: fixed "You'll Feel Right as Rain"

This commit is contained in:
Ovahlord committed 2022-01-28 22:28:28 +01:00
1 parent f4c39d1aa9
commit 0d2a56473a
2 files changed
+39

No files matched your search

+36
View File
@@ -5024,6 +5024,41 @@ class spell_item_world_queller_focus : public AuraScript
}
};
enum ChocolateCookie
{
SPELL_BY_THE_TIME_YOURE_DONE_EATING_YOULL_FEEL_RIGHT_AS_RAIN = 99041 // Serverside spell
};
// 87649 - Satisfied
class spell_item_satisfied : public SpellScript
{
bool Load() override
{
return GetCaster()->IsPlayer();
}
void HandleAchievementCriteria()
{
Unit* caster = GetCaster();
if (!caster)
return;
if (Aura const* aura = GetHitAura())
{
if (aura->GetStackAmount() == 91)
{
Player* player = caster->ToPlayer();
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_BY_THE_TIME_YOURE_DONE_EATING_YOULL_FEEL_RIGHT_AS_RAIN, 1);
}
}
}
void Register() override
{
AfterHit.Register(&spell_item_satisfied::HandleAchievementCriteria);
}
};
void AddSC_item_spell_scripts()
{
// 23074 Arcanite Dragonling
@@ -5157,4 +5192,5 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_battle_trance);
RegisterSpellScript(spell_item_world_queller_focus);
RegisterSpellScript(spell_item_jom_gabbar);
RegisterSpellScript(spell_item_satisfied);
}