summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 23:27:44 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 23:27:44 +0300
commit08c3c35325813bf897686464dfffeaa0d339f3f7 (patch)
treecd15f20b8156fefc6eed37268eba0e7b67d2a7ba /src/actions/actions.cpp
parent0611fa23db668aaabd6d79e6b1c074d8e863dd66 (diff)
downloadmv-08c3c35325813bf897686464dfffeaa0d339f3f7.tar.gz
mv-08c3c35325813bf897686464dfffeaa0d339f3f7.tar.bz2
mv-08c3c35325813bf897686464dfffeaa0d339f3f7.tar.xz
mv-08c3c35325813bf897686464dfffeaa0d339f3f7.zip
Add pet emote action and keys for each emote.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index cb2a49249..190258cc2 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -67,6 +67,7 @@
#include "net/gamehandler.h"
#include "net/ipc.h"
#include "net/net.h"
+#include "net/pethandler.h"
#include "net/playerhandler.h"
#include "net/uploadcharinfo.h"
#include "net/tradehandler.h"
@@ -171,6 +172,22 @@ impHandler(emote)
return false;
}
+impHandler(petEmote)
+{
+ if (event.action >= InputAction::PET_EMOTE_1
+ && event.action <= InputAction::PET_EMOTE_48)
+ {
+ const int emotion = event.action - InputAction::PET_EMOTE_1;
+ if (emoteShortcut)
+ Net::getPetHandler()->emote(emoteShortcut->getEmote(emotion), 0);
+ if (Game::instance())
+ Game::instance()->setValidSpeed();
+ return true;
+ }
+
+ return false;
+}
+
impHandler(outfit)
{
if (inputManager.isActionActive(InputAction::WEAR_OUTFIT))