17,105
edits
mNo edit summary |
(Adapt to revised data format) |
||
Line 279: | Line 279: | ||
else | else | ||
--Now for handling armour | --Now for handling armour | ||
if type == "Armour" or type == "Melee" then | if type == "Armour" or type == "Melee" then | ||
listItem = | listItem = Items._getItemStat(item, 'defenceLevelRequired') ~= nil or (item.category == 'Combat' and item.type == 'Armour') | ||
elseif type == "Ranged Armour" or type == "Ranged" then | elseif type == "Ranged Armour" or type == "Ranged" then | ||
listItem = | listItem = Items._getItemStat(item, 'rangedLevelRequired') ~= nil or (item.category == 'Combat' and item.type == 'Ranged Armour') | ||
elseif type == "Magic Armour" or type == "Magic" then | elseif type == "Magic Armour" or type == "Magic" then | ||
listItem = | listItem = Items._getItemStat(item, 'magicLevelRequired') or (item.category == 'Combat' and item.type == 'Magic Armour') | ||
else | else | ||
listItem = item.type == type and item.category ~= 'Combat' | listItem = item.type == type and item.category ~= 'Combat' | ||
Line 308: | Line 307: | ||
local isMatch = item.isEquipment | local isMatch = item.isEquipment | ||
if isMatch then | if isMatch then | ||
if style == 'Melee' then | if style == 'Melee' then | ||
if ( | if (Items._getItemStat(item, 'defenceLevelRequired') == nil and Items._getItemStat(item, 'attackLevelRequired') == nil) and not Shared.contains(styleOverrides.Melee, item.name) then isMatch = false end | ||
elseif style == 'Ranged' then | elseif style == 'Ranged' then | ||
if | if Items._getItemStat(item, 'rangedLevelRequired') == nil and not Shared.contains(styleOverrides.Ranged, item.name) then isMatch = false end | ||
elseif style == 'Magic' then | elseif style == 'Magic' then | ||
if | if Items._getItemStat(item, 'magicLevelRequired') == nil and not Shared.contains(styleOverrides.Magic, item.name) then isMatch = false end | ||
elseif style == 'None' then | elseif style == 'None' then | ||
if ( | 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 | 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 | not Shared.contains(styleOverrides.None, item.name) then | ||
Line 477: | Line 475: | ||
--Unfortunately just gonna have to manually check all the changes I think... | --Unfortunately just gonna have to manually check all the changes I think... | ||
getSpecificStatString(Items._getItemStat(item1, 'stabAttackBonus'), Items._getItemStat(item2, 'stabAttackBonus'), '{V} '..Icons.Icon({'Melee', notext=true})..' Stab Bonus') | |||
getSpecificStatString(Items._getItemStat(item1, 'slashAttackBonus'), Items._getItemStat(item2, 'slashAttackBonus'), '{V} '..Icons.Icon({'Melee', notext=true})..' Slash Bonus') | |||
getSpecificStatString(Items._getItemStat(item1, 'blockAttackBonus'), Items._getItemStat(item2, 'blockAttackBonus'), '{V} '..Icons.Icon({'Melee', notext=true})..' Block Bonus') | |||
getSpecificStatString( | |||
getSpecificStatString( | |||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'meleeStrengthBonus'), Items._getItemStat(item2, 'meleeStrengthBonus'), '{V} '..Icons.Icon({'Strength', type='skill', notext=true})..' Strength Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'rangedStrengthBonus'), Items._getItemStat(item2, 'rangedStrengthBonus'), '{V} '..Icons.Icon({'Ranged', type='skill', notext=true})..' Strength Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'magicStrengthBonus'), Items._getItemStat(item2, 'magicStrengthBonus'), '{V}% '..Icons.Icon({'Magic', type='skill', notext=true})..' Damage Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'meleeDefenceBonus'), Items._getItemStat(item2, 'meleeDefenceBonus'), '{V} '..Icons.Icon({'Defence', type='skill', notext=true})..' Defence Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'rangedDefenceBonus'), Items._getItemStat(item2, 'rangedDefenceBonus'), '{V} '..Icons.Icon({'Ranged', type='skill', notext=true})..' Defence Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'magicDefenceBonus'), Items._getItemStat(item2, 'magicDefenceBonus'), '{V} '..Icons.Icon({'Magic', type='skill', notext=true})..' Defence Bonus') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'damageReduction'), Items._getItemStat(item2, 'damageReduction'), '{V}% Damage Reduction') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemModifier(item1, 'increasedSkillXP', 'Slayer'), Items._getItemModifier(item2, 'increasedSkillXP', 'Slayer'), '{V}% '..Icons.Icon({'Slayer', type='skill', notext=true})..' Bonus XP') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'attackLevelRequired'), Items._getItemStat(item2, 'attackLevelRequired'), '{V} '..Icons.Icon({'Attack', type='skill', notext=true})..' Level Required') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'defenceLevelRequired'), Items._getItemStat(item2, 'defenceLevelRequired'), '{V} '..Icons.Icon({'Defence', type='skill', notext=true})..' Level Required') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'rangedLevelRequired'), Items._getItemStat(item2, 'rangedLevelRequired'), '{V} '..Icons.Icon({'Ranged', type='skill', notext=true})..' Level Required') | ||
getSpecificStatString( | getSpecificStatString(Items._getItemStat(item1, 'magicLevelRequired'), Items._getItemStat(item2, 'magicLevelRequired'), '{V} '..Icons.Icon({'Magic', type='skill', notext=true})..' Level Required') | ||
return table.concat(changeArray, '<br/>') | return table.concat(changeArray, '<br/>') |