summaryrefslogtreecommitdiff
path: root/src/net/eathena/mercenaryhandler.cpp
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/mercenaryhandler.cpp
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/mercenaryhandler.cpp')
-rw-r--r--src/net/eathena/mercenaryhandler.cpp18
1 files changed, 18 insertions, 0 deletions
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