diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-22 15:43:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-22 15:43:42 +0300 |
commit | c8c04113ea360bdf542393001e45eb1ea9f317d1 (patch) | |
tree | a77df61da3e3fdc1b4e66b292f5545cdd92dd224 | |
parent | 752c00b3e14478ebfc243938ed0bfd3af0a05f58 (diff) | |
download | ManaVerse-c8c04113ea360bdf542393001e45eb1ea9f317d1.tar.gz ManaVerse-c8c04113ea360bdf542393001e45eb1ea9f317d1.tar.bz2 ManaVerse-c8c04113ea360bdf542393001e45eb1ea9f317d1.tar.xz ManaVerse-c8c04113ea360bdf542393001e45eb1ea9f317d1.zip |
eathena: add packet CMSG_PET_DIRECTION 0x0b12.
-rw-r--r-- | src/net/eathena/pethandler.cpp | 7 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 3 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.h | 3 |
6 files changed, 11 insertions, 7 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp index 6218da7a1..fbdb52d2a 100644 --- a/src/net/eathena/pethandler.cpp +++ b/src/net/eathena/pethandler.cpp @@ -322,8 +322,13 @@ void PetHandler::unequip() const outMsg.writeInt8(4, "action"); } -void PetHandler::setDirection(const BeingDirection::Type type A_UNUSED) const +void PetHandler::setDirection(const unsigned char type) const { + createOutPacket(CMSG_PET_DIRECTION); + outMsg.writeInt32(0, "pet id"); + outMsg.writeInt8(0, "head direction"); + outMsg.writeInt8(0, "unused"); + outMsg.writeInt8(type, "pet direction"); } void PetHandler::startAi(const bool start A_UNUSED) const diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 016b622e6..6d037b7fe 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -65,8 +65,7 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void unequip() const override final; - void setDirection(const BeingDirection::Type type) const - override final; + void setDirection(const unsigned char type) const override final; void startAi(const bool start) const override final; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 9f5cdfd7e..fa4e6ffec 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -516,6 +516,7 @@ #define CMSG_PET_TALK 0x0b0c #define CMSG_PET_EMOTE 0x0b0d #define CMSG_PET_MOVE_TO 0x0b11 +#define CMSG_PET_DIRECTION 0x0b12 #define CMSG_MERCENARY_ACTION 0x029f #define CMSG_HOMUNCULUS_SET_NAME 0x0231 diff --git a/src/net/pethandler.h b/src/net/pethandler.h index bba766f24..5caddf068 100644 --- a/src/net/pethandler.h +++ b/src/net/pethandler.h @@ -57,7 +57,7 @@ class PetHandler notfinal virtual void unequip() const = 0; - virtual void setDirection(const BeingDirection::Type type) const = 0; + virtual void setDirection(const unsigned char type) const = 0; virtual void startAi(const bool start) const = 0; }; diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp index cd4cbfa4d..f759fdb0d 100644 --- a/src/net/tmwa/pethandler.cpp +++ b/src/net/tmwa/pethandler.cpp @@ -107,7 +107,7 @@ void PetHandler::unequip() const { } -void PetHandler::setDirection(const BeingDirection::Type type) const +void PetHandler::setDirection(const unsigned char type) const { chatHandler->talk(strprintf("\302\202\302d%dg%d", static_cast<int>(type), tick_time), GENERAL_CHANNEL); diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h index 3237bf67f..3a744180a 100644 --- a/src/net/tmwa/pethandler.h +++ b/src/net/tmwa/pethandler.h @@ -63,8 +63,7 @@ class PetHandler final : public MessageHandler, public Net::PetHandler void unequip() const override final; - void setDirection(const BeingDirection::Type type) const - override final; + void setDirection(const unsigned char type) const override final; void startAi(const bool start) const override final; |