0312 主界面功能
增加真机debug模块:1.输出日志 2.支持非SDK登录 3.GM命令 4.分支下载
26个文件已修改
1 文件已重命名
7个文件已删除
13 文件已复制
17个文件已添加
4740 ■■■■■ 已修改文件
Main/Component/UI/Common/SmoothSlider.cs 120 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/ConfigManager.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/PlayerLVConfig.cs 94 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmConfig.cs 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmLVUPTaskConfig.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/RealmLVUPTaskConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TaskConfig.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/Configs/TaskConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/RealmLVUPTaskConfig.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/RealmLVUPTaskConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/RichTextMsgReplaceConfig.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Config/PartialConfigs/RichTextMsgReplaceConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/Frame/UIFrameMgr.cs 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/GameEngine/Player/PlayerBaseData.cs 111 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/GameEngine/Player/PlayerDatas.cs 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA122_tagUpdatePlayerName.cs 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA122_tagUpdatePlayerName.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM/DTC3202_tagServerResponse.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM/DTC3202_tagServerResponse.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA921_tagUpdatePlayerNameResult.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA921_tagUpdatePlayerNameResult.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB110_tagMCTaskInfo.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB110_tagMCTaskInfo.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/H08_Event/H0801_tagEventTalk.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/H08_Event/H0801_tagEventTalk.cs.meta 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/H32_GM/H3202_tagServerResponse.cs 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HA9_Function/HA921_tagUpdatePlayerNameResult.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HA9_Function/HA921_tagUpdatePlayerNameResult.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB110_tagMCTaskInfo.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB110_tagMCTaskInfo.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Core/NetworkPackage/Socket/ClientSocket.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Main.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Manager/UIManager.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/AssetVersion/InGameDownLoad.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugController.cs 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugLogRecorder.cs 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugLogRecorder.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugLogSetting.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugLogSetting.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Debug/DebugUtility.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/GMCommand/GMCmdPanel.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/GMCommand/GMInputWin.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Login/LoginManager.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/HomeWin.cs 146 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Main/MainWin.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Message/RichTableEvent.cs 784 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Message/SysNotifyMgr.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/OfficialRank.meta 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/OfficialRank/OfficialRankManager.cs 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/OfficialRank/OfficialRankManager.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/PhantasmPavilion/PhantasmPavilionModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/System/Task/TaskManager.cs 1787 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/ComponentExtersion.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/EnumHelper.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Utility/UIHelper.cs 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/SmoothSlider.cs
@@ -4,65 +4,67 @@
using UnityEngine.UI;
    [DisallowMultipleComponent]
    public class SmoothSlider : MonoBehaviour
    {
[DisallowMultipleComponent]
        [SerializeField]
        Slider m_Slider;
        public Slider slider {
            get { return m_Slider; }
        }
public class SmoothSlider : MonoBehaviour
{
        [SerializeField]
        [Range(0, 10)]
        float m_Delay = 0.2f;
        public float delay {
            get { return m_Delay; }
            set {
                m_Delay = Mathf.Clamp(value, 0, 10);
            }
        }
        [SerializeField]
        [Range(0, 1)]
        float m_Value = 0f;
        public float value {
            get {
                return m_Value;
            }
            set {
                m_Value = Mathf.Clamp01(value);
            }
        }
        float refSpeed = 0f;
        public void ResetValue(float _value)
        {
            value = _value;
            if (slider != null)
            {
                slider.value = Mathf.Clamp01(_value);
            }
        }
        void OnEnable()
        {
            refSpeed = 0f;
        }
        void LateUpdate()
        {
            if (slider == null)
            {
                return;
            }
            if (Mathf.Abs(slider.value - value) > 0.001f)
            {
                slider.value = Mathf.SmoothDamp(slider.value, value, ref refSpeed, delay);
            }
        }
    [SerializeField]
    Slider m_Slider;
    public Slider slider {
        get { return m_Slider; }
    }
    [SerializeField]
    [Range(0, 10)]
    float m_Delay = 0.2f;
    public float delay {
        get { return m_Delay; }
        set {
            m_Delay = Mathf.Clamp(value, 0, 10);
        }
    }
    [SerializeField]
    [Range(0, 1)]
    float m_Value = 0f;
    public float value {
        get {
            return m_Value;
        }
        set {
            m_Value = Mathf.Clamp01(value);
        }
    }
    [SerializeField] public Text Text;
    float refSpeed = 0f;
    public void ResetValue(float _value)
    {
        value = _value;
        if (slider != null)
        {
            slider.value = Mathf.Clamp01(_value);
        }
    }
    void OnEnable()
    {
        refSpeed = 0f;
    }
    void LateUpdate()
    {
        if (slider == null)
        {
            return;
        }
        if (Mathf.Abs(slider.value - value) > 0.001f)
        {
            slider.value = Mathf.SmoothDamp(slider.value, value, ref refSpeed, delay);
        }
    }
}
Main/Config/ConfigManager.cs
@@ -33,7 +33,7 @@
        isLoadFinished = false;
        // 加载配置文件
        int totalConfigs = 60;
        int totalConfigs = 63;
        Type[] configTypes = new Type[] {
            typeof(AppointItemConfig),
            typeof(AudioConfig),
@@ -84,12 +84,15 @@
            typeof(PlayerLVConfig),
            typeof(PlayerPropertyConfig),
            typeof(priorbundleConfig),
            typeof(RealmConfig),
            typeof(RealmLVUPTaskConfig),
            typeof(RichTextMsgReplaceConfig),
            typeof(RuleConfig),
            typeof(SkillConfig),
            typeof(StoreConfig),
            typeof(SuccessConfig),
            typeof(SysInfoConfig),
            typeof(TaskConfig),
            typeof(TitleStarUpConfig),
            typeof(TreasureCntAwardConfig),
            typeof(TreasureItemLibConfig),
@@ -289,6 +292,10 @@
        ClearConfigDictionary<PlayerPropertyConfig>();
        // 清空 priorbundleConfig 字典
        ClearConfigDictionary<priorbundleConfig>();
        // 清空 RealmConfig 字典
        ClearConfigDictionary<RealmConfig>();
        // 清空 RealmLVUPTaskConfig 字典
        ClearConfigDictionary<RealmLVUPTaskConfig>();
        // 清空 RichTextMsgReplaceConfig 字典
        ClearConfigDictionary<RichTextMsgReplaceConfig>();
        // 清空 RuleConfig 字典
@@ -301,6 +308,8 @@
        ClearConfigDictionary<SuccessConfig>();
        // 清空 SysInfoConfig 字典
        ClearConfigDictionary<SysInfoConfig>();
        // 清空 TaskConfig 字典
        ClearConfigDictionary<TaskConfig>();
        // 清空 TitleStarUpConfig 字典
        ClearConfigDictionary<TitleStarUpConfig>();
        // 清空 TreasureCntAwardConfig 字典
Main/Config/Configs/PlayerLVConfig.cs
@@ -1,56 +1,38 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年5月22日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class PlayerLVConfig : ConfigBase<int, PlayerLVConfig>
{
    public int LV;
    public int EXP1;
    public int EXP2;
    public int TalentPoint;
    public int ReExp;
    public int ReMaxHP;
    public int fightPower;
    public int IceLodeFightPower;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out LV);
            int.TryParse(tables[1],out EXP1);
            int.TryParse(tables[2],out EXP2);
            int.TryParse(tables[3],out TalentPoint);
            int.TryParse(tables[4],out ReExp);
            int.TryParse(tables[5],out ReMaxHP);
            int.TryParse(tables[6],out fightPower);
            int.TryParse(tables[7],out IceLodeFightPower);
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年6月25日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class PlayerLVConfig : ConfigBase<int, PlayerLVConfig>
{
    public int LV;
    public long EXP;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out LV);
            long.TryParse(tables[1],out EXP);
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
Main/Config/Configs/RealmConfig.cs
New file
@@ -0,0 +1,74 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年6月25日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class RealmConfig : ConfigBase<int, RealmConfig>
{
    public int Lv;
    public string Name;
    public int LVMax;
    public int[] AddAttrType;
    public int[] AddAttrNum;
    public int Quality;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out Lv);
            Name = tables[1];
            int.TryParse(tables[2],out LVMax);
            if (tables[3].Contains("["))
            {
                AddAttrType = JsonMapper.ToObject<int[]>(tables[3]);
            }
            else
            {
                string[] AddAttrTypeStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AddAttrType = new int[AddAttrTypeStringArray.Length];
                for (int i=0;i<AddAttrTypeStringArray.Length;i++)
                {
                     int.TryParse(AddAttrTypeStringArray[i],out AddAttrType[i]);
                }
            }
            if (tables[4].Contains("["))
            {
                AddAttrNum = JsonMapper.ToObject<int[]>(tables[4]);
            }
            else
            {
                string[] AddAttrNumStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                AddAttrNum = new int[AddAttrNumStringArray.Length];
                for (int i=0;i<AddAttrNumStringArray.Length;i++)
                {
                     int.TryParse(AddAttrNumStringArray[i],out AddAttrNum[i]);
                }
            }
            int.TryParse(tables[5],out Quality);
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
Main/Config/Configs/RealmConfig.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Config/Configs/RealmConfig.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 0d1d159b5ea4e8f48bedf080edf20ad7
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Config/Configs/RealmLVUPTaskConfig.cs
New file
@@ -0,0 +1,62 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年6月25日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class RealmLVUPTaskConfig : ConfigBase<int, RealmLVUPTaskConfig>
{
    public int ID;
    public int Lv;
    public int TaskID;
    public int TaskType;
    public int[] NeedValueList;
    public int[][] AwardItemList;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out ID);
            int.TryParse(tables[1],out Lv);
            int.TryParse(tables[2],out TaskID);
            int.TryParse(tables[3],out TaskType);
            if (tables[4].Contains("["))
            {
                NeedValueList = JsonMapper.ToObject<int[]>(tables[4]);
            }
            else
            {
                string[] NeedValueListStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                NeedValueList = new int[NeedValueListStringArray.Length];
                for (int i=0;i<NeedValueListStringArray.Length;i++)
                {
                     int.TryParse(NeedValueListStringArray[i],out NeedValueList[i]);
                }
            }
            AwardItemList = JsonMapper.ToObject<int[][]>(tables[5].Replace("(", "[").Replace(")", "]"));
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
Main/Config/Configs/RealmLVUPTaskConfig.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Config/Configs/RealmLVUPTaskConfig.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 2f6b0dd2330349748b9e24c850c39554
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Config/Configs/TaskConfig.cs
New file
@@ -0,0 +1,65 @@
//--------------------------------------------------------
//    [Author]:           YYL
//    [  Date ]:           2025年6月26日
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
using LitJson;
public partial class TaskConfig : ConfigBase<int, TaskConfig>
{
    public int TaskID;
    public int Index;
    public int TaskType;
    public int[] TaskConds;
    public int NeedValue;
    public string TaskDescribe;
    public int[][] AwardItemList;
    public override int LoadKey(string _key)
    {
        int key = GetKey(_key);
        return key;
    }
    public override void LoadConfig(string input)
    {
        try {
        string[] tables = input.Split('\t');
        int.TryParse(tables[0],out TaskID);
            int.TryParse(tables[1],out Index);
            int.TryParse(tables[2],out TaskType);
            if (tables[3].Contains("["))
            {
                TaskConds = JsonMapper.ToObject<int[]>(tables[3]);
            }
            else
            {
                string[] TaskCondsStringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                TaskConds = new int[TaskCondsStringArray.Length];
                for (int i=0;i<TaskCondsStringArray.Length;i++)
                {
                     int.TryParse(TaskCondsStringArray[i],out TaskConds[i]);
                }
            }
            int.TryParse(tables[4],out NeedValue);
            TaskDescribe = tables[5];
            AwardItemList = JsonMapper.ToObject<int[][]>(tables[6].Replace("(", "[").Replace(")", "]"));
        }
        catch (Exception exception)
        {
            Debug.LogError(exception);
        }
    }
}
Main/Config/Configs/TaskConfig.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Config/Configs/TaskConfig.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 50f99bcf5e945de479ec59c4f7ba2679
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Config/PartialConfigs/RealmLVUPTaskConfig.cs
New file
@@ -0,0 +1,39 @@
using System.Collections.Generic;
using System.Linq;
public partial class RealmLVUPTaskConfig : ConfigBase<int, RealmLVUPTaskConfig>
{
    //官职:任务ID:索引id
    private static Dictionary<int, Dictionary<int, int>> missionDict = new Dictionary<int, Dictionary<int, int>>();
    protected override void OnConfigParseCompleted()
    {
        if (!missionDict.ContainsKey(Lv))
        {
            missionDict.Add(Lv, new Dictionary<int, int>());
        }
        missionDict[Lv][TaskID] = ID;
    }
    public static int GetID(int realmLV, int taskID)
    {
        if (missionDict.ContainsKey(realmLV) && missionDict[realmLV].ContainsKey(taskID))
        {
            return missionDict[realmLV][taskID];
        }
        return -1;
    }
    public static List<int> GetMissionIDs(int lv)
    {
        List<int> list = new List<int>();
        if (missionDict.ContainsKey(lv))
        {
            list = missionDict[lv].Keys.ToList();
            list.Sort();
            return list;
        }
        return list;
    }
}
Main/Config/PartialConfigs/RealmLVUPTaskConfig.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Config/PartialConfigs/RealmLVUPTaskConfig.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 1a5f9e407e52f6b499ba29ba0d8f1483
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Config/PartialConfigs/RichTextMsgReplaceConfig.cs
New file
@@ -0,0 +1,24 @@
using System.Collections.Generic;
using UnityEngine;
using LitJson;
public partial class RichTextMsgReplaceConfig : ConfigBase<int, RichTextMsgReplaceConfig>
{
    private static Dictionary<string, RichTextMsgReplaceConfig> m_ReplaceCfgs = new Dictionary<string, RichTextMsgReplaceConfig>();
    protected override void OnConfigParseCompleted()
    {
        m_ReplaceCfgs.Add(StringUtility.Contact(Identification, Number).ToString(), this);
    }
    public static string GetRichReplace(string identify, int number)
    {
        RichTextMsgReplaceConfig replace = null;
        m_ReplaceCfgs.TryGetValue(StringUtility.Contact(identify, number).ToString(), out replace);
        if (replace != null)
        {
            return replace.Content;
        }
        return string.Empty;
    }
}
Main/Config/PartialConfigs/RichTextMsgReplaceConfig.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Config/PartialConfigs/RichTextMsgReplaceConfig.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: a840a1e0c4a502646aac085f98f174d8
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/Frame/UIFrameMgr.cs
@@ -1,84 +1,112 @@
using System.Collections;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIFrameMgr  {
/// <summary>
/// UI帧动画管理器 - 负责帧动画资源的加载和管理
/// </summary>
public class UIFrameMgr {
    private static UIFrameMgr _inst = null;
    private static readonly object _lock = new object();
    public static UIFrameMgr Inst {
        get {
            if (_inst == null) {
                _inst = new UIFrameMgr();
                lock (_lock) {
                    if (_inst == null) {
                        _inst = new UIFrameMgr();
                    }
                }
            }
            return _inst;
        }
    }
    // 表中的所有记录
    // 帧动画资源缓存
    private Dictionary<string, List<Sprite>> allFrameDic = new Dictionary<string, List<Sprite>>();
    //只有聊天表情用到的 根据路径frame来划分
    private List<string> chatFaces = new List<string>();
    // 是否已初始化
    private bool isInitialized = false;
    public UIFrameMgr()
    {
        Init();
    }
    /// <summary>
    /// 初始化管理器
    /// </summary>
    public void Init()
    {
        if (isInitialized)
            return;
        allFrameDic.Clear();
        chatFaces.Clear();
        var dic = FaceConfig.dic.Values;
        foreach (var cfg in dic)
        isInitialized = true;
    }
    /// <summary>
    /// 加载指定帧动画资源
    /// </summary>
    private void LoadFrameSprites(FaceConfig cfg)
    {
        if (allFrameDic.ContainsKey(cfg.name))
            return;
        List<Sprite> spriteList = new List<Sprite>();
        for (int i = 1; i <= cfg.frameCnt; i++)
        {
            if (cfg.frameType == 1 && !chatFaces.Contains(cfg.name))
            string spritePath = "Sprite/" + cfg.folder;
            string spriteName = StringUtility.Contact(cfg.name, "_", i);
            Sprite sprite = ResManager.Instance.LoadAsset<Sprite>(spritePath, spriteName);
            if (sprite != null)
            {
                chatFaces.Add(cfg.name);
                spriteList.Add(sprite);
            }
            for (int i = 1; i <= cfg.frameCnt; i++)
            {
                Sprite sprite = ResManager.Instance.LoadAsset<Sprite>("Sprite/" + cfg.folder, StringUtility.Contact(cfg.name, "_", i));
                if (sprite != null)
                {
                    List<Sprite> list = null;
                    allFrameDic.TryGetValue(cfg.name, out list);
                    if (list != null)
                    {
                        list.Add(sprite);
                    }
                    else
                    {
                        list = new List<Sprite>();
                        list.Add(sprite);
                        allFrameDic.Add(cfg.name, list);
                    }
                }
            }
        }
        if (spriteList.Count > 0)
        {
            allFrameDic.Add(cfg.name, spriteList);
        }
    }
    //所有动态帧
    public Dictionary<string, List<UnityEngine.Sprite>> GetAllFrame()
    /// <summary>
    /// 获取帧动画资源
    /// </summary>
    public List<Sprite> GetDynamicImage(string key)
    {
        return allFrameDic;
        // 按需加载资源
        if (!allFrameDic.ContainsKey(key))
        {
            LoadFrameSprites(FaceConfig.Get(key));
        }
        if (allFrameDic.TryGetValue(key, out var list))
        {
            return list;
        }
        return null;
    }
    //只有聊天表情
    public List<string> GetAllFace()
    {
        return chatFaces;
    }
    public List<UnityEngine.Sprite> GetDynamicImage(string key)
    {
        List<UnityEngine.Sprite> list = null;
        allFrameDic.TryGetValue(key, out list);
        return list;
    }
    /// <summary>
    /// 检查是否包含指定帧动画
    /// </summary>
    public bool ContainsDynamicImage(string key)
    {
        return allFrameDic.ContainsKey(key);
        return FaceConfig.HasKey(key);
    }
}
    /// <summary>
    /// 预加载指定帧动画
    /// </summary>
    public void PreloadDynamicImage(string key)
    {
        if (!allFrameDic.ContainsKey(key))
        {
            LoadFrameSprites(FaceConfig.Get(key));
        }
    }
}
Main/Core/GameEngine/Player/PlayerBaseData.cs
@@ -9,8 +9,9 @@
    public byte Job;    //职业, 
    public ushort LV;    //等级
    public int TitleID;
    public uint ExpPoint;    //扩充经验点数
    public uint TotalExp;    //总经验
    public uint ExpPoint;    //扩充经验点数(亿)
    public uint TotalExp;    //总经验(小于亿部分)
    public ulong curExp { get { return ExpPoint + TotalExp * Constants.ExpPointValue; } }
    public uint FamilyId;    //家族
    public string FamilyName;    //家族名称
    public uint diamond;    //仙玉
@@ -31,7 +32,7 @@
    public string Setting;    //设定
    public byte AttackMode;    //攻击模式
    public byte FBID;    //fb id
    public byte realmLevel;    //旧服务端官阶,现项目用于境界
    public byte realmLevel;    //官职
    public byte VIPLv;    //VIP等级
    public uint ExAttr1;    // 协助目标玩家ID,非0变0退出协助
    public uint teamAutoOperateFlag;    //扩展属性2,各项目专用
@@ -137,58 +138,58 @@
    }
    public void UpdateData(H0102_tagCDBPlayer _serverInfo)
    {
        AccID = _serverInfo.AccID;
        PlayerID = _serverInfo.PlayerID;
        PlayerName = _serverInfo.PlayerName.Trim().Replace("\0", "");
        GMLevel = _serverInfo.GMLevel;
        Job = _serverInfo.Job;
        LV = _serverInfo.LV;
        ExpPoint = _serverInfo.ExpPoint;
        TotalExp = _serverInfo.TotalExp;
        FamilyId = _serverInfo.Family;
        FamilyName = _serverInfo.FamilyName.Trim().Replace("\0", "");
        diamond = _serverInfo.Gold;
        bindDiamond = _serverInfo.GoldPaper;
        copper = _serverInfo.Silver;
        MapID = _serverInfo.MapID;
        PosX = _serverInfo.PosX;
        PosY = _serverInfo.PosY;
        FreePoint = _serverInfo.FreePoint;
        FreeSkillPoint = _serverInfo.FreeSkillPoint;
        STR = _serverInfo.STR;
        PNE = _serverInfo.PNE;
        PHY = _serverInfo.PHY;
        CON = _serverInfo.CON;
        Setting = _serverInfo.Setting;
        FBID = _serverInfo.FBID;
        ExAttr1 = _serverInfo.ExAttr1;
        teamAutoOperateFlag = _serverInfo.ExAttr2;
        dungeonLineId = (int)_serverInfo.ExAttr3 % 1000;
        dungeonMapId = (int)_serverInfo.ExAttr3 / 1000;
        shield = _serverInfo.ExAttr4;
        CrossServerFlag = _serverInfo.ExAttr5;
        realmLevel = _serverInfo.OfficialRank;
        VIPLv = _serverInfo.VIPLv;
        copperExtend = _serverInfo.ExAttr6;
        sp = _serverInfo.ExAttr7;
        spExtend = _serverInfo.ExAttr8;
        bubbleId = _serverInfo.ExAttr10;
        ExAttr11 = _serverInfo.ExAttr11;
        ExAttr16 = _serverInfo.ExAttr16;
        ServerGroupId = _serverInfo.ExAttr13;
        faction = _serverInfo.Faction;
        coinPointTotal = _serverInfo.ChangeCoinPointTotal;
        equipShowSwitch = _serverInfo.EquipShowSwitch;
        mapRealmSelect = (int)_serverInfo.ExAttr18;
        leaveFamilyTime = (int)_serverInfo.ExAttr19;
        face = (int)_serverInfo.Face;
        facePic = (int)_serverInfo.FacePic;
        HP = _serverInfo.HP + _serverInfo.HPEx * Constants.ExpPointValue;
        AttackMode = _serverInfo.AttackMode;
    {
        AccID = _serverInfo.AccID.Trim().Replace("\0", "");
        PlayerID = _serverInfo.PlayerID;
        PlayerName = _serverInfo.PlayerName.Trim().Replace("\0", "");
        GMLevel = _serverInfo.GMLevel;
        Job = _serverInfo.Job;
        LV = _serverInfo.LV;
        ExpPoint = _serverInfo.ExpPoint;
        TotalExp = _serverInfo.TotalExp;
        FamilyId = _serverInfo.Family;
        FamilyName = _serverInfo.FamilyName.Trim().Replace("\0", "");
        diamond = _serverInfo.Gold;
        bindDiamond = _serverInfo.GoldPaper;
        copper = _serverInfo.Silver;
        MapID = _serverInfo.MapID;
        PosX = _serverInfo.PosX;
        PosY = _serverInfo.PosY;
        FreePoint = _serverInfo.FreePoint;
        FreeSkillPoint = _serverInfo.FreeSkillPoint;
        STR = _serverInfo.STR;
        PNE = _serverInfo.PNE;
        PHY = _serverInfo.PHY;
        CON = _serverInfo.CON;
        Setting = _serverInfo.Setting;
        FBID = _serverInfo.FBID;
        ExAttr1 = _serverInfo.ExAttr1;
        teamAutoOperateFlag = _serverInfo.ExAttr2;
        dungeonLineId = (int)_serverInfo.ExAttr3 % 1000;
        dungeonMapId = (int)_serverInfo.ExAttr3 / 1000;
        shield = _serverInfo.ExAttr4;
        CrossServerFlag = _serverInfo.ExAttr5;
        realmLevel = _serverInfo.OfficialRank;
        VIPLv = _serverInfo.VIPLv;
        copperExtend = _serverInfo.ExAttr6;
        sp = _serverInfo.ExAttr7;
        spExtend = _serverInfo.ExAttr8;
        bubbleId = _serverInfo.ExAttr10;
        ExAttr11 = _serverInfo.ExAttr11;
        ExAttr16 = _serverInfo.ExAttr16;
        ServerGroupId = _serverInfo.ExAttr13;
        faction = _serverInfo.Faction;
        coinPointTotal = _serverInfo.ChangeCoinPointTotal;
        equipShowSwitch = _serverInfo.EquipShowSwitch;
        mapRealmSelect = (int)_serverInfo.ExAttr18;
        leaveFamilyTime = (int)_serverInfo.ExAttr19;
        face = (int)_serverInfo.Face;
        facePic = (int)_serverInfo.FacePic;
        HP = _serverInfo.HP + _serverInfo.HPEx * Constants.ExpPointValue;
        AttackMode = _serverInfo.AttackMode;
    }
    // 部分情况需要服务端非重登情况下同步所有数据
Main/Core/GameEngine/Player/PlayerDatas.cs
@@ -49,44 +49,11 @@
        }
    }
    public void UpdatePlayerData(/*HA112_tagMCDBPlayer data*/)
    {
        // baseData.UpdateData(data);
        // if (hero != null)
        // {
        //     hero.InitBornPos(baseData.PosX, baseData.PosY);
        //     CameraController.Instance.Apply();
        // }
        // if (playerDataUpdateEvent != null)
        // {
        //     playerDataUpdateEvent();
        // }
    }
    public void FightRefreshPlayerHp(ulong hp)
    {
        RefreshProperty(PlayerDataType.HP, (uint)(hp % Constants.ExpPointValue), (uint)(hp/Constants.ExpPointValue));
        if (playerDataUpdateEvent != null)
        {
            playerDataUpdateEvent();
        }
        if (playerDataRefreshEvent != null)
        {
            playerDataRefreshEvent(PlayerDataType.HP);
        }
    }
    public void RefreshPlayerData(H0418_tagObjInfoRefresh vNetData)
    {
        UpdatePlayerData(vNetData);
        //StoreModel.RefreshTCBPlayerData(vNetData);
        if (playerDataUpdateEvent != null)
        {
            playerDataUpdateEvent();
        }
    }
@@ -139,7 +106,7 @@
            case PlayerDataType.Family:
                baseData.FamilyId = value;
                if (LocalSave.GetInt("FimilyReport" + PlayerDatas.Instance.baseData.PlayerID) == 0)
                {
                {
                    SDKUtils.Instance.TraceEvent("joinalliance", "", false);
                    LocalSave.SetInt("FimilyReport" + PlayerDatas.Instance.baseData.PlayerID, 1);
                }
@@ -276,7 +243,7 @@
            case PlayerDataType.ExAttr4:
                baseData.shield = value;
                break;
            case PlayerDataType.Faction:
                baseData.faction = value;
                break;
@@ -450,7 +417,7 @@
            case PlayerDataType.CDBPlayerRefresh_TalentPoint:
                extersion.talentPoint = (int)value;
                break;
            case PlayerDataType.CDBPlayerRefresh_SoulDust:
                extersion.soulDust = value;
                break;
@@ -550,6 +517,12 @@
            case PlayerDataType.default10:
                baseData.leaveFamilyTime = (int)value;
                break;
            case PlayerDataType.Face:
                baseData.face = (int)value;
                break;
            case PlayerDataType.FacePic:
                baseData.facePic = (int)value;
                break;
        }
    }
Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA122_tagUpdatePlayerName.cs
New file
@@ -0,0 +1,24 @@
using UnityEngine;
using System.Collections;
//A1 22 角色改名 #tagUpdatePlayerName
public class CA122_tagUpdatePlayerName : GameNetPackBasic {
    public byte NewNameLen;
    public string NewName;
    public byte ItemIndex;    //改名物品在背包中的位置
    public uint ServerID;
    public CA122_tagUpdatePlayerName () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA122;
    }
    public override void WriteToBytes () {
        WriteBytes (NewNameLen, NetDataType.BYTE);
        WriteBytes (NewName, NetDataType.Chars, NewNameLen);
        WriteBytes (ItemIndex, NetDataType.BYTE);
        WriteBytes (ServerID, NetDataType.DWORD);
    }
}
Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA122_tagUpdatePlayerName.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA122_tagUpdatePlayerName.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: bfd244f765fbd414db05f791c73e38d8
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7fb3a2dfae86c3b46b56e9cd44cf514e
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM/DTC3202_tagServerResponse.cs
New file
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;
//32 02 服务器回应客户端消息#tagServerResponse
public class DTC3202_tagServerResponse : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        H3202_tagServerResponse vNetData = vNetPack as H3202_tagServerResponse;
        #if UNITY_EDITOR
        if (vNetData != null)
        {
            Debug.LogFormat("---------- 收到服务端信息: {0}", vNetData.Message);
            ServerTipDetails.ReceivePackage(vNetData.Message);
        }
        #endif
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/H32_GM/DTC3202_tagServerResponse.cs.meta
File was renamed from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 11c9910fc0e719b438f17c3ed8b6fdee
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs
New file
@@ -0,0 +1,13 @@
using UnityEngine;
using System.Collections;
// A3 11 通知玩家境界信息 #tagMCSyncRealmInfo
public class DTCA311_tagMCSyncRealmInfo : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        HA311_tagMCSyncRealmInfo vNetData = vNetPack as HA311_tagMCSyncRealmInfo;
        OfficialRankManager.Instance.ReceivePackage(vNetData);
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA311_tagMCSyncRealmInfo.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: eddef92c6bd46be47aba126094ae9885
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 18c84983810679b419c9e2b6ea25534f
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA921_tagUpdatePlayerNameResult.cs
New file
@@ -0,0 +1,37 @@
using UnityEngine;
using System.Collections;
//A9 21 角色改名结果 #tagUpdatePlayerNameResult
public class DTCA921_tagUpdatePlayerNameResult : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        HA921_tagUpdatePlayerNameResult vNetData = vNetPack as HA921_tagUpdatePlayerNameResult;
        switch ((RoleRenameResult)vNetData.Result)
        {
            case RoleRenameResult.MoneyErr:
                SysNotifyMgr.Instance.ShowTip("GoldErr");
                break;
            case RoleRenameResult.NameRuleErr:
                ServerTipDetails.DisplayNormalTip(Language.Get("L1007"));
                break;
            case RoleRenameResult.NameLengErr:
                break;
            case RoleRenameResult.NameRepeatErr:
                SysNotifyMgr.Instance.ShowTip("RepeatName");
                break;
            case RoleRenameResult.RenameFailErr:
                break;
            case RoleRenameResult.RenameSuccess:
                SysNotifyMgr.Instance.ShowTip("RenameSuccess01");
                // if(WindowCenter.Instance.IsOpen<RoleRenameWin>())
                // {
                //     WindowCenter.Instance.Close<RoleRenameWin>();
                // }
                GameNetSystem.Instance.Reconnect();
                break;
        }
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA921_tagUpdatePlayerNameResult.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HA9_Function/DTCA921_tagUpdatePlayerNameResult.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 98e9e571f8e9a7341acc80bdab67d3bd
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB110_tagMCTaskInfo.cs
New file
@@ -0,0 +1,14 @@
using UnityEngine;
using System.Collections;
using System.Threading.Tasks;
// B1 10 当前任务信息 #tagMCTaskInfo
public class DTCB110_tagMCTaskInfo : DtcBasic {
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        HB110_tagMCTaskInfo vNetData = vNetPack as HB110_tagMCTaskInfo;
        TaskManager.Instance.UpdateTask(vNetData);
    }
}
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB110_tagMCTaskInfo.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB110_tagMCTaskInfo.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 211fc658a1790544faff232ed7b0db28
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -89,7 +89,10 @@
        Register(typeof(HB117_tagMCFaceInfo), typeof(DTCB117_tagMCFaceInfo));
        Register(typeof(HB118_tagMCFacePicInfo), typeof(DTCB118_tagMCFacePicInfo));
        Register(typeof(HB120_tagMCZhanlingInfo), typeof(DTCB120_tagMCZhanlingInfo));
        Register(typeof(HA311_tagMCSyncRealmInfo), typeof(DTCA311_tagMCSyncRealmInfo));
        Register(typeof(HB110_tagMCTaskInfo), typeof(DTCB110_tagMCTaskInfo));
        Register(typeof(HA921_tagUpdatePlayerNameResult), typeof(DTCA921_tagUpdatePlayerNameResult));
        Register(typeof(H3202_tagServerResponse), typeof(DTC3202_tagServerResponse));
    }
Main/Core/NetworkPackage/ServerPack/H08_Event/H0801_tagEventTalk.cs
File was deleted
Main/Core/NetworkPackage/ServerPack/H08_Event/H0801_tagEventTalk.cs.meta
File was deleted
Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs
File was deleted
Main/Core/NetworkPackage/ServerPack/H32_GM/H3202_tagServerResponse.cs
@@ -1,35 +1,19 @@
using UnityEngine;
using System.Collections;
//32 02 服务器回应客户端消息#tagServerResponse
public class H3202_tagServerResponse : GameNetPackBasic {
    public ushort Len;
    public string Message;    //size = Len
    public H3202_tagServerResponse () {
        _cmd = (ushort)0x3202;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Len, vBytes, NetDataType.WORD);
        TransBytes (out Message, vBytes, NetDataType.Chars, Len);
    }
}
//32 02 服务器回应客户端消息#tagServerResponse
public class H3202_tagServerResponse : GameNetPackBasic {
    public ushort Len;
    public string Message;    //size = Len
    public H3202_tagServerResponse () {
        _cmd = (ushort)0x3202;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Len, vBytes, NetDataType.WORD);
        TransBytes (out Message, vBytes, NetDataType.Chars, Len);
    }
}
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs
New file
@@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
// A3 11 通知玩家境界信息 #tagMCSyncRealmInfo
public class HA311_tagMCSyncRealmInfo : GameNetPackBasic {
    public uint TaskAwardState;    //进阶任务领奖状态;按任务ID二进制位存储是否已领取
    public byte TaskValueCount;
    public  tagMCSyncRealmTask[] TaskValueList;    //进阶任务值列表,仅有需要记录的任务才会通知
    public HA311_tagMCSyncRealmInfo () {
        _cmd = (ushort)0xA311;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out TaskAwardState, vBytes, NetDataType.DWORD);
        TransBytes (out TaskValueCount, vBytes, NetDataType.BYTE);
        TaskValueList = new tagMCSyncRealmTask[TaskValueCount];
        for (int i = 0; i < TaskValueCount; i ++) {
            TaskValueList[i] = new tagMCSyncRealmTask();
            TransBytes (out TaskValueList[i].TaskID, vBytes, NetDataType.BYTE);
            TransBytes (out TaskValueList[i].TaskValue, vBytes, NetDataType.DWORD);
        }
    }
    public struct tagMCSyncRealmTask {
        public byte TaskID;
        public uint TaskValue;
    }
}
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/ServerPack/HA3_Function/HA311_tagMCSyncRealmInfo.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 236116d721b320347808b7aca2466b47
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/ServerPack/HA9_Function/HA921_tagUpdatePlayerNameResult.cs
New file
@@ -0,0 +1,17 @@
using UnityEngine;
using System.Collections;
//A9 21 角色改名结果 #tagUpdatePlayerNameResult
public class HA921_tagUpdatePlayerNameResult : GameNetPackBasic {
    public byte Result;    //角色改名结果
    public HA921_tagUpdatePlayerNameResult () {
        _cmd = (ushort)0xA921;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Result, vBytes, NetDataType.BYTE);
    }
}
Main/Core/NetworkPackage/ServerPack/HA9_Function/HA921_tagUpdatePlayerNameResult.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/ServerPack/HA9_Function/HA921_tagUpdatePlayerNameResult.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: bdc9e0587c135cc49a8b9b2ba79329e5
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB110_tagMCTaskInfo.cs
New file
@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
// B1 10 当前任务信息 #tagMCTaskInfo
public class HB110_tagMCTaskInfo : GameNetPackBasic {
    public byte TaskCount;
    public  tagMCTask[] TaskList;
    public HB110_tagMCTaskInfo () {
        _cmd = (ushort)0xB110;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out TaskCount, vBytes, NetDataType.BYTE);
        TaskList = new tagMCTask[TaskCount];
        for (int i = 0; i < TaskCount; i ++) {
            TaskList[i] = new tagMCTask();
            TransBytes (out TaskList[i].TaskGroup, vBytes, NetDataType.BYTE);
            TransBytes (out TaskList[i].TaskID, vBytes, NetDataType.DWORD);
            TransBytes (out TaskList[i].CurValue, vBytes, NetDataType.DWORD);
            TransBytes (out TaskList[i].State, vBytes, NetDataType.BYTE);
        }
    }
    public struct tagMCTask {
        public byte TaskGroup;        // 任务组,0-主线
        public uint TaskID;        // 当前任务ID,可能为0,表示该分组暂时没有任务
        public uint CurValue;        // 当前进度值
        public byte State;        // 任务状态 1-进行中 2-可领取
    }
}
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB110_tagMCTaskInfo.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/Core/NetworkPackage/ServerPack/HB1_Role/HB110_tagMCTaskInfo.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: a4f9527e3b17c574b8c37e8594eb2ef2
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/Core/NetworkPackage/Socket/ClientSocket.cs
@@ -317,10 +317,10 @@
                    vNetpack = PackageRegedit.TransPack(socketType, cmd, vPackBytes);
                    if (vNetpack != null)
                    {
                        if (Launch.Instance.EnableNetLog)
                        {
                            Debug.LogFormat("收包:{0}", vNetpack.GetType().Name);
                        }
                        // if (Launch.Instance.EnableNetLog)
                        // {
                        //     Debug.LogFormat("收包:{0}", vNetpack.GetType().Name);
                        // }
                        m_LastPackageTime = DateTime.Now;
                        GameNetSystem.Instance.PushPackage(vNetpack, this.socketType);
                        isRegist = true;
@@ -362,10 +362,10 @@
            return;
        }
        if (Launch.Instance.EnableNetLog)
        {
            Debug.LogFormat("发包:{0}", protocol.GetType().Name);
        }
        // if (Launch.Instance.EnableNetLog)
        // {
        //     Debug.LogFormat("发包:{0}", protocol.GetType().Name);
        // }
        if (protocol.combineBytes == null)
        {
Main/Main.cs
@@ -67,6 +67,7 @@
        managers.Add(CustomizedGiftModel.Instance);
        managers.Add(ChatManager.Instance);
        managers.Add(ChatBubbleManager.Instance);
        managers.Add(OfficialRankManager.Instance);
        foreach (var manager in managers)
        {
Main/Manager/UIManager.cs
@@ -446,7 +446,9 @@
        foreach (var ui in uiToClose)
        {
            // 记录日志
#if UNITY_EDITOR
            Debug.Log($"销毁长时间未使用的UI: {ui.uiName}, 空闲回合数: {currentRound - ui.lastUsedRound}");
#endif
            // 销毁UI对象
            GameObject.Destroy(ui.gameObject);
        }
@@ -614,7 +616,9 @@
        if (closedUIDict.TryGetValue(uiName, out closedUIList) && closedUIList.Count > 0)
        {
            #if UNITY_EDITOR
            Debug.Log("OpenWindow getFromClosedDict " + uiName);
            #endif
            returnValue = closedUIList[0] as UIBase;
            closedUIList.RemoveAt(0);
@@ -626,7 +630,9 @@
        }
        else
        {
            #if UNITY_EDITOR
            Debug.Log("OpenWindow getNewLoad " + uiName);
            #endif
            returnValue = LoadUIResource(uiName);
            if (returnValue == null)
            {
@@ -752,8 +758,9 @@
        
        // 获取UI类型名称
        string uiName = ui.uiName;
#if UNITY_EDITOR
        Debug.Log("CloseWindow " + uiName + " destroy : " + destroy.ToString());
#endif
        // 收集所有子UI
        List<UIBase> childrenUI = new List<UIBase>();
@@ -810,7 +817,7 @@
        // 关闭UI
        ui.HandleClose();
        OnCloseWindow?.Invoke(ui);
        if (destroy)
        {
            // 销毁UI对象
@@ -824,8 +831,10 @@
                closedUIDict[uiName] = new List<UIBase>();
            }
            closedUIDict[uiName].Add(ui);
#if UNITY_EDITOR
            Debug.Log("CloseWindow " + uiName + " destroy : " + destroy.ToString() + " push to closedUIDict");
#endif
            // 隐藏UI (交给handle close内部自己去做)
            // ui.gameObject.SetActive(false);
Main/System/AssetVersion/InGameDownLoad.cs
@@ -169,10 +169,6 @@
        state = State.None;
        // TODO YYL
        TaskManager.Event_MainlineTask -= OnMainTaskChange;
        TaskManager.Event_MainlineTask += OnMainTaskChange;
        PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerLevelChange;
        PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerLevelChange;
    }
@@ -311,8 +307,6 @@
    //所有任务完成
    private void OnDownLoadFinished()
    {
        //  TODO YYL
        TaskManager.Event_MainlineTask -= OnMainTaskChange;
        PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerLevelChange;
        UIManager.Instance.CloseWindow<InGameDownLoadWin>();
@@ -578,19 +572,6 @@
        }
    }
    //主线任务任务状态变更和刷新
    private void OnMainTaskChange(int _taskId, int _state)
    {
        var mainTaskId = TaskManager.Instance.currentMission;
        if (GeneralDefine.inGameDownLoadTaskCheckPoints.Contains(mainTaskId)
            && TaskManager.Instance.currentMissionState == 1)
        {
            if (CheckDominantDownLoad())
            {
                TryDownLoad(Dominant.Whole);
            }
        }
    }
    //获取最大下载任务数
    public int GetMaxTask()
Main/System/Debug/DebugController.cs
@@ -10,74 +10,29 @@
public class DebugController : MonoBehaviour
{
    // [SerializeField] FPS m_Fps;
    // [SerializeField] Toggle m_ToggleFPS;
    [SerializeField] FPS m_Fps;
    // [SerializeField] DebugVersionShow m_DebugVersion;
    // [SerializeField] Toggle m_ToggleVersion;
    [SerializeField] Text m_Version;
    private void OnEnable()
    {
        // if (m_Fps != null)
        // {
        //     m_Fps.SetActive(m_ToggleFPS.isOn);
        // }
        // m_ToggleFPS.RemoveAllListeners();
        // m_ToggleFPS.AddListener(ToggleFPS);
        // if (m_DebugVersion != null)
        // {
        //     m_DebugVersion.SetActive(m_ToggleVersion.isOn);
        // }
        // m_ToggleVersion.RemoveAllListeners();
        // m_ToggleVersion.AddListener(ToggleVersion);
        m_Version.text = string.Format("{0}_{1} 分支:{2}",
                VersionConfig.Get().version, VersionConfig.Get().buildIndex, VersionConfig.Get().branch);
    }
    void ToggleFPS(bool _value)
    {
        // if (m_Fps != null)
        // {
        //     m_Fps.SetActive(_value);
        // }
    }
    void ToggleVersion(bool _value)
    {
        // if (m_DebugVersion != null)
        // {
        //     m_DebugVersion.SetActive(_value);
        // }
    }
    public void OpenGM()
    {
        // if (!WindowCenter.Instance.IsOpen<GMInputWin>())
        // {
        //     WindowCenter.Instance.Open<GMInputWin>();
        // }
        if (!UIManager.Instance.IsOpened<GMInputWin>())
        {
            UIManager.Instance.OpenWindow<GMInputWin>();
        }
    }
    public void OpenGMCommond()
    {
        // WindowCenter.Instance.Open<GMCmdPanel>();
        UIManager.Instance.OpenWindow<GMCmdPanel>();
    }
    // //public void SendSpecialCTG()
    // //{
    // //    var model = ModelCenter.Instance.GetModel<VipModel>();
    // //    var list = model.GetCTGConfigs(VersionConfig.Get().appId);
    // //    for (int i = 0; i < list.Count; i++)
    // //    {
    // //        var config = CTGConfig.Get(list[i]);
    // //        if (config.PayType == 4)
    // //        {
    // //            model.CTG(config.RecordID);
    // //            return;
    // //        }
    // //    }
    // //}
    public void CleanNewBranchSet()
    {
@@ -85,13 +40,6 @@
        ScrollTip.ShowTip("清理分支设置");
    }
    public void PrintLastCrashLog()
    {
        // if (CrashReport.lastReport != null)
        // {
        //     Debug.LogFormat("崩溃日志:{0}", CrashReport.lastReport);
        // }
    }
}
Main/System/Debug/DebugLogRecorder.cs
File was deleted
Main/System/Debug/DebugLogRecorder.cs.meta
File was deleted
Main/System/Debug/DebugLogSetting.cs
File was deleted
Main/System/Debug/DebugLogSetting.cs.meta
File was deleted
Main/System/Debug/DebugUtility.cs
@@ -12,7 +12,7 @@
    GameObject debugRoot;
    bool m_DebugAccount = false;
    public bool debugAccount
    public bool debugAccount    // 是否开启debug模式
    {
        get { return m_DebugAccount; }
        private set
@@ -20,19 +20,20 @@
            if (m_DebugAccount != value)
            {
                m_DebugAccount = value;
                if (m_DebugAccount)
                {
                    RunTimeExceptionUtility.Instance.Init();
                }
                // if (m_DebugAccount)
                // {
                //     RunTimeExceptionUtility.Instance.Init();
                // }
            }
        }
    }
    public int debugBranch = -1;
    //服务端设置白名单:1.可打开debug模式 2. 可提前登录维护服;缺点需要运维人员配合但安全
    //其他参考: 客户端自己设置的debug模式,增加debug文件;缺点:ios无法操作
    //          聊天设置分支同时会开启debug模式,优点:任何情况下可以独立操作,不安全但无实质性影响
    public bool isWhiteListAccount { get; set; }
    public bool autoLogin { get; private set; }
    public void Init()
    {
@@ -82,123 +83,20 @@
        }
        if (debugAccount)
        {
            Launch.Instance.EnableLog = LocalSave.GetBool("DesignEnableLog", true);
            Launch.Instance.EnableLogWarning = LocalSave.GetBool("DesignEnableLogWarning", true);
            Launch.Instance.EnableLogError = LocalSave.GetBool("DesignEnableLogError", true);
            Launch.Instance.EnableNetLog = false;
        }
        else
        {
            Launch.Instance.EnableLog = false;
            Launch.Instance.EnableLogWarning = false;
            Launch.Instance.EnableLogError = false;
            Launch.Instance.EnableNetLog = false;
        }
        autoLogin = Resources.Load<TextAsset>("AutoLogin") != null;
        if (autoLogin)
        {
            var update = new LogicUpdate(3f);
            update.Start(OnAutoLoginUpdate);
        }
    }
    private void OnAutoLoginUpdate()
    {
        // TODO YYL
        // if (StageLoad.Instance.currentStage is LoginStage)
        // {
            var loginWin = UIManager.Instance.GetUI<LoginWin>();
            if (loginWin != null)
            {
                var accountIpf = loginWin.transform.FindComponent("InputField", "Container_Account/AccountInput");
                if (accountIpf != null)
                {
                    (accountIpf as InputField).text = StringUtility.Contact("Test_", UnityEngine.Random.Range(10000, 99999));
                }
                var enterGame = loginWin.transform.FindComponent("Button", "Container_EnterGame/LoginButton");
                (enterGame as Button).onClick.Invoke();
            }
        // }
        // if (StageLoad.Instance.currentStage is CreateRoleStage)
        // {
        //     var win = WindowCenter.Instance.Get<CreateRoleWin>();
        //     if (win != null)
        //     {
        //         var enterGame = win.transform.FindComponent("Button", "Container_Right/Btn_CreateRole");
        //         if (enterGame is Button)
        //         {
        //             (enterGame as Button).onClick.Invoke();
        //         }
        //     }
        // }
    }
    public void CreateDebugRoot()
    {
        if (debugRoot == null)
        {
            // var prefab = BuiltInLoader.LoadPrefab("UIRootDebug");
            // debugRoot = GameObject.Instantiate(prefab);
            // MonoBehaviour.DontDestroyOnLoad(debugRoot);
            // debugRoot.name = "UIRootDebug";
            var prefab = BuiltInLoader.LoadPrefab("UIRootDebug");
            debugRoot = GameObject.Instantiate(prefab);
            MonoBehaviour.DontDestroyOnLoad(debugRoot);
            debugRoot.name = "UIRootDebug";
        }
    }
    public void RequestWhiteListAuthority(string _account)
    {
        //isWhiteListAccount = false;
        //var tables = new Dictionary<string, string>();
        //tables["channel"] = VersionConfig.Get().appId;
        //tables["player"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
        //tables["game"] = VersionConfig.Get().gameId;
        //HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType, 1, OnDebugAuthority);
    }
    private void OnDebugAuthority(bool _ok, string _result)
    {
        if (_ok)
        {
            var debugAuthority = JsonMapper.ToObject<DebugAuthority>(_result);
            isWhiteListAccount = debugAuthority.dbg == 1;
        }
    }
    public static void SetLogAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLog", _able);
        Launch.Instance.EnableLog = _able;
    }
    public static void SetLogWarningAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLogWarning", _able);
        Launch.Instance.EnableLogWarning = _able;
    }
    public static void SetLogErrorAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLogError", _able);
        Launch.Instance.EnableLogError = _able;
    }
    public static void SetLogNetAble(bool _able)
    {
        Launch.Instance.EnableNetLog = _able;
    }
    struct DebugAuthority
    {
        public int dbg;
    }
    public class DebugBranch
    {
Main/System/GMCommand/GMCmdPanel.cs
@@ -17,13 +17,16 @@
    GMCmdManager _cmdModel;
    GMCmdManager cmdModel{ get { return GMCmdManager.Instance; } }
    protected override void InitComponent()
    {
        _closeBtn.AddListener(OnClickCloseBtn);
    }
    protected override void OnPreOpen()
    {
        base.OnPreOpen();
        _cmdCtrl.OnRefreshCell += RefreshCmdCell;
        _closeBtn.onClick.AddListener(OnClickCloseBtn);
        CreateCmdCell();
    }
Main/System/GMCommand/GMInputWin.cs
@@ -36,18 +36,23 @@
    private List<string> recordCmdlist;
    GMCmdManager cmdModel { get { return GMCmdManager.Instance; } }
    protected override void OnPreOpen()
    protected override void InitComponent()
    {
        base.OnPreOpen();
        _cmdCtrl.OnRefreshCell += RefreshCmdCell;
        _closeBtn.onClick.AddListener(OnClickCloseBtn);
        _lookBtn.onClick.AddListener(OnClickLookBtn);
        _sendBtn.onClick.AddListener(() => { OnClickSendBtn(); });
        _gmInfoBtn.onClick.AddListener(OnClickGMInfoBtn);
        _clearBtn.onClick.AddListener(OnClickClearBtn);
        achieveJumpTestBtn.AddListener(ClickAchieveJumpBtn);
    }
    protected override void OnPreOpen()
    {
        base.OnPreOpen();
        _cmdCtrl.OnRefreshCell += RefreshCmdCell;
        _cmdContent.SetActive(false);
    }
Main/System/Login/LoginManager.cs
@@ -82,10 +82,6 @@
        sdkLogined = true;
        sdkLoginResult = _result;
        if (!DebugUtility.Instance.isWhiteListAccount)
        {
            DebugUtility.Instance.RequestWhiteListAuthority(sdkLoginResult.account);
        }
        ServerListCenter.Instance.RequestServerListPlayer(sdkLoginResult.account);
        SDKUtils.Instance.MakeKeyAndVisible();
@@ -317,22 +313,22 @@
                send.ExtraLen = 0;
                send.Extra = "";
                break;
            case VersionAuthority.Release:
            {
                var deviceInfo = DeviceUtility.GetDeviceModel();
                deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", "");
                var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo);
            case VersionAuthority.Release:
            {
                var deviceInfo = DeviceUtility.GetDeviceModel();
                deviceInfo.Replace(" ", "").Replace("=", "").Replace("%", "").Replace("-", "").Replace("|", "");
                var versionStr = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", deviceInfo);
                send.Extra = StringUtility.Contact(VersionConfig.Get().SpID, "|",
                                                    SDKUtils.Instance.Device.uniqueID, "|",
                                                    sdkLoginResult.token, "|",
                                                    sdkLoginResult.qkUserName, "|",
                                                    versionStr.Substring(0, Math.Min(24, versionStr.Length)));
                Debug.Log("=====> extra: " + send.Extra);
                send.ExtraLen = (ushort)send.Extra.Length;
                                                    versionStr.Substring(0, Math.Min(24, versionStr.Length)));
                Debug.Log("=====> extra: " + send.Extra);
                send.ExtraLen = (ushort)send.Extra.Length;
                send.IDType = (byte)SDKUtils.Instance.ChannelPlatform;
                send.Password = sdkLoginResult.token;
                send.AccID = sdkLoginResult.account;
@@ -356,15 +352,15 @@
                {
                    send.Adult = 0;
                }
                break;
            }
                break;
            }
        }
        return send;
    }
    public string GetVersionStr()
    {
        return StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", InitialFunctionConfig.Get("version").Numerical1);
    {
        return StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex, "_", InitialFunctionConfig.Get("version").Numerical1);
    }
}
Main/System/Main/HomeWin.cs
@@ -8,63 +8,161 @@
/// </summary>
public class HomeWin : UIBase
{
    //头像区
    [SerializeField] AvatarCell avatarCell;
    [SerializeField] Text playerNameText;
    [SerializeField] Text powerText;
    [SerializeField] Text rankName;
    [SerializeField] Text playerLevelText;
    [SerializeField] Slider expSlider;
    [SerializeField] Text officialRankText;
    [SerializeField] Text goldText;
    [SerializeField] Text diamondText;
    [SerializeField] Text sparText;
    //经验区
    [SerializeField] Text playerLevelText;
    [SerializeField] SmoothSlider expSlider;
    //任务区
    [SerializeField] Button taskButton; //引导或者领取任务奖励
    [SerializeField] RichText taskText;
    [SerializeField] Text taskNumText;
    [SerializeField] Image awardIcon;
    [SerializeField] Text awardCnt;
    [SerializeField] UIEffect taskEffect;
    /// <summary>
    /// 初始化组件
    /// </summary>
    protected override void InitComponent()
    {
        avatarCell.button.AddListener(() => { });
        taskButton.AddListener(OnClickTaskButton);
    }
    public override void Refresh()
    {
        UpdatePlayerInfo();
        UpdateCurrency();
        UpdateTask();
    }
    protected override void OnPreOpen()
    {
        PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
        TaskManager.Instance.OnTaskUpdate += UpdateTask;
        Refresh();
    }
    // protected override void OnPreClose()
    // {
    // }
    protected override void OnPreClose()
    {
        PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
        TaskManager.Instance.OnTaskUpdate -= UpdateTask;
    }
    void PlayerDataRefresh(PlayerDataType type)
    {
        switch (type)
        {
            case PlayerDataType.FightPower:
                powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPoint);
                break;
            case PlayerDataType.RealmLevel:
                officialRankText.text = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel).Name;
                break;
            case PlayerDataType.TotalExp:
            case PlayerDataType.ExpPoint:
                ShowExp();
                break;
            case PlayerDataType.Gold:
                goldText.text = UIHelper.GetMoneyCntEx(1).ToString();
                break;
            case PlayerDataType.default33:
                sparText.text = UIHelper.GetMoneyCnt(42).ToString();
                break;
            case PlayerDataType.LV:
                playerLevelText.text = PlayerDatas.Instance.baseData.LV.ToString();
                break;
            case PlayerDataType.Face:
            case PlayerDataType.FacePic:
                avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)PlayerDatas.Instance.baseData.PlayerID,
                                                                PlayerDatas.Instance.baseData.face,
                                                                PlayerDatas.Instance.baseData.facePic));
                break;
        }
    }
    /// <summary>
    /// 更新玩家信息
    /// </summary>
    private void UpdatePlayerInfo()
    {
        // 从玩家数据中获取信息并更新UI
        // 例如:
        // playerNameText.text = PlayerData.Instance.Name;
        // playerLevelText.text = "Lv." + PlayerData.Instance.Level;
        // powerText.text = PlayerData.Instance.Power.ToString();
        // expSlider.value = PlayerData.Instance.ExpRatio;
        avatarCell.InitUI(AvatarHelper.GetAvatarModel((int)PlayerDatas.Instance.baseData.PlayerID,
                                                        PlayerDatas.Instance.baseData.face,
                                                        PlayerDatas.Instance.baseData.facePic));
        playerNameText.text = PlayerDatas.Instance.baseData.PlayerName;
        playerLevelText.text = PlayerDatas.Instance.baseData.LV.ToString();
        powerText.text = UIHelper.ReplaceLargeArtNum(PlayerDatas.Instance.baseData.FightPoint);
        officialRankText.text = RealmConfig.Get(PlayerDatas.Instance.baseData.realmLevel).Name;
        ShowExp();
    }
    void ShowExp()
    {
        var lvConfig = PlayerLVConfig.Get(PlayerDatas.Instance.baseData.LV);
        expSlider.value = (float)PlayerDatas.Instance.baseData.curExp / lvConfig.EXP;
        expSlider.Text.text = PlayerDatas.Instance.baseData.curExp + "/" + PlayerLVConfig.Get(PlayerDatas.Instance.baseData.LV).EXP;
    }
    /// <summary>
    /// 更新货币信息
    /// </summary>
    private void UpdateCurrency()
    {
        // 从玩家数据中获取货币信息并更新UI
        // 例如:
        // goldText.text = PlayerData.Instance.Gold.ToString();
        // diamondText.text = PlayerData.Instance.Diamond.ToString();
        // energyText.text = PlayerData.Instance.Energy + "/" + PlayerData.Instance.MaxEnergy;
        goldText.text = UIHelper.GetMoneyCntEx(1).ToString();
        sparText.text = UIHelper.ReplaceLargeNumEx(UIHelper.GetMoneyCnt(42));
    }
    void UpdateTask()
    {
        var task = TaskManager.Instance.mainTask;
        if (task.TaskID == 0)
        {
            taskButton.SetActive(false);
        }
        else
        {
            taskButton.SetActive(true);
            var taskConfig = TaskConfig.Get(task.TaskID);
            taskText.text = taskConfig.TaskDescribe;
            taskNumText.text = string.Format("({0}/{1})", task.CurValue, taskConfig.NeedValue);
            taskNumText.color = task.CurValue >= taskConfig.NeedValue ? UIHelper.GetUIColor(TextColType.NavyBrown) :  UIHelper.GetUIColor(TextColType.Red);
            taskEffect.SetActive(TaskManager.Instance.GetMainTaskState() == 2);
            awardIcon.SetSprite(ItemConfig.Get(taskConfig.AwardItemList[0][0]).IconKey);
            awardCnt.text = taskConfig.AwardItemList[0][1].ToString();
        }
    }
    void OnClickTaskButton()
    {
        if (TaskManager.Instance.GetMainTaskState() == 2)
        {
            //领取任务奖励
            CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward();
            getReward.RewardType = 66;
            getReward.DataEx = (uint)TaskManager.Instance.mainTask.TaskID;
            GameNetSystem.Instance.SendInfo(getReward);
        }
        else
        {
            //根据任务类型引导
        }
    }
}
Main/System/Main/MainWin.cs
@@ -11,13 +11,15 @@
    // 底部按钮组
    public Button[] bottomTabButtons;
    public Text hammerText;
    
    // 当前选中的底部标签索引
    private int currentTabIndex = 0;
    
    // 当前打开的子界面
    private UIBase currentSubUI;
    /// <summary>
    /// 初始化组件
    /// </summary>
@@ -52,6 +54,7 @@
    protected override void OnPreOpen()
    {
        PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefresh;
        // 默认选中第一个标签
        SelectBottomTab(0);
@@ -59,10 +62,18 @@
        Refresh();
    }
    // protected override void OnPreClose()
    // {
    // }
    protected override void OnPreClose()
    {
        PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefresh;
    }
    void PlayerDataRefresh(PlayerDataType type)
    {
        if (type == PlayerDataType.default26)
        {
            UpdateCurrency();
        }
    }
    
    /// <summary>
@@ -70,11 +81,7 @@
    /// </summary>
    private void UpdateCurrency()
    {
        // 从玩家数据中获取货币信息并更新UI
        // 例如:
        // goldText.text = PlayerData.Instance.Gold.ToString();
        // diamondText.text = PlayerData.Instance.Diamond.ToString();
        // energyText.text = PlayerData.Instance.Energy + "/" + PlayerData.Instance.MaxEnergy;
        hammerText.text = UIHelper.GetMoneyCnt(41).ToString();
    }
    
    /// <summary>
Main/System/Message/RichTableEvent.cs
@@ -3,8 +3,6 @@
using UnityEngine;
// TODO YYL
public class RichTableEvent : TRichTextEvent
{
    public RichTableEvent()
@@ -15,448 +13,332 @@
    public override bool Execute(RichTextEventEnum type, RichTextMgr.HrefInfo href)
    {
        // switch (type)
        // {
        //     case RichTextEventEnum.SHOWITEM:
        //         {
        //             var config = ItemConfig.Get(href.mSplits["showitem"]);
        //             if (config != null)
        //             {
        //                 DisplayItem(config.ID, href);
        //             }
        //         }
        //         break;
        // }
        switch (type)
        {
            case RichTextEventEnum.SHOWITEM:
                {
                    var config = ItemConfig.Get(int.Parse(href.mSplits["showitem"]));
                    if (config != null)
                    {
                        DisplayItem(config.ID, href);
                    }
                }
                break;
        }
        return false;
    }
    
    public override string GetDisplay(RichTextEventEnum type, Dictionary<string, string> _dict)
    {
        // switch (type)
        // {
        //     case RichTextEventEnum.TABLE:
        //         {
        //             if (_dict.ContainsKey("info"))
        //             {
        //                 string info = _dict["info"];
        //                 switch (info)
        //                 {
        //                     case "richtextmsgreplace":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 return RichTextMsgReplaceConfig.GetRichReplace(_dict["name"], id);
        //                             }
        //                         }
        //                         break;
        //                     case "item":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 ItemConfig cfg = ItemConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     var _itemColor = cfg.ItemColor;
        //                                     if (ItemLogicUtility.Instance.IsWing(id))//翅膀
        //                                     {
        //                                         Dictionary<int, List<int>> userdata = null;
        //                                         if (TryGetUserData(_dict, out userdata))
        //                                         {
        //                                             _itemColor = ItemLogicUtility.Instance.GetItemQuality(cfg.ID, userdata);
        //                                         }
        //                                     }
        //                                     var itemName = cfg.ItemName;
        //                                     if (_dict.ContainsKey("chatsend"))
        //                                     {
        //                                         itemName = StringUtility.Contact("[", itemName, "]");
        //                                     }
        //                                     if (_dict.ContainsKey("count"))
        //                                     {
        //                                         var count = 0;
        //                                         int.TryParse(_dict["count"], out count);
        //                                         if (count > 0)
        //                                         {
        //                                             itemName = StringUtility.Contact(itemName, "x", count);
        //                                         }
        //                                     }
        //                                     var suitLabel = string.Empty;
        //                                     if (!_dict.ContainsKey("chatsend"))
        //                                     {
        //                                         var text = RichTextMgr.Inst.presentRichText;
        //                                         int colorType = 0;
        //                                         if (text != null)
        //                                         {
        //                                             colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
        //                                         }
        //                                         if (ItemLogicUtility.Instance.IsSuitEquip(id))
        //                                         {
        //                                             suitLabel = StringUtility.Contact("<Suitname=", UIHelper.GetEquipSuitName(id, colorType == 1), "/>|");
        //                                         }
        //                                     }
        //                                     return StringUtility.Contact(suitLabel, AppendColor(itemName, _itemColor, _dict));
        //                                 }
        //                                 else
        //                                 {
        //                                     Debug.LogError(string.Format("物品表里没有ID{0}对应的物品", id));
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "npc":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 NPCConfig cfg = NPCConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     return cfg.charName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "map":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 var lineId = 0;
        //                                 if (_dict.ContainsKey("lineid") && int.TryParse(_dict["lineid"], out lineId))
        //                                 {
        //                                     var mapResourceConfig = MapResourcesConfig.GetConfig(id, lineId);
        //                                     if (mapResourceConfig != null)
        //                                     {
        //                                         return mapResourceConfig.Name;
        //                                     }
        //                                 }
        //                                 MapConfig cfg = MapConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     return cfg.Name;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "skill":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 SkillConfig cfg = SkillConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     return cfg.SkillName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "fairyquestion":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 QuestionBankConfig cfg = QuestionBankConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     return cfg.question;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "runetower":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 RuneTowerConfig cfg = RuneTowerConfig.Get(id);
        //                                 if (cfg != null)
        //                                 {
        //                                     return cfg.TowerName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "realm":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 RealmConfig _cfg = RealmConfig.Get(id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     var text = RichTextMgr.Inst.presentRichText;
        //                                     int colorType = 0;
        //                                     if (text != null)
        //                                     {
        //                                         colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
        //                                     }
        //                                     return UIHelper.GetRealmName(id, colorType == 1);
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "pet":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 PetInfoConfig _cfg = PetInfoConfig.Get(id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return AppendColor(_cfg.Name, _cfg.Quality, _dict);
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "alchemy":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 AlchemyConfig _cfg = AlchemyConfig.Get(id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.AlchemName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "treasure":
        //                         {
        //                             int id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
        //                             {
        //                                 TreasureConfig _cfg = TreasureConfig.Get(id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.Name;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "godweapon":
        //                         {
        //                             var _type = 0;
        //                             if (_dict.ContainsKey("type") && int.TryParse(_dict["type"], out _type))
        //                             {
        //                                 var _cfg = GodWeaponConfig.GetConfig(_type, 1);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.Name;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "buffdesc":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = SkillConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.BuffDescription;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "property":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = PlayerPropertyConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.Name;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "mount":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = HorseConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return AppendColor(_cfg.Name, _cfg.Quality, _dict);
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "success":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = SuccessConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.Describe;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "osredenvelope":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = OSRedAchieveConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.typeName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "treasureprivilege":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var _cfg = TreasurePrivilegeConfig.Get(_id);
        //                                 if (_cfg != null)
        //                                 {
        //                                     return _cfg.Name;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "towernewrune":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var config = RuneTowerConfig.Get(_id + 1);
        //                                 if (config != null)
        //                                 {
        //                                     var itemConfig = ItemConfig.Get(config.ProductRune);
        //                                     return itemConfig.ItemName;
        //                                 }
        //                                 var towerFloor = RuneTowerFloorConfig.Get(_id * 100 + 8);
        //                                 if (config != null)
        //                                 {
        //                                     var itemConfig = ItemConfig.Get(towerFloor.UnLockCompose);
        //                                     return itemConfig.ItemName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "runetowerfloor":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var config = RuneTowerFloorConfig.Get(_id);
        //                                 if (config != null)
        //                                 {
        //                                     var towerConfig = RuneTowerConfig.Get(config.TowerId);
        //                                     return StringUtility.Contact(towerConfig.TowerName, config.FloorName);
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "skytowerfloor":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var config = SkyTowerConfig.Get(_id);
        //                                 if (config != null)
        //                                 {
        //                                     return config.floorName;
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "coloritem":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var config = ItemConfig.Get(_id);
        //                                 if (config != null)
        //                                 {
        //                                     return StringUtility.Contact(GetItemColorName(config.ItemColor), AppendColor(config.ItemName, config.ItemColor, _dict));
        //                                 }
        //                             }
        //                         }
        //                         break;
        //                     case "crossserverarena":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 var text = RichTextMgr.Inst.presentRichText;
        //                                 int colorType = 0;
        //                                 if (text != null)
        //                                 {
        //                                     colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
        //                                 }
        //                                 return UIHelper.AppendDanLVNameColor(_id, colorType == 1);
        //                             }
        //                         }
        //                         break;
        //                     case "equipsuitname":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 return EquipSuitConfig.GetEquipSuitName(_id);
        //                             }
        //                         }
        //                         break;
        //                     case "title":
        //                         {
        //                             var _id = 0;
        //                             if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
        //                             {
        //                                 return UIHelper.AppendColor(TextColType.Green, DienstgradConfig.Get(_id).Name, true);
        //                             }
        //                         }
        //                         break;
        //                     case "orderInfo":
        //                         {
        //                             if (_dict.ContainsKey("id"))
        //                             {
        //                                 var cpInfo = _dict["id"];
        //                                 string goodsName = string.Empty;
        //                                 OrderInfoConfig orderInfo = null;
        //                                 VipModel vipModel = ModelCenter.Instance.GetModel<VipModel>();
        //                                 if (vipModel.orderInfoToCTGID[cpInfo] != 0)
        //                                 {
        //                                     vipModel.TryGetOrderInfo(vipModel.orderInfoToCTGID[cpInfo], out orderInfo);
        //                                     goodsName = CTGConfig.Get(vipModel.orderInfoToCTGID[cpInfo]).Title;
        //                                 }
        //                                 else
        //                                 {
        //                                     var keys = OrderInfoConfig.GetKeys();
        //                                     for (int i = 0; i < keys.Count; i++)
        //                                     {
        //                                         orderInfo = OrderInfoConfig.Get(keys[i]);
        //                                         if (orderInfo != null && orderInfo.OrderInfo == cpInfo)
        //                                         {
        //                                             break;
        //                                         }
        //                                     }
        //                                     goodsName = Language.Get("DayGoods_1", UIHelper.GetMoneyFormat(orderInfo.PayRMBNum));
        //                                 }
        switch (type)
        {
            case RichTextEventEnum.TABLE:
                {
                    if (_dict.ContainsKey("info"))
                    {
                        string info = _dict["info"];
                        switch (info)
                        {
                            case "richtextmsgreplace":
                                {
                                    int id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    {
                                        return RichTextMsgReplaceConfig.GetRichReplace(_dict["name"], id);
                                    }
                                }
                                break;
                            case "item":
                                {
                                    int id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    {
                                        ItemConfig cfg = ItemConfig.Get(id);
                                        if (cfg != null)
                                        {
                                            var _itemColor = cfg.ItemColor;
                                            if (ItemLogicUtility.Instance.IsWing(id))//翅膀
                                            {
                                                Dictionary<int, List<int>> userdata = null;
                                                if (TryGetUserData(_dict, out userdata))
                                                {
                                                    _itemColor = ItemLogicUtility.Instance.GetItemQuality(cfg.ID, userdata);
                                                }
                                            }
                                            var itemName = cfg.ItemName;
                                            if (_dict.ContainsKey("chatsend"))
                                            {
                                                itemName = StringUtility.Contact("[", itemName, "]");
                                            }
                                            if (_dict.ContainsKey("count"))
                                            {
                                                var count = 0;
                                                int.TryParse(_dict["count"], out count);
                                                if (count > 0)
                                                {
                                                    itemName = StringUtility.Contact(itemName, "x", count);
                                                }
                                            }
                                            var suitLabel = string.Empty;
                                            if (!_dict.ContainsKey("chatsend"))
                                            {
                                                var text = RichTextMgr.Inst.presentRichText;
                                                int colorType = 0;
                                                if (text != null)
                                                {
                                                    colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
                                                }
                                                // if (ItemLogicUtility.Instance.IsSuitEquip(id))
                                                // {
                                                //     suitLabel = StringUtility.Contact("<Suitname=", UIHelper.GetEquipSuitName(id, colorType == 1), "/>|");
                                                // }
                                            }
                                            return StringUtility.Contact(suitLabel, AppendColor(itemName, _itemColor, _dict));
                                        }
                                        else
                                        {
                                            Debug.LogError(string.Format("物品表里没有ID{0}对应的物品", id));
                                        }
                                    }
                                }
                                break;
                            case "npc":
                                {
                                    int id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    {
                                        NPCConfig cfg = NPCConfig.Get(id);
                                        if (cfg != null)
                                        {
                                            return cfg.charName;
                                        }
                                    }
                                }
                                break;
                            case "map":
                                {
                                    //     int id = 0;
                                    //     if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    //     {
                                    //         var lineId = 0;
                                    //         if (_dict.ContainsKey("lineid") && int.TryParse(_dict["lineid"], out lineId))
                                    //         {
                                    //             var mapResourceConfig = MapResourcesConfig.GetConfig(id, lineId);
                                    //             if (mapResourceConfig != null)
                                    //             {
                                    //                 return mapResourceConfig.Name;
                                    //             }
                                    //         }
                                    //         MapConfig cfg = MapConfig.Get(id);
                                    //         if (cfg != null)
                                    //         {
                                    //             return cfg.Name;
                                    //         }
                                    //     }
                                    return "map";
                                 }
                                break;
                            case "skill":
                                {
                                    int id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    {
                                        SkillConfig cfg = SkillConfig.Get(id);
                                        if (cfg != null)
                                        {
                                            return cfg.SkillName;
                                        }
                                    }
                                }
                                break;
                            case "realm":
                                {
                                    int id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    {
                                        RealmConfig _cfg = RealmConfig.Get(id);
                                        if (_cfg != null)
                                        {
                                            var text = RichTextMgr.Inst.presentRichText;
                                            int colorType = 0;
                                            if (text != null)
                                            {
                                                colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
                                            }
                                            return UIHelper.GetRealmName(id, colorType == 1);
                                        }
                                    }
                                }
                                break;
                            case "pet":
                                {
                                    // int id = 0;
                                    // if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out id))
                                    // {
                                    //     PetInfoConfig _cfg = PetInfoConfig.Get(id);
                                    //     if (_cfg != null)
                                    //     {
                                    //         return AppendColor(_cfg.Name, _cfg.Quality, _dict);
                                    //     }
                                    // }
                                    return "pet";
                                }
                                break;
                            case "buffdesc":
                                {
                                    var _id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    {
                                        var _cfg = SkillConfig.Get(_id);
                                        if (_cfg != null)
                                        {
                                            return _cfg.BuffDescription;
                                        }
                                    }
                                }
                                break;
                            case "property":
                                {
                                    var _id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    {
                                        var _cfg = PlayerPropertyConfig.Get(_id);
                                        if (_cfg != null)
                                        {
                                            return _cfg.Name;
                                        }
                                    }
                                }
                                break;
                            case "mount":
                                {
                                    // var _id = 0;
                                    // if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    // {
                                    //     var _cfg = HorseConfig.Get(_id);
                                    //     if (_cfg != null)
                                    //     {
                                    //         return AppendColor(_cfg.Name, _cfg.Quality, _dict);
                                    //     }
                                    // }
                                }
                                break;
                            case "success":
                                {
                                    var _id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    {
                                        var _cfg = SuccessConfig.Get(_id);
                                        if (_cfg != null)
                                        {
                                            return _cfg.Describe;
                                        }
                                    }
                                }
                                break;
        //                                 return goodsName;
        //                             }
        //                         }
        //                         break;
        //                 }
        //             }
        //         }
        //         break;
        // }
                            case "treasureprivilege":
                                {
                                    // var _id = 0;
                                    // if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    // {
                                    //     var _cfg = TreasurePrivilegeConfig.Get(_id);
                                    //     if (_cfg != null)
                                    //     {
                                    //         return _cfg.Name;
                                    //     }
                                    // }
                                    return "treasureprivilege";
                                }
                                break;
                            // case "skytowerfloor":
                            //     {
                            //         var _id = 0;
                            //         if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                            //         {
                            //             var config = SkyTowerConfig.Get(_id);
                            //             if (config != null)
                            //             {
                            //                 return config.floorName;
                            //             }
                            //         }
                            //     }
                            //     break;
                            case "coloritem":
                                {
                                    var _id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    {
                                        var config = ItemConfig.Get(_id);
                                        if (config != null)
                                        {
                                            return StringUtility.Contact(GetItemColorName(config.ItemColor), AppendColor(config.ItemName, config.ItemColor, _dict));
                                        }
                                    }
                                }
                                break;
                            // case "crossserverarena":
                            //     {
                            //         var _id = 0;
                            //         if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                            //         {
                            //             var text = RichTextMgr.Inst.presentRichText;
                            //             int colorType = 0;
                            //             if (text != null)
                            //             {
                            //                 colorType = text.colorType == RichText.ColorType.Dark ? 0 : 1;
                            //             }
                            //             return UIHelper.AppendDanLVNameColor(_id, colorType == 1);
                            //         }
                            //     }
                            //     break;
                            case "title":
                                {
                                    var _id = 0;
                                    if (_dict.ContainsKey("id") && int.TryParse(_dict["id"], out _id))
                                    {
                                        return UIHelper.AppendColor(TextColType.Green, DienstgradConfig.Get(_id).Name, true);
                                    }
                                }
                                break;
                            case "orderInfo":
                                {
                                    if (_dict.ContainsKey("id"))
                                    {
                                        var cpInfo = _dict["id"];
                                        string goodsName = string.Empty;
                                        OrderInfoConfig orderInfo = null;
                                        if (RechargeManager.Instance.orderInfoToCTGID[cpInfo] != 0)
                                        {
                                            RechargeManager.Instance.TryGetOrderInfo(RechargeManager.Instance.orderInfoToCTGID[cpInfo], out orderInfo);
                                            goodsName = CTGConfig.Get(RechargeManager.Instance.orderInfoToCTGID[cpInfo]).Title;
                                        }
                                        else
                                        {
                                            var keys = OrderInfoConfig.GetKeys();
                                            for (int i = 0; i < keys.Count; i++)
                                            {
                                                orderInfo = OrderInfoConfig.Get(keys[i]);
                                                if (orderInfo != null && orderInfo.OrderInfo == cpInfo)
                                                {
                                                    break;
                                                }
                                            }
                                            goodsName = Language.Get("DayGoods_1", UIHelper.GetMoneyFormat(orderInfo.PayRMBNum));
                                        }
                                        return goodsName;
                                    }
                                }
                                break;
                        }
                    }
                }
                break;
        }
        return string.Empty;
    }
@@ -529,18 +411,18 @@
        return UIHelper.AppendColor(_itemColor, info, colorType == 1);
    }
    // static bool TryGetUserData(Dictionary<string, string> href, out Dictionary<int, List<int>> userdata)
    // {
    //     // userdata = null;
    //     // if (href.ContainsKey("itemplus"))
    //     // {
    //     //     var itemplus = LitJson.JsonMapper.ToObject<ItemTipUtility.CustomItemPlus>(href["itemplus"]);
    //     //     userdata = ConfigParse.Analysis(itemplus.UserData);
    //     // }
    //     // else if (href.ContainsKey("userdata"))
    //     // {
    //     //     userdata = ConfigParse.Analysis(href["userdata"]);
    //     // }
    //     return false;
    // }
    static bool TryGetUserData(Dictionary<string, string> href, out Dictionary<int, List<int>> userdata)
    {
        userdata = null;
        if (href.ContainsKey("itemplus"))
        {
            var itemplus = LitJson.JsonMapper.ToObject<ItemTipUtility.CustomItemPlus>(href["itemplus"]);
            userdata = ConfigParse.Analysis(itemplus.UserData);
        }
        else if (href.ContainsKey("userdata"))
        {
            userdata = ConfigParse.Analysis(href["userdata"]);
        }
        return false;
    }
}
Main/System/Message/SysNotifyMgr.cs
@@ -158,6 +158,10 @@
            tipInfoList.AddRange(msg);
            AnalysisSysmsg(cfg);
        }
        else
        {
            Debug.LogError("未找到系统提示信息: " + key);
        }
    }
    void AnalysisSysmsg(SysInfoConfig cfg)
Main/System/OfficialRank.meta
New file
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0600c139dec25884fa4a6885698d410e
folderAsset: yes
DefaultImporter:
  externalObjects: {}
  userData:
  assetBundleName:
  assetBundleVariant:
Main/System/OfficialRank/OfficialRankManager.cs
New file
@@ -0,0 +1,131 @@
using System;
using System.Collections.Generic;
public class OfficialRankManager : GameSystemManager<OfficialRankManager>
{
    bool redpointDirty = false;
    #region 官职任务
    //当前官职的任务状态
    int taskAwardState;
    Dictionary<int, int> taskValues = new Dictionary<int, int>();
    public Dictionary<int, int[]> realMissionGuides = new Dictionary<int, int[]>();
    public event Action RealmMissionRefreshEvent;
    // 返回服务端的记录任务奖励状态 0未领取  1已领取
    public int GetMissionAwardState(int id)
    {
        return (taskAwardState & (int)Math.Pow(2, id)) != 0 ? 1 : 0;
    }
    //任务类型    任务说明    所需值
    // 1    等级达到x级    x级
    // 2    通关x地图x层    地图ID|层
    // 3    消耗战锤    x个
    //客户端显示的任务状态 0 代表进行中 1 代表可领取 2 代表已领取
    public int GetMissionState(int realm, int missionID)
    {
        var id = RealmLVUPTaskConfig.GetID(realm, missionID);
        var config = RealmLVUPTaskConfig.Get(id);
        var type = config.TaskType;
        if (GetMissionAwardState(missionID) == 1)
        {
            return 2;
        }
        switch (type)
        {
            case 1:
                return PlayerDatas.Instance.baseData.LV >= config.NeedValueList[0] ? 1 : 0;
            case 2:
                if (config.NeedValueList[0] == 0)
                {
                    return 0;
                }
                return 0;
            case 3:
                return taskValues.ContainsKey(missionID) && taskValues[missionID] >= config.NeedValueList[0] ? 1 : 0;
            default:
                return 0;
        }
    }
    public int GetMissionProcess(int id)
    {
        if (taskValues.ContainsKey(id))
        {
            return taskValues[id];
        }
        return 0;
    }
    //type: 1等级 2通关 3消耗战锤
    public void RealMissionGuide(int type, int id = 0)
    {
        if (realMissionGuides.ContainsKey(type))
        {
            int guideIndex = 0;
            if (type == 1)
            {
            }
            else if (type == 2)
            {
                if (!FuncOpen.Instance.IsFuncOpen(164, true))
                {
                    return;
                }
            }
            else if (type == 3)
            {
                if (FuncOpen.Instance.IsFuncOpen(108))
                {
                    guideIndex = 1;
                }
            }
            //NewBieCenter.Instance.StartNewBieGuideEx(guideID);
        }
    }
    public void RequestAllAwards()
    {
        var missisons = RealmLVUPTaskConfig.GetMissionIDs(PlayerDatas.Instance.baseData.realmLevel);
        for (int i = 0; i < missisons.Count; i++)
        {
            var state = GetMissionState(PlayerDatas.Instance.baseData.realmLevel, missisons[i]);
            if (state == 1)
            {
                CA504_tagCMPlayerGetReward pak = new CA504_tagCMPlayerGetReward();
                pak.RewardType = 68;
                pak.DataEx = (uint)missisons[i];
                GameNetSystem.Instance.SendInfo(pak);
            }
        }
    }
    #endregion
    public void ReceivePackage(HA311_tagMCSyncRealmInfo package)
    {
        taskAwardState = (int)package.TaskAwardState;
        for (int i = 0; i < package.TaskValueCount; i++)
        {
            taskValues[package.TaskValueList[i].TaskID] = (int)package.TaskValueList[i].TaskValue;
        }
        RealmMissionRefreshEvent?.Invoke();
        redpointDirty = true;
    }
}
Main/System/OfficialRank/OfficialRankManager.cs.meta
copy from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta copy to Main/System/OfficialRank/OfficialRankManager.cs.meta
File was copied from Main/Core/NetworkPackage/ServerPack/H08_Event/H0820_tagMissionDict.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a29fffee1fddfb8498cdfd5ff5225cd4
guid: 0b11e558a5ef66f4db9ca27b2108c8a4
MonoImporter:
  externalObjects: {}
  serializedVersion: 2
Main/System/PhantasmPavilion/PhantasmPavilionModel.cs
@@ -132,9 +132,9 @@
        {
            nowIDDict[PhantasmPavilionTab.Avatar] = (int)PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.Face);
        }
        else if (type == PlayerDataType.HairColor)
        else if (type == PlayerDataType.FacePic)
        {
            nowIDDict[PhantasmPavilionTab.AvatarFrame] = (int)PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.HairColor);
            nowIDDict[PhantasmPavilionTab.AvatarFrame] = (int)PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.FacePic);
        }
        else if (type == PlayerDataType.ExAttr10)
        {
Main/System/Task/TaskManager.cs
@@ -5,1802 +5,73 @@
using LitJson;
using System.Text.RegularExpressions;
using System.Text;
using UnityEngine.Events;
//任务信息的存储
/** 任务结构 */
public class MissionDetailDates
public class TaskDetailDates
{
    public DateTime Time;//记录时间
    public int ID;//任务ID
    public string Name;//任务名称
    public int Type;//任务类型
    public int NPC_ID;//起始NPCID
    public int LV;//可接等级
    public int ColorLV;//任务难度
    public string Desclist;//任务详情
    public string RewardList;//奖励信息
    public List<TsakLight> LightList;//任务灯信息
    public string InforList;//任务完成条件
    public int MissionState;//任务状态0未接,1进行中,2可提交,3已完成,6特殊卡级
    public int descIndex;//任务描述索引
    public int TaskGroup;    // 任务组,0-主线
    public int TaskID;        // 当前任务ID,可能为0,表示该分组暂时没有任务
    public int CurValue;        // 当前进度值
    public int State;        // 任务状态 1-进行中 2-可领取
}
public class MissionDict//任务字典信息
public enum TaskTypenum//任务类型分类
{
    public int MissionId;//任务ID
    public int DictKeyLen;//任务字典中的某个Key
    public string DictKey;//key的长度
    public int DictValue;//该key对应的值
    MainlineTaskType = 0,//主线
    SideQuestsType = 1,//支线
}
public class RunTaskAwardRecord
{
    public int Num;
    public int AwardState;
}
public struct TsakLight
{
    public int NpcId;
    public int StateLight;
}
public class TaskManager : GameSystemManager<TaskManager>
{
    /** 任务总清单 */
    public static bool _globalbool = false;
    public Dictionary<int, MissionDetailDates> allMissionDict = new Dictionary<int, MissionDetailDates>();//任务初始化接收字典
    public Dictionary<int, MissionDetailDates> MainTaskDic = new Dictionary<int, MissionDetailDates>();//主线任务字典
    public Dictionary<int, MissionDetailDates> SideQuestsDic = new Dictionary<int, MissionDetailDates>();//支线任务字典
    public Dictionary<int, MissionDetailDates> BountyDic = new Dictionary<int, MissionDetailDates>();//赏金任务
    public Dictionary<int, MissionDetailDates> FairyAuDic = new Dictionary<int, MissionDetailDates>();//仙盟任务
    public int FairyAuTaskCount_Day { get; private set; }
    public int FairyAuTaskCount_Round { get; private set; }
    public Dictionary<int, MissionDetailDates> SpecialTask = new Dictionary<int, MissionDetailDates>();//特殊任务类型
    public Dictionary<int, Dictionary<string, string>> _DicTaskInformation = new Dictionary<int, Dictionary<string, string>>();//任务字典的信息
    public Dictionary<int, Dictionary<string, int>> ReplaceDic = new Dictionary<int, Dictionary<string, int>>();//key值替换字典
    public Dictionary<int, RunTaskAwardRecord> AwardRecordDic = new Dictionary<int, RunTaskAwardRecord>();//跑环奖励记录
    public Dictionary<int, int> NPCShowDic = new Dictionary<int, int>();//关于NPC的显隐问题
    Dictionary<int, int> m_ShowNpcCache = new Dictionary<int, int>();
    public delegate void OnTaskToAdd(int MissionID, int MissionState, int DiscriptionIndex);
    public static event OnTaskToAdd Event_TaskToAdd;//任务添加
    public delegate void OnTaskRefreshes(int _taskId);
    public static event OnTaskRefreshes Event_TaskRefreshes;//任务的刷新
    public delegate void OnBounty();//赏金任务的添加
    public static event OnBounty Event_nBounty;
    public delegate void OnFairyAuTask();//仙盟任务的添加和刷新
    public static event OnFairyAuTask Event_FairyAuTask;
    public delegate void OnTaskInformation(int _id, Dictionary<int, Dictionary<string, string>> _Dic);
    public static event OnTaskInformation Event_TaskInformation;//任务字典信息
    public delegate void OnTaskToDelete(int _taskID);
    public static event OnTaskToDelete Event_TaskToDelete;//任务的删除
    public delegate void OnBountyRewards(int Number, int AwardState);//获取赏金奖励
    public static event OnBountyRewards Event_BountyRewards;
    public int BountyRewardsNumber = 0;//获取赏金内容的奖励值
    public delegate void OnFairyAuReward(int Number, int AwardState);//仙盟奖励
    public static event OnFairyAuReward Event_FairyAuReward;
    public int OnFairyAuNumber = 0;//获取仙盟的奖励值
    public string _conversation = null;//对话内容、
    public int _TaskNow = 0;//获取当前任务ID
    public string _DefaultDialogContent = null;//默认对话内容
    public delegate void OnMainlineTask(int MissionID, int MissionState);//主线任务任务状态变更和刷新
    public static event OnMainlineTask Event_MainlineTask;
    public delegate void OnTaskResponse(int _nowNPCid, int _nPCLamp, Dictionary<int, int> _dic = null);//NPCNPC灯状态,可接取任务(NPCID,任务灯状态)
    public static event OnTaskResponse Event_TaskResponse;
    public static event Action tryGetTaskAwardEvent;//这个是客户端只要尝试去领奖就会触发,不管最后的领奖结果。
    public static event Action<int> CardLevelChange;//关于任务卡机状态的转变
    public static event Action<int> SideQuestChangeEvent;//支线任务状态改变
    public static event Action<int> MainCardLevelChange;//主线任务卡级状态改变
    public static event Action<int> CompletionOfTaskEvent;//任务完成回调
    public event Action<int> talkNpcIdUpdate;
    public event Action<int> taskDescriptionRefresh;
    public static event Action TaskCoinTaskEvent;//赏金任务信息字典变更
    public static event Action FairyTaskEvent;//仙盟任务信息字典变更
    public int NPCid = 0;//获取NPCID(打开任务面板时)、
    public bool BountyMotionBool = false;//控制赏金任务是否自动移动
    public bool FairyAuBool = false;//控制仙盟任务是否自动移动
    public int currentMission { get; private set; }
    public int currentMissionState { get; private set; }
    public int GetNowTaskID { get; set; }//获取当前选中条的任务ID
    private bool isServerPrepare = false;//控制是否自动进行自动任务
    private int retainTaskID = 0;
    private float BossDelayTimeint = 0;
    public Vector3 UIeffectFabaoVec = new Vector3();//法宝NPC消失时获取的坐标
    //----关于前期无操作自动执行主线
    public int TaskAutoLv = 0;
    public int TaskAutoTime = 0;
    public bool TaskOverBool = false;
    private int Times = 0;
    private int NeedWaitTime = 4;
    public int clientGuardDugeonTask { get; private set; }
    List<int[]> priorityTaskChains = new List<int[]>();
    List<int> allowAutoTaskMapIds = new List<int>();
    private float mainTaskAutoWaitTime = 0f;
    public readonly TaskWait taskWait = new TaskWait();
    public List<int> npcImages = new List<int>();
    public List<int> playerJobImages = new List<int>();
    //跳转到任务,0为置顶
    public event Action OnJumpTask;
    private int m_JumpTaskID = 0;
    public int jumpTaskID {
        get { return m_JumpTaskID; }
        set {
            m_JumpTaskID = value;
            OnJumpTask?.Invoke();
        }
    }
    //任务组:任务信息;只有任务包没有删除包,可以认为一个任务组只有一个任务
    //public Dictionary<int, TaskDetailDates> allMissionDict = new Dictionary<int, TaskDetailDates>();
    //主线任务,暂且只处理主线任务
    public TaskDetailDates mainTask = new TaskDetailDates();
    public event Action OnTaskUpdate;
    public override void Init()
    {
        // StageLoad.Instance.onStageLoadFinish += onStageLoadFinish;
        // NPCInteractProcessor.s_NpcInteractEvent += NpcInterac;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
        // string BossDelayTime = FuncConfigConfig.Get("BossDelayTime").Numerical1;
        // BossDelayTimeint = float.Parse(BossDelayTime);
        // var Task_Auto = FuncConfigConfig.Get("TaskAuto");
        // TaskAutoLv = int.Parse(Task_Auto.Numerical1);
        // TaskAutoTime = int.Parse(Task_Auto.Numerical2);
        // mainTaskAutoWaitTime = int.Parse(Task_Auto.Numerical3) / 1000f;
        // var mapIds = ConfigParse.GetMultipleStr<int>(Task_Auto.Numerical4);
        // if (mapIds != null && mapIds.Length > 0)
        // {
        //     allowAutoTaskMapIds.AddRange(mapIds);
        // }
        // FairyAuTaskCount_Day = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical1.Split('|')[1].Split('_')[1]);
        // FairyAuTaskCount_Round = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical2.Split('|')[1].Split('_')[1]);
        // var cliengGuardConfig = FuncConfigConfig.Get("ClientGuardDungeon");
        // clientGuardDugeonTask = int.Parse(cliengGuardConfig.Numerical5);
        // var funcConfig = FuncConfigConfig.Get("AutoSelectTaskChain");
        // var taskChainArray = LitJson.JsonMapper.ToObject<int[][]>(funcConfig.Numerical1);
        // if (taskChainArray != null)
        // {
        //     for (int i = 0; i < taskChainArray.Length; i++)
        //     {
        //         priorityTaskChains.Add(taskChainArray[i]);
        //     }
        // }
        // var config = FuncConfigConfig.Get("NPCTalk");
        // npcImages = JsonMapper.ToObject<List<int>>(config.Numerical1);
        // playerJobImages = JsonMapper.ToObject<List<int>>(config.Numerical2);
    }
    public override void Release()
    {
        // StageLoad.Instance.onStageLoadFinish -= onStageLoadFinish;
        // NPCInteractProcessor.s_NpcInteractEvent -= NpcInterac;
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
    }
    public void OnBeforePlayerDataInitialize()
    {
        allMissionDict.Clear();
        MainTaskDic.Clear();
        SideQuestsDic.Clear();
        BountyDic.Clear();
        FairyAuDic.Clear();
        SpecialTask.Clear();
        _DicTaskInformation.Clear();
        ReplaceDic.Clear();
        AwardRecordDic.Clear();
        NPCShowDic.Clear();
        m_ShowNpcCache.Clear();
        _conversation = null;
        _DefaultDialogContent = null;
        _TaskNow = 0;
        BountyRewardsNumber = 0;
        NPCid = 0;
        retainTaskID = 0;
        currentMission = 0;
        _globalbool = false;
        BountyMotionBool = false;
        FairyAuBool = false;
        isServerPrepare = false;
    }
    public void OnPlayerLoginOk()
    {
        GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        GlobalTimeEvent.Instance.secondEvent += secondEvent;
        isServerPrepare = true;
        TaskOverBool = false;
    }
    // private void onStageLoadFinish()//地图切换时调用
    // {
    //     var inDungeon = IsDungeon();
    //     if (!inDungeon && retainTaskID != 0)
    //     {
    //         if (ReplaceDic.ContainsKey(retainTaskID))
    //         {
    //             AutomaticTripToTask(retainTaskID);
    //             //int missionState = SideQuestState(retainTaskID);
    //             //TaskTerminationToHangUp(retainTaskID, missionState);
    //             retainTaskID = 0;
    //         }
    //     }
    // }
    List<int> ListMissionID = new List<int>();
    public void RefreshMissionState(int MissionID, int MissionState, int DiscriptionIndex)//1.任务ID,2任务状态,3,任务描述Index(接收任务)
    {
        // TODO YYL
        // try
        // {
        //     if (isServerPrepare && MissionState != 3 && MissionID != 2000 && MissionID != 3000)
        //     {
        //         TaskupToDate = MissionID;
        //     }
        //     var pytaskM = PyTaskConfig.Get(MissionID);
        //     if (pytaskM == null)
        //     {
        //         return;
        //     }
        //     if ((pytaskM.type == (int)TaskTypenum.MainlineTaskType || pytaskM.type == (int)TaskTypenum.MainlineTaskTyp2) && MissionState != 0 && MissionState != 3)
        //     {
        //         currentMission = MissionID;
        //         currentMissionState = MissionState;
        //     }
        //     //仙盟任务完成
        //     if ((pytaskM.type == 12 || pytaskM.type == 14) && TaskAllocation.Instance.FairyAuAllNumber() >= FairyAuTaskCount_Day)
        //     {
        //         Event_FairyAuTask();
        //         return;
        //     }
        //     if (allMissionDict.ContainsKey(MissionID))
        //     {
        //         int missionState = allMissionDict[MissionID].MissionState;
        //         var lastDescriptionIndex = allMissionDict[MissionID].descIndex;
        //         if (allMissionDict[MissionID].MissionState != MissionState && MissionState == 3 && isServerPrepare)
        //         {
        //             TaskOverBool = true;
        //             taskWait.Push(TaskWaitType.TaskComplete);
        //             if (CompletionOfTaskEvent != null)
        //             {
        //                 CompletionOfTaskEvent(MissionID);
        //             }
        //         }
        //         TaskChanges(MissionID, MissionState, DiscriptionIndex);//任务的状态修改
        //         if (missionState == 0 && (MissionState == 1 || MissionState == 2))
        //         {
        //             if (Event_TaskToAdd != null)//任务添加(用于存储于身上的未接取任务的特殊处理)
        //             {
        //                 Event_TaskToAdd(MissionID, MissionState, DiscriptionIndex);
        //             }
        //         }
        //         else
        //         {
        //             if (Event_TaskRefreshes != null)//刷新任务
        //             {
        //                 Event_TaskRefreshes(MissionID);
        //             }
        //         }
        //         if (lastDescriptionIndex != DiscriptionIndex)
        //         {
        //             if (taskDescriptionRefresh != null)
        //             {
        //                 taskDescriptionRefresh(MissionID);
        //             }
        //         }
        //     }
        //     else
        //     {
        //         AddMission(MissionID, MissionState, DiscriptionIndex);//任务的添加
        //         if (taskDescriptionRefresh != null)
        //         {
        //             taskDescriptionRefresh(MissionID);
        //         }
        //         if (Event_TaskToAdd != null)
        //         {
        //             Event_TaskToAdd(MissionID, MissionState, DiscriptionIndex);
        //         }
        //     }
        //     TaskClassification(MissionID, MissionState);//任务分类
        //     IsShowNpC(1);//是否显示NPC
        //     IsShowNpC(MissionID);//是否显示NPC
        //     if (isServerPrepare)
        //     {
        //         AutotaskingPrecedence(isServerPrepare, MissionID);//是否执行自动任务
        //     }
        //     TaskTerminationToHangUp(MissionID, MissionState);//结束赏金和仙盟任务前往挂机
        //     if (Event_TaskResponse != null)//发送任务灯信息
        //     {
        //         if (allMissionDict[MissionID].LightList.Equals(default(TsakLight)))
        //         {
        //             return;
        //         }
        //         for (int i = 0; i < allMissionDict[MissionID].LightList.Count; i++)
        //         {
        //             Event_TaskResponse(allMissionDict[MissionID].LightList[i].NpcId, allMissionDict[MissionID].LightList[i].StateLight);
        //         }
        //     }
        // }
        // catch (Exception ex)
        // {
        //     Debug.Log(ex.StackTrace);
        // }
        mainTask = new TaskDetailDates();
    }
    // public ImpactRankModel.RankAwardItem GetRunTaskRward()//添加任务奖励
    // {
    //     var runTaskAward = FuncConfigConfig.Get("RunTaskAward");
    //     ImpactRankModel.RankAwardItem _award = new ImpactRankModel.RankAwardItem();
    //     var _jsonData = LitJson.JsonMapper.ToObject(runTaskAward.Numerical3);
    //     var jsonData2 = LitJson.JsonMapper.ToObject(runTaskAward.Numerical4);
    //     foreach (string key in _jsonData.Keys)
    //     {
    //         var _job = int.Parse(key);
    //         var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
    //         for (int j = 0; j < _itemArray.Length; j++)
    //         {
    //             _award.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
    //         }
    //     }
    //     foreach (string key in jsonData2.Keys)
    //     {
    //         var _job = int.Parse(key);
    //         _award.Add(_job, new Item(2301, 0));
    //     }
    //     return _award;
    // }
    public int GetLatestMainTaskId()
    public void UpdateTask(HB110_tagMCTaskInfo netPack)
    {
        var taskId = 0;
        //主线任务的顺序由任务列表的顺序决定 TaskListConfig.GetMissionIndex
        //这里是bug,但是因为只有一个主线任务,所以暂时不影响
        foreach (var id in MainTaskDic.Keys)
        for (int i = 0; i < netPack.TaskList.Length; i++)
        {
            if (id > taskId)
            if (netPack.TaskList[i].TaskGroup == 0)
            {
                taskId = id;
            }
        }
        return taskId;
    }
    public bool TryGetTaskData(int _taskId, out MissionDetailDates taskData)
    {
        return allMissionDict.TryGetValue(_taskId, out taskData);
    }
    void DefaultDialogue()//关于打开默认对话界面
    {
        // if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing)
        // {
        //     return;
        // }
        // bool IsOpenMain = UIManager.Instance.IsOpened<MainWin>();
        // if (!UIManager.Instance.IsOpened<DefaultDialogueBoxWin>() && IsOpenMain)
        // {
        //     UIManager.Instance.OpenWindow<DefaultDialogueBoxWin>();
        //     UIManager.Instance.CloseWindow<MainInterfaceWin>();
        // }
        // else
        // {
        //     if (talkNpcIdUpdate != null)
        //     {
        //         talkNpcIdUpdate(NPCid);
        //     }
        // }
    }
    private void OnEventTalkEvent(int taskID)//NPC对话后的弹框
    {
        //if (UIManager.Instance.ExitAnyFullScreenOrMaskWin())
        //{
        //    return;
        //}
        //bug: 功能开启引导时,未收到服务端的封包快速对话会导致功能开启引导被打断,如果只是判断inGuiding又导致无法继续任务
        //解决方案:1. 对话时判断有引导且必须界面在打开状态;2. 功能引导飞入的时候如果中断则取消引导
        // -------------------------TODO YYL-----------------------------------
        // if ((NewBieCenter.Instance.inGuiding && UIManager.Instance.IsOpened<NewBieWin>()) || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing
        //     || UIManager.Instance.IsOpened<TreasureChapterWin>())
        // {
        //     return;
        // }
        // bool IsOpenMain = UIManager.Instance.IsOpened<MainInterfaceWin>();
        // var state = 0;
        // if (TryGetCustomTaskState(taskID, out state))
        // {
        //     var config = StoryMissionsConfig.GetConfig(taskID, state);
        //     if (config != null && NPCid == config.NpcID)
        //     {
        //         if (!UIManager.Instance.IsOpened<DialogueDuidanceWin>() && IsOpenMain
        //              && !UIManager.Instance.ExistAnyFullScreenOrMaskWin())
        //         {
        //             UIManager.Instance.CloseWindow<MainInterfaceWin>();
        //             DialogueDuidanceWin.storyMissionId = config.id;
        //             DialogueDuidanceWin.taskId = taskID;
        //             UIManager.Instance.OpenWindow<DialogueDuidanceWin>();
        //         }
        //         return;
        //     }
        // }
        // if (!UIManager.Instance.IsOpened<TaskBoxBGMWin>() && IsOpenMain)
        // {
        //     UIManager.Instance.CloseWindow<MainInterfaceWin>();
        //     UIManager.Instance.OpenWindow<TaskBoxBGMWin>();
        //     return;
        // }
        // if (BountyDic.ContainsKey(_TaskNow) || FairyAuDic.ContainsKey(_TaskNow))
        // {
        //     if (!ModelCenter.Instance.GetModel<TeamModel>().teamPrepare.isPreparing)
        //     {
        //         RequestGetTaskAward("OK", _TaskNow);
        //     }
        // }
    }
    private void BountySelfMotion()
    {
        int blank = PackManager.Instance.GetEmptyGridCount(PackType.Item);
        if (blank < 1)//"请先清理背包再领取奖励
        {
            return;
        }
    }
    public bool TryGetCustomTaskState(int taskId, out int state)
    {
        state = 0;
        if (ReplaceDic.ContainsKey(taskId))
        {
            var keyValue = ReplaceDic[taskId];
            if (keyValue.ContainsKey("state"))
            {
                state = keyValue["state"];
                return true;
            }
        }
        return false;
    }
    void AddMission(int MissionID, int MissionState, int DiscriptionIndex)//添加任务
    {
        //  TODO YYL
        // var config = PyTaskConfig.Get(MissionID);
        // if (config == null)
        // {
        //     Debug.LogError(MissionID + "表格中不存在此任务ID");
        //     return;
        // }
        // if (allMissionDict == null)
        //     allMissionDict = new Dictionary<int, MissionDetailDates>();
        // MissionDetailDates vDetailData = new MissionDetailDates();
        // vDetailData.Time = DateTime.Now;
        // vDetailData.ID = int.Parse(config.id);
        // vDetailData.Name = config.name;
        // vDetailData.Type = config.type;
        // vDetailData.NPC_ID = config.npcId;
        // vDetailData.LV = config.lv;
        // vDetailData.ColorLV = config.colorLV;
        // vDetailData.RewardList = RewardInformation(config.rewardList, DiscriptionIndex);//奖励信息
        // if (ReplaceDic.ContainsKey(MissionID))
        // {
        //     Dictionary<string, int> _dic = ReplaceDic[MissionID];
        //     if (_dic.ContainsKey("visit_npc_id") || _dic.ContainsKey("kill_npc_id"))
        //     {
        //         vDetailData.LightList = CharactersReplace(config.lightList, DiscriptionIndex, int.Parse(config.id));
        //     }
        //     else
        //     {
        //         vDetailData.LightList = StrSegmentation(config.lightList, DiscriptionIndex);//任务信息灯
        //     }
        //     if (MissionState == 3)
        //     {
        //         for (int i = 0; i < vDetailData.LightList.Count; i++)
        //         {
        //             TsakLight TsakLight = new TsakLight();
        //             TsakLight.NpcId = vDetailData.LightList[i].NpcId;
        //             TsakLight.StateLight = -1;
        //             vDetailData.LightList[i] = TsakLight;
        //         }
        //     }
        // }
        // else
        // {
        //     vDetailData.LightList = StrSegmentation(config.lightList, DiscriptionIndex);//任务信息灯
        //     if (MissionState == 3)
        //     {
        //         for (int i = 0; i < vDetailData.LightList.Count; i++)
        //         {
        //             TsakLight TsakLight = new TsakLight();
        //             TsakLight.NpcId = vDetailData.LightList[i].NpcId;
        //             TsakLight.StateLight = -1;
        //             vDetailData.LightList[i] = TsakLight;
        //         }
        //     }
        // }
        // vDetailData.Desclist = TaskDetails(config.descList, DiscriptionIndex);//任务详情
        // vDetailData.InforList = StrInforList(config.infoList, DiscriptionIndex);//任务完成条件
        // vDetailData.MissionState = MissionState;
        // vDetailData.descIndex = DiscriptionIndex;
        // var canSwitchSelectTask = true;
        // if (GetNowTaskID != 0 && !IsMainTaskType(vDetailData.Type))
        // {
        //     MissionDetailDates taskData;
        //     if (TryGetTaskData(GetNowTaskID, out taskData)
        //         && IsMainTaskType(taskData.Type)
        //         && taskData.MissionState != 3)
        //     {
        //         canSwitchSelectTask = false;
        //     }
        // }
        // if (isServerPrepare && PriorityTaskChainContains(MissionID))
        // {
        //     canSwitchSelectTask = true;
        // }
        // if (canSwitchSelectTask)
        // {
        //     GetNowTaskID = MissionID;
        // }
        // allMissionDict.Add(MissionID, vDetailData);//添加任务
    }
    public bool PriorityTaskChainContains(int taskId)
    {
        for (int i = 0; i < priorityTaskChains.Count; i++)
        {
            if (taskId >= priorityTaskChains[i][0]
                && taskId <= priorityTaskChains[i][1])
            {
                return true;
            }
        }
        return false;
    }
    public bool IsMainTaskType(int type)
    {
        return type == (int)TaskTypenum.MainlineTaskType || type == (int)TaskTypenum.MainlineTaskTyp2;
    }
    public enum TaskTypenum//任务类型分类
    {
        MainlineTaskType = 0,//主线
        MainlineTaskTyp2 = 1,
        SideQuestsType2 = 2,//支线
        SideQuestsType3 = 3,//支线任务(本源法宝支线)
        SideQuestsType4 = 4,
        SideQuestsType5 = 5,
        BountyMissionsType6 = 6,//赏金任务
        BountyMissionsType7 = 7,
        BountyMissionsType8 = 8,
        FairyAuMissionType11 = 11,//仙盟任务
        FairyAuMissionType12 = 12,
        SpecialTaskType13 = 13,//特殊任务类型(用于赏金)
        SpecialTaskType14 = 14,//特殊任务类型(用于仙盟)
        AchievementTask = 15,//成就任务(暂未开出专属字典)
        SpecialTaskType16 = 16,//特殊任务类型(用于法宝)
        SideQuestsType17 = 17,//支线17-21新增
        SideQuestsType18 = 18,
        SideQuestsType19 = 19,
        SideQuestsType20 = 20,//(后端特殊处理,暂定不让使用)
        SideQuestsType21 = 21,
        //后续IL开发添加预设
        default1,
        default2,
        default3,
        default4,
        default5,
        default6,
        default7,
        default8,
        default9,
        default10,
    }
    void TaskClassification(int _taskID, int MissionState)//任务分类(主线任务,支线任务)
    {
        if (!allMissionDict.ContainsKey(_taskID))
        {
            return;
        }
        TaskTypenum type = (TaskTypenum)allMissionDict[_taskID].Type;
        switch (type)
        {
            case TaskTypenum.MainlineTaskType:
            case TaskTypenum.MainlineTaskTyp2:
                {
                    if (_taskID != 1)//主线任务(添加与更新)
                    {
                        if (MainTaskDic.ContainsKey(_taskID))
                        {
                            MainTaskDic[_taskID] = allMissionDict[_taskID];
                        }
                        else
                        {
                            MainTaskDic.Add(_taskID, allMissionDict[_taskID]);
                        }
                        if (Event_MainlineTask != null)
                        {
                            Event_MainlineTask(_taskID, MissionState);
                        }
                    }
                }
                mainTask.TaskGroup = netPack.TaskList[i].TaskGroup;
                mainTask.TaskID = (int)netPack.TaskList[i].TaskID;
                mainTask.CurValue = (int)netPack.TaskList[i].CurValue;
                mainTask.State = netPack.TaskList[i].State;
                break;
            case TaskTypenum.SideQuestsType2:
            case TaskTypenum.SideQuestsType3:
            case TaskTypenum.SideQuestsType4:
            case TaskTypenum.SideQuestsType5:
            case TaskTypenum.SideQuestsType17:
            case TaskTypenum.SideQuestsType18:
            case TaskTypenum.SideQuestsType19:
            case TaskTypenum.SideQuestsType20:
            case TaskTypenum.SideQuestsType21:
                {
                    if (SideQuestsDic.ContainsKey(_taskID))
                    {
                        SideQuestsDic[_taskID] = allMissionDict[_taskID];
                    }
                    else
                    {
                        SideQuestsDic.Add(_taskID, allMissionDict[_taskID]);
                    }
                    if (SideQuestChangeEvent != null)
                    {
                        SideQuestChangeEvent(_taskID);
                    }
                }
                break;
            case TaskTypenum.BountyMissionsType6:
            case TaskTypenum.BountyMissionsType7:
            case TaskTypenum.BountyMissionsType8:
                {
                    if (BountyDic.ContainsKey(_taskID))
                        BountyDic[_taskID] = allMissionDict[_taskID];
                    else
                        BountyDic.Add(_taskID, allMissionDict[_taskID]);
                    if (Event_nBounty != null)
                        Event_nBounty();
                }
                break;
            case TaskTypenum.FairyAuMissionType11:
            case TaskTypenum.FairyAuMissionType12:
                {
                    if (FairyAuDic.ContainsKey(_taskID))
                        FairyAuDic[_taskID] = allMissionDict[_taskID];
                    else
                        FairyAuDic.Add(_taskID, allMissionDict[_taskID]);
                    if (Event_FairyAuTask != null && MissionState != 3)
                        Event_FairyAuTask();
                }
                break;
            case TaskTypenum.SpecialTaskType13:
            case TaskTypenum.SpecialTaskType14:
            case TaskTypenum.SpecialTaskType16:
                {
                    if (SpecialTask.ContainsKey(_taskID))
                        SpecialTask[_taskID] = allMissionDict[_taskID];
                    else
                        SpecialTask.Add(_taskID, allMissionDict[_taskID]);
                }
                break;
            default:
                break;
        }
    }
    void TaskTypeDeletion(int _taskID)//任务类型的删除
    {
        if (MainTaskDic.ContainsKey(_taskID))//主线
        {
            MainTaskDic.Remove(_taskID);
        }
        else if (SideQuestsDic.ContainsKey(_taskID))//支线
        {
            SideQuestsDic.Remove(_taskID);
        }
        else if (BountyDic.ContainsKey(_taskID))//赏金
        {
            BountyDic.Remove(_taskID);
            if (Event_nBounty != null)
                Event_nBounty();
        }
        else if (SpecialTask.ContainsKey(_taskID))//特殊任务
        {
            SpecialTask.Remove(_taskID);
        }
        else if (FairyAuDic.ContainsKey(_taskID))
        {
            FairyAuDic.Remove(_taskID);
            if (Event_FairyAuTask != null)
                Event_FairyAuTask();
        }
    }
    string TaskDetails(string _string, int _index)////Json解析
    {
        JsonData _Json = JsonMapper.ToObject(_string);
        if (_Json.Count == 1)
        {
            string _TaskDetails = _Json["0"].ToString().Replace("\"", "");
            return _TaskDetails;
        }
        else
        {
            string _TaskDetails = _Json[_index.ToString()].ToString().Replace("\"", "");
            return _TaskDetails;
        }
    }
    List<TsakLight> CharactersReplace(string _string, int _index, int Id)
    {
        JsonData _Json = JsonMapper.ToObject(_string);
        List<TsakLight> TsakLightList = new List<TsakLight>();
        TsakLightList.Clear();
        TsakLight taskLight = new TsakLight();
        foreach (var key in _Json.Keys)
        {
            if (int.Parse(key) == _index)
            {
                JsonData _Json1 = _Json[key];
                if (_Json1.Count != 0)
                {
                    foreach (var _key in _Json1.Keys)
                    {
                        string Str = _key.ToString();
                        Match match = Regex.Match(Str, pattern);
                        if (ReplaceDic.ContainsKey(Id))
                        {
                            Dictionary<string, int> _dic = ReplaceDic[Id];
                            if (_dic.ContainsKey(match.Groups[1].Value))
                            {
                                taskLight.NpcId = _dic[match.Groups[1].Value];
                                taskLight.StateLight = int.Parse(_Json1[_key].ToString());
                                TsakLightList.Add(taskLight);
                            }
                        }
                    }
                }
                return TsakLightList;
            }
        }
        return TsakLightList;
    }
    string StrInforList(string _string, int _index)
    {
        JsonData _Json = JsonMapper.ToObject(_string);
        foreach (var key in _Json.Keys)
        {
            if (int.Parse(key) == _index)
            {
                JsonData _Json1 = _Json[key];
                if (_Json1.Count != 0)
                {
                    foreach (var _key in _Json1.Keys)
                    {
                        return _Json1[_key].ToString();
                    }
                }
            }
        }
        return string.Empty;
    }
    List<TsakLight> StrSegmentation(string _string, int _index)
    {
        int val;
        JsonData _Json = JsonMapper.ToObject(_string);
        List<TsakLight> TsakLightList = new List<TsakLight>();
        TsakLightList.Clear();
        foreach (var key in _Json.Keys)
        {
            if (int.Parse(key) == _index)
            {
                JsonData _Json1 = _Json[key];
                if (_Json1.Count != 0)
                {
                    foreach (var _key in _Json1.Keys)
                    {
                        if (int.TryParse(_key, out val))
                        {
                            TsakLight taskLight = new TsakLight();
                            taskLight.NpcId = int.Parse(_key);
                            taskLight.StateLight = int.Parse(_Json1[_key].ToString());
                            TsakLightList.Add(taskLight);
                        }
                    }
                }
                return TsakLightList;
            }
        }
        return TsakLightList;
    }
    string RewardInformation(string _string, int _index)//奖励信息
    {
        string _occupation = ("J" + PlayerDatas.Instance.baseData.Job).ToString();
        JsonData _Json = JsonMapper.ToObject(_string);
        foreach (var key in _Json.Keys)
        {
            if (int.Parse(key) == _index)
            {
                JsonData _Json1 = _Json[key];
                if (_Json1.Count != 0)
                {
                    foreach (var _key in _Json1.Keys)
                    {
                        if (_key == _occupation)
                            return _Json1[_key].ToString();
                        else if (_key == "-")
                            return _Json1[_key].ToString();
                    }
                }
                else
                {
                    return null;
                }
            }
        }
        return null;
    }
    void TaskChanges(int MissionID, int MissionState, int DiscriptionIndex)//存在的任务的修改
    {
        //  TODO YYL
        // var pytaskM = PyTaskConfig.Get(MissionID);
        // if (pytaskM == null)
        //     return;
        // allMissionDict[MissionID].Time = DateTime.Now;
        // allMissionDict[MissionID].MissionState = MissionState;
        // allMissionDict[MissionID].descIndex = DiscriptionIndex;
        // allMissionDict[MissionID].RewardList = RewardInformation(pytaskM.rewardList, DiscriptionIndex);//奖励信息
        // allMissionDict[MissionID].Desclist = TaskDetails(pytaskM.descList, DiscriptionIndex);//任务详情
        // allMissionDict[MissionID].InforList = StrInforList(pytaskM.infoList, DiscriptionIndex);//任务完成条件
        // if (MissionState == 3)
        // {
        //     if (allMissionDict[MissionID].LightList.Equals(default(TsakLight)))
        //     {
        //         return;
        //     }
        //     for (int i = 0; i < allMissionDict[MissionID].LightList.Count; i++)
        //     {
        //         TsakLight TsakLight = new TsakLight();
        //         TsakLight.NpcId = allMissionDict[MissionID].LightList[i].NpcId;
        //         TsakLight.StateLight = -1;
        //         allMissionDict[MissionID].LightList[i] = TsakLight;
        //     }
        //     return;
        // }
        // else
        // {
        //     if (ReplaceDic.ContainsKey(MissionID))
        //     {
        //         Dictionary<string, int> _dic = ReplaceDic[MissionID];
        //         if (_dic.ContainsKey("visit_npc_id") || _dic.ContainsKey("kill_npc_id"))
        //         {
        //             allMissionDict[MissionID].LightList = CharactersReplace(pytaskM.lightList, DiscriptionIndex, allMissionDict[MissionID].ID);
        //         }
        //         else
        //         {
        //             allMissionDict[MissionID].LightList = StrSegmentation(pytaskM.lightList, DiscriptionIndex);//任务信息灯
        //         }
        //     }
        //     else
        //     {
        //         allMissionDict[MissionID].LightList = StrSegmentation(pytaskM.lightList, DiscriptionIndex);//任务信息灯
        //     }
        // }
    }
    public void Task0820(H0820_tagMissionDict info)//0820信息字典
    {
        // TODO YYL
        // Dictionary<string, int> dic = null;
        // ReplaceDic.TryGetValue((int)info.MissionID, out dic);
        // if (dic == null)
        // {
        //     dic = new Dictionary<string, int>();
        //     StorageNPCDic(info.MissionID, info.DictKey, (int)info.DictValue);
        //     dic.Add(info.DictKey, (int)info.DictValue);
        //     ReplaceDic.Add((int)info.MissionID, dic);
        // }
        // else
        // {
        //     if (dic.ContainsKey(info.DictKey))
        //     {
        //         StorageNPCDic(info.MissionID, info.DictKey, (int)info.DictValue);
        //         dic[info.DictKey] = (int)info.DictValue;
        //         if (info.DictKey == "around_allcount")
        //         {
        //             if (TaskCoinTaskEvent != null)
        //             {
        //                 TaskCoinTaskEvent();
        //             }
        //         }
        //         if (info.DictKey == "around_count_family")
        //         {
        //             if (FairyTaskEvent != null)
        //             {
        //                 FairyTaskEvent();
        //             }
        //         }
        //     }
        //     else
        //     {
        //         StorageNPCDic(info.MissionID, info.DictKey, (int)info.DictValue);
        //         dic.Add(info.DictKey, (int)info.DictValue);
        //     }
        // }
        OnTaskUpdate?.Invoke();
    }
    public void RequestGetTaskAward(string _answer, int taskId = 0)
    {
        // TODO YYL
        // if (taskId == clientGuardDugeonTask)
        // {
        //     ClientGuardDungeon.RequestEnter();
        //     return;
        // }
        // var sendInfo = new C0802_tagCNPCAnswer();
        // sendInfo.Answer = _answer;
        // sendInfo.AnswerLen = (byte)_answer.Length;
        // GameNetSystem.Instance.SendInfo(sendInfo);
        // if (tryGetTaskAwardEvent != null)
        // {
        //     tryGetTaskAwardEvent();
        // }
    }
    public void TaskRefreshes(int _MissionId, int _DictKeyLen, string _DictKey, int _DictValue)//任务数据的刷新(任务字典信息)
    {
        if (!_DicTaskInformation.ContainsKey(_MissionId))
        {
            Dictionary<string, string> _dic = new Dictionary<string, string>();
            if (_dic.ContainsKey(_DictKey))
            {
                _dic[_DictKey] = _DictValue.ToString();
            }
            else
            {
                _dic.Add(_DictKey, _DictValue.ToString());
            }
            _DicTaskInformation.Add(_MissionId, _dic);
            string kaji = "kaji";
            if (_DicTaskInformation.ContainsKey(_MissionId) && _DicTaskInformation[_MissionId].ContainsKey(kaji))
            {
                if (MainTaskDic.ContainsKey(_MissionId) && MainCardLevelChange != null && _DictValue == 0)
                {
                    if (IsGetOnBool)
                    {
                        GetNowTaskID = _MissionId;
                    }
                    MainCardLevelChange(_MissionId);
                }
            }
        }
        else
        {
            if (_DicTaskInformation[_MissionId].ContainsKey(_DictKey))
            {
                _DicTaskInformation[_MissionId][_DictKey] = _DictValue.ToString();
                if (_DictKey == "kaji" && (_DictValue == 0 || _DictValue == 1))//kaji:0为主线卡级变更,kaji:1为魔族卡级变更
                {
                    if (CardLevelChange != null)
                    {
                        CardLevelChange(_MissionId);
                    }
                    if (MainTaskDic.ContainsKey(_MissionId))
                    {
                        if (IsGetOnBool)
                        {
                            GetNowTaskID = _MissionId;
                        }
                        if (MainCardLevelChange != null)
                        {
                            MainCardLevelChange(_MissionId);
                        }
                    }
                }
            }
            else
            {
                _DicTaskInformation[_MissionId].Add(_DictKey, _DictValue.ToString());
            }
        }
        if (Event_TaskInformation != null)
            Event_TaskInformation(_MissionId, _DicTaskInformation);
    }
    public void DelMission(int _taskID)//真实任务删除
    {
        if (allMissionDict.ContainsKey(_taskID))
        {
            allMissionDict.Remove(_taskID);
            if (_DicTaskInformation.ContainsKey(_taskID))
            {
                _DicTaskInformation.Remove(_taskID);
            }
        }
        TaskTypeDeletion(_taskID);
        if (Event_TaskToDelete != null)
        {
            Event_TaskToDelete(_taskID);
        }
    }
    bool _bool = false;
    string _conversationA = null;
    public void EventTalk(H0801_tagEventTalk info)//访问任务是否可提交
    {
        NPCid = (int)info.NPCID;
        if (info.Msg == null || info.Msg[0].MsgLen == 0)
        {
            _conversation = _conversationA;
        }
        else
        {
            if (_conversationA != info.Msg[0].Msg)
            {
                _conversation = info.Msg[0].Msg;
                _conversationA = _conversation;
            }
        }
        if (_bool)
        {
            if ((int)info.MissionID != 0)
            {
                _TaskNow = (int)info.MissionID;
                OnEventTalkEvent((int)info.MissionID);
                _bool = false;
                return;
            }
        }
        for (int i = 0; i < info.Answer.Length; i++)
        {
            string[] str = info.Answer[i].Msg.Split('_');
            int var;
            if (str.Length > 1)
            {
                for (int j = 0; j < info.Answer.Length; j++)
                {
                    string[] stX = info.Answer[j].Msg.Split('_');
                    if (stX.Length > 1)
                    {
                        string strXX = stX[stX.Length - 1];
                        if (int.TryParse(strXX, out var))
                        {
                            if (int.Parse(strXX) == GetNowTaskID)
                            {
                                RequestGetTaskAward(strXX);
                                _bool = true;
                                return;
                            }
                        }
                    }
                }
                string str1 = str[str.Length - 1];
                RequestGetTaskAward(str1);
                _bool = true;
                return;
            }
            else
            {
                _bool = false;
                if ((int)info.NPCID != 32504001)
                {
                    DefaultDialogue();
                }
                return;
            }
        }
    }
    public string pattern = @"\{(.+)\}";
    public int StatusLightQuery(int _NpcID)//状态灯查询
    {
        int Light = -1;
        foreach (int key in allMissionDict.Keys)
        {
            if (allMissionDict[key].LightList.Equals(default(TsakLight)))
            {
                continue;
            }
            for (int i = 0; i < allMissionDict[key].LightList.Count; i++)
            {
                if (_NpcID == allMissionDict[key].LightList[i].NpcId)
                {
                    if (allMissionDict[key].LightList[i].StateLight > Light)
                    {
                        Light = allMissionDict[key].LightList[i].StateLight;
                    }
                }
            }
        }
        return Light;
    }
    public void DailyFairyTaskMove()//日常仙盟任务
    {
        // TODO YYL
        // if (SpecialTask.Count != 0)
        // {
        //     foreach (int key in SpecialTask.Keys)
        //     {
        //         if (SpecialTask[key].Type == 14 && SpecialTask[key].MissionState != 3)//未接任务
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(key));
        //             return;
        //         }
        //     }
        // }
        // if (FairyAuDic.Count != 0)
        // {
        //     foreach (int key in FairyAuDic.Keys)
        //     {
        //         if (FairyAuDic[key].MissionState != 0 && FairyAuDic[key].MissionState != 3)
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(key));
        //             return;
        //         }
        //     }
        // }
    }
    public void DailyBountyMove()//日常赏金任务
    {
        // if (SpecialTask.Count != 0)
        // {
        //     foreach (int key in SpecialTask.Keys)
        //     {
        //         if (SpecialTask[key].Type == 13 && SpecialTask[key].MissionState != 3)//未接任务
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(key));
        //             return;
        //         }
        //     }
        // }
        // if (BountyDic.Count != 0)
        // {
        //     foreach (int key in BountyDic.Keys)
        //     {
        //         if (BountyDic[key].MissionState != 0 && BountyDic[key].MissionState != 3)
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(key));
        //             return;
        //         }
        //     }
        // }
    // 任务状态 1-进行中 2-可领取
    public int GetMainTaskState()
    {
        return mainTask.State;
    }
    private void AutotaskingPrecedence(bool automaticityBool, int missionID)//关于是否执行自动任务和自动任务的优先级
    {
        if (automaticityBool)
        {
            var inDungeon = IsDungeon();
            if (inDungeon)//判断是否再副本中对任务ID进行储存
            {
                retainTaskID = Autotasking(missionID);
            }
            else
            {
                retainTaskID = 0;
                if (Autotasking(missionID) != 0)
                {
                    AutomaticTripToTask(Autotasking(missionID));
                }
            }
        }
    }
    private int Autotasking(int taskID)
    {
        foreach (var value in MainTaskDic.Values)
        {
            if (value.MissionState != 0 && value.MissionState != 3)
            {
                if (allMissionDict.ContainsKey(taskID) && (allMissionDict[taskID].Time - value.Time).TotalSeconds <= 1)
                {
                    if (ReplaceDic.ContainsKey(value.ID))
                    {
                        Dictionary<string, int> _dic = ReplaceDic[value.ID];
                        if (_dic.ContainsKey("continue") && _dic["continue"] == 1)
                        {
                            return value.ID;
                        }
                    }
                }
            }
        }
        if (ReplaceDic.ContainsKey(taskID))
        {
            Dictionary<string, int> _dic = ReplaceDic[taskID];
            if (_dic.ContainsKey("continue") && _dic["continue"] == 1)
            {
                return taskID;
            }
        }
        return 0;
    }
    public void AutomaticTripToTask(int _taskID)//任务自动前往(任务添加)
    {
        // TODO YYL
        // try
        // {
        //     if (!allowAutoTaskMapIds.Contains(PlayerDatas.Instance.baseData.MapID))
        //     {
        //         return;
        //     }
        //     var _hero = PlayerDatas.Instance.hero;
        //     if (_hero != null)
        //     {
        //         if (MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.Boss))
        //         {
        //             return;
        //         }
        //     }
        //     if (MainTaskDic.ContainsKey(_taskID))//主线任务
        //     {
        //         if (MainTaskDic[_taskID].MissionState == 0 || MainTaskDic[_taskID].MissionState == 3)
        //             return;
        //         if (MainTaskDic.ContainsKey(_taskID))
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             if (PlayerDatas.Instance.baseData.LV != 1)
        //                 SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(_taskID));
        //             return;
        //         }
        //     }
        //     if (BountyDic.ContainsKey(_taskID))//赏金任务
        //     {
        //         if (BountyDic[_taskID].MissionState == 3 || BountyMotionBool)
        //         {
        //             return;
        //         }
        //         else
        //         {
        //             if (BountyDic.ContainsKey(_taskID))
        //             {
        //                 PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //                 SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(_taskID));
        //                 return;
        //             }
        //         }
        //     }
        //     else if (FairyAuDic.ContainsKey(_taskID))//仙盟任务
        //     {
        //         if (FairyAuDic[_taskID].MissionState == 3 || FairyAuBool)
        //         {
        //             return;
        //         }
        //         if (FairyAuDic.ContainsKey(_taskID))
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(_taskID));
        //             return;
        //         }
        //     }
        //     else if (SideQuestsDic.ContainsKey(_taskID))
        //     {
        //         if (SideQuestsDic[_taskID].MissionState == 0 || SideQuestsDic[_taskID].MissionState == 3)
        //         {
        //             return;
        //         }
        //         else
        //         {
        //             PlayerDatas.Instance.hero.Behaviour.StopHandupAI();
        //             SnxxzGame.Instance.StartCoroutine(WaitForSkillFinished(_taskID));
        //             return;
        //         }
        //     }
        // }
        // catch (Exception ex)
        // {
        //     Debug.Log(ex);
        // }
    }
    public void RunTaskAwarInfo(HA708_tagMCRunTaskAwardInfo info)//通知跑环奖励记录
    {
        for (int i = 0; i < info.Cnt; i++)
        {
            if (!AwardRecordDic.ContainsKey(info.InfoList[i].Type))
            {
                RunTaskAwardRecord _RunTaskAwardRecord = new RunTaskAwardRecord();
                _RunTaskAwardRecord.Num = (int)info.InfoList[i].Num;
                _RunTaskAwardRecord.AwardState = info.InfoList[i].AwardState;
                AwardRecordDic.Add(info.InfoList[i].Type, _RunTaskAwardRecord);
            }
            else
            {
                AwardRecordDic[info.InfoList[i].Type].Num = (int)info.InfoList[i].Num;
                AwardRecordDic[info.InfoList[i].Type].AwardState = info.InfoList[i].AwardState;
            }
            if (info.InfoList[i].Type == (int)TaskTypenum.BountyMissionsType7)
            {
                BountyRewardsNumber = (int)info.InfoList[i].Num;
                if (Event_BountyRewards != null)
                    Event_BountyRewards((int)info.InfoList[i].Num, info.InfoList[i].AwardState);
            }
            else if (info.InfoList[i].Type == (int)TaskTypenum.FairyAuMissionType12)
            {
                OnFairyAuNumber = (int)info.InfoList[i].Num;
                if (Event_FairyAuReward != null)
                    Event_FairyAuReward((int)info.InfoList[i].Num, info.InfoList[i].AwardState);
            }
        }
    }
    // private IEnumerator WaitForSkillFinished(int _taskID)
    // {
    //     GA_Hero _hero = PlayerDatas.Instance.hero;
    //     if (_hero == null)
    //     {
    //         yield break;
    //     }
    //     while (_hero != null && _hero.SkillMgr.CurCastSkill != null &&
    //            _hero.SkillMgr.CurCastSkill.SkillCompelete == false)
    //     {
    //         yield return null;
    //     }
    //     yield return WaitingForSecondConst.WaitMS500;
    //     // 如果有守护, 则不拾取
    //     var equipIndex = EquipSet.ClientPlaceToServerPlace(new Int2(0, (int)RoleEquipType.Guard));
    //     var _itemModel = PackManager.Instance.GetItemByIndex(PackType.Equip, equipIndex);
    //     if (_itemModel == null || !GeneralDefine.GuardianPickUpID.Contains(_itemModel.itemId))
    //     {
    //         float _chkDistanceSqrt;
    //         DropItemManager.DropObject _obj = null;
    //         while (DropItemManager.HandupTryGetHeroItem(out _obj))
    //         {
    //             if (DropItemManager.StopMissionPickup)
    //             {
    //                 break;
    //             }
    //             if (MapTransferUtility.Instance.MapTransferDoType != MapTransferUtility.E_MapTransferDoType.None)
    //             {
    //                 break;
    //             }
    //             Vector3 _targetPosition = _obj.dropItem.transform.position;
    //             _chkDistanceSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _targetPosition);
    //             if (_chkDistanceSqrt > 0.5f)
    //             {
    //                 if (_hero.State != E_ActorState.AutoRun)
    //                 {
    //                     _hero.MoveToPosition(_targetPosition);
    //                 }
    //             }
    //             yield return null;
    //         }
    //     }
    //     if (AdventureStage.Instance.IsInAdventureStage)
    //     {
    //         yield break;
    //     }
    //     if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing
    //         || UIManager.Instance.IsOpened<TreasureChapterWin>())
    //     {
    //         yield break;
    //     }
    //     if (UIManager.Instance.IsOpened<TreasureBaseWin>())
    //     {
    //         yield break;
    //     }
    //     if (UIManager.Instance.IsOpened<MysteriousMissionWin>())
    //     {
    //         yield break;
    //     }
    //     if (BossShowModel.Instance.BossShowing)
    //     {
    //         yield break;
    //     }
    //     if (BountyDic.ContainsKey(_taskID) || FairyAuDic.ContainsKey(_taskID))
    //     {
    //         yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
    //     }
    //     if (MainTaskDic.ContainsKey(_taskID))//主线等待表现
    //     {
    //         if (taskWait.wait)
    //         {
    //             yield return WaitingForSecondConst.GetWaitForSeconds(mainTaskAutoWaitTime);
    //         }
    //     }
    //     while(ClientSceneManager.Instance.isWaitPickup)
    //     {
    //         yield return null;
    //     }
    //     if (GA_Hero.s_MapSwitching)
    //     {
    //         yield break;
    //     }
    //     try
    //     {
    //         TaskMove(_taskID);
    //     }
    //     catch (Exception ex)
    //     {
    //         Debug.Log(ex);
    //     }
    // }
    public enum TaskStatus//任务状态
    {
        None = -5,//没有
        Normal = 0,//正常任务(绿)
        TreasureCardLevel = 1,//法宝卡级(红)
        CardLevel = 2,//等级卡级(红)
        Completed = 3,//立即完成任务
    }
    public TaskStatus GetTaskStatus(int taskID)
    {
        if (_DicTaskInformation.ContainsKey(taskID) && _DicTaskInformation[taskID].ContainsKey("kaji"))
        {
            var kaji = _DicTaskInformation[taskID]["kaji"];
            switch (int.Parse(kaji))
            {
                case 0:
                    return TaskStatus.Normal;
                case 1:
                    return TaskStatus.TreasureCardLevel;
                case 2:
                    return TaskStatus.CardLevel;
                case 3:
                    return TaskStatus.Completed;
                default:
                    return TaskStatus.None;
            }
        }
        else
        {
            return TaskStatus.None;
        }
    }
    private bool IsDungeon()//判断是否在副本中
    {
        return false;
        // if (ClientDungeonStageUtility.isClientDungeon)
        //     return true;
        // var mapId = PlayerDatas.Instance.baseData.MapID;
        // var mapConfig = MapConfig.Get(mapId);
        // return mapConfig != null && mapConfig.MapFBType != 0;
    }
    public bool IsGather(int npdId)//是否能采集NPC
    {
        // TODO YYL
        // var taskListConfig = TaskListConfig.Get(currentMission);
        // if (taskListConfig != null)
        // {
        //     int[] collectNPCList = taskListConfig.CollectNPC;
        //     var isTaskNPC = false;
        //     for (int i = 0; i < collectNPCList.Length; i++)
        //     {
        //         if (collectNPCList[i] == npdId)
        //         {
        //             isTaskNPC = true;
        //             break;
        //         }
        //     }
        //     if (isTaskNPC)
        //     {
        //         if ((collectNPCList.Length == 1 && collectNPCList[0] == 0) || GetTaskStatus(currentMission) != 0)
        //         {
        //             return false;
        //         }
        //     }
        // }
        return true;
    }
    public static bool IsOPenAutoResolve()//任务面板不开启自动挂机状态
    {
        bool _bool = true;
        // TODO YYL
        // if (UIManager.Instance.IsOpened<TaskBoxBGMWin>())
        // {
        //     _bool = false;
        // }
        // else if (UIManager.Instance.IsOpened<DefaultDialogueBoxWin>())
        // {
        //     _bool = false;
        // }
        // else if (UIManager.Instance.IsOpened<DialogueDuidanceWin>())
        // {
        //     _bool = false;
        // }
        return _bool;
    }
    private int BOUNTYTASK = 2009;//赏金任务
    private int FAIRYAUTASK = 3009;//仙盟任务
    private void TaskTerminationToHangUp(int taskID, int MissionState)//(完成任务后前往挂机地点)任务ID,任务状态
    {
        // TODO YYL
        // if (!isServerPrepare)
        // {
        //     return;
        // }
        // if ((taskID == BOUNTYTASK && MissionState == 1 && !BountyMotionBool && TaskAllocation.Instance.ForRingAllNumber() != 10)
        //     || (taskID == FAIRYAUTASK && MissionState == 1 && !FairyAuBool && TaskAllocation.Instance.FairyAuAllNumber() == 70))
        // {
        //     var mapModel = ModelCenter.Instance.GetModel<MapModel>();
        //     var point = mapModel.GetRecommendHangPoint();
        //     var config = MapEventPointConfig.Get(point);
        //     MapTransferUtility.Instance.MoveToNPC(config.NPCID);
        // }
    }
    public void CompletionOfTask(int TaskID)//任务完成
    {
        CA206_tagCMQuickFinishMission _CA206 = new CA206_tagCMQuickFinishMission();
        _CA206.MissionID = (uint)TaskID;
        _CA206.DoType = 0;
        GameNetSystem.Instance.SendInfo(_CA206);
    }
    public int SideQuestState(int TaskID)//关于查询任务的状态(-1没有此任务,0未接,1正在进行中,2可提交)
    {
        if (allMissionDict.ContainsKey(TaskID))
        {
            return allMissionDict[TaskID].MissionState;
        }
        else
        {
            return -1;
        }
    }
    public int GetQuestState(int _taskId)
    {
        if (allMissionDict.ContainsKey(_taskId))
        {
            return allMissionDict[_taskId].MissionState;
        }
        else
        {
            return -1;
        }
    }
    //--------主要用于记录任务列表选中条的智能性 (-_-||)
    public int TaskupToDate = 0;//获取最新任务ID
    public int GetOnTaskId = 0;
    public bool IsGetOnBool = false;
    private int NeedTime = 10;
    private DateTime dateTimeA;
    public void GetTaskGetOnNow(int TaskID, string DictKey)//记录下信息字典的ID
    {
        string key1Str = "on_kill_" + TaskID;
        string key2Str = "get_byid_" + TaskID;
        if (TaskID > 1 && (key1Str == DictKey || key2Str == DictKey))
        {
            GetOnTaskId = TaskID;
            dateTimeA = DateTime.Now;
        }
    }
    private void secondEvent()
    {
        TimeSpan timeS = DateTime.Now - dateTimeA;
        int timeSend = timeS.Seconds;
        if (timeSend >= NeedTime)
        {
            IsGetOnBool = true;
            GetOnTaskId = GetNowTaskID;//获取当前选中的ID
        }
        else
        {
            IsGetOnBool = false;
        }
        if (TaskOverBool)
        {
            Times += 1;
            if (Times >= NeedTime)
            {
                TaskOverBool = false;
            }
        }
        else
        {
            if (Times != 0)
            {
                Times = 0;
            }
        }
    }
    public bool IsTaskMove()
    {
        bool IsBool = false;
        if (!UIManager.Instance.IsOpened<MainWin>())
        {
            return IsBool;
        }
        if (PlayerDatas.Instance.baseData.LV > TaskAutoLv)
        {
            return IsBool;
        }
        if (GetTaskStatus(currentMission) == TaskStatus.Normal)
        {
            IsBool = true;
        }
        return IsBool;
    }
    public void TaskMove(int _taskID)
    {
        //  TODO YYL
        // if (allMissionDict.ContainsKey(_taskID) && !NewBieCenter.Instance.inGuiding)
        // {
        //     string _strTest = allMissionDict[_taskID].InforList;
        //     string strTask = TaskAllocation.Instance.GetTaskInfo(TASKINFOConfig.Get(_strTest).show_writing, _taskID);
        //     HrefAnalysis.Inst.ExcuteHrefEvent(strTask, 0, true);
        //     DropItemManager.StopMissionPickup = false;
        //     TaskAllocation.Instance.TaskTime = TimeUtility.ServerNow;
        // }
    }
    public class TaskWait
    {
        public bool wait
        {
            get
            {
                foreach (var key in taskWaits.Keys)
                {
                    if ((Time.realtimeSinceStartup - taskWaits[key]) < 1f)
                    {
#if UNITY_EDITOR
                        Debug.LogFormat("<color=#00ffff>由于{0}开始任务等待</color>", GetTaskWaitTypeLabel(key));
#endif
                        return true;
                    }
                }
                return false;
            }
        }
        Dictionary<TaskWaitType, float> taskWaits = new Dictionary<TaskWaitType, float>();
        public void Push(TaskWaitType type)
        {
            taskWaits[type] = Time.realtimeSinceStartup;
        }
#if UNITY_EDITOR
        static string GetTaskWaitTypeLabel(TaskWaitType waitType)
        {
            switch (waitType)
            {
                case TaskWaitType.TaskComplete:
                    return "主界面任务完成表现";
                case TaskWaitType.LevelUp:
                    return "玩家升级表现";
                case TaskWaitType.TreasureProgress:
                    return "法宝进度更新";
                case TaskWaitType.BetterEquip:
                    return "获得更好装备";
                default:
                    return waitType.ToString();
            }
        }
#endif
    }
    public enum TaskWaitType
    {
        TaskComplete,
        LevelUp,
        TreasureProgress,
        BetterEquip,
    }
}
Main/Utility/ComponentExtersion.cs
@@ -238,7 +238,7 @@
            switch (pattern)
            {
                case 1:
                    _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.LightYellow : TextColType.White);
                    _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.LightWhite : TextColType.White);
                    break;
                case 2:
                    _btnTxt.color = UIHelper.GetUIColor(_colorful ? TextColType.Green : TextColType.White);
Main/Utility/EnumHelper.cs
@@ -449,7 +449,7 @@
    PlayerName = 2,                   //角色名,size , 14  2,
    Sex = 3,                          //性别    3,
    Hair = 4,                         //发型  1.标准型(男) 2.名仕型 3.浪子型 4.标准型(女) 5.马髻型 6.妩媚型    4,
    HairColor = 5,                    //头发颜色  5种  5,
    FacePic = 5,                    //头像框  5, (旧的HairColor)
    Face = 6,                         //基本脸型 6,
    Job = 7,                          //职业  
    LV = 8,                           //等级 8,
@@ -466,7 +466,7 @@
    GoldPaper = 19,                     //金票  19,
    Silver = 20,                       //银子 20,
    SilverPaper = 21,                  //银票    21,
    FightPoint = 22,                   //战斗值  22,
    //FightPoint = 22,                   //战斗值  22,
    HappyPoint = 23,                   //娱乐值  23,
    MapID = 24,                        //角色所在地图  24,
    PosX = 25,                         //角色坐标 25,
@@ -1082,7 +1082,7 @@
    /// <summary>
    /// fff4cd
    /// </summary>
    LightYellow = 15,
    LightWhite = 15,
    /// <summary>
    /// (204, 204, 204, 255)
    /// </summary>
Main/Utility/UIHelper.cs
@@ -500,7 +500,7 @@
    #region 文字色值 Bright 和 Dark指背景色系是明还是暗,暗底亮字,亮底暗字的规则
    public static readonly Color s_BrightPinkColor = new Color32(246, 64, 141, 255);
    public static readonly Color s_BrightRedColor = new Color32(255, 3, 3, 255);
    public static readonly Color s_BrightRedColor = new Color32(234, 38, 30, 255);
    public static readonly Color s_BrightPurpleColor = new Color32(218, 72, 213, 255);
    public static readonly Color s_BrightBlueColor = new Color32(0, 107, 227, 255); //006BE3FF
    public static readonly Color s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
@@ -508,7 +508,7 @@
    public static readonly Color s_BrightGreenColor = new Color32(36, 139, 18, 255); //248b12
    public static readonly Color s_DarkPinkColor = new Color32(255, 124, 124, 255);
    public static readonly Color s_DarkRedColor = new Color32(250, 1, 1, 255);
    public static readonly Color s_DarkRedColor = new Color32(234, 38, 30, 255);
    public static readonly Color s_DarkPurpleColor = new Color32(236, 75, 246, 255);
    public static readonly Color s_DarkBlueColor = new Color32(49, 206, 251, 255);//31cefb
    public static readonly Color s_DarkOrangeColor = new Color32(248, 152, 59, 255);
@@ -519,7 +519,7 @@
    public static readonly Color s_Black = new Color32(0, 0, 0, 255);
    public static readonly Color s_NavyYellow = new Color32(255, 239, 71, 255);
    public static readonly Color s_LightGreen = new Color32(42, 227, 55, 255);//2ae337
    public static readonly Color s_LightYellow = new Color32(245, 246, 230, 255); //f5f6e6
    public static readonly Color s_LightWhite = new Color32(245, 246, 230, 255); //f5f6e6
    public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
    public static readonly Color s_Gold = new Color32(255, 239, 71, 255);//ffef47
    public static readonly Color s_EarthYellow = new Color32(248, 152, 59, 255);//f8983b
@@ -650,8 +650,8 @@
                return s_NavyYellow;
            case TextColType.LightGreen:
                return s_LightGreen;
            case TextColType.LightYellow:
                return s_LightYellow;
            case TextColType.LightWhite:
                return s_LightWhite;
            case TextColType.Gray:
                return s_Gray;
        }
@@ -680,7 +680,7 @@
            case TextColType.Orange:
                return StringUtility.Contact("<color=#", bright ? "ff6701" : "f8983b", ">", msg, "</color>");
            case TextColType.Red:
                return StringUtility.Contact("<color=#", bright ? "ff0303" : "ff0101", ">", msg, "</color>");
                return StringUtility.Contact("<color=#", bright ? "ea261e" : "ea261e", ">", msg, "</color>");
            case TextColType.Pink:
                return StringUtility.Contact("<color=#", bright ? "f6408d" : "ff7c7c", ">", msg, "</color>");
            case TextColType.Green:
@@ -691,7 +691,7 @@
                return StringUtility.Contact("<color=#", "109d06", ">", msg, "</color>");
            case TextColType.Black:
                return StringUtility.Contact("<color=#", "000000", ">", msg, "</color>");
            case TextColType.LightYellow:
            case TextColType.LightWhite:
                return StringUtility.Contact("<color=#", "f5f646", ">", msg, "</color>");
            case TextColType.LightGreen:
                return StringUtility.Contact("<color=#", "8ddc11", ">", msg, "</color>");
@@ -701,20 +701,20 @@
        return msg;
    }
    //needName 指境界0是否需要名称
    // public static string GetRealmName(int realmLv, bool bright = false, bool needName = false)
    // {
    //     if (realmLv <= 0 && !needName)
    //     {
    //         return string.Empty;
    //     }
    //     var config = RealmConfig.Get(realmLv);
    //     if (config == null)
    //     {
    //         return string.Empty;
    //     }
    //     return GetRealmColorByLv(realmLv, config.Name, bright);
    // }
    //needName 指官职0是否需要名称
    public static string GetRealmName(int realmLv, bool bright = false, bool needName = false)
    {
        if (realmLv <= 0 && !needName)
        {
            return string.Empty;
        }
        var config = RealmConfig.Get(realmLv);
        if (config == null)
        {
            return string.Empty;
        }
        return GetRealmColorByLv(realmLv, config.Name, bright);
    }
    //strFormat附加 境界名以外的文字
    //needName 指境界0是否需要名称
@@ -732,31 +732,31 @@
    //     return GetRealmColorByLv(realmLv, string.Format(strFormat, config.Name), bright);
    // }
    // public static string GetRealmColorByLv(int realmLv, string msg, bool bright = false)
    // {
    //     var config = RealmConfig.Get(realmLv);
    //     if (config == null)
    //     {
    //         return string.Empty;
    //     }
    //     switch (config.Quality)
    //     {
    //         case 1:
    //             return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>");
    //         case 2:
    //             return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>");
    //         case 3:
    //             return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>");
    //         case 4:
    //             return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>");
    //         case 5:
    //             return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>");
    //         case 6:
    //             return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>");
    //         default:
    //             return msg;
    //     }
    // }
    public static string GetRealmColorByLv(int realmLv, string msg, bool bright = false)
    {
        var config = RealmConfig.Get(realmLv);
        if (config == null)
        {
            return string.Empty;
        }
        switch (config.Quality)
        {
            case 1:
                return StringUtility.Contact("<color=#", bright ? "666666" : "dddddd", ">", msg, "</color>");
            case 2:
                return StringUtility.Contact("<color=#", bright ? "00b337" : "66ff00", ">", msg, "</color>");
            case 3:
                return StringUtility.Contact("<color=#", bright ? "0066ff" : "00c6ff", ">", msg, "</color>");
            case 4:
                return StringUtility.Contact("<color=#", bright ? "ff00f6" : "f000ff", ">", msg, "</color>");
            case 5:
                return StringUtility.Contact("<color=#", bright ? "ff6600" : "ff9000", ">", msg, "</color>");
            case 6:
                return StringUtility.Contact("<color=#", bright ? "ff0000" : "ff0000", ">", msg, "</color>");
            default:
                return msg;
        }
    }
    public static string AppendColor(int itemColor, string msg, bool bright = false)
    {