少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-12 1aeb815836d84ecfddf761a47862efebbba0ad03
Core/GameEngine/Model/ConfigManager.cs
@@ -236,7 +236,7 @@
        AddAsyncTask<FestivalRedpackTaskConfig>();
        AddAsyncTask<HolidayHomingConfig>();
        AddAsyncTask<HolidayHomingPointConfig>();
        while (!AllCompleted())
        {
            var completedCount = 0;
@@ -479,25 +479,14 @@
                    var container = _task.container as Dictionary<string, ConfigBase>;
                    for (int i = 3; i < _task.contentLines.Length; i++)
                    {
                        var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
                        if (contents.Length <= 1)
                        {
                            continue;
                        }
                        var newConfig = new T();
                        newConfig.SetRawContent(contents);
                        newConfig.Parse();
                        newConfig.PostProcess();
                        newConfig.Parse(_task.contentLines[i]);
                        if (newConfig is IConfigPostProcess)
                        {
                            (newConfig as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        newConfig.parsed = true;
                        container[contents[0]] = newConfig;
                        container[newConfig.getKey()] = newConfig;
                        count++;
                        if (count >= 500)
                        {
@@ -586,26 +575,15 @@
        {
            for (int i = 3; i < _task.contentLines.Length; i++)
            {
                var contents = _task.contentLines[i].Split(new string[] { "\t" }, StringSplitOptions.None);
                if (contents.Length <= 1)
                {
                    continue;
                }
                var newConfig = new T();
                newConfig.SetRawContent(contents);
                newConfig.Parse();
                newConfig.PostProcess();
                newConfig.Parse(_task.contentLines[i]);
                if (newConfig is IConfigPostProcess)
                {
                    (newConfig as IConfigPostProcess).OnConfigParseCompleted();
                }
                newConfig.parsed = true;
                _task.container[contents[0]] = newConfig;
                _task.container[newConfig.getKey()] = newConfig;
            }
        }
        catch (Exception ex)
@@ -643,13 +621,6 @@
        else
        {
            config = dic[_dwTemplateID];
        }
        if (config != null && !config.parsed)
        {
            config.Parse();
            config.PostProcess();
            config.parsed = true;
        }
        return config as T;
@@ -708,13 +679,6 @@
        var dicTemplate = configDictionary[token];
        foreach (var value in dicTemplate.Values)
        {
            if (value != null && !value.parsed)
            {
                value.Parse();
                value.PostProcess();
                value.parsed = true;
            }
            configs.Add(value as T);
        }
@@ -752,13 +716,6 @@
        ReadFileFailure = 3,
        ParseFailure = 4,
        ParseSuccess = 5,
    }
    public enum AssetPath
    {
        Resource,
        ResourceOut,
        External,
    }
    private void OnApplicationOut()