summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/actions.cpp17
-rw-r--r--src/actions/actions.h1
2 files changed, 18 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))
diff --git a/src/actions/actions.h b/src/actions/actions.h
index f241b321c..04535700a 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -30,6 +30,7 @@ struct InputEvent;
namespace Actions
{
decHandler(emote);
+ decHandler(petEmote);
decHandler(outfit);
decHandler(mouseClick);
decHandler(ok);