17,105
edits
m (Items module 0.21 testing) |
mNo edit summary |
||
Line 132: | Line 132: | ||
--Special Overrides: | --Special Overrides: | ||
-- Equipment stats first | -- Equipment stats first | ||
if Shared.contains(ItemData.EquipmentStatKeys, StatName) then | if Shared.contains(ItemData.EquipmentStatKeys, StatName) and item.equipmentStats ~= nil then | ||
local equipStats = p._processEquipmentStats(item.equipmentStats) | for i, stat in pairs(item.equipmentStats) do | ||
result = equipStats[StatName] | if stat['key'] == StatName then | ||
result = stat['value'] | |||
break | |||
end | |||
end | |||
--local equipStats = p._processEquipmentStats(item.equipmentStats) | |||
--result = equipStats[StatName] | |||
elseif StatName == 'isTwoHanded' then | elseif StatName == 'isTwoHanded' then | ||
if item.validSlots ~= nil and item.occupiesSlots ~= nil then | if item.validSlots ~= nil and item.occupiesSlots ~= nil then |