-- 足迹所对应的资源图片（表现数据）
-- Ani 衣柜展示的图片
-- Type 分类
-- Effect 衣柜展示的角色足迹特效title，只是衣柜界面。具体玩家装备后的显示配置在ActionMap3DEffect.ini里
-- Effect1 行走光效
-- Effect2 跳跃光效
-- DlgType 页签：0是所有，1 2 3分别表示类别1 2 3
local FootEffectCollectInfo = {
    [1]={["DlgType"] = 2, ["Type"] = 9001, ["Id"] = 9002, },
	--Blaze的足迹
	[2]={["DlgType"] = 2, ["Type"] = 9006, ["Id"] = 9007, },
	--Zooko的足迹
	[3]={["DlgType"] = 2, ["Type"] = 9007, ["Id"] = 9008, },
	[4]={["DlgType"] = 1, ["Type"] = 9005, ["Id"] = 9005, },
	-- 血蝠幽影
	[5]={["DlgType"] = 1, ["Type"] = 9009, ["Id"] = 9009, },
}

-- 该物品对应的解锁条件
-- VIP消费等级
-- Item 持有物品
local FootEffectCollectCondition = {
	[90019002] = { ["Item"] = 2100095, ["CostVIPLev"] = 0,},
	[90069007] = { ["Item"] = 2169645, ["CostVIPLev"] = 0,},
	[90079008] = { ["Item"] = 2169165, ["CostVIPLev"] = 0,},
	[90059005] = { ["Item"] = 0, ["CostVIPLev"] = 0,},
	[90099009] = { ["Item"] = 0, ["CostVIPLev"] = 0,},
}

local FootEffectInfo = {
    -- EquipType决定了展示的足迹光效，与ActionMap3DEffect.ini里的前三位相对应
    -- FollowEffect是流光光效 Effect是足迹光效 后续编号对应FGUI里的光效loader
    -- PlayTime是衣柜里每次播放的时间
    -- FGuiAct是对应FGUI里的动效名称
    [9001] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 4000, ["EquipType"] = 199, ["Item"] = 2100095, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji2", ["FollowEffect"] = "lianhua_zuji", ["Effect1"] = "lianhua_jump", ["Effect2"] = "lianhua_jump", ["Effect3"] = "lianhua_jump", ["Effect4"] = "", ["Effect5"] = "",},
    -- 下架：踏金留痕
    -- [9002] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 4000, ["EquipType"] = 100, ["Item"] = 0, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji3", ["FollowEffect"] = "zuji_1_1", ["Effect1"] = "zuji_1_2", ["Effect2"] = "zuji_1_2", ["Effect3"] = "zuji_1_2", ["Effect4"] = "", ["Effect5"] = "",},
    -- 下架：夏日祭
    -- [9003] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 4000, ["EquipType"] = 101, ["Item"] = 0, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji4", ["FollowEffect"] = "zuji_2_1", ["Effect1"] = "zuji_2_2", ["Effect2"] = "zuji_2_2", ["Effect3"] = "zuji_2_2", ["Effect4"] = "", ["Effect5"] = "",},
    [9006] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 4000, ["EquipType"] = 199, ["Item"] = 2169645, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji2", ["FollowEffect"] = "lianhua_zuji", ["Effect1"] = "lianhua_jump", ["Effect2"] = "lianhua_jump", ["Effect3"] = "lianhua_jump", ["Effect4"] = "", ["Effect5"] = "",},
    [9007] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 4000, ["EquipType"] = 199, ["Item"] = 2169165, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji2", ["FollowEffect"] = "lianhua_zuji", ["Effect1"] = "lianhua_jump", ["Effect2"] = "lianhua_jump", ["Effect3"] = "lianhua_jump", ["Effect4"] = "", ["Effect5"] = "",},
    [9005] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 3000, ["EquipType"] = 103, ["Item"] = 0, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji5", ["FollowEffect"] = "zuji_5_1", ["Effect1"] = "zuji_5_2", ["Effect2"] = "zuji_5_2", ["Effect3"] = "zuji_5_2", ["Effect4"] = "", ["Effect5"] = "",},
    [9009] = {["FGuiAct"] = "act_preview", ["PlayTime"] = 3000, ["EquipType"] = 104, ["Item"] = 0, ["HotTag"] = 0, ["NewTag"] = 0, ["Ani"] = "yigui_zuji6", ["FollowEffect"] = "zuji_6_1", ["Effect1"] = "zuji_6_2", ["Effect2"] = "zuji_6_2", ["Effect3"] = "zuji_6_2", ["Effect4"] = "", ["Effect5"] = "",},

}

--上面配置的EquipType如果有新增的足迹类型得通知资管，同步ActionMap3DEffect.ini中添加响应的足迹光效，
--例如：[1999991104999]，[1999991105999]修改前三位199，代表武器类型，新增两条，这个是给穿戴藏品伞后使用的，藏品伞会让跑步的左（动作120），右（动作121）替换成动作左（1104），右（1105）

-- 新增 DefaultDlgType ，用来配置页面打开后默认分类
local DefaultDlgType = 0

local function GetFootEffectCollectInfo(nIndex, key1)
    if nIndex == "DefaultDlgType" then
        return DefaultDlgType
    end

    if nIndex == "Amount" then
        return #FootEffectCollectInfo
    end

    if FootEffectCollectInfo[nIndex] == nil then
        return nil
    end

    if FootEffectCollectInfo[nIndex][key1] == nil then
        return nil
    end

    return FootEffectCollectInfo[nIndex][key1]
end

local function GetFootEffectCollectConditionById(idItem, key1)
    if FootEffectCollectCondition[idItem] == nil then
        return nil
    end

    if FootEffectCollectCondition[idItem][key1] == nil then
        return nil
    end
    
    return FootEffectCollectCondition[idItem][key1]
end

local function GetFootEffectInfo(id, key1)
    if FootEffectInfo[id] == nil then
        return nil
    end

    if FootEffectInfo[id][key1] == nil then
        return nil
    end

    return FootEffectInfo[id][key1]
end

local function GetFootEffectInfo(id, key1)
    if FootEffectInfo[id] == nil then
        return nil
    end

    if FootEffectInfo[id][key1] == nil then
        return nil
    end

    return FootEffectInfo[id][key1]
end

local function Unload()
    FootEffectCollectInfo = nil
end

local FootEffectCollect = {
    Unload = Unload,
    GetFootEffectInfo = GetFootEffectInfo,
    GetFootEffectCollectInfo = GetFootEffectCollectInfo,
    GetFootEffectCollectConditionById = GetFootEffectCollectConditionById,
}

-- global
FootEffectCollect_Unload = FootEffectCollect.Unload
FootEffectCollect_GetFootEffectCollectConditionById = FootEffectCollect.GetFootEffectCollectConditionById
FootEffectCollect_GetFootEffectInfo = FootEffectCollect.GetFootEffectInfo
FootEffectCollect_GetFootEffectCollectInfo = FootEffectCollect.GetFootEffectCollectInfo

return FootEffectCollect