From bf966d287a973ad9134c31d8c37cb471832088d2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 25 Feb 2015 23:34:43 +0300 Subject: eathena: add packet CMSG_HOMMERC_DIRECTION 0x0b15. --- src/net/eathena/homunculushandler.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/net/eathena/homunculushandler.cpp') 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 -- cgit v1.2.3-70-g09d2