summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/cashshophandler.cpp14
-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, 18 insertions, 1 deletions
diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp
index 5cc0529a7..a001b1f2e 100644
--- a/src/net/eathena/cashshophandler.cpp
+++ b/src/net/eathena/cashshophandler.cpp
@@ -48,6 +48,7 @@ CashShopHandler::CashShopHandler() :
SMSG_NPC_CASH_SHOP_OPEN,
SMSG_NPC_CASH_BUY_ACK,
SMSG_NPC_CASH_POINTS,
+ SMSG_NPC_CASH_BUY,
0
};
handledMessages = _messages;
@@ -71,6 +72,10 @@ void CashShopHandler::handleMessage(Net::MessageIn &msg)
processCashShopPoints(msg);
break;
+ case SMSG_NPC_CASH_BUY:
+ processCashShopBuy(msg);
+ break;
+
default:
break;
}
@@ -112,6 +117,15 @@ void CashShopHandler::processCashShopPoints(Net::MessageIn &msg)
msg.readInt32("kafra points");
}
+void CashShopHandler::processCashShopBuy(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ msg.readInt32("id");
+ msg.readInt16("result");
+ msg.readInt32("cash points");
+ msg.readInt32("kafra points");
+}
+
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 cc6ccc0c1..d122b6cc9 100644
--- a/src/net/eathena/cashshophandler.h
+++ b/src/net/eathena/cashshophandler.h
@@ -53,6 +53,8 @@ class CashShopHandler final : public MessageHandler,
static void processCashShopPoints(Net::MessageIn &msg);
+ static void processCashShopBuy(Net::MessageIn &msg);
+
static BuyDialog *mBuyDialog;
};
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 52d6ea51b..a349fb33f 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -220,7 +220,7 @@ int16_t packet_lengths[] =
0, 0, 0, 0, 6, 0, -1, 3, 14, 0, 10, 0, 10, -1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 5, 0, 0, 6, 26, 0,
// #0x0840
- -1, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0,
+ -1, 0, 0, 0, 0, 10, 0, 0, 0, 16, 0, 19, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, -1, -1, -1, 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 17b568177..394103ca9 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -196,6 +196,7 @@
#define SMSG_NPC_CASH_SHOP_OPEN 0x0287
#define SMSG_NPC_CASH_BUY_ACK 0x0289
#define SMSG_NPC_CASH_POINTS 0x0845
+#define SMSG_NPC_CASH_BUY 0x0849
#define SMSG_NPC_AREA 0x0b0b
#define SMSG_NPC_SHOW_DIGIT 0x01b1