From c9418c55fab6be4151d7a540daa01542d16a2ddd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Mar 2015 12:22:19 +0300 Subject: eathena: add partial support for packet SMSG_NPC_CASH_POINTS 0x0845. --- src/net/eathena/cashshophandler.cpp | 12 ++++++++++++ src/net/eathena/cashshophandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/cashshophandler.cpp b/src/net/eathena/cashshophandler.cpp index 67d50cd21..5cc0529a7 100644 --- a/src/net/eathena/cashshophandler.cpp +++ b/src/net/eathena/cashshophandler.cpp @@ -47,6 +47,7 @@ CashShopHandler::CashShopHandler() : { SMSG_NPC_CASH_SHOP_OPEN, SMSG_NPC_CASH_BUY_ACK, + SMSG_NPC_CASH_POINTS, 0 }; handledMessages = _messages; @@ -66,6 +67,10 @@ void CashShopHandler::handleMessage(Net::MessageIn &msg) processCashShopBuyAck(msg); break; + case SMSG_NPC_CASH_POINTS: + processCashShopPoints(msg); + break; + default: break; } @@ -100,6 +105,13 @@ void CashShopHandler::processCashShopBuyAck(Net::MessageIn &msg) msg.readInt16("error"); } +void CashShopHandler::processCashShopPoints(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + 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 176af7dc3..cc6ccc0c1 100644 --- a/src/net/eathena/cashshophandler.h +++ b/src/net/eathena/cashshophandler.h @@ -51,6 +51,8 @@ class CashShopHandler final : public MessageHandler, static void processCashShopBuyAck(Net::MessageIn &msg); + static void processCashShopPoints(Net::MessageIn &msg); + static BuyDialog *mBuyDialog; }; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 22dbaf1a8..52d6ea51b 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, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, + -1, 0, 0, 0, 0, 10, 0, 0, 0, 0, 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 85256de0f..17b568177 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -195,6 +195,7 @@ #define SMSG_NPC_MARKET_BUY_ACK 0x09d7 #define SMSG_NPC_CASH_SHOP_OPEN 0x0287 #define SMSG_NPC_CASH_BUY_ACK 0x0289 +#define SMSG_NPC_CASH_POINTS 0x0845 #define SMSG_NPC_AREA 0x0b0b #define SMSG_NPC_SHOW_DIGIT 0x01b1 -- cgit v1.2.3-60-g2f50