From 68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Sep 2014 19:08:31 +0300 Subject: eathena: add packet CMSG_PET_SELECT_EGG 0x01a7. --- src/net/eathena/inventoryhandler.cpp | 7 +++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + src/net/inventoryhandler.h | 2 ++ src/net/tmwa/inventoryhandler.cpp | 4 ++++ src/net/tmwa/inventoryhandler.h | 2 ++ 6 files changed, 18 insertions(+) (limited to 'src/net') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 1e3a80ffe..7717586f3 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -589,4 +589,11 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerStorageAdd") } +void InventoryHandler::selectEgg(const Item *const item) const +{ + createOutPacket(CMSG_PET_SELECT_EGG); + outMsg.writeInt16(static_cast( + item->getInvIndex() + INVENTORY_OFFSET), "index"); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 8f5280e2f..376a1496b 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -66,6 +66,8 @@ class InventoryHandler final : public MessageHandler, void favoriteItem(const Item *const item, const bool favorite) const override final; + void selectEgg(const Item *const item) const override final; + protected: void processPlayerEquipment(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index eda0ddbe8..2dc51d5f6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -404,6 +404,7 @@ #define CMSG_PET_CATCH 0x019f #define CMSG_PET_REQUEST_STATE 0x01a9 #define CMSG_PET_SET_NAME 0x01a5 +#define CMSG_PET_SELECT_EGG 0x01a7 #define CMSG_DORI_DORI 0x01e7 #define CMSG_EXPLOSION_SPIRITS 0x01ed diff --git a/src/net/inventoryhandler.h b/src/net/inventoryhandler.h index ce134f90c..ec822531a 100644 --- a/src/net/inventoryhandler.h +++ b/src/net/inventoryhandler.h @@ -82,6 +82,8 @@ class InventoryHandler notfinal virtual void favoriteItem(const Item *const item, const bool favorite) const = 0; + + virtual void selectEgg(const Item *const item) const = 0; }; } // namespace Net diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp index f222b3349..a64efd571 100644 --- a/src/net/tmwa/inventoryhandler.cpp +++ b/src/net/tmwa/inventoryhandler.cpp @@ -540,4 +540,8 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerStorageAdd") } +void InventoryHandler::selectEgg(const Item *const item A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/inventoryhandler.h b/src/net/tmwa/inventoryhandler.h index b352e3b7f..beaf560a2 100644 --- a/src/net/tmwa/inventoryhandler.h +++ b/src/net/tmwa/inventoryhandler.h @@ -66,6 +66,8 @@ class InventoryHandler final : public MessageHandler, void favoriteItem(const Item *const item, const bool favorite) const override final; + void selectEgg(const Item *const item) const override final; + protected: void processPlayerEquipment(Net::MessageIn &msg); -- cgit v1.2.3-70-g09d2