From b6030e26ed33dd5d5dd85519cacb4644100cb299 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Oct 2014 17:34:05 +0300 Subject: eathena: add partial support for packet SMSG_PLAYER_UNE_CARD 0x017b. --- src/net/eathena/inventoryhandler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/net/eathena/inventoryhandler.cpp') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index f0b0d7a1d..953242462 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -69,6 +69,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_UNEQUIP, SMSG_PLAYER_ARROW_EQUIP, SMSG_PLAYER_ATTACK_RANGE, + SMSG_PLAYER_UNE_CARD, 0 }; handledMessages = _messages; @@ -151,6 +152,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerArrowEquip(msg); break; + case SMSG_PLAYER_UNE_CARD: + processPlayerUseCard(msg); + break; + default: break; } @@ -589,6 +594,16 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerStorageAdd") } +void InventoryHandler::processPlayerUseCard(Net::MessageIn &msg) +{ + // +++ here need show dialog with item selection for card. + const int count = (msg.readInt16("len") - 4) / 2; + for (int f = 0; f < count; f ++) + { + msg.readInt16("item id"); + } +} + void InventoryHandler::selectEgg(const Item *const item) const { createOutPacket(CMSG_PET_SELECT_EGG); -- cgit v1.2.3-60-g2f50