Module:Items: Difference between revisions

Added getItemByID
(Added getWeaponAttackType)
(Added getItemByID)
Line 5: Line 5:
local Shared = require('Module:Shared')
local Shared = require('Module:Shared')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
function p.getItemByID(ID)
  local result = Shared.clone(ItemData[ID + 1])
  if result ~= nil then
    result.id = ID
  end
  return result
end


function p.getItem(name)
function p.getItem(name)