4,951
edits
ByteFoolish (talk | contribs) m (AltMagicProducts) |
Falterfire (talk | contribs) (Fixed check for WeaponAttackType for throwing knives and javelins) |
||
(One intermediate revision by one other user not shown) | |||
Line 215: | Line 215: | ||
function p._getWeaponAttackType(item) | function p._getWeaponAttackType(item) | ||
if item.isEquipment == true and item.validSlots ~= nil and Shared.contains(item.validSlots, 'Weapon') then | if item.isEquipment == true and (item.validSlots ~= nil and Shared.contains(item.validSlots, 'Weapon')) or | ||
(item.occupiesSlots ~= nil and Shared.contains(item.occupiesSlots, 'Weapon')) then | |||
if Shared.contains({'melee', 'ranged', 'magic'}, item.attackType) then | if Shared.contains({'melee', 'ranged', 'magic'}, item.attackType) then | ||
local iconType = item.attackType ~= 'melee' and 'skill' or nil | local iconType = item.attackType ~= 'melee' and 'skill' or nil | ||
Line 250: | Line 251: | ||
if potion ~= nil then | if potion ~= nil then | ||
table.insert(resultPart, '\r\n|-') | table.insert(resultPart, '\r\n|-') | ||
table.insert(resultPart, '\r\n|'..Icons.Icon({tierName, type='item', notext= | table.insert(resultPart, '\r\n|'..Icons.Icon({tierName, type='item', notext=true, size='60'})) | ||
table.insert(resultPart, '||'.. | table.insert(resultPart, '||'..Icons.Icon({tierName, tier, type='item', noicon=true})) | ||
table.insert(resultPart, '||'..potion.potionCharges..'||'..potion.description) | table.insert(resultPart, '||'..potion.potionCharges..'||'..potion.description) | ||
end | end | ||
Line 361: | Line 362: | ||
table.insert(resultPart, '!Skillcape!!Name!!Effect') | table.insert(resultPart, '!Skillcape!!Name!!Effect') | ||
table.insert(resultPart, '\r\n|-\r\n|'..Icons.Icon({cape.name, type='item', size='60', notext=true})) | table.insert(resultPart, '\r\n|-\r\n|'..Icons.Icon({cape.name, type='item', size='60', notext=true})) | ||
table.insert(resultPart, '|| | table.insert(resultPart, '||'..Icons.Icon({cape.name, type='item', noicon=true})..'||'..cape.description) | ||
table.insert(resultPart, '\r\n|}') | table.insert(resultPart, '\r\n|}') | ||
return table.concat(resultPart) | return table.concat(resultPart) |