From 61b29214e3b5becfccf8b9264a12019be7290a0f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Mar 2015 13:14:39 +0300 Subject: eathena: add partial support for packet SMSG_NPC_CASH_TAB_PRICE_LIST 0x08c0. --- src/net/eathena/cashshophandler.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/net/eathena/cashshophandler.cpp') diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index a001b1f2e..f4ac1297c 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -49,6 +49,7 @@ CashShopHandler::CashShopHandler() : SMSG_NPC_CASH_BUY_ACK, SMSG_NPC_CASH_POINTS, SMSG_NPC_CASH_BUY, + SMSG_NPC_CASH_TAB_PRICE_LIST, 0 }; handledMessages = _messages; @@ -76,6 +77,10 @@ void CashShopHandler::handleMessage(Net::MessageIn &msg) processCashShopBuy(msg); break; + case SMSG_NPC_CASH_TAB_PRICE_LIST: + processCashShopTabPriceList(msg); + break; + default: break; } @@ -126,6 +131,22 @@ void CashShopHandler::processCashShopBuy(Net::MessageIn &msg) msg.readInt32("kafra points"); } +void CashShopHandler::processCashShopTabPriceList(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + const int count = (msg.readInt16("len") - 10) / 6; + msg.readInt32("tab"); + const int itemsCount = msg.readInt16("count"); + if (count != itemsCount) + logger->log("error: wrong list count"); + + for (int f = 0; f < count; f ++) + { + msg.readInt16("item id"); + msg.readInt32("price"); + } +} + void CashShopHandler::buyItem(const int points, const int itemId, const unsigned char color A_UNUSED, -- cgit v1.2.3-60-g2f50