diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-06 19:55:35 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 19:55:35 +0300 |
commit | cac4c3021450989df296d1c6821f83589f7104f0 (patch) | |
tree | 4c815561d75ec4bc4569614e16ad95ce5fb371b7 /src/net/eathena | |
parent | 575b5ce55b40ab3c923230299b893909ac0ab59e (diff) | |
download | manaplus-cac4c3021450989df296d1c6821f83589f7104f0.tar.gz manaplus-cac4c3021450989df296d1c6821f83589f7104f0.tar.bz2 manaplus-cac4c3021450989df296d1c6821f83589f7104f0.tar.xz manaplus-cac4c3021450989df296d1c6821f83589f7104f0.zip |
eathena: fix packet SMSG_PLAYER_STORAGE_ADD 0x01c4.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 22 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index a87573980..3499962fe 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -494,14 +494,17 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) { BLOCK_START("InventoryHandler::processPlayerStorageAdd") // Move an item into storage - const int index = msg.readInt16() - STORAGE_OFFSET; - const int amount = msg.readInt32(); - const int itemId = msg.readInt16(); - unsigned char identified = msg.readUInt8(); - msg.readUInt8(); // attribute - const uint8_t refine = msg.readUInt8(); - for (int i = 0; i < 4; i++) - msg.readInt16(); // card i + const int index = msg.readInt16("index") - STORAGE_OFFSET; + const int amount = msg.readInt32("amount"); + const int itemId = msg.readInt16("item id"); + msg.readUInt8("type"); + unsigned char identified = msg.readUInt8("identify"); + msg.readUInt8("attribute"); + const uint8_t refine = msg.readUInt8("refine"); + msg.readInt16("card0"); + msg.readInt16("card1"); + msg.readInt16("card2"); + msg.readInt16("card3"); if (Item *const item = mStorage->getItem(index)) { @@ -512,9 +515,6 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) { if (mStorage) { - if (serverVersion < 1 && identified > 1) - identified = 1; - mStorage->setItem(index, itemId, amount, refine, identified, false); } diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 9c2f25d43..c5e6fc138 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -153,7 +153,7 @@ #define SMSG_PLAYER_STORAGE_ITEMS 0x01f0 /**< Item list for storage */ #define SMSG_PLAYER_STORAGE_EQUIP 0x0996 /**< Equipment list for storage */ #define SMSG_PLAYER_STORAGE_STATUS 0x00f2 /**< Slots used and total slots */ -#define SMSG_PLAYER_STORAGE_ADD 0x00f4 /**< Add item/equip to storage */ +#define SMSG_PLAYER_STORAGE_ADD 0x01c4 /**< Add item/equip to storage */ // Remove item/equip from storage #define SMSG_PLAYER_STORAGE_REMOVE 0x00f6 #define SMSG_PLAYER_STORAGE_CLOSE 0x00f8 /**< Storage access closed */ |