2023-07-14 19:35:33 +00:00
|
|
|
|
XExhibitionConfigs = XExhibitionConfigs or {}
|
|
|
|
|
|
|
|
|
|
local TABLE_CHARACTER_EXHIBITION = "Client/Exhibition/Exhibition.tab"
|
|
|
|
|
local TABLE_CHARACTER_EXHIBITION_LEVEL = "Client/Exhibition/ExhibitionLevel.tab"
|
|
|
|
|
local TABLE_CHARACTER_GROW_TASK_INFO = "Share/Exhibition/ExhibitionReward.tab"
|
2024-09-01 20:49:41 +00:00
|
|
|
|
local TABLE_EXHIBITIONLIMIT = "Share/Exhibition/ExhibitionLimit.tab"
|
2023-07-14 19:35:33 +00:00
|
|
|
|
|
|
|
|
|
local DefaultPortraitImagePath = CS.XGame.ClientConfig:GetString("DefaultPortraitImagePath")
|
|
|
|
|
local ExhibitionLevelPoint = {}
|
|
|
|
|
local ExhibitionConfig = {}
|
|
|
|
|
local ExhibitionGroupNameConfig = {}
|
|
|
|
|
local ExhibitionGroupLogoConfig = {}
|
|
|
|
|
local ExhibitionGroupDescConfig = {}
|
|
|
|
|
local CharacterExhibitionLevelConfig = {}
|
|
|
|
|
local GrowUpTasksConfig = {}
|
|
|
|
|
local CharacterGrowUpTasksConfig = {}
|
|
|
|
|
local CharacterGrowUpTasksConfigByType = {}
|
|
|
|
|
local CharacterHeadPortrait = {}
|
|
|
|
|
local CharacterGraduationPortrait = {}
|
|
|
|
|
local ExhibitionConfigByTypeAndPort = {}
|
|
|
|
|
local ExhibitionConfigByTypeAndGroup = {}
|
|
|
|
|
local CharacterToExhibitionTypeTable = {}
|
|
|
|
|
local InVisibleGroupTable = {}
|
2024-09-01 20:49:41 +00:00
|
|
|
|
local ExhibitionlimitTable = {}
|
|
|
|
|
local ExhibitionCharacterGroupDic = {}
|
|
|
|
|
|
2023-07-14 19:35:33 +00:00
|
|
|
|
function XExhibitionConfigs.Init()
|
|
|
|
|
CharacterExhibitionLevelConfig = XTableManager.ReadByIntKey(TABLE_CHARACTER_EXHIBITION_LEVEL, XTable.XTableExhibitionLevel, "LevelId")
|
2024-09-01 20:49:41 +00:00
|
|
|
|
ExhibitionlimitTable = XTableManager.ReadByIntKey(TABLE_EXHIBITIONLIMIT, XTable.XTableExhibitionLimit, "CharacterId")
|
2023-07-14 19:35:33 +00:00
|
|
|
|
ExhibitionConfig = XTableManager.ReadByIntKey(TABLE_CHARACTER_EXHIBITION, XTable.XTableCharacterExhibition, "Id")
|
|
|
|
|
for _, v in pairs(ExhibitionConfig) do
|
|
|
|
|
if v.Port ~= nil then
|
|
|
|
|
CharacterHeadPortrait[v.CharacterId] = v.HeadPortrait
|
|
|
|
|
CharacterGraduationPortrait[v.CharacterId] = v.GraduationPortrait
|
2024-09-01 20:49:41 +00:00
|
|
|
|
ExhibitionCharacterGroupDic[v.CharacterId] = { GroupName = v.GroupName, GroupNameEn = v.GroupNameEn }
|
2023-07-14 19:35:33 +00:00
|
|
|
|
ExhibitionGroupNameConfig[v.GroupId] = v.GroupName
|
|
|
|
|
ExhibitionGroupLogoConfig[v.GroupId] = v.GroupLogo
|
|
|
|
|
ExhibitionGroupDescConfig[v.GroupId] = v.GroupDescription
|
|
|
|
|
if v.Type and not ExhibitionConfigByTypeAndPort[v.Type] then
|
|
|
|
|
ExhibitionConfigByTypeAndPort[v.Type] = {}
|
|
|
|
|
ExhibitionConfigByTypeAndGroup[v.Type] = {}
|
|
|
|
|
end
|
|
|
|
|
ExhibitionConfigByTypeAndPort[v.Type][v.Port] = v
|
|
|
|
|
ExhibitionConfigByTypeAndGroup[v.Type][v.GroupId] = v
|
|
|
|
|
if v.Type then
|
|
|
|
|
if not InVisibleGroupTable[v.Type] then InVisibleGroupTable[v.Type] = {} end
|
|
|
|
|
if InVisibleGroupTable[v.Type][v.GroupId] == nil then InVisibleGroupTable[v.Type][v.GroupId] = true end
|
|
|
|
|
if v.InVisible == 1 then InVisibleGroupTable[v.Type][v.GroupId] = false end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
if v.CharacterId and v.CharacterId ~= 0 and not CharacterToExhibitionTypeTable[v.CharacterId] then
|
|
|
|
|
CharacterToExhibitionTypeTable[v.CharacterId] = v.Type
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
GrowUpTasksConfig = XTableManager.ReadByIntKey(TABLE_CHARACTER_GROW_TASK_INFO, XTable.XTableExhibitionReward, "Id")
|
|
|
|
|
for task, v in pairs(GrowUpTasksConfig) do
|
|
|
|
|
if CharacterGrowUpTasksConfig[v.CharacterId] == nil then
|
|
|
|
|
CharacterGrowUpTasksConfig[v.CharacterId] = {}
|
|
|
|
|
end
|
|
|
|
|
CharacterGrowUpTasksConfig[v.CharacterId][task] = v
|
|
|
|
|
local type = CharacterToExhibitionTypeTable[v.CharacterId] or 1
|
|
|
|
|
if not CharacterGrowUpTasksConfigByType[type] then CharacterGrowUpTasksConfigByType[type] = {} end
|
|
|
|
|
if not CharacterGrowUpTasksConfigByType[type][v.Id] then
|
|
|
|
|
CharacterGrowUpTasksConfigByType[type][v.Id] = v
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
ExhibitionLevelPoint[1] = CS.XGame.ClientConfig:GetInt("ExhibitionLevelPoint_01")
|
|
|
|
|
ExhibitionLevelPoint[2] = CS.XGame.ClientConfig:GetInt("ExhibitionLevelPoint_02")
|
|
|
|
|
ExhibitionLevelPoint[3] = CS.XGame.ClientConfig:GetInt("ExhibitionLevelPoint_03")
|
|
|
|
|
ExhibitionLevelPoint[4] = CS.XGame.ClientConfig:GetInt("ExhibitionLevelPoint_04")
|
2024-09-01 20:49:41 +00:00
|
|
|
|
-- ExhibitionLevelPoint[5] = CS.XGame.ClientConfig:GetInt("ExhibitionLevelPoint_05")
|
2023-07-14 19:35:33 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetDefaultPortraitImagePath()
|
|
|
|
|
return DefaultPortraitImagePath
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionLevelPoints()
|
|
|
|
|
return ExhibitionLevelPoint
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetGrowUpLevelMax()
|
|
|
|
|
local maxPoint = 0
|
2024-09-01 20:49:41 +00:00
|
|
|
|
for _, value in pairs(ExhibitionLevelPoint) do
|
|
|
|
|
maxPoint = maxPoint + value
|
2023-07-14 19:35:33 +00:00
|
|
|
|
end
|
|
|
|
|
return maxPoint
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionConfig()
|
|
|
|
|
return ExhibitionConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionPortConfigByType(showType)
|
|
|
|
|
if not showType then return ExhibitionConfig end
|
|
|
|
|
return ExhibitionConfigByTypeAndPort[showType] or {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionGroupNameConfig()
|
|
|
|
|
return ExhibitionGroupNameConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionGroupConfigByType(showType)
|
|
|
|
|
if not showType then return ExhibitionConfig end
|
|
|
|
|
return ExhibitionConfigByTypeAndGroup[showType] or {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionConfigByTypeAndGroup(showType, groupId)
|
|
|
|
|
return ExhibitionConfigByTypeAndGroup[showType][groupId]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionTypeByCharacterId(characterId)
|
|
|
|
|
return CharacterToExhibitionTypeTable[characterId]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionGroupLogoConfig()
|
|
|
|
|
return ExhibitionGroupLogoConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionGroupDescConfig()
|
|
|
|
|
return ExhibitionGroupDescConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionInVisbleGroupTable(exhibitionType)
|
|
|
|
|
return InVisibleGroupTable[exhibitionType] or {}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetIsExhibitionInVisbleGroup(exhibitionType, groupId)
|
|
|
|
|
return InVisibleGroupTable[exhibitionType] and InVisibleGroupTable[exhibitionType][groupId] or false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionLevelConfig()
|
|
|
|
|
return CharacterExhibitionLevelConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetCharacterGrowUpTasks(characterId)
|
|
|
|
|
local config = CharacterGrowUpTasksConfig[characterId]
|
|
|
|
|
if not config then
|
|
|
|
|
XLog.Error("XExhibitionConfigs.GetCharacterGrowUpTasks error: 角色解放配置错误:characterId: " .. characterId .. " ,path: " .. TABLE_CHARACTER_GROW_TASK_INFO)
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
return config
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetCharacterGrowUpTask(characterId, level)
|
|
|
|
|
local levelTasks = XExhibitionConfigs.GetCharacterGrowUpTasks(characterId)
|
|
|
|
|
for _, config in pairs(levelTasks) do
|
|
|
|
|
if config.LevelId == level then
|
|
|
|
|
return config
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetCharacterGrowUpTasksConfig()
|
|
|
|
|
return CharacterGrowUpTasksConfig
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionGrowUpLevelConfig(level)
|
|
|
|
|
return CharacterExhibitionLevelConfig[level]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionLevelNameByLevel(level)
|
|
|
|
|
return CharacterExhibitionLevelConfig[level].Name or ""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionLevelDescByLevel(level)
|
|
|
|
|
return CharacterExhibitionLevelConfig[level].Desc or ""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetExhibitionLevelIconByLevel(level)
|
|
|
|
|
return CharacterExhibitionLevelConfig[level].LevelIcon or ""
|
|
|
|
|
end
|
|
|
|
|
|
2024-09-01 20:49:41 +00:00
|
|
|
|
function XExhibitionConfigs.GetExhibitionGroupByCharId(charId)
|
|
|
|
|
return ExhibitionCharacterGroupDic[charId]
|
|
|
|
|
end
|
|
|
|
|
|
2023-07-14 19:35:33 +00:00
|
|
|
|
function XExhibitionConfigs.GetCharacterHeadPortrait(characterId)
|
|
|
|
|
return CharacterHeadPortrait[characterId]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetCharacterGraduationPortrait(characterId)
|
|
|
|
|
return CharacterGraduationPortrait[characterId]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetGrowUpTasksConfig()
|
|
|
|
|
return GrowUpTasksConfig
|
|
|
|
|
end
|
|
|
|
|
|
2024-09-01 20:49:41 +00:00
|
|
|
|
function XExhibitionConfigs.GetCharacterExhibitonLimitCfgByCharacterId(id)
|
|
|
|
|
return ExhibitionlimitTable[id]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function XExhibitionConfigs.GetAureoleListByCharacterId(id)
|
|
|
|
|
local res = {}
|
|
|
|
|
local idList = ExhibitionlimitTable[id].AureoleIds
|
|
|
|
|
for k, id in pairs(idList) do
|
|
|
|
|
local aureoleCfg = XFashionConfigs.GetAllConfigs(XFashionConfigs.TableKey.FashionAureole)[id]
|
|
|
|
|
res[k] = aureoleCfg
|
|
|
|
|
end
|
|
|
|
|
return res
|
|
|
|
|
end
|
|
|
|
|
|
2023-07-14 19:35:33 +00:00
|
|
|
|
function XExhibitionConfigs.GetGrowUpTasksConfigByType(exhibitionType)
|
|
|
|
|
if not exhibitionType then return GrowUpTasksConfig end
|
|
|
|
|
return CharacterGrowUpTasksConfigByType[exhibitionType] or {}
|
|
|
|
|
end
|