summaryrefslogtreecommitdiff
path: root/src/net/eathena/cashshophandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-18 13:22:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-18 13:22:35 +0300
commit0c291817a1e3fb61e229a2aa0037983ab2f0bf07 (patch)
treed6600c912b596ede7d5deebed5778840ab4b2c88 /src/net/eathena/cashshophandler.cpp
parent61b29214e3b5becfccf8b9264a12019be7290a0f (diff)
downloadplus-0c291817a1e3fb61e229a2aa0037983ab2f0bf07.tar.gz
plus-0c291817a1e3fb61e229a2aa0037983ab2f0bf07.tar.bz2
plus-0c291817a1e3fb61e229a2aa0037983ab2f0bf07.tar.xz
plus-0c291817a1e3fb61e229a2aa0037983ab2f0bf07.zip
eathena: add partial support for packet SMSG_NPC_CASH_SCHEDULE 0x08ca.
Diffstat (limited to 'src/net/eathena/cashshophandler.cpp')
-rw-r--r--src/net/eathena/cashshophandler.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index f4ac1297c..082394b68 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -50,6 +50,7 @@ CashShopHandler::CashShopHandler() :
SMSG_NPC_CASH_POINTS,
SMSG_NPC_CASH_BUY,
SMSG_NPC_CASH_TAB_PRICE_LIST,
+ SMSG_NPC_CASH_SCHEDULE,
0
};
handledMessages = _messages;
@@ -81,6 +82,10 @@ void CashShopHandler::handleMessage(Net::MessageIn &msg)
processCashShopTabPriceList(msg);
break;
+ case SMSG_NPC_CASH_SCHEDULE:
+ processCashShopSchedule(msg);
+ break;
+
default:
break;
}
@@ -147,6 +152,22 @@ void CashShopHandler::processCashShopTabPriceList(Net::MessageIn &msg)
}
}
+void CashShopHandler::processCashShopSchedule(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ const int count = (msg.readInt16("len") - 8) / 6;
+ const int itemsCount = msg.readInt16("count");
+ msg.readInt16("tab");
+ 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,