少年修仙传客户端代码仓库
client_Wu Xijin
2019-05-14 1d425cf61cfa74556de30689633b6e12d81e0042
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已添加
9个文件已修改
606 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/TaskFeedbackConfig.cs 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TaskFeedbackConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskFeedbackModel.cs 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskFeedbackModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskListTip.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/RichEvent.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/RichNormalEvent.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Message/WordAnalysis.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/ReikiRootModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/TreasureSkillCell.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/TreasureSkillWin.cs 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TaskFeedbackConfig.cs
New file
@@ -0,0 +1,214 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Tuesday, May 14, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class TaskFeedbackConfig
{
    public readonly int taskId;
    public readonly int type;
    public readonly string condition;
    public readonly int succGuide;
    public readonly int failGuide;
    public readonly string remind;
    public TaskFeedbackConfig()
    {
    }
    public TaskFeedbackConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out taskId);
            int.TryParse(tables[1],out type);
            condition = tables[2];
            int.TryParse(tables[3],out succGuide);
            int.TryParse(tables[4],out failGuide);
            remind = tables[5];
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, TaskFeedbackConfig> configs = new Dictionary<string, TaskFeedbackConfig>();
    public static TaskFeedbackConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("TaskFeedbackConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        TaskFeedbackConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new TaskFeedbackConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static TaskFeedbackConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<TaskFeedbackConfig> GetValues()
    {
        var values = new List<TaskFeedbackConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/TaskFeedback.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/TaskFeedback.txt");
        }
        var tempConfig = new TaskFeedbackConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new TaskFeedbackConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new TaskFeedbackConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/TaskFeedbackConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b80a883f246077d46ab59d6938182ec9
timeCreated: 1557813920
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/MainInterfacePanel/TaskFeedbackModel.cs
New file
@@ -0,0 +1,217 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Snxxz.UI
{
    public class TaskFeedbackModel : Model
    {
        Dictionary<int, TaskFeedback> m_TaskFeedbacks = new Dictionary<int, TaskFeedback>();
        ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        TaskModel taskModel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
        public override void Init()
        {
            ParseConfig();
        }
        public override void UnInit()
        {
        }
        void ParseConfig()
        {
            var configs = TaskFeedbackConfig.GetValues();
            foreach (var config in configs)
            {
                if (config.type == 100)
                {
                    continue;
                }
                var feedback = new TaskFeedback()
                {
                    taskId = config.taskId,
                    type = (TaskFeedbackType)config.type,
                };
                switch (feedback.type)
                {
                    case TaskFeedbackType.FightPower:
                    case TaskFeedbackType.ReikiPoint:
                    case TaskFeedbackType.Copper:
                        feedback.condition = int.Parse(config.condition);
                        break;
                    case TaskFeedbackType.SideTask:
                        {
                            var array = LitJson.JsonMapper.ToObject<int[][]>(config.condition);
                            if (array != null)
                            {
                                List<int[]> sideTasks = new List<int[]>(array.Length);
                                for (int i = 0; i < array.Length; i++)
                                {
                                    sideTasks.Add(array[i]);
                                }
                                feedback.sideTasks = sideTasks;
                            }
                        }
                        break;
                    case TaskFeedbackType.Equip:
                        {
                            var array = LitJson.JsonMapper.ToObject<int[]>(config.condition);
                            feedback.equipCondition = array;
                        }
                        break;
                }
                m_TaskFeedbacks.Add(config.taskId, feedback);
            }
        }
        public bool TryGetTaskFeedback(int taskId, out TaskFeedback feedback)
        {
            return m_TaskFeedbacks.TryGetValue(taskId, out feedback);
        }
        public void ExecuteTaskFeedback(int taskId)
        {
            TaskFeedback feedback;
            if (TryGetTaskFeedback(taskId, out feedback))
            {
                var config = TaskFeedbackConfig.Get(taskId);
                switch (feedback.type)
                {
                    case TaskFeedbackType.FightPower:
                    case TaskFeedbackType.ReikiPoint:
                    case TaskFeedbackType.Guide:
                    case TaskFeedbackType.Equip:
                        {
                            int condition = 0;
                            if (IsSatisfyCondition(feedback, out condition))
                            {
                                if (config.succGuide != 0)
                                {
                                    ExecuteGuide(config.succGuide);
                                }
                            }
                            else
                            {
                                if (!string.IsNullOrEmpty(config.remind))
                                {
                                    SysNotifyMgr.Instance.ShowTip(config.remind);
                                }
                                if (config.failGuide != 0)
                                {
                                    ExecuteGuide(config.succGuide);
                                }
                            }
                        }
                        break;
                    case TaskFeedbackType.SideTask:
                        {
                            int condition = 0;
                            if (IsSatisfyCondition(feedback, out condition))
                            {
                                if (config.succGuide != 0)
                                {
                                    ExecuteGuide(config.succGuide);
                                }
                            }
                            else
                            {
                                var sideFeedbackConfig = TaskFeedbackConfig.Get(condition);
                                if (!string.IsNullOrEmpty(sideFeedbackConfig.remind))
                                {
                                    SysNotifyMgr.Instance.ShowTip(sideFeedbackConfig.remind);
                                }
                                if (sideFeedbackConfig != null && sideFeedbackConfig.failGuide != 0)
                                {
                                    ExecuteGuide(sideFeedbackConfig.failGuide);
                                }
                            }
                        }
                        break;
                }
            }
        }
        public void ExecuteGuide(int id)
        {
            var config = GuideConfig.Get(id);
            if (config == null)
            {
                DebugEx.LogFormat("引导<color=#ff0000>{0}</color>未添加", id);
                return;
            }
            switch ((GuideType)config.Type)
            {
                case GuideType.Functional:
                    FunctionalGuideCenter.Instance.StartGuide(id);
                    break;
                default:
                    NewBieCenter.Instance.StartNewBieGuide(id);
                    break;
            }
        }
        public bool IsSatisfyCondition(TaskFeedback feedback, out int condition)
        {
            condition = feedback.condition;
            switch (feedback.type)
            {
                case TaskFeedbackType.FightPower:
                    return PlayerDatas.Instance.baseData.FightPoint >= feedback.condition;
                case TaskFeedbackType.SideTask:
                    foreach (var taskId in taskModel.SideQuestsDic.Keys)
                    {
                        for (int i = 0; i < feedback.sideTasks.Count; i++)
                        {
                            if (taskId >= feedback.sideTasks[i][0]
                                && taskId <= feedback.sideTasks[i][1])
                            {
                                condition = taskId;
                                return false;
                            }
                        }
                    }
                    return true;
                case TaskFeedbackType.ReikiPoint:
                    return reikiRootModel.GetReikiRootTotalPoint() >= feedback.condition;
                case TaskFeedbackType.Equip:
                    var items = packModel.GetItems(PackType.Item, new SinglePack.FilterParams()
                    {
                        levels = new List<int>() { feedback.equipCondition[0] },
                        qualitys = new List<int>() { feedback.equipCondition[1] },
                    });
                    return items != null && items.Count > 0;
                case TaskFeedbackType.Copper:
                    return PlayerDatas.Instance.baseData.allCopper >= (ulong)feedback.condition;
                case TaskFeedbackType.Guide:
                    return true;
            }
            return false;
        }
    }
    public struct TaskFeedback
    {
        public int taskId;
        public TaskFeedbackType type;
        public int condition;
        public List<int[]> sideTasks;
        public int[] equipCondition;
    }
    public enum TaskFeedbackType
    {
        FightPower = 1,
        SideTask = 2,
        ReikiPoint = 3,
        Equip = 4,
        Copper = 5,
        Guide = 6,
    }
}
System/MainInterfacePanel/TaskFeedbackModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c55c5981dc69bf44792d505c7cab421e
timeCreated: 1557814038
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/MainInterfacePanel/TaskListTip.cs
@@ -31,6 +31,7 @@
        List<int> _list = new List<int>();//用来控制进行排序
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        TaskModel taskmodel { get { return ModelCenter.Instance.GetModel<TaskModel>(); } }
        ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
        List<int> ListSort = new List<int>();//用于排列顺序(未卡级)
        List<int> ListSort1 = new List<int>();//用于排序(卡级)
@@ -65,6 +66,7 @@
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
            TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
            PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;//数据的刷新(h0418)
            reikiRootModel.onReikiRootPointRefresh += RefreshTaskContent;
            OnCollectingTreasureChangeEvent(TreasureCategory.Human);
            TaskScheduling();//任务排序  
            Selected();//任务选择
@@ -114,30 +116,32 @@
            TaskModel.CardLevelChange -= CardLevelChangeEvent;//卡级任务状态改变
            TreasureNewGotWin.CloseTreasureNewGotWinEvent -= CloseTreasureNewGotWinEvent;
            PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;//数据的刷新(h0418)
            reikiRootModel.onReikiRootPointRefresh -= RefreshTaskContent;
            StopAllCoroutines();
        }
        private void RefreshTaskContent()
        {
            foreach (var key in taskmodel.allMissionDict.Keys)
            {
                int leng = Content.childCount;
                for (int i = 0; i < leng; i++)
                {
                    var childObj = Content.GetChild(i).gameObject;
                    var childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
                    if (childObj.activeSelf && childObjTaskType.TaskID == key)
                    {
                        childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(key);
                    }
                }
            }
        }
        private void Updatefighting(PlayerDataType obj)//等级刷新
        {
            if (obj == PlayerDataType.FightPower)
            {
                foreach (var key in taskmodel.allMissionDict.Keys)
                {
                    var TaskPower = TaskPowerConfig.Get(key);
                    if (TaskPower != null)
                    {
                        int leng = Content.childCount;
                        for (int i = 0; i < leng; i++)
                        {
                            var childObj = Content.GetChild(i).gameObject;
                            var childObjTaskType = Content.GetChild(i).gameObject.GetComponent<TaskType>();
                            if (childObj.activeSelf && childObjTaskType.TaskID == key)
                            {
                                childObj.GetComponent<FlyingShoesTask>().FlyingShoes_Task(key);
                            }
                        }
                    }
                }
                RefreshTaskContent();
            }
        }
System/Message/RichEvent.cs
@@ -25,4 +25,7 @@
    AncientRobotName,//上古战场随机名字
    AuctionBidding,//集市竞价
    RandomChat,
    TaskFeedback,
    MyFightPoint,
    MyReikiRoot,
}
System/Message/RichNormalEvent.cs
@@ -18,6 +18,9 @@
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AncientRobotName, this);
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.AuctionBidding, this);
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.RandomChat, this);
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.TaskFeedback, this);
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.MyFightPoint, this);
        RichTextMgr.Inst.RegisterEvent(RichTextEventEnum.MyReikiRoot, this);
    }
    public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
@@ -127,6 +130,23 @@
                    }
                }
                break;
            case RichTextEventEnum.TaskFeedback:
                {
                    if (href.mSplits.ContainsKey("taskfeedback"))
                    {
                        var taskId = 0;
                        int.TryParse(href.mSplits["taskfeedback"], out taskId);
                        TaskFeedback feedback;
                        var feedbackModel = ModelCenter.Instance.GetModel<TaskFeedbackModel>();
                        if (feedbackModel.TryGetTaskFeedback(taskId, out feedback))
                        {
                            feedbackModel.ExecuteTaskFeedback(taskId);
                            return true;
                        }
                    }
                }
                break;
        }
        return false;
    }
@@ -150,6 +170,47 @@
                    }
                }
                break;
            case RichTextEventEnum.MyFightPoint:
                {
                    var colorType = 0;
                    if (RichTextMgr.Inst.presentRichText != null)
                    {
                        colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
                    }
                    var fightPoint = PlayerDatas.Instance.baseData.FightPoint;
                    var targetValue = int.Parse(dic["myfightpoint"]);
                    if (fightPoint < targetValue)
                    {
                        var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
                        return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(label, fightPoint, "/", targetValue), colorType == 1);
                    }
                    else
                    {
                        var label = dic.ContainsKey("replacelabel2") ? dic["replacelabel2"] : string.Empty;
                        return UIHelper.AppendColor(TextColType.Green, label, colorType == 1);
                    }
                }
            case RichTextEventEnum.MyReikiRoot:
                {
                    var colorType = 0;
                    if (RichTextMgr.Inst.presentRichText != null)
                    {
                        colorType = RichTextMgr.Inst.presentRichText.colorType == RichText.ColorType.Dark ? 0 : 1;
                    }
                    var reikiRootModel = ModelCenter.Instance.GetModel<ReikiRootModel>();
                    var point = reikiRootModel.GetReikiRootTotalPoint();
                    var targetValue = int.Parse(dic["myreikiroot"]);
                    if (point < targetValue)
                    {
                        var label = dic.ContainsKey("replacelabel1") ? dic["replacelabel1"] : string.Empty;
                        return UIHelper.AppendColor(TextColType.Red, StringUtility.Contact(label, point, "/", targetValue), colorType == 1);
                    }
                    else
                    {
                        var label = dic.ContainsKey("replacelabel2") ? dic["replacelabel2"] : string.Empty;
                        return UIHelper.AppendColor(TextColType.Green, label, colorType == 1);
                    }
                }
        }
        return string.Empty;
    }
System/Message/WordAnalysis.cs
@@ -1,4 +1,5 @@
using System;
using Snxxz.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
@@ -147,6 +148,16 @@
                        eventType = RichTextEventEnum.AncientRobotName;
                    }
                    break;
                case "myfightpoint":
                    {
                        eventType = RichTextEventEnum.MyFightPoint;
                    }
                    break;
                case "myreikiroot":
                    {
                        eventType = RichTextEventEnum.MyReikiRoot;
                    }
                    break;
                default:
                    {
                        displayDic.Add(split_value, array[1]);
System/Role/ReikiRootModel.cs
@@ -244,6 +244,16 @@
            return totalPoint;
        }
        public int GetReikiRootTotalPoint()
        {
            var point = 0;
            foreach (var _point in m_ReikiRootPoints.Values)
            {
                point += _point;
            }
            return point;
        }
        public List<ReikiRootRecommend> GetReikiRootRecommendPoint(int point)
        {
            if (point == 0)
System/Skill/TreasureSkillCell.cs
@@ -13,6 +13,9 @@
        [SerializeField] Text m_SkillLevel;
        [SerializeField] Transform m_ContainerLock;
        [SerializeField] Text m_SkillCondition;
        [SerializeField] Transform m_ContainerReiki;
        [SerializeField] Text m_ReikiNone;
        [SerializeField] Image m_ReikiIcon;
        [SerializeField] Transform m_ContainerSelect;
        [SerializeField] Button m_Func;
        [SerializeField] RedpointBehaviour m_Redpoint;
@@ -57,7 +60,23 @@
            m_ContainerSelect.gameObject.SetActive(skillId == model.selectSkill);
            m_SkillLevel.gameObject.SetActive(isSkillUnlock);
            m_ContainerReiki.gameObject.SetActive(isSkillUnlock);
            if (isSkillUnlock)
            {
                var expertSkill = 0;
                if (model.TryGetExpertSkill(skillId, out expertSkill))
                {
                    m_ReikiNone.gameObject.SetActive(false);
                    m_ReikiIcon.gameObject.SetActive(true);
                    var skillConfig = SkillConfig.Get(expertSkill);
                    m_ReikiIcon.SetSprite("XT_LG_" + skillConfig.RequireProperty());
                }
                else
                {
                    m_ReikiNone.gameObject.SetActive(true);
                    m_ReikiIcon.gameObject.SetActive(false);
                }
            }
        }
        void DisplayBase()
System/Skill/TreasureSkillWin.cs
@@ -243,6 +243,7 @@
        private void ExpertSkillRefresh()
        {
            DisplayExpertSkill();
            m_Controller.m_Scorller.RefreshActiveCellViews();
        }
        private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
System/WindowBase/ModelCenter.cs
@@ -234,6 +234,7 @@
            RegisterModel<DungeonUseBuffModel>();
            RegisterModel<AlchemyModel>();
            RegisterModel<OtherPlayerEquipModel>();
            RegisterModel<TaskFeedbackModel>();
            CSharpCallLua.ModelInit();
            inited = true;
Utility/ConfigInitiator.cs
@@ -291,7 +291,8 @@
        normalTasks.Add(new ConfigInitTask("DungeonUseBuffConfig", () => { DungeonUseBuffConfig.Init(); }, () => { return DungeonUseBuffConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("AlchemyCountConfig", () => { AlchemyCountConfig.Init(); }, () => { return AlchemyCountConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("CollectNpcConfig", () => { CollectNpcConfig.Init(); }, () => { return CollectNpcConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("TreasureChapterConfig", () => { TreasureChapterConfig.Init(); }, () => { return TreasureChapterConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("TaskFeedbackConfig", () => { TaskFeedbackConfig.Init(); }, () => { return TaskFeedbackConfig.inited; }));
    }
    static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>();