local Info = {
-- [当前动作id]
[100] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[120] = 150,
--	[下个动作id] = 动作融合总时长（单位：毫秒），以此类推
	[130] = 150,

},
-- [当前动作id]
[120] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[100] = 150,
--	[下个动作id] = 动作融合总时长（单位：毫秒），以此类推
	[101] = 0,
	[102] = 0,
	[103] = 0,
	[121] = 0,
},
-- [当前动作id]
[121] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[100] = 150,
--	[下个动作id] = 动作融合总时长（单位：毫秒），以此类推
	[101] = 0,
	[102] = 0,
	[103] = 0,
	[120] = 0,
},
-- [当前动作id]
[101] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[120] = 150,
--	[下个动作id] = 动作融合总时长（单位：毫秒），以此类推
	[121] = 150,
},
-- [当前动作id]
[130] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[100] = 150,
},
-- [当前动作id]
[250] = {
--	[下个动作id] = 动作融合总时长（单位：毫秒）
	[100] = 150,

},
}
-- 参数
--	ActionTo 下一个动作id
--	ActionFrom 当前动作id
-- 返回值
--	单位：毫秒，
--	含义：从ActionFrom动作切到ActionTo动作时，动作融合总时长
local function GetActionTransitionTime(ActionTo, ActionFrom)
	local param = Info[ActionFrom]
	if (param == nil) then
		return 0
	end
	local val = param[ActionTo]
	if (val == nil) then
		return 0
	end
	return val
end

-- 执行前后两个动作
local TowAction = {
	-- 神剑动作1
	[0] = {
		FirstAction = 1112,
		SecondAction = 1113,
	},
	-- 新神剑动作1
	[1] = {
		FirstAction = 1116,
		SecondAction = 1117,
	},
	-- 天尊圣杯摆酷1
	[2] = {
		FirstAction = 3108,
		SecondAction = 3110,
	},
	-- 天尊圣杯摆酷2
	[3] = {
		FirstAction = 3109,
		SecondAction = 3110,
	},
	-- 新天尊圣杯摆酷1
	[4] = {
		FirstAction = 3102,
		SecondAction = 3103,
	},
	-- 新天尊圣杯摆酷2
	[5] = {
		FirstAction = 3104,
		SecondAction = 3105,
	},
	-- 炫耀动作3
	[6] = {
		FirstAction = 1114,
		SecondAction = 1115,
	},
	-- 灵宠互动动作
	[7] = {
		FirstAction = 60,
		SecondAction = 61,
	},
	-- 灵宠炫耀动作
	[8] = {
		FirstAction = 230,
		SecondAction = 231,
	},		
	-- 灵宠互动动作
	[9] = {
		FirstAction = 3000,
		SecondAction = 3001,
	},
	-- 灵宠互动动作
	[10] = {
		FirstAction = 3010,
		SecondAction = 3011,
	},
	-- 衣柜动作-夏日祭
	[11] = {
		FirstAction = 3100,
		SecondAction = 3101,
	},	
	
	--衣柜动作-外观活动新增
	[12] = {
		FirstAction = 3112,
		SecondAction = 3113,
	},
	
   -- 衣柜新增
   [13] = {
	   FirstAction = 3114,
	   SecondAction = 3115,
   },
}

-- 是否是神剑动作
local function IsFaultAction(action)
	if action == 1112 or action == 1113 or action == 1114 or action == 1115 or action == 1116 or action == 1117 then
		return true
	end
	return false
end

local function GetTwoAction(key, index)
	if key == "Count" then
		local count = 0
		for _, _ in pairs(TowAction) do
			count = count + 1
		end
		return count
	end

	return TowAction[index][key]
end

-- 获取炫耀动作方向
local FlauntDir = {
	[1112] = 7,
	[1114] = 7,
	[1116] = 7,
	[3100] = 7,
	[3101] = 7,
	[3114] = 7,
	[3115] = 7,
}
local function GetFlauntDir(action, dir)
	-- if action == 1112 or action == 1114 or action == 1116 or action == 3108  or action == 3109 then
		-- return 7
	-- end
	if FlauntDir[action] ~= nil then
		return FlauntDir[action]
	end
	return dir
end

-- 清理变量，释放内存
local function Unload()
	RoleSelect = nil
end

local ActionTransition = {
	GetActionTransitionTime = GetActionTransitionTime,
	Unload = Unload,
	GetTwoAction = GetTwoAction,
	GetFlauntDir = GetFlauntDir,
	IsFaultAction = IsFaultAction,
}


-- C++程序使用的global函数名
ActionTransition_GetActionTransitionTime = ActionTransition.GetActionTransitionTime
ActionTransition_Unload = ActionTransition.Unload
ActionTransition_GetTwoAction = ActionTransition.GetTwoAction
ActionTransition_GetFlauntDir = ActionTransition.GetFlauntDir
ActionTransition_IsFaultAction = ActionTransition.IsFaultAction

-- require返回值
return ActionTransition