summaryrefslogtreecommitdiff
path: root/src/net/eathena/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-03 13:16:17 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commitcb392d4bf99ff06849f5891a17be59a7e509ff98 (patch)
tree38cce73e116b1eedd19ddd5e7e146b0879d4fe31 /src/net/eathena/inventoryhandler.cpp
parentbfa9351f768f20b591cccdbb24eb546dfb59e27d (diff)
downloadmanaverse-cb392d4bf99ff06849f5891a17be59a7e509ff98.tar.gz
manaverse-cb392d4bf99ff06849f5891a17be59a7e509ff98.tar.bz2
manaverse-cb392d4bf99ff06849f5891a17be59a7e509ff98.tar.xz
manaverse-cb392d4bf99ff06849f5891a17be59a7e509ff98.zip
eathena: fix packet SMSG_PLAYER_INVENTORY_ADD 0x0990.
Diffstat (limited to 'src/net/eathena/inventoryhandler.cpp')
-rw-r--r--src/net/eathena/inventoryhandler.cpp37
1 files changed, 21 insertions, 16 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp
index abc03d3df..3a9297984 100644
--- a/src/net/eathena/inventoryhandler.cpp
+++ b/src/net/eathena/inventoryhandler.cpp
@@ -230,15 +230,15 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg)
msg.readUInt8("item type");
// uint8_t identified = msg.readUInt8(); // identify flag
- msg.readInt32("location");
+ const int equipType = msg.readInt32("location");
msg.readInt32("wear state");
const uint8_t refine = static_cast<uint8_t>(msg.readInt8("refine"));
- msg.readInt16("cart0");
- msg.readInt16("cart1");
- msg.readInt16("cart2");
- msg.readInt16("cart3");
+ msg.readInt16("card0");
+ msg.readInt16("card1");
+ msg.readInt16("card2");
+ msg.readInt16("card3");
msg.readInt32("hire expire date (?)");
- const int equipType = msg.readInt16("equip type");
+ msg.readInt16("equip type");
msg.readInt16("item sprite number");
msg.readInt8("flags");
@@ -268,16 +268,21 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg)
mEquips.clear();
PlayerInfo::getEquipment()->setBackend(&mEquips);
}
- const int index = msg.readInt16() - INVENTORY_OFFSET;
- int amount = msg.readInt16();
- const int itemId = msg.readInt16();
- uint8_t identified = msg.readUInt8();
- msg.readUInt8(); // attribute
- const uint8_t refine = msg.readUInt8();
- for (int i = 0; i < 4; i++)
- msg.readInt16(); // cards[i]
- const int equipType = msg.readInt16();
- msg.readUInt8(); // itemType
+ const int index = msg.readInt16("index") - INVENTORY_OFFSET;
+ int amount = msg.readInt16("count");
+ const int itemId = msg.readInt16("item id");
+ uint8_t identified = msg.readUInt8("identified");
+ msg.readUInt8("is damaged");
+ const uint8_t refine = msg.readUInt8("refine");
+ msg.readInt16("card0");
+ msg.readInt16("card1");
+ msg.readInt16("card2");
+ msg.readInt16("card3");
+ const int equipType = msg.readInt32("location");
+ msg.readUInt8("item type");
+ msg.readUInt8("fail flag");
+ msg.readInt32("hire expire date");
+ msg.readInt16("equip type");
const ItemInfo &itemInfo = ItemDB::get(itemId);
const unsigned char err = msg.readUInt8();