"Boosts and potions!"

Fixed crate opening such that the item has an iOpt of 1.
This commit is contained in:
Gent
2020-09-14 10:27:52 -04:00
committed by dongresource
parent a976fef2b4
commit 148d90f4f1
6 changed files with 70 additions and 34 deletions

View File

@@ -129,8 +129,8 @@ void TableData::init() {
for (int i = 0; i < 12; i++) {
itemSet = xdtData[setNames[i]]["m_pItemData"];
for (nlohmann::json::iterator item = itemSet.begin(); item != itemSet.end(); item++)
ItemManager::ItemData[std::pair<int32_t, int32_t>(item.value()["m_iItemNumber"], i == 11 ? 9 : (i == 10 ? 7 : item.value()["m_iEquipLoc"]))]
= { item.value()["m_iTradeAble"] == 1, item.value()["m_iSellAble"] == 1, item.value()["m_iItemPrice"], item.value()["m_iItemSellPrice"], item.value()["m_iStackNumber"], i > 9 ? 0 : item.value()["m_iMinReqLev"] };
ItemManager::ItemData[std::pair<int32_t, int32_t>(item.value()["m_iItemNumber"], i == 11 ? 9 : (i == 10 ? 7 : (int)item.value()["m_iEquipLoc"]))]
= { item.value()["m_iTradeAble"] == 1, item.value()["m_iSellAble"] == 1, item.value()["m_iItemPrice"], item.value()["m_iItemSellPrice"], item.value()["m_iStackNumber"], i > 9 ? 0 : (int)item.value()["m_iMinReqLev"] };
}
std::cout << "[INFO] Loaded " << ItemManager::ItemData.size() << " items" << std::endl;