diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-21 01:13:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-21 01:13:46 +0300 |
commit | 76e55447563fae6f8d17f2fd90231c81e0b3f927 (patch) | |
tree | fa0b2b5daaa50149329f12b7f47b28901d95cc79 /src/net/eathena | |
parent | 8d12abe6ff4114a04b8fc9549e8f44683fed9e3d (diff) | |
download | plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.gz plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.bz2 plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.tar.xz plus-76e55447563fae6f8d17f2fd90231c81e0b3f927.zip |
Add to item field identified.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/inventoryhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/itemflags.h | 2 | ||||
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/inventoryhandler.cpp b/src/net/eathena/inventoryhandler.cpp index 1e0ccd072..b016b6a17 100644 --- a/src/net/eathena/inventoryhandler.cpp +++ b/src/net/eathena/inventoryhandler.cpp @@ -326,7 +326,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) if (inventory) { inventory->setItem(index, itemId, 1, refine, - 1, true, false); + 1, flags.bits.isIdentified, true, false); } if (equipType) @@ -422,7 +422,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) amount += item->getQuantity(); inventory->setItem(index, itemId, amount, refine, - 1, equipType != 0, false); + 1, identified != 0, equipType != 0, false); } ArrowsListener::distributeEvent(); } @@ -466,7 +466,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg) if (inventory) { inventory->setItem(index, itemId, amount, - 0, 1, false, false); + 0, 1, flags.bits.isIdentified, false, false); } } BLOCK_END("InventoryHandler::processPlayerInventory") @@ -498,7 +498,7 @@ void InventoryHandler::processPlayerStorage(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mInventoryItems.push_back(Ea::InventoryItem(index, itemId, - amount, 0, 1, false)); + amount, 0, 1, flags.bits.isIdentified, false)); } BLOCK_END("InventoryHandler::processPlayerInventory") } @@ -596,7 +596,7 @@ void InventoryHandler::processPlayerStorageEquip(Net::MessageIn &msg) flags.byte = msg.readUInt8("flags"); mInventoryItems.push_back(Ea::InventoryItem(index, - itemId, amount, refine, 1, false)); + itemId, amount, refine, 1, flags.bits.isIdentified, false)); } BLOCK_END("InventoryHandler::processPlayerStorageEquip") } @@ -627,7 +627,7 @@ void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg) if (mStorage) { mStorage->setItem(index, itemId, amount, - refine, 1, false, false); + refine, 1, identified != 0, false, false); } } BLOCK_END("InventoryHandler::processPlayerStorageAdd") diff --git a/src/net/eathena/itemflags.h b/src/net/eathena/itemflags.h index df4a98eaf..c7af6ee95 100644 --- a/src/net/eathena/itemflags.h +++ b/src/net/eathena/itemflags.h @@ -33,7 +33,7 @@ namespace EAthena unsigned char isDamaged : 1; unsigned char isFavorite : 1; unsigned char spareBits : 5; - } __attribute__((packed)); + } bits; uint8_t byte; } __attribute__((packed)); } // namespace EAthena diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index a183b70a6..dffc68057 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -201,7 +201,7 @@ void TradeHandler::processTradeItemAdd(Net::MessageIn &msg) else { tradeWindow->addItem2(type, false, amount, - refine, identify, false); + refine, 1, identify != 0, false); } } } |