Anonymous

Module:Items/UseTables: Difference between revisions

From Melvor Idle
_getItemUses: Resolve issue where skill use of certain items could be listed twice
m (Fix Summoning non-shard item cost quantity)
(_getItemUses: Resolve issue where skill use of certain items could be listed twice)
Line 94: Line 94:
local addUse = function(useName)
local addUse = function(useName)
local skillID = (type(useName) == 'number' and useName) or SkillEnum[useName]
local skillID = (type(useName) == 'number' and useName) or SkillEnum[useName]
if type(skillID) == 'number' and skillUses[skillID] == nil then
if type(skillID) == 'number' then
skillUses[skillID] = Constants.getSkillName(skillID)
if skillUses[skillID] == nil then
skillUses[skillID] = Constants.getSkillName(skillID)
end
elseif not otherUses[useName] then
elseif not otherUses[useName] then
otherUses[useName] = true
otherUses[useName] = true