From 2822bd9efe74131a6f0614f8092db9c990a0e708 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 14 Jul 2018 01:32:24 +0300 Subject: Add packet CMSG_PET_EVOLUTION 0x09fb. --- src/net/eathena/pethandler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/eathena/pethandler.cpp') 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 -- cgit v1.2.3-70-g09d2