diff options
| author | offl <11556157+offl@users.noreply.github.com> | 2021-04-03 00:27:59 +0300 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2022-03-07 22:04:51 +0100 |
| commit | 4b8bd9e4bc47793b4cc03d8843c87760cc2df6c1 (patch) | |
| tree | 7928bb7a6251aeb8b5eab6499a4b61a9ebe1cfee /src | |
| parent | 1b95b541c7e85727503e595b6f0f8990802c00fc (diff) | |
Scripts/Quest: Rework 'Basic Orders' (25199) (#26294)
(cherry picked from commit 293ae05d31be71276cb093f66945652bbd5965a1)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index c613a510b34..a833bad9cc5 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -2306,6 +2306,52 @@ class spell_q12308_escape_from_silverbrook_summon_worgen : public SpellScriptLoa } }; +enum BasicOrdersEmote +{ + SPELL_TEST_SALUTE = 73835, + SPELL_TEST_ROAR = 73836, + SPELL_TEST_CHEER = 73725, + SPELL_TEST_DANCE = 73837, + SPELL_TEST_STOP_DANCE = 73886 +}; + +class spell_q25199_emote : public AuraScript +{ + PrepareAuraScript(spell_q25199_emote); + + void HandlePeriodic(AuraEffect const* /*aurEff*/) + { + Unit* target = GetTarget(); + + switch (GetSpellInfo()->Id) + { + case SPELL_TEST_SALUTE: + target->HandleEmoteCommand(EMOTE_ONESHOT_SALUTE); + break; + case SPELL_TEST_ROAR: + target->HandleEmoteCommand(EMOTE_ONESHOT_ROAR); + break; + case SPELL_TEST_CHEER: + target->HandleEmoteCommand(EMOTE_ONESHOT_CHEER); + break; + case SPELL_TEST_DANCE: + target->SetEmoteState(EMOTE_STATE_DANCE); + break; + case SPELL_TEST_STOP_DANCE: + target->SetEmoteState(EMOTE_STATE_NONE); + break; + default: + return; + } + Remove(); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_q25199_emote::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); + } +}; + enum DeathComesFromOnHigh { SPELL_FORGE_CREDIT = 51974, @@ -3078,6 +3124,7 @@ void AddSC_quest_spell_scripts() RegisterSpellScript(spell_q11896_weakness_to_lightning_46444); new spell_q12308_escape_from_silverbrook_summon_worgen(); new spell_q12308_escape_from_silverbrook(); + RegisterSpellScript(spell_q25199_emote); new spell_q12641_death_comes_from_on_high(); new spell_q12641_recall_eye_of_acherus(); new spell_q12619_emblazon_runeblade(); |
