aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index e82a314798e..f7029874f34 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -1255,11 +1255,20 @@ public:
return true;
}
- //show animation
- static bool HandleDebugAnimCommand(ChatHandler* handler, uint32 emoteId)
+ // Play emote animation
+ static bool HandleDebugAnimCommand(ChatHandler* handler, Emote emote)
{
if (Unit* unit = handler->getSelectedUnit())
- unit->HandleEmoteCommand(static_cast<Emote>(emoteId));
+ unit->HandleEmoteCommand(emote);
+
+ try
+ {
+ handler->PSendSysMessage("Playing emote %s", EnumUtils::ToConstant(emote));
+ }
+ catch (...)
+ {
+ handler->PSendSysMessage("Playing unknown emote");
+ }
return true;
}