summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/pethandler.cpp9
-rw-r--r--src/net/eathena/protocol.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 6d1167198..6218da7a1 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -36,6 +36,7 @@
#include "net/chathandler.h"
#include "net/inventoryhandler.h"
+#include "net/serverfeatures.h"
#include "net/ea/eaprotocol.h"
@@ -109,8 +110,14 @@ void PetHandler::handleMessage(Net::MessageIn &msg)
}
void PetHandler::move(const int petId A_UNUSED,
- const int x A_UNUSED, const int y A_UNUSED) const
+ const int x, const int y) const
{
+ if (!serverFeatures->haveMovePet())
+ return;
+ createOutPacket(CMSG_PET_MOVE_TO);
+ outMsg.writeInt32(0, "pet id");
+ outMsg.writeInt16(x, "x");
+ outMsg.writeInt16(y, "y");
}
void PetHandler::spawn(const Being *const being A_UNUSED,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index a9ab76092..9f5cdfd7e 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -515,6 +515,7 @@
#define CMSG_PET_MENU_ACTION 0x01a1
#define CMSG_PET_TALK 0x0b0c
#define CMSG_PET_EMOTE 0x0b0d
+#define CMSG_PET_MOVE_TO 0x0b11
#define CMSG_MERCENARY_ACTION 0x029f
#define CMSG_HOMUNCULUS_SET_NAME 0x0231