blob: 127c0359ecd3919b802bb7578ee63af4ca7e80f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ScriptMgr.h"
#include "SpellScript.h"
#include "Unit.h"
enum BasicOrdersEmote
{
SPELL_TEST_SALUTE = 73835,
SPELL_TEST_ROAR = 73836,
SPELL_TEST_CHEER = 73725,
SPELL_TEST_DANCE = 73837,
SPELL_TEST_STOP_DANCE = 73886
};
/* 73725 - [DND] Test Cheer
73835 - [DND] Test Salute
73836 - [DND] Test Roar
73837 - [DND] Test Dance
73886 - [DND] Test Stop Dance */
class spell_operation_gnomeregan_basic_orders_emote : public AuraScript
{
void HandlePeriodic(AuraEffect const* /*aurEff*/)
{
Unit* target = GetTarget();
switch (GetId())
{
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_operation_gnomeregan_basic_orders_emote::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
void AddSC_event_operation_gnomeregan()
{
RegisterSpellScript(spell_operation_gnomeregan_basic_orders_emote);
}
|