summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/net/eathena/cashshophandler.cpp21
-rw-r--r--src/net/eathena/cashshophandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 25 insertions, 1 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,
diff --git a/src/net/eathena/cashshophandler.h b/src/net/eathena/cashshophandler.h
index 2dd7d206f..08aa39ac5 100644
--- a/src/net/eathena/cashshophandler.h
+++ b/src/net/eathena/cashshophandler.h
@@ -57,6 +57,8 @@ class CashShopHandler final : public MessageHandler,
static void processCashShopTabPriceList(Net::MessageIn &msg);
+ static void processCashShopSchedule(Net::MessageIn &msg);
+
static BuyDialog *mBuyDialog;
};
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 8d4278f62..6e3cea889 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -230,7 +230,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, -1, 0, 0, 0, 0, 0, 12, 10, 0, 0, 0, 0, 0,
// #0x08C0
- -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0,
0, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 795523e24..8e89fca04 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -198,6 +198,7 @@
#define SMSG_NPC_CASH_POINTS 0x0845
#define SMSG_NPC_CASH_BUY 0x0849
#define SMSG_NPC_CASH_TAB_PRICE_LIST 0x08c0
+#define SMSG_NPC_CASH_SCHEDULE 0x08ca
#define SMSG_NPC_AREA 0x0b0b
#define SMSG_NPC_SHOW_DIGIT 0x01b1