summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-18 19:19:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-18 19:19:43 +0300
commitc16820057eb9d381eb222512bb931da12e898a1f (patch)
tree140c2dc45aef83abe480b4a41b7c492fd2a55ebb
parent789277e423144102b2b28788e1bb8c7672b06a79 (diff)
downloadmv-c16820057eb9d381eb222512bb931da12e898a1f.tar.gz
mv-c16820057eb9d381eb222512bb931da12e898a1f.tar.bz2
mv-c16820057eb9d381eb222512bb931da12e898a1f.tar.xz
mv-c16820057eb9d381eb222512bb931da12e898a1f.zip
eathena: add partial support for packet SMSG_ROULETTE_INFO_ACK_TYPE 0x0a1c.
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h2
-rw-r--r--src/net/eathena/roulettehandler.cpp20
-rw-r--r--src/net/eathena/roulettehandler.h3
4 files changed, 26 insertions, 1 deletions
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 2447f702d..5fdf66caa 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, 0, 0, 0, 7,
+ 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 344, 0, 0, 7,
0, 0, 0, 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 5f3c2f69e..3decb369f 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -451,6 +451,8 @@
#define SMSG_BATTLE_NOTICE_DELETE 0x08db
#define SMSG_BATTLE_JOINED 0x08d9
+#define SMSG_ROULETTE_INFO_ACK_TYPE 0x0a1c
+
/**********************************
* Packets from client to server *
**********************************/
diff --git a/src/net/eathena/roulettehandler.cpp b/src/net/eathena/roulettehandler.cpp
index d11357fbb..372e13f45 100644
--- a/src/net/eathena/roulettehandler.cpp
+++ b/src/net/eathena/roulettehandler.cpp
@@ -37,6 +37,7 @@ RouletteHandler::RouletteHandler() :
{
static const uint16_t _messages[] =
{
+ SMSG_ROULETTE_INFO_ACK_TYPE,
0
};
handledMessages = _messages;
@@ -47,9 +48,28 @@ void RouletteHandler::handleMessage(Net::MessageIn &msg)
{
switch (msg.getId())
{
+ case SMSG_ROULETTE_INFO_ACK_TYPE:
+ processRouletteInfoAckType(msg);
+ break;
+
default:
break;
}
}
+void RouletteHandler::processRouletteInfoAckType(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ const int count = (msg.readInt16("len") - 8) / 8;
+ msg.readInt32("serial");
+
+ for (int f = 0; f < count; f ++)
+ {
+ msg.readInt16("row");
+ msg.readInt16("position");
+ msg.readInt16("item id");
+ msg.readInt16("count");
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/roulettehandler.h b/src/net/eathena/roulettehandler.h
index 8b69c002f..239ba2e70 100644
--- a/src/net/eathena/roulettehandler.h
+++ b/src/net/eathena/roulettehandler.h
@@ -36,6 +36,9 @@ class RouletteHandler final : public MessageHandler,
A_DELETE_COPY(RouletteHandler)
void handleMessage(Net::MessageIn &msg) override final;
+
+ protected:
+ static void processRouletteInfoAckType(Net::MessageIn &msg);
};
} // namespace EAthena