From 48746ecb8cd94270f143cc7d722188d2e77c3101 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Apr 2015 16:09:56 +0300 Subject: eathena: add partial support for packet SMSG_ROULETTE_OPEN_ACK 0x0a1a. --- src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + src/net/eathena/roulettehandler.cpp | 18 ++++++++++++++++++ src/net/eathena/roulettehandler.h | 2 ++ 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 08c45856b..30e3d86f7 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -260,7 +260,7 @@ int16_t packet_lengths[] = //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 // #0x0A00 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 344, 0, 0, 7, + 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 23, 0, 344, 0, 0, 7, 21, 0, 5, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // #0x0A40 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 29228ec96..b7e767d17 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -466,6 +466,7 @@ #define SMSG_BATTLE_NOTICE_DELETE 0x08db #define SMSG_BATTLE_JOINED 0x08d9 +#define SMSG_ROULETTE_OPEN_ACK 0x0a1a #define SMSG_ROULETTE_INFO_ACK_TYPE 0x0a1c #define SMSG_ROULETTE_RECV_ITEM_ACK 0x0a22 #define SMSG_ROULETTE_GENERATE_ACK_TYPE 0x0a20 diff --git a/src/net/eathena/roulettehandler.cpp b/src/net/eathena/roulettehandler.cpp index 5ba9c7997..09cc67db2 100644 --- a/src/net/eathena/roulettehandler.cpp +++ b/src/net/eathena/roulettehandler.cpp @@ -39,6 +39,7 @@ RouletteHandler::RouletteHandler() : SMSG_ROULETTE_INFO_ACK_TYPE, SMSG_ROULETTE_RECV_ITEM_ACK, SMSG_ROULETTE_GENERATE_ACK_TYPE, + SMSG_ROULETTE_OPEN_ACK, 0 }; handledMessages = _messages; @@ -61,6 +62,10 @@ void RouletteHandler::handleMessage(Net::MessageIn &msg) processRouletteGenerateAckType(msg); break; + case SMSG_ROULETTE_OPEN_ACK: + processRouletteOpenAck(msg); + break; + default: break; } @@ -100,4 +105,17 @@ void RouletteHandler::processRouletteGenerateAckType(Net::MessageIn &msg) msg.readInt32("remain bronze"); } +void RouletteHandler::processRouletteOpenAck(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + msg.readUInt8("result"); + msg.readInt32("serial"); + msg.readUInt8("step"); + msg.readUInt8("idx"); + msg.readInt16("additional item id"); + msg.readInt32("gold point"); + msg.readInt32("silver point"); + msg.readInt32("bronze point"); +} + } // namespace EAthena diff --git a/src/net/eathena/roulettehandler.h b/src/net/eathena/roulettehandler.h index 66028be62..965bcd322 100644 --- a/src/net/eathena/roulettehandler.h +++ b/src/net/eathena/roulettehandler.h @@ -43,6 +43,8 @@ class RouletteHandler final : public MessageHandler, static void processRouletteItemAck(Net::MessageIn &msg); static void processRouletteGenerateAckType(Net::MessageIn &msg); + + static void processRouletteOpenAck(Net::MessageIn &msg); }; } // namespace EAthena -- cgit v1.2.3-60-g2f50