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 +++++++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 18 insertions(+) (limited to 'src') 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); diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 376a1496b..b00d7af51 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -86,6 +86,8 @@ class InventoryHandler final : public MessageHandler, void processPlayerStorageEquip(Net::MessageIn &msg); void processPlayerStorageAdd(Net::MessageIn &msg); + + void processPlayerUseCard(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index a6b2be72d..4d6370a69 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -74,6 +74,7 @@ #define SMSG_PLAYER_EQUIPMENT 0x0992 #define SMSG_PLAYER_EQUIP 0x0999 #define SMSG_PLAYER_UNEQUIP 0x099a +#define SMSG_PLAYER_UNE_CARD 0x017b #define SMSG_PLAYER_ATTACK_RANGE 0x013a #define SMSG_PLAYER_ARROW_EQUIP 0x013c #define SMSG_PLAYER_ARROW_MESSAGE 0x013b -- cgit v1.2.3-70-g09d2