diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-21 19:08:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-21 19:08:31 +0300 |
commit | 68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c (patch) | |
tree | 63d2ea0437231cc6f8f9f587791094968cdc7134 | |
parent | 42bd653a5932f2fb38fc8e3c3a09286ddac20761 (diff) | |
download | manaplus-68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c.tar.gz manaplus-68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c.tar.bz2 manaplus-68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c.tar.xz manaplus-68f7d0afad5023ccd0e5eb8e6739cf2baf217f7c.zip |
eathena: add packet CMSG_PET_SELECT_EGG 0x01a7.
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 7 | ||||
-rw-r--r-- | src/net/eathena/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/inventoryhandler.h | 2 |
6 files changed, 18 insertions, 0 deletions
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<int16_t>( + 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); |