From f840d8133e7fe1e76c9e1401a39fc57fecc0b140 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 3 Oct 2014 19:01:07 +0300 Subject: eathena: add packet SMSG_PLAYER_INSERT_CARD 0x017d. --- 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 953242462..7605e9177 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -70,6 +70,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_ARROW_EQUIP, SMSG_PLAYER_ATTACK_RANGE, SMSG_PLAYER_UNE_CARD, + SMSG_PLAYER_INSERT_CARD, 0 }; handledMessages = _messages; @@ -156,6 +157,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerUseCard(msg); break; + case SMSG_PLAYER_INSERT_CARD: + processPlayerInsertCard(msg); + break; + default: break; } @@ -604,6 +609,16 @@ void InventoryHandler::processPlayerUseCard(Net::MessageIn &msg) } } +void InventoryHandler::processPlayerInsertCard(Net::MessageIn &msg) +{ + msg.readInt16("item index"); + msg.readInt16("card index"); + if (msg.readUInt8("flag")) + NotifyManager::notify(NotifyTypes::CARD_INSERT_FAILED); + else + NotifyManager::notify(NotifyTypes::CARD_INSERT_SUCCESS); +} + void InventoryHandler::selectEgg(const Item *const item) const { createOutPacket(CMSG_PET_SELECT_EGG); -- cgit v1.2.3-60-g2f50