summaryrefslogtreecommitdiff
path: root/src/net/eathena/pethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-22 15:00:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-22 15:00:14 +0300
commit752c00b3e14478ebfc243938ed0bfd3af0a05f58 (patch)
tree462cbce8889111c8be0906c5821a9c3212fc3a74 /src/net/eathena/pethandler.cpp
parent7e44f48d83922efe4b2e5ff50813fef65c1877b1 (diff)
downloadmanaplus-752c00b3e14478ebfc243938ed0bfd3af0a05f58.tar.gz
manaplus-752c00b3e14478ebfc243938ed0bfd3af0a05f58.tar.bz2
manaplus-752c00b3e14478ebfc243938ed0bfd3af0a05f58.tar.xz
manaplus-752c00b3e14478ebfc243938ed0bfd3af0a05f58.zip
eathena: add packet CMSG_PET_MOVE_TO 0x0b11.
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r--src/net/eathena/pethandler.cpp9
1 files changed, 8 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,