summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/inventoryhandler.cpp7
-rw-r--r--src/net/eathena/inventoryhandler.h2
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 10 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