summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 00:02:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 00:02:45 +0300
commit1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d (patch)
treea7b4c4aef5a3e5f03bb0e5ca38c9d7946275a584 /src/actions
parent3529ae89be2b72e34d119ed4a2aca7b30403032c (diff)
downloadplus-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.gz
plus-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.bz2
plus-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.tar.xz
plus-1333ccee41e2acca4ecf4a90a6b230e8bbd23f7d.zip
Move chat command /emotepet into actions.
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp9
-rw-r--r--src/actions/commands.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 3a44a58b9..2ee223386 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -69,6 +69,7 @@
#include "gui/widgets/tabs/whispertab.h"
#include "net/adminhandler.h"
+#include "net/pethandler.h"
#include "net/net.h"
#include "utils/gettext.h"
@@ -338,4 +339,12 @@ impHandler(commandEmote)
return false;
}
+impHandler(commandEmotePet)
+{
+ // need use actual pet id
+ Net::getPetHandler()->emote(static_cast<uint8_t>(
+ atoi(event.args.c_str())), 0);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 3577aab36..4b0150d12 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -42,6 +42,7 @@ namespace Actions
decHandler(setTarget);
decHandler(commandOutfit);
decHandler(commandEmote);
+ decHandler(commandEmotePet);
} // namespace Actions
#undef decHandler