diff options
| author | Peter Keresztes Schmidt <carbenium@outlook.com> | 2020-08-16 16:26:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-16 16:26:47 +0200 |
| commit | 86dc58974a46b554042f33df674e3e40ef0cec1e (patch) | |
| tree | a0729fa85177966718a14e801a0dabfaa6748585 /src/server/scripts | |
| parent | b74dc4754d8c1edb81e9564beea1783bdd39d87c (diff) | |
Scripts/Commands: Use enum type arg for HandleDebugAnimCommand (PR #25256)
* Core/Shared: Make Emote enum smart
* Scripts/Commands: Use enum type arg for HandleDebugAnimCommand
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index eca67c1bf8e..eab6cc6993d 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -1242,11 +1242,19 @@ 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; } |
