summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-25 23:34:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-25 23:34:43 +0300
commitbf966d287a973ad9134c31d8c37cb471832088d2 (patch)
tree1d2c2c0b28d19f35f0449e62a5071f7d8b3b6924 /src/net/eathena
parent192b8db5c67860ec9a67d19d9529b01794ae1c83 (diff)
downloadManaVerse-bf966d287a973ad9134c31d8c37cb471832088d2.tar.gz
ManaVerse-bf966d287a973ad9134c31d8c37cb471832088d2.tar.bz2
ManaVerse-bf966d287a973ad9134c31d8c37cb471832088d2.tar.xz
ManaVerse-bf966d287a973ad9134c31d8c37cb471832088d2.zip
eathena: add packet CMSG_HOMMERC_DIRECTION 0x0b15.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/homunculushandler.cpp18
-rw-r--r--src/net/eathena/homunculushandler.h2
-rw-r--r--src/net/eathena/mercenaryhandler.cpp18
-rw-r--r--src/net/eathena/mercenaryhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
5 files changed, 41 insertions, 0 deletions
diff --git a/src/net/eathena/homunculushandler.cpp b/src/net/eathena/homunculushandler.cpp
index 42426b57f..13ba7ebe8 100644
--- a/src/net/eathena/homunculushandler.cpp
+++ b/src/net/eathena/homunculushandler.cpp
@@ -28,6 +28,8 @@
#include "gui/windows/skilldialog.h"
+#include "net/serverfeatures.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -287,6 +289,8 @@ void HomunculusHandler::fire() const
void HomunculusHandler::talk(const std::string &restrict text) const
{
+ if (!serverFeatures->haveMovePet())
+ return;
if (text.empty())
return;
std::string msg = text;
@@ -302,8 +306,22 @@ void HomunculusHandler::talk(const std::string &restrict text) const
void HomunculusHandler::emote(const uint8_t emoteId) const
{
+ if (!serverFeatures->haveMovePet())
+ return;
createOutPacket(CMSG_HOMMERC_EMOTE);
outMsg.writeInt8(emoteId, "emote id");
}
+void HomunculusHandler::setDirection(const unsigned char type) const
+{
+ if (!serverFeatures->haveMovePet())
+ return;
+ createOutPacket(CMSG_HOMMERC_DIRECTION);
+ outMsg.writeInt32(0, "pet id");
+ outMsg.writeInt8(0, "head direction");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeInt8(MessageOut::toServerDirection(type),
+ "pet direction");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/homunculushandler.h b/src/net/eathena/homunculushandler.h
index f3c7a48aa..a8d80fc65 100644
--- a/src/net/eathena/homunculushandler.h
+++ b/src/net/eathena/homunculushandler.h
@@ -53,6 +53,8 @@ class HomunculusHandler final : public MessageHandler,
void emote(const uint8_t emoteId) const override final;
+ void setDirection(const unsigned char type) const override final;
+
protected:
static void processHomunculusSkills(Net::MessageIn &msg);
diff --git a/src/net/eathena/mercenaryhandler.cpp b/src/net/eathena/mercenaryhandler.cpp
index 857890bd7..0c3985f07 100644
--- a/src/net/eathena/mercenaryhandler.cpp
+++ b/src/net/eathena/mercenaryhandler.cpp
@@ -30,6 +30,8 @@
#include "gui/windows/skilldialog.h"
+#include "net/serverfeatures.h"
+
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
@@ -217,6 +219,8 @@ void MercenaryHandler::attack(const int targetId, const bool keep) const
void MercenaryHandler::talk(const std::string &restrict text) const
{
+ if (!serverFeatures->haveMovePet())
+ return;
if (text.empty())
return;
std::string msg = text;
@@ -232,8 +236,22 @@ void MercenaryHandler::talk(const std::string &restrict text) const
void MercenaryHandler::emote(const uint8_t emoteId) const
{
+ if (!serverFeatures->haveMovePet())
+ return;
createOutPacket(CMSG_HOMMERC_EMOTE);
outMsg.writeInt8(emoteId, "emote id");
}
+void MercenaryHandler::setDirection(const unsigned char type) const
+{
+ if (!serverFeatures->haveMovePet())
+ return;
+ createOutPacket(CMSG_HOMMERC_DIRECTION);
+ outMsg.writeInt32(0, "pet id");
+ outMsg.writeInt8(0, "head direction");
+ outMsg.writeInt8(0, "unused");
+ outMsg.writeInt8(MessageOut::toServerDirection(type),
+ "pet direction");
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/mercenaryhandler.h b/src/net/eathena/mercenaryhandler.h
index c2a1b18f1..c1a784c3b 100644
--- a/src/net/eathena/mercenaryhandler.h
+++ b/src/net/eathena/mercenaryhandler.h
@@ -51,6 +51,8 @@ class MercenaryHandler final : public MessageHandler,
void emote(const uint8_t emoteId) const override final;
+ void setDirection(const unsigned char type) const override final;
+
protected:
static void processMercenaryUpdate(Net::MessageIn &msg);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index d42ec59fb..b9e0621b1 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -526,6 +526,7 @@
#define CMSG_HOMMERC_ATTACK 0x0233
#define CMSG_HOMMERC_TALK 0x0b13
#define CMSG_HOMMERC_EMOTE 0x0b14
+#define CMSG_HOMMERC_DIRECTION 0x0b15
#define CMSG_DORI_DORI 0x01e7
#define CMSG_EXPLOSION_SPIRITS 0x01ed