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 | |
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')
-rw-r--r-- | src/net/eathena/packetsout.inc | 7 | ||||
-rw-r--r-- | src/net/eathena/pethandler.cpp | 15 | ||||
-rw-r--r-- | src/net/eathena/pethandler.h | 2 | ||||
-rw-r--r-- | src/net/pethandler.h | 4 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.cpp | 5 | ||||
-rw-r--r-- | src/net/tmwa/pethandler.h | 2 |
6 files changed, 35 insertions, 0 deletions
diff --git a/src/net/eathena/packetsout.inc b/src/net/eathena/packetsout.inc index b622b0340..b480c16f4 100644 --- a/src/net/eathena/packetsout.inc +++ b/src/net/eathena/packetsout.inc @@ -336,6 +336,7 @@ packet(CMSG_ATTENDANCE_REWARD, 0x0000, 0, nullptr); packet(CMSG_MAP_BLOCK_PLAY_CANCEL, 0x0000, 0, nullptr); packet(CMSG_PRIVATE_AIRSHIP_REQUEST, 0x0000, 0, nullptr); packet(CMSG_PLAYER_SELECT_STYLE, 0x0000, 0, nullptr); +packet(CMSG_PET_EVOLUTION, 0x0000, 0, nullptr); #else // 20040713 if (packetVersion >= 20040713) @@ -1258,6 +1259,12 @@ if (packetVersion >= 20131230) packet(CMSG_MAIL2_SEND_MAIL, 0x09ec, -1, clif->pRodexSendMail); } +// 20140122 +if (packetVersion >= 20140122) +{ + packet(CMSG_PET_EVOLUTION, 0x09fb, -1, clif->pPetEvolution); +} + // 20140129 if (packetVersion >= 20140129) { 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 diff --git a/src/net/eathena/pethandler.h b/src/net/eathena/pethandler.h index 00cc4b7f3..2d73b6524 100644 --- a/src/net/eathena/pethandler.h +++ b/src/net/eathena/pethandler.h @@ -57,6 +57,8 @@ class PetHandler final : public Net::PetHandler void unequip() const override final; void setDirection(const unsigned char type) const override final; + + void evolution(const Item *const item) const override final; }; } // namespace EAthena diff --git a/src/net/pethandler.h b/src/net/pethandler.h index 3116d7ba9..ba1502631 100644 --- a/src/net/pethandler.h +++ b/src/net/pethandler.h @@ -23,6 +23,8 @@ #include "being/being.h" +class Item; + namespace Net { @@ -59,6 +61,8 @@ class PetHandler notfinal virtual void unequip() const = 0; virtual void setDirection(const unsigned char type) const = 0; + + virtual void evolution(const Item *item) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/pethandler.cpp b/src/net/tmwa/pethandler.cpp index 4e7577bf9..63a82df9a 100644 --- a/src/net/tmwa/pethandler.cpp +++ b/src/net/tmwa/pethandler.cpp @@ -81,4 +81,9 @@ void PetHandler::setDirection(const unsigned char type A_UNUSED) const { } +void PetHandler::evolution(const Item *item A_UNUSED) const +{ +} + + } // namespace TmwAthena diff --git a/src/net/tmwa/pethandler.h b/src/net/tmwa/pethandler.h index 884110932..87d16c023 100644 --- a/src/net/tmwa/pethandler.h +++ b/src/net/tmwa/pethandler.h @@ -58,6 +58,8 @@ class PetHandler final : public Net::PetHandler void setDirection(const unsigned char type) const override final; + void evolution(const Item *const item) const override final; + protected: int mRandCounter; }; |