diff --git a/data/scripts/item_classification/item_tiers.lua b/data/scripts/item_classification/item_tiers.lua index 6126a48baa3..82cfa9fb267 100644 --- a/data/scripts/item_classification/item_tiers.lua +++ b/data/scripts/item_classification/item_tiers.lua @@ -2,33 +2,33 @@ local itemTierClassifications = { -- Upgrade classification 1 [1] = { -- Update tier 0 - [0] = {price = 25000} + [1] = {price = 25000} }, -- Upgrade classification 2 [2] = { -- Update tier 0 - [0] = {price = 750000}, + [1] = {price = 750000}, -- Update tier 1 - [1] = {price = 5000000} + [2] = {price = 5000000} }, -- Upgrade classification 3 [3] = { - [0] = {price = 4000000}, - [1] = {price = 10000000}, - [2] = {price = 20000000} + [1] = {price = 4000000}, + [2] = {price = 10000000}, + [3] = {price = 20000000} }, -- Upgrade classification 4 [4] = { - [0] = {price = 8000000}, - [1] = {price = 20000000}, - [2] = {price = 40000000}, - [3] = {price = 65000000}, - [4] = {price = 100000000}, - [5] = {price = 250000000}, - [6] = {price = 750000000}, - [7] = {price = 2500000000}, - [8] = {price = 8000000000}, - [9] = {price = 15000000000} + [1] = {price = 8000000}, + [2] = {price = 20000000}, + [3] = {price = 40000000}, + [4] = {price = 65000000}, + [5] = {price = 100000000}, + [6] = {price = 250000000}, + [7] = {price = 750000000}, + [8] = {price = 2500000000}, + [9] = {price = 8000000000}, + [10] = {price = 15000000000} } } @@ -40,7 +40,7 @@ for classificationId, classificationTable in ipairs(itemTierClassifications) do classification.Upgrades = {} for tierId, tierTable in ipairs(classificationTable) do if tierId and tierTable.price then - table.insert(classification.Upgrades, {TierId = tierId, Price = tierTable.price}) + table.insert(classification.Upgrades, {TierId = tierId - 1, Price = tierTable.price}) end end -- Create item classification and register classification table diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 486b5d92496..716290a5806 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -76,7 +76,7 @@ void ProtocolGame::AddItem(NetworkMessage &msg, uint16_t id, uint8_t count) msg.addByte(0x01); } if (it.upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } } @@ -191,7 +191,7 @@ void ProtocolGame::AddItem(NetworkMessage &msg, const Item *item) msg.addByte(podiumVisible ? static_cast(boost::get(podiumVisible->value)) : 0x01); } if (it.upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } } @@ -4046,7 +4046,7 @@ void ProtocolGame::sendMarketEnter(uint32_t depotId) msg.add(it->first); if (Item::items[it->first].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(std::min(0xFFFF, it->second)); } @@ -4121,7 +4121,7 @@ void ProtocolGame::sendMarketBrowseItem(uint16_t itemId, const MarketOfferList & msg.addByte(MARKETREQUEST_ITEM_BROWSE); msg.addItemId(itemId); if (Item::items[itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(buyOffers.size()); @@ -4155,7 +4155,7 @@ void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) msg.addByte(MARKETREQUEST_ITEM_BROWSE); msg.addItemId(offer.itemId); if (Item::items[offer.itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } if (offer.type == MARKETACTION_BUY) @@ -4195,7 +4195,7 @@ void ProtocolGame::sendMarketBrowseOwnOffers(const MarketOfferList &buyOffers, c msg.add(offer.counter); msg.addItemId(offer.itemId); if (Item::items[offer.itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(offer.amount); msg.add(offer.price); @@ -4208,7 +4208,7 @@ void ProtocolGame::sendMarketBrowseOwnOffers(const MarketOfferList &buyOffers, c msg.add(offer.counter); msg.addItemId(offer.itemId); if (Item::items[offer.itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(offer.amount); msg.add(offer.price); @@ -4230,7 +4230,7 @@ void ProtocolGame::sendMarketCancelOffer(const MarketOfferEx &offer) msg.add(offer.counter); msg.addItemId(offer.itemId); if (Item::items[offer.itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(offer.amount); msg.add(offer.price); @@ -4244,7 +4244,7 @@ void ProtocolGame::sendMarketCancelOffer(const MarketOfferEx &offer) msg.add(offer.counter); msg.addItemId(offer.itemId); if (Item::items[offer.itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(offer.amount); msg.add(offer.price); @@ -4271,7 +4271,7 @@ void ProtocolGame::sendMarketBrowseOwnHistory(const HistoryMarketOfferList &buyO msg.add(counterMap[it->timestamp]++); msg.addItemId(it->itemId); if (Item::items[it->itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(it->amount); msg.add(it->price); @@ -4288,7 +4288,7 @@ void ProtocolGame::sendMarketBrowseOwnHistory(const HistoryMarketOfferList &buyO msg.add(counterMap[it->timestamp]++); msg.addItemId(it->itemId); if (Item::items[it->itemId].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(it->amount); msg.add(it->price); @@ -4332,7 +4332,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId) const ItemType &it = Item::items[itemId]; if (it.upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } if (it.armor != 0) @@ -6494,7 +6494,7 @@ void ProtocolGame::openImbuementWindow(Item *item) msg.addByte(0xEB); msg.addItemId(item->getID()); if (Item::items[item->getID()].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.addByte(item->getImbuementSlot()); @@ -6853,7 +6853,7 @@ void ProtocolGame::sendItemsPrice() msg.addItemId(it.first); if (Item::items[it.first].upgradeClassification > 0) { - msg.addByte(1); + msg.addByte(0); } msg.add(it.second); msg.add(0);