diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-14 01:32:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-14 01:32:24 +0300 |
commit | 2822bd9efe74131a6f0614f8092db9c990a0e708 (patch) | |
tree | c7b5aec485abd33e3a9d9761430a56e246445270 /src/net/eathena/pethandler.cpp | |
parent | acd87806b767d70c0676c0f800e23a7ce4f623e0 (diff) | |
download | manaverse-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.gz manaverse-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.bz2 manaverse-2822bd9efe74131a6f0614f8092db9c990a0e708.tar.xz manaverse-2822bd9efe74131a6f0614f8092db9c990a0e708.zip |
Add packet CMSG_PET_EVOLUTION 0x09fb.
Diffstat (limited to 'src/net/eathena/pethandler.cpp')
-rw-r--r-- | src/net/eathena/pethandler.cpp | 15 |
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 |