From 08c3c35325813bf897686464dfffeaa0d339f3f7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Sep 2014 23:27:44 +0300 Subject: Add pet emote action and keys for each emote. --- src/actions/actions.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/actions/actions.cpp') 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)) -- cgit v1.2.3-60-g2f50