summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-27 19:21:37 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-27 19:21:37 +0300
commit7b2fbfb1f4384cb0e86d4c7cca81a526444d54b8 (patch)
tree40cf0cab5c0549506555f53422d67ff4f2b868ee /src/net
parent7112c6d75657791aab52a5e1e2f7aec9a0b2519d (diff)
downloadplus-7b2fbfb1f4384cb0e86d4c7cca81a526444d54b8.tar.gz
plus-7b2fbfb1f4384cb0e86d4c7cca81a526444d54b8.tar.bz2
plus-7b2fbfb1f4384cb0e86d4c7cca81a526444d54b8.tar.xz
plus-7b2fbfb1f4384cb0e86d4c7cca81a526444d54b8.zip
add pet emote command.
New chat command: /emotepet emote
Diffstat (limited to 'src/net')
-rw-r--r--src/net/pethandler.h2
-rw-r--r--src/net/tmwa/pethandler.cpp9
-rw-r--r--src/net/tmwa/pethandler.h2
3 files changed, 13 insertions, 0 deletions
diff --git a/src/net/pethandler.h b/src/net/pethandler.h
index 15805ba22..a3a5f25f5 100644
--- a/src/net/pethandler.h
+++ b/src/net/pethandler.h
@@ -38,6 +38,8 @@ class PetHandler
virtual void spawn(const Being *const being,
const int x, const int y) const = 0;
+
+ virtual void emote(const uint8_t emoteId) const = 0;
};
} // namespace Net
diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp
index e71420f15..d260cea3a 100644
--- a/src/net/tmwa/pethandler.cpp
+++ b/src/net/tmwa/pethandler.cpp
@@ -20,8 +20,11 @@
#include "net/tmwa/pethandler.h"
+#include "gui/widgets/tabs/chattab.h"
+
#include "net/net.h"
+#include "net/tmwa/chathandler.h"
#include "net/tmwa/protocol.h"
#include "debug.h"
@@ -59,4 +62,10 @@ void PetHandler::spawn(const Being *const being A_UNUSED,
{
}
+void PetHandler::emote(const uint8_t emoteId) const
+{
+ Net::getChatHandler()->talk("\302\202\302e" + toString(
+ static_cast<int>(emoteId)), GENERAL_CHANNEL);
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h
index 207e0add9..2d04d5c29 100644
--- a/src/net/tmwa/pethandler.h
+++ b/src/net/tmwa/pethandler.h
@@ -43,6 +43,8 @@ class PetHandler final : public MessageHandler, public Net::PetHandler
void spawn(const Being *const being,
const int x, const int y) const override final;
+
+ void emote(const uint8_t emoteId) const override final;
};
} // namespace TmwAthena