17,105
edits
Falterfire (talk | contribs) (Fixed Cape of Completion being counted as a Skillcape) |
m (Amend indentation) |
||
Line 247: | Line 247: | ||
local category = args.category ~= nil and args.category or 'Combat' | local category = args.category ~= nil and args.category or 'Combat' | ||
--Find out what Ammo Type we're working with | |||
local ammoType = nil | local ammoType = nil | ||
if ammoTypeStr ~= nil then | if ammoTypeStr ~= nil then | ||
Line 311: | Line 311: | ||
elseif style == 'None' then | elseif style == 'None' then | ||
if (Items._getItemStat(item, 'defenceLevelRequired') ~= nil or Items._getItemStat(item, 'rangedLevelRequired') ~= nil or Items._getItemStat(item, 'magicLevelRequired') ~= nil or | if (Items._getItemStat(item, 'defenceLevelRequired') ~= nil or Items._getItemStat(item, 'rangedLevelRequired') ~= nil or Items._getItemStat(item, 'magicLevelRequired') ~= nil or | ||
Shared.contains(styleOverrides.Melee, item.name) or Shared.contains(styleOverrides.Ranged, item.name) or Shared.contains(styleOverrides.Magic, item.name)) and | |||
not Shared.contains(styleOverrides.None, item.name) then | |||
isMatch = false | isMatch = false | ||
end | end | ||
Line 493: | Line 493: | ||
elseif string.upper(category) == 'OTHER' then | elseif string.upper(category) == 'OTHER' then | ||
itemArray = Items.getItems(function(item) | itemArray = Items.getItems(function(item) | ||
return not Shared.contains(item.name, 'Potion') and item.itemsRequired ~= nil and item.validSlots == nil | |||
end) | |||
else | else | ||
if Constants.getEquipmentSlotID(category) == nil then | if Constants.getEquipmentSlotID(category) == nil then | ||
Line 501: | Line 501: | ||
isEquipment = true | isEquipment = true | ||
itemArray = Items.getItems(function(item) | itemArray = Items.getItems(function(item) | ||
return item.itemsRequired ~= nil and Shared.contains(item.validSlots, category) | |||
end) | |||
end | end | ||
table.sort(itemArray, function(a, b) return a.id < b.id end) | table.sort(itemArray, function(a, b) return a.id < b.id end) |