From c21d7f9229d7d450012a8cd3b197c0f4432bfb7a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 23 Jan 2015 01:47:45 +0300 Subject: eathena: add partial support for packet SMSG_CART_INFO 0x0121. --- src/net/eathena/inventoryhandler.cpp | 13 +++++++++++++ src/net/eathena/inventoryhandler.h | 2 ++ src/net/eathena/protocol.h | 1 + 3 files changed, 16 insertions(+) diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index f628073f0..ab384e2ce 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -94,6 +94,7 @@ InventoryHandler::InventoryHandler() : SMSG_PLAYER_INSERT_CARD, SMSG_PLAYER_ITEM_RENTAL_TIME, SMSG_PLAYER_ITEM_RENTAL_EXPIRED, + SMSG_CART_INFO, 0 }; handledMessages = _messages; @@ -192,6 +193,10 @@ void InventoryHandler::handleMessage(Net::MessageIn &msg) processPlayerItemRentalExpired(msg); break; + case SMSG_CART_INFO: + processCartInfo(msg); + break; + default: break; } @@ -726,4 +731,12 @@ void InventoryHandler::processPlayerStorageRemove(Net::MessageIn &msg) BLOCK_END("InventoryHandler::processPlayerStorageRemove") } +void InventoryHandler::processCartInfo(Net::MessageIn &msg) +{ + msg.readInt16("cart items used"); + msg.readInt16("max cart items"); + msg.readInt32("cart weight"); + msg.readInt32("max cart weight"); +} + } // namespace EAthena diff --git a/src/net/eathena/inventoryhandler.h b/src/net/eathena/inventoryhandler.h index cf7f9e7d8..8508032ee 100644 --- a/src/net/eathena/inventoryhandler.h +++ b/src/net/eathena/inventoryhandler.h @@ -102,6 +102,8 @@ class InventoryHandler final : public MessageHandler, static void processPlayerItemRentalExpired(Net::MessageIn &msg); static void processPlayerStorageRemove(Net::MessageIn &msg); + + static void processCartInfo(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 384ea8e3e..8e2aee5c2 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -327,6 +327,7 @@ #define SMSG_MAP_MUSIC 0x0b05 +#define SMSG_CART_INFO 0x0121 /********************************** * Packets from client to server * -- cgit v1.2.3-70-g09d2