local this = class("rogueObjTpl")

function this:init(config)
  self.data = config
end

function this:getTplById(id)
  return self.data[id]
end

function this:getId(tpl)
  return tpl.id
end

function this:getBattleObjectType(tpl)
  return tpl.battleObjectType
end

function this:getDefaultTrigger(tpl)
  return tpl.defaultTrigger
end

function this:getName(tpl)
  return L_Config:provider(tpl.name)
end

function this:getWorldDifficultyObjLevel(tpl)
  return tpl.worldDifficultyObjLevel
end

function this:getDefaultParam(tpl)
  return tpl.defaultParam
end

function this:getUnitId(tpl)
  return tpl.unitId
end

function this:getObjTemplate(tpl)
  return tpl.objTemplate
end

function this:getSievingType(tpl)
  return tpl.sievingType
end

function this:getType(tpl)
  return tpl.type
end

function this:getIcon(tpl)
  local icon = L_Config:getPathByHash(tpl.icon)
  return icon
end

function this:getTip(tpl)
  return tpl.tip
end

function this:getPath(tpl)
  return tpl.path
end

function this:getObjResPath(tpl)
  if tpl.objNameChanged and tpl.objNameChanged ~= "" then
    return L_Config:getPathByHash(tpl.objNameChanged)
  end
  local path = string.format("Item/World/%s.prefab", tpl.objName)
  return path
end

function this:getFuncNpcType(tpl)
  return tpl.funcNpcType
end

function this:getFuncNpcTitle(tpl)
  return L_Config:provider(tpl.funcNpcTitle)
end

function this:getObjHeight(tpl)
  local pos = tpl.objHeight
  return L_Vector3.new(pos.x or 0, pos.y or 0, pos.z or 0)
end

return this
