16,985
edits
(getPurchaseIcon: Amend logic for certain item bundles introduced in V1.2.2) |
(Add getEquipmentSlotPage function) |
||
Line 29: | Line 29: | ||
return skillData.skillID | return skillData.skillID | ||
end | end | ||
end | |||
end | |||
-- getEquipmentSlotPage: Given a valid equipment slot ID, returns the page name for that slot's | |||
-- equipment. If the slot is not recognized, then nil is returned | |||
function p.getEquipmentSlotPage(equipSlot) | |||
if type(equipSlot) == 'string' then | |||
local slotLinkMap = { | |||
["Helmet"] = 'Helmets', | |||
["Platebody"] = 'Platebodies', | |||
["Platelegs"] = 'Platelegs', | |||
["Boots"] = 'Boots', | |||
["Gloves"] = 'Gloves', | |||
["Cape"] = 'Capes', | |||
["Amulet"] = 'Amulets', | |||
["Ring"] = 'Rings', | |||
["Gem"] = 'Gems (Equipment)', | |||
["Weapon"] = 'Weapons', | |||
["Shield"] = 'Shields', | |||
["Quiver"] = 'Ammunition', | |||
["Consumable"] = 'Consumables', | |||
["Passive"] = 'Combat Passive Slot', | |||
["Summon1"] = 'Summoning', | |||
["Summon2"] = 'Summoning' | |||
} | |||
return slotLinkMap[equipSlot] | |||
end | end | ||
end | end |