From dca1d63c7734846844fd3d322d1b6927cfa7d913 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 12 Mar 2015 17:49:22 +0300 Subject: eathena: add partial support for packet SMSG_PLAYER_COOKING_LIST 0x025a. --- src/net/eathena/inventoryhandler.cpp | 15 +++++++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index c60af4755..4cbe83027 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -112,6 +112,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_REFINE_LIST, SMSG_PLAYER_STORAGE_PASSWORD, SMSG_PLAYER_STORAGE_PASSWORD_RESULT, + SMSG_PLAYER_COOKING_LIST, 0 }; handledMessages = _messages; @@ -268,6 +269,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerStoragePasswordResult(msg); break; + case SMSG_PLAYER_COOKING_LIST: + processPlayerCookingList(msg); + break; + default: break; } @@ -1067,4 +1072,14 @@ void InventoryHandler::processPlayerStoragePasswordResult(Net::MessageIn &msg) msg.readInt16("error count"); } +void InventoryHandler::processPlayerCookingList(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + + const int count = (msg.readInt16("len") - 6) / 2; + msg.readInt16("list type"); + for (int f = 0; f < count; f ++) + msg.readInt16("item id"); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index 94855384e..8cf69408a 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -131,6 +131,8 @@ class InventoryHandler final : public MessageHandler, static void processPlayerStoragePasswordResult(Net::MessageIn &msg); + static void processPlayerCookingList(Net::MessageIn &msg); + static Ea::InventoryItems mCartItems; }; diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index 480da3d71..1f3804e7e 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -89,7 +89,7 @@ int16_t packet_lengths[] = 12, 0, 0, 0, 0, -1, 0, 0, 282, 0, 4, 0, 6, 0, 0, 0, // #0x0240 -1, 0, -1, 0, 0, 3, 0, 0, 0, 3, 70, 0, 0, 0, 0, 0, - 3, 0, -1, 3, 0, 5, 5, 8, 0, 0, 0, 0, 0, 4, 0, 6, + 3, 0, -1, 3, 0, 5, 5, 8, 0, 0, -1, 0, 0, 4, 0, 6, 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, // #0x0280 diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 1b44fbbbc..44517b6f6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -110,6 +110,7 @@ #define SMSG_PLAYER_FAME_TAEKWON 0x0224 #define SMSG_PLAYER_REFINE_LIST 0x0221 #define SMSG_PLAYER_UPGRADE_MESSAGE 0x0223 +#define SMSG_PLAYER_COOKING_LIST 0x025a #define SMSG_SKILL_FAILED 0x0110 #define SMSG_SKILL_DAMAGE 0x01de #define SMSG_SKILL_AUTO_CAST 0x0147 -- cgit v1.2.3-70-g09d2