summaryrefslogtreecommitdiff
path: root/src/net/eathena/pethandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-14 01:32:24 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-14 01:32:24 +0300
commit2822bd9efe74131a6f0614f8092db9c990a0e708 (patch)
treec7b5aec485abd33e3a9d9761430a56e246445270 /src/net/eathena/pethandler.cpp
parentacd87806b767d70c0676c0f800e23a7ce4f623e0 (diff)
downloadplus-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.gz
plus-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.bz2
plus-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.xz
plus-2822bd9efe74131a6f0614f8092db9c990a0e708.zip
Add packet CMSG_PET_EVOLUTION 0x09fb.
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r--src/net/eathena/pethandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/pethandler.cpp b/src/net/eathena/pethandler.cpp
index 1f492aa31..72243057f 100644
--- a/src/net/eathena/pethandler.cpp
+++ b/src/net/eathena/pethandler.cpp
@@ -27,8 +27,12 @@
#include "net/eathena/messageout.h"
#include "net/eathena/protocolout.h"
+#include "resources/item/item.h"
+
#include "debug.h"
+extern int packetVersion;
+
namespace EAthena
{
@@ -123,4 +127,15 @@ void PetHandler::setDirection(const unsigned char type) const
"pet direction");
}
+void PetHandler::evolution(const Item *const item) const
+{
+ if (packetVersion < 20140122 ||
+ item == nullptr)
+ {
+ return;
+ }
+ createOutPacket(CMSG_PET_EVOLUTION);
+ outMsg.writeInt16(CAST_S16(item->getId()), "egg id");
+}
+
} // namespace EAthena