-- 任务id-任务信息 finishtype 0为寻路至npc 1为打开指定窗口 hide_go = 1隐藏引导按钮
local TaskInfo = {
    -- 常规服
    [0] = {
	[1] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_1", finsihtype = 0, hide_go = 1},
	[2] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_2", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_2", finsihtype = 1},
	[3] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_3", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_3", finsihtype = 1},
	[4] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_4", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_4", finsihtype = 1, hide_go = 1},
--	[5] = { taskname = "Focus Mythforging", taskdesc = "Use Focus Pebble or extract Mythforging once .", finsihtype = 1,hide_go = 1},
    [5] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_5", finsihtype = 1, hide_go = 1},
    [6] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_6", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_6", finsihtype = 1, hide_go = 1},
	[7] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_7", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_7", finsihtype = 1},
	[8] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_8", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_8", finsihtype = 1},
	[9] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_9", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_9", finsihtype = 1},
    [10] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_10", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_10", finsihtype = 0, hide_go = 1},
    [11] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_10", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_11", finsihtype = 0, hide_go = 1},
	[12] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_11", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_12", finsihtype = 0},
	[13] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_12", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_13", finsihtype = 0},
    -- [14] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_13", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_14", finsihtype = 0},
    [14] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_14", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_14", finsihtype = 0},
    [15] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_15", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_15", finsihtype = 0},
	},
        -- 老兵服
    [1] = {
        [1] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", finsihtype = 0, hide_go = 1},
        [2] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_17", finsihtype = 0},
        [3] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_18", finsihtype = 0},
        [4] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_19",finsihtype = 0},
        [5] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_20", finsihtype = 0},
        [6] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_16", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_21", finsihtype = 1, hide_go = 1},
        [7] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_22", finsihtype = 0},
        [8] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_23", finsihtype = 0},
        [9] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_24", finsihtype = 0},
        [10] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_25", finsihtype = 0},
        [11] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_26", finsihtype = 0},
        [12] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_27", finsihtype = 0},
        [13] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_28", finsihtype = 0},
    },
    
        -- 老兵新服
    [2] = {
        [1] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", finsihtype = 0, hide_go = 1},
        [2] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_17", finsihtype = 0},
        [3] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_18", finsihtype = 0},
        [4] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_19",finsihtype = 0},
        [5] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_20", finsihtype = 0},
        [6] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_16", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_21", finsihtype = 1, hide_go = 1},
        [7] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_22", finsihtype = 0},
        [8] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_23", finsihtype = 0},
        [9] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_24", finsihtype = 0},
        [10] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_25", finsihtype = 0},
        [11] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_26", finsihtype = 0},
        [12] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_27", finsihtype = 0},
        [13] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_28", finsihtype = 0},
    },
    -- 掉钱服
    [3] = {
        [1] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", finsihtype = 0, hide_go = 1},
        [2] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_17", finsihtype = 0},
        [3] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_18", finsihtype = 0},
        [4] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_19",finsihtype = 0},
        [5] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_20_COIN", finsihtype = 0},
        [6] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_16", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_21", finsihtype = 1, hide_go = 1},
        [7] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_22", finsihtype = 0},
        [8] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_23", finsihtype = 0},
        [9] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_24", finsihtype = 0},
        [10] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_25", finsihtype = 0},
        [11] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_26", finsihtype = 0},
        [12] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_27", finsihtype = 0},
        [13] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_28", finsihtype = 0},
    },
    
	-- 掉钱新服
    [4] = {
        [1] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_NAME_1", finsihtype = 0, hide_go = 1},
        [2] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_17", finsihtype = 0},
        [3] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_18", finsihtype = 0},
        [4] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_19",finsihtype = 0},
        [5] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_20_COIN", finsihtype = 0},
        [6] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_16", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_21", finsihtype = 1, hide_go = 1},
        [7] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_22", finsihtype = 0},
        [8] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_23", finsihtype = 0},
        [9] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_24", finsihtype = 0},
        [10] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_5", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_25", finsihtype = 0},
        [11] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_26", finsihtype = 0},
        [12] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_27", finsihtype = 0},
        [13] = { taskname = "STR_INI_LUA_BATTLEPASSTASK_NAME_17", taskdesc = "STR_INI_LUA_BATTLEPASSTASK_DESC_28", finsihtype = 0},
    },
}

local function GetTaskInfo(idTask, index, default)
    local serverInfo = nil
	if UserData_IsOldSoldierServer() and UserData_IsNewServer()  then
		serverInfo = TaskInfo[2]
	elseif UserData_IsCoinsServer() and UserData_IsNewServer()  then
		serverInfo = TaskInfo[4]
    elseif UserData_IsOldSoldierServer() then
        serverInfo = TaskInfo[1]
	elseif UserData_IsCoinsServer() then
        serverInfo = TaskInfo[3]
    else
        serverInfo = TaskInfo[0]
    end

    local t = serverInfo[idTask]
    
    if (t ~= nil) then
        local res = t[index]
        
        if (res ~= nil) then
            return res
        end
    end
    
    return default
end

-- 任务id - 打开窗口id
local DlgInfo = {
    -- 常规服
    [0] = {
	[2] = "345-2029",--元灵萃取,
	[3] = "345-2029",
	[4] = "345-2029",
	[7] = "619",	-- 自创武功
	[8] = "588",	-- 炼气界面
	[9] = "345-2026",	-- 神炼界面
    },

    -- 老兵服
    [1] = {
        -- [6] = "2820",	-- 自创武功
        -- [7] = "2201",	-- 炼气界面
        -- [8] = "345-2026",	-- 精炼界面
        [6] = "1035",	-- 排位赛
    },
	 -- 老兵新服
    [2] = {
        -- [6] = "2820",	-- 自创武功
        -- [7] = "2201",	-- 炼气界面
        -- [8] = "345-2026",	-- 精炼界面
        [6] = "1035",	-- 排位赛
    },
	
    -- 掉钱服
    [3] = {
        -- [6] = "2820",	-- 自创武功
        -- [7] = "2201",	-- 炼气界面
        -- [8] = "345-2026",	-- 精炼界面
        [6] = "1035",	-- 排位赛
    },
	 -- 掉钱新服
    [4] = {
        -- [6] = "2820",	-- 自创武功
        -- [7] = "2201",	-- 炼气界面
        -- [8] = "345-2026",	-- 精炼界面
        [6] = "1035",	-- 排位赛
    },
}

local function GetDlgInfo(idTask, default)
    local res = nil
	if UserData_IsOldSoldierServer() and UserData_IsNewServer()  then
		res = DlgInfo[2][idTask]
	elseif UserData_IsCoinsServer() and UserData_IsNewServer()  then
		res = DlgInfo[4][idTask]
    elseif UserData_IsOldSoldierServer() then
        res = DlgInfo[1][idTask]
	elseif UserData_IsCoinsServer() then
        res = DlgInfo[3][idTask]
    else 
        res = DlgInfo[0][idTask]
    end
    
    if (res ~= nil) then
        return res
    end
    
    return default
end

-- 任务id - 寻路信息
local NpcInfo = {
    -- 非激情服
    [0] = {
		--日常任务
		-- [3] = { mapid = 1002, npcid = 9998, x = 275, y = 469},
		--
		-- [1] = { mapid = 1002, npcid = 30219, x = 356, y = 488},
		-- [6] = { mapid = 1002, npcid = 30216, x = 337, y = 491},
		--决战冥城
        [12] = { mapid = 1002, npcid = 3215, x = 274, y = 482},
		--赛马
		-- [14] = { mapid = 1002, npcid = 6001, x = 394, y = 472},
        -- [11] = { mapid = 1002, npcid = 10123, x = 263, y = 439},
		--战旗
		[13] = { mapid = 1002, npcid = 380, x = 319, y = 318},
		-- [13] = { mapid = 1002, npcid = 7879, x = 438, y = 270},
        --运动会
		[14] = { mapid = 1002, npcid = 33251, x = 320, y = 442},
        [15] = { mapid = 1002, npcid = 33251, x = 320, y = 442},
    },
    
    -- 激情服
    [1] = {
		[1] = { mapid = 1002, npcid = 30219, x = 356, y = 488},
		[6] = { mapid = 1002, npcid = 30216, x = 337, y = 491},
		-- [3] = { mapid = 10369, npcid = 0, x = 338, y = 268},
        -- [12] = { mapid = 10364, npcid = 380, x = 225, y = 238},
		-- [13] = { mapid = 10364, npcid = 7879, x = 303, y = 142},
    },
}

-- 任务id 老兵服
local NpcInfo_OSServer = {
    -- 非激情服
    [0] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
    
    -- 激情服
    [1] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
}

-- 任务id 老兵新服
local NpcInfo_OSNewServer = {
    -- 非激情服
    [0] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
    
    -- 激情服
    [1] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
}

-- 掉钱服
local NpcInfo_CoinServer = {
    -- 非激情服
    [0] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
    
    -- 激情服
    [1] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
}

-- 任务id 掉钱新服
local NpcInfo_CoinNewServer = {
    -- 非激情服
    [0] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
    
    -- 激情服
    [1] = {
		[2] = { mapid = 10368, npcid = 32198, x = 465, y = 200},
		[3] = { mapid = 10364, npcid = 31863, x = 301, y = 273},
		[4] = { mapid = 1036, npcid = 6001, x = 189, y = 183},
		[5] = { mapid = 10364, npcid = 31881, x = 307, y = 366},
		[7] = { mapid = 10364, npcid = 17980, x = 315, y = 281},
		[8] = { mapid = 10364, npcid = 31855, x = 256, y = 241},
		[9] = { mapid = 10364, npcid = 31926, x = 241, y = 214},
		[10] = { mapid = 10366, npcid = 20823, x = 530, y = 482},
		[11] = { mapid = 1036, npcid = 31880, x = 292, y = 226},
		[12] = { mapid = 10364, npcid = 7879, x = 289, y = 146},
		[13] = { mapid = 10364, npcid = 1152, x = 261, y = 135},
    },
}


local function GetNpcInfo(isPassion, idTask, nIndex, default)
	-- 老兵新服
	if (UserData_IsOldSoldierServer() and UserData_IsNewServer()) then
		local t = NpcInfo_OSNewServer[isPassion]
    
        if (t ~= nil) then
            local p = t[idTask]
            
            if (p ~= nil) then
                local res = p[nIndex]
                
                if (res ~= nil) then
                    return res
                end
            end
        end
        
        return default
    end

	-- 老兵服
    if UserData_IsOldSoldierServer() or UserData_IsCoinsServer() then
        local t = NpcInfo_OSServer[isPassion]
    
        if (t ~= nil) then
            local p = t[idTask]
            
            if (p ~= nil) then
                local res = p[nIndex]
                
                if (res ~= nil) then
                    return res
                end
            end
        end
        
        return default
    end
	
	-- 掉钱新服
	if (UserData_IsCoinsServer() and UserData_IsNewServer())  then
		local t = NpcInfo_CoinNewServer[isPassion]
    
        if (t ~= nil) then
            local p = t[idTask]
            
            if (p ~= nil) then
                local res = p[nIndex]
                
                if (res ~= nil) then
                    return res
                end
            end
        end
        
        return default
    end
	
	-- 掉钱服
    if UserData_IsCoinsServer() then
        local t = NpcInfo_CoinServer[isPassion]
    
        if (t ~= nil) then
            local p = t[idTask]
            
            if (p ~= nil) then
                local res = p[nIndex]
                
                if (res ~= nil) then
                    return res
                end
            end
        end
        
        return default
    end

    local t = NpcInfo[isPassion]
    
    if (t ~= nil) then
        local p = t[idTask]
        
        if (p ~= nil) then
            local res = p[nIndex]
            
            if (res ~= nil) then
                return res
            end
        end
    end
    
    return default
end

local EffectInfo = {
-- spacex数字间隔
    x = 50, y = 200, spacex = -30,
}

local function GetEffectInfo(index, default)
    local res = EffectInfo[index]
    
    if (res ~= nil) then
        return res
    end
    
    return default
end

-- 清理变量释放内存
local function Unload()
    TaskInfo = nil
    DlgInfo = nil
    NpcInfo = nil
    EffectInfo = nil
end

-- 通过require传给其他Lua脚本使用
local BattlePassTask = {
    GetTaskInfo = GetTaskInfo,
    GetDlgInfo = GetDlgInfo,
    GetNpcInfo = GetNpcInfo,
    GetEffectInfo = GetEffectInfo,
    Unload = Unload,
}

-- C++程序使用的global函数名
BattlePassTask_GetTaskInfo = BattlePassTask.GetTaskInfo
BattlePassTask_GetDlgInfo = BattlePassTask.GetDlgInfo
BattlePassTask_GetNpcInfo = BattlePassTask.GetNpcInfo
BattlePassTask_GetEffectInfo = BattlePassTask.GetEffectInfo
BattlePassTask_Unload = BattlePassTask.Unload

-- require返回值
return BattlePassTask
