From cc2c18c2b41e5409a0762b538568b41e9147c6e9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 25 Jan 2015 01:10:09 +0300 Subject: Add weight bar into cart window. --- src/net/eathena/inventoryhandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/net/eathena/inventoryhandler.cpp') diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 316617be1..ff0e8eaaf 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -26,6 +26,8 @@ #include "enums/equipslot.h" +#include "enums/being/attributes.h" + #include "being/localplayer.h" #include "listeners/arrowslistener.h" @@ -764,8 +766,10 @@ void InventoryHandler::processCartInfo(Net::MessageIn &msg) { msg.readInt16("cart items used"); const int size = msg.readInt16("max cart items"); - msg.readInt32("cart weight"); - msg.readInt32("max cart weight"); + PlayerInfo::setAttribute(Attributes::CART_TOTAL_WEIGHT, + msg.readInt32("cart weight")); + PlayerInfo::setAttribute(Attributes::CART_MAX_WEIGHT, + msg.readInt32("max cart weight")); if (mCartItems.empty()) return; -- cgit v1.2.3-70-g09d2