|
|
|
|
@ -91,8 +91,12 @@ void PackItem(ItemPack &packedItem, const Item &item, bool isHellfire)
|
|
|
|
|
packedItem.iSeed = SDL_SwapLE32(item._iSeed); |
|
|
|
|
packedItem.iCreateInfo = SDL_SwapLE16(item._iCreateInfo); |
|
|
|
|
packedItem.bId = (item._iMagical << 1) | (item._iIdentified ? 1 : 0); |
|
|
|
|
packedItem.bDur = item._iDurability; |
|
|
|
|
packedItem.bMDur = item._iMaxDur; |
|
|
|
|
if (item._iMaxDur > 255) |
|
|
|
|
packedItem.bMDur = 254; |
|
|
|
|
else |
|
|
|
|
packedItem.bMDur = item._iMaxDur; |
|
|
|
|
packedItem.bDur = std::min<int32_t>(item._iDurability, packedItem.bMDur); |
|
|
|
|
|
|
|
|
|
packedItem.bCh = item._iCharges; |
|
|
|
|
packedItem.bMCh = item._iMaxCharges; |
|
|
|
|
if (item.IDidx == IDI_GOLD) |
|
|
|
|
|