comparison AskMrRobot-Serializer/AskMrRobot-Serializer.lua @ 73:304d7ebb8e30 v29

small bug fixes for item upgrades, gear swapping
author yellowfive
date Tue, 17 Nov 2015 20:52:06 -0800
parents 6abc0858b45e
children dfea9df158c1
comparison
equal deleted inserted replaced
72:55598ba0d435 73:304d7ebb8e30
607 table.insert(item.bonusIds, tonumber(parts[i])) 607 table.insert(item.bonusIds, tonumber(parts[i]))
608 end 608 end
609 table.sort(item.bonusIds) 609 table.sort(item.bonusIds)
610 end 610 end
611 611
612 -- if numBonuses is 0 and there is a number after it, that is the upgrade id for old items now I guess? 612 -- if there is another part after bonus ids, that is the upgrade id
613 if numBonuses == 0 then 613 if #parts >= 14 + numBonuses then
614 local upgradeId = tonumber(parts[14]) 614 local upgradeId = tonumber(parts[14 + numBonuses])
615 item.upgradeId = upgradeId and upgradeId or 0 615 item.upgradeId = upgradeId and upgradeId or 0
616 else 616 else
617 item.upgradeId = 0 617 item.upgradeId = 0
618 end 618 end
619 619