local this = class("gameConstTpl")

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

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

function this:getValue(key, isNumber, default)
  local val = self.data[key]
  if val == nil then
    return default
  end
  if isNumber then
    return tonumber(val)
  else
    return val
  end
end

function this:getMaleDefaultHeroConfigId()
  return self.data.AVATAR_HERO_ID_MALE
end

function this:getFemaleDefaultHeroConfigId()
  return self.data.AVATAR_HERO_ID_FEMALE
end

function this:getMaleDefaultHeroUnitId()
  return self.data.AVATAR_UNIT_ID_MALE
end

function this:getFemaleDefaultHeroUnitId()
  return self.data.AVATAR_UNIT_ID_FEMALE
end

function this:getFriendLimit()
  return self.data.FRIEND_LIMITS[1]
end

function this:getFriendApplicationLimit()
  return self.data.FRIEND_LIMITS[2]
end

function this:getBlackListLimit()
  return self.data.FRIEND_LIMITS[4]
end

function this:getHomeFoodStorage()
  return self.data.HOME_CANTEEN_BASIC_STORAGE
end

function this:getEntrustStaminaReward()
  return self.data.DUNGEON_ENTRUST_STAMINA_REWARD
end

return this
