少年修仙传客户端代码仓库
client_Hale
2019-04-18 713c7eaeaa044b25d214ff966a45786803e7113e
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
7个文件已删除
1 文件已重命名
18个文件已修改
1个文件已添加
2132 ■■■■ 已修改文件
Core/GameEngine/Model/Config/EquipWashConfig.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/EquipWashConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/EquipWashSpecConfig.cs 214 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/EquipWashSpecConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/TelPartialConfig/tagEquipWashSpecConfig.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EquipWashConfigWrap.cs 592 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EquipWashConfigWrap.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EquipWashSpecConfigWrap.cs 428 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EquipWashSpecConfigWrap.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/XLuaGenAutoRegister.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyBasicDrugWin.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyDrugWin.cs 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyDrugWin.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyFairyDrugWin.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyModel.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyScrollBehaviour.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyStoveBehaviour.cs 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainModel.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainPropertyBar.cs 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainPropertyBarBehaviour.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipTrain/EquipTrainWin.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingModel.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassDungeonWin.cs 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionIncidentBehaviour.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WorldMap/LocalMapTag.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/TimeUtility.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/EquipWashConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Thursday, February 14, 2019
//    [  Date ]:           Thursday, April 18, 2019
//--------------------------------------------------------
using System.Collections.Generic;
@@ -18,16 +18,13 @@
    public readonly int level;
    public readonly int attType1;
    public readonly int attMax1;
    public readonly int attCostMoneyMin1;
    public readonly int attCostMoneyMax1;
    public readonly int attCostMoney1;
    public readonly int attType2;
    public readonly int attMax2;
    public readonly int attCostMoneyMin2;
    public readonly int attCostMoneyMax2;
    public readonly int attCostMoney2;
    public readonly int attType3;
    public readonly int attMax3;
    public readonly int attCostMoneyMin3;
    public readonly int attCostMoneyMax3;
    public readonly int attCostMoney3;
    public readonly int costItem;
    public readonly int costCount;
    public readonly string costMoneyList;
@@ -52,31 +49,25 @@
            int.TryParse(tables[4],out attMax1); 
            int.TryParse(tables[5],out attCostMoneyMin1);
            int.TryParse(tables[5],out attCostMoney1);
            int.TryParse(tables[6],out attCostMoneyMax1);
            int.TryParse(tables[6],out attType2);
            int.TryParse(tables[7],out attType2);
            int.TryParse(tables[7],out attMax2);
            int.TryParse(tables[8],out attMax2);
            int.TryParse(tables[8],out attCostMoney2);
            int.TryParse(tables[9],out attCostMoneyMin2);
            int.TryParse(tables[9],out attType3);
            int.TryParse(tables[10],out attCostMoneyMax2);
            int.TryParse(tables[10],out attMax3);
            int.TryParse(tables[11],out attType3);
            int.TryParse(tables[11],out attCostMoney3);
            int.TryParse(tables[12],out attMax3);
            int.TryParse(tables[12],out costItem);
            int.TryParse(tables[13],out attCostMoneyMin3);
            int.TryParse(tables[13],out costCount);
            int.TryParse(tables[14],out attCostMoneyMax3);
            int.TryParse(tables[15],out costItem);
            int.TryParse(tables[16],out costCount);
            costMoneyList = tables[17];
            costMoneyList = tables[14];
        }
        catch (Exception ex)
        {
Core/GameEngine/Model/Config/EquipWashConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 19f48e263f005554ba7c2823f723611f
timeCreated: 1550121162
timeCreated: 1555574496
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/GameEngine/Model/Config/EquipWashSpecConfig.cs
File was deleted
Core/GameEngine/Model/Config/EquipWashSpecConfig.cs.meta
File was deleted
Core/GameEngine/Model/TelPartialConfig/tagEquipWashSpecConfig.cs
File was deleted
Lua/Gen/EquipWashConfigWrap.cs
File was deleted
Lua/Gen/EquipWashConfigWrap.cs.meta
File was deleted
Lua/Gen/EquipWashSpecConfigWrap.cs
File was deleted
Lua/Gen/EquipWashSpecConfigWrap.cs.meta
File was deleted
Lua/Gen/XLuaGenAutoRegister.cs
@@ -234,12 +234,6 @@
            translator.DelayWrapLoader(typeof(EquipSuitNameConfig), EquipSuitNameConfigWrap.__Register);
        
        
            translator.DelayWrapLoader(typeof(EquipWashConfig), EquipWashConfigWrap.__Register);
            translator.DelayWrapLoader(typeof(EquipWashSpecConfig), EquipWashSpecConfigWrap.__Register);
            translator.DelayWrapLoader(typeof(FaceConfig), FaceConfigWrap.__Register);
        
        
System/Alchemy/AlchemyBasicDrugWin.cs
@@ -13,95 +13,8 @@
namespace Snxxz.UI
{
    public class AlchemyBasicDrugWin : Window
    public class AlchemyBasicDrugWin : AlchemyDrugWin
    {
        [SerializeField] AlchemyScrollBehaviour m_AlchemyScroll;
        [SerializeField] AlchemyDrugBriefBehaviour m_AlchemyDrug;
        [SerializeField] AlchemyStudyBehaviour m_AlchemyStudy;
        [SerializeField] AlchemyBriefBehaviour m_AlchemyBrief;
        [SerializeField] AlchemyStoveBehaviour m_AlchemyStove;
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            SetDefaultSelect();
            m_AlchemyScroll.Display((int)AlchemyType.Normal);
            DisplayAlchmey();
            m_AlchemyDrug.Display();
            m_AlchemyStove.Display();
            model.selectAlchemyRefresh += SelectAlchemyRefresh;
            model.selectQualityRefresh += SelectQualityRefresh;
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            m_AlchemyScroll.Dispose();
            m_AlchemyDrug.Dispose();
            m_AlchemyStudy.Dispose();
            m_AlchemyBrief.Dispose();
            m_AlchemyStove.Dispose();
            model.selectAlchemyRefresh -= SelectAlchemyRefresh;
            model.selectQualityRefresh -= SelectQualityRefresh;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void SetDefaultSelect()
        {
            var qualities = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Normal);
            model.selectQuality = qualities.First();
            var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Normal, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectQualityRefresh()
        {
            var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Normal, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectAlchemyRefresh()
        {
            DisplayAlchmey();
        }
        void DisplayAlchmey()
        {
            var grasp = model.IsGraspRecipe(model.selectAlchemy);
            m_AlchemyStudy.gameObject.SetActive(!grasp);
            m_AlchemyBrief.gameObject.SetActive(grasp);
            if (grasp)
            {
                m_AlchemyStudy.Display();
                m_AlchemyBrief.Dispose();
            }
            else
            {
                m_AlchemyBrief.Display();
                m_AlchemyStudy.Dispose();
            }
        }
    }
}
System/Alchemy/AlchemyDrugWin.cs
New file
@@ -0,0 +1,121 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, April 18, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class AlchemyDrugWin : Window
    {
        [SerializeField] AlchemyType m_AlchemyType;
        [SerializeField] AlchemyScrollBehaviour m_AlchemyScroll;
        [SerializeField] AlchemyDrugBriefBehaviour m_AlchemyDrug;
        [SerializeField] AlchemyStudyBehaviour m_AlchemyStudy;
        [SerializeField] AlchemyBriefBehaviour m_AlchemyBrief;
        [SerializeField] AlchemyStoveBehaviour m_AlchemyStove;
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            model.selectAlchemyType = m_AlchemyType;
            SetDefaultSelect();
            m_AlchemyScroll.Display((int)m_AlchemyType);
            DisplayAlchmey();
            m_AlchemyDrug.Display();
            m_AlchemyStove.Display();
            model.selectAlchemyRefresh += SelectAlchemyRefresh;
            model.selectQualityRefresh += SelectQualityRefresh;
            model.alchemyStateRefresh += AlchemyStateRefresh;
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            m_AlchemyScroll.Dispose();
            m_AlchemyDrug.Dispose();
            m_AlchemyStudy.Dispose();
            m_AlchemyBrief.Dispose();
            m_AlchemyStove.Dispose();
            model.selectAlchemyRefresh -= SelectAlchemyRefresh;
            model.selectQualityRefresh -= SelectQualityRefresh;
            model.alchemyStateRefresh -= AlchemyStateRefresh;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void SetDefaultSelect()
        {
            var qualities = AlchemyConfig.GetAlchemyQualities((int)m_AlchemyType);
            model.selectQuality = qualities.First();
            var alchemys = AlchemyConfig.GetAlchemies((int)m_AlchemyType, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectQualityRefresh()
        {
            var alchemys = AlchemyConfig.GetAlchemies((int)m_AlchemyType, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectAlchemyRefresh()
        {
            DisplayAlchmey();
        }
        private void AlchemyStateRefresh()
        {
            DisplayAlchmey();
        }
        void DisplayAlchmey()
        {
            var grasp = model.IsGraspRecipe(model.selectAlchemy);
            m_AlchemyStudy.gameObject.SetActive(!grasp);
            m_AlchemyBrief.gameObject.SetActive(grasp);
            if (!grasp)
            {
                m_AlchemyStudy.Display();
                m_AlchemyBrief.Dispose();
            }
            else
            {
                m_AlchemyBrief.Display();
                m_AlchemyStudy.Dispose();
            }
        }
    }
}
System/Alchemy/AlchemyDrugWin.cs.meta
File was renamed from Core/GameEngine/Model/TelPartialConfig/tagEquipWashSpecConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 5e689b8cb1014ef4dad115032b7d6012
timeCreated: 1502507015
guid: ecacfe2835b59a74ab865dcae5030139
timeCreated: 1555571188
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Alchemy/AlchemyFairyDrugWin.cs
@@ -13,95 +13,8 @@
namespace Snxxz.UI
{
    public class AlchemyFairyDrugWin : Window
    public class AlchemyFairyDrugWin : AlchemyDrugWin
    {
        [SerializeField] AlchemyScrollBehaviour m_AlchemyScroll;
        [SerializeField] AlchemyDrugBriefBehaviour m_AlchemyDrug;
        [SerializeField] AlchemyStudyBehaviour m_AlchemyStudy;
        [SerializeField] AlchemyBriefBehaviour m_AlchemyBrief;
        [SerializeField] AlchemyStoveBehaviour m_AlchemyStove;
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            SetDefaultSelect();
            m_AlchemyScroll.Display((int)AlchemyType.Fairy);
            DisplayAlchmey();
            m_AlchemyDrug.Display();
            m_AlchemyStove.Display();
            model.selectAlchemyRefresh += SelectAlchemyRefresh;
            model.selectQualityRefresh += SelectQualityRefresh;
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            m_AlchemyScroll.Dispose();
            m_AlchemyDrug.Dispose();
            m_AlchemyStudy.Dispose();
            m_AlchemyBrief.Dispose();
            m_AlchemyStove.Dispose();
            model.selectAlchemyRefresh -= SelectAlchemyRefresh;
            model.selectQualityRefresh -= SelectQualityRefresh;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void SetDefaultSelect()
        {
            var qualities = AlchemyConfig.GetAlchemyQualities((int)AlchemyType.Fairy);
            model.selectQuality = qualities.First();
            var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Fairy, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectQualityRefresh()
        {
            var alchemys = AlchemyConfig.GetAlchemies((int)AlchemyType.Normal, model.selectQuality);
            model.selectAlchemy = alchemys[0];
        }
        private void SelectAlchemyRefresh()
        {
            DisplayAlchmey();
        }
        void DisplayAlchmey()
        {
            var grasp = model.IsGraspRecipe(model.selectAlchemy);
            m_AlchemyStudy.gameObject.SetActive(!grasp);
            m_AlchemyBrief.gameObject.SetActive(grasp);
            if (grasp)
            {
                m_AlchemyStudy.Display();
                m_AlchemyBrief.Dispose();
            }
            else
            {
                m_AlchemyBrief.Display();
                m_AlchemyStudy.Dispose();
            }
        }
    }
}
System/Alchemy/AlchemyModel.cs
@@ -45,6 +45,8 @@
            }
        }
        public AlchemyType selectAlchemyType { get; set; }
        public int stoveLevel { get; private set; }
        public int stoveExp { get; private set; }
        public string alchemySuccRate { get; private set; }
@@ -52,6 +54,8 @@
        public event Action selectQualityRefresh;
        public event Action selectAlchemyRefresh;
        public event Action alchemyStateRefresh;
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        public override void Init()
        {
@@ -186,11 +190,63 @@
            return Equation.Instance.Eval<float>(alchemySuccRate);
        }
        public int GetStoveState(int alchemyId)
        {
            uint tick = 0;
            if (TryGetAlchemyStartTime(alchemyId, out tick)
                && tick > 0)
            {
                var config = AlchemyConfig.Get(alchemyId);
                var startTime = TimeUtility.GetTime(tick);
                var seconds = (int)(config.NeedTime - (float)(TimeUtility.ServerNow - startTime).TotalSeconds);
                return seconds > 0 ? 1 : 2;
            }
            return 0;
        }
        public bool IsGraspRecipe(int alchemyId)
        {
            return m_AlchemyTimes.ContainsKey(alchemyId);
        }
        public bool IsAlchemyEnoughMaterial(int alchemyId, out Item item)
        {
            List<Item> materials;
            item = default(Item);
            if (TryGetAlchemyMaterials(alchemyId, out materials))
            {
                for (int i = 0; i < materials.Count; i++)
                {
                    var mat = materials[i];
                    var count = packModel.GetItemCountByID(PackType.Item, mat.id);
                    if (count < mat.count)
                    {
                        item = mat;
                        return false;
                    }
                }
            }
            return true;
        }
        public bool IsStoveAlcheming(AlchemyType alchemyType)
        {
            var qualities = AlchemyConfig.GetAlchemyQualities((int)alchemyType);
            foreach (var quality in qualities)
            {
                var alchemys = AlchemyConfig.GetAlchemies((int)alchemyType, quality);
                foreach (var alchemyId in alchemys)
                {
                    var state = GetStoveState(alchemyId);
                    if (state != 0)
                    {
                        return true;
                    }
                }
            }
            return false;
        }
        public void ReceivePackage(HA3BF_tagMCPlayerStoveMsg package)
        {
            for (int i = 0; i < package.StoveCnt; i++)
System/Alchemy/AlchemyScrollBehaviour.cs
@@ -29,6 +29,7 @@
        void DisplayRecipes()
        {
            m_Controller.Refresh();
            var qualities = AlchemyConfig.GetAlchemyQualities(alchemyType);
            foreach (var quality in qualities)
            {
@@ -42,6 +43,7 @@
                    }
                }
            }
            m_Controller.Restart();
        }
        private void OnRefreshCell(ScrollerDataType type, CellView cell)
System/Alchemy/AlchemyStoveBehaviour.cs
@@ -39,6 +39,7 @@
        }
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        private void Awake()
        {
@@ -51,8 +52,9 @@
            GlobalTimeEvent.Instance.secondEvent += PerSecond;
            model.alchemyStateRefresh += AlchemyStateRefresh;
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            packModel.refreshItemCountEvent += RefreshItemCountEvent;
            m_State = GetStoveState();
            m_State = model.GetStoveState(model.selectAlchemy);
            DisplayAlchemyMaterials();
            DisplayStove();
@@ -70,12 +72,12 @@
            {
                if (grasp && materials != null && i < materials.Count)
                {
                    m_AlchemyMaterials[i].SetLock(true);
                    m_AlchemyMaterials[i].SetLock(false);
                    m_AlchemyMaterials[i].Display(materials[i]);
                }
                else
                {
                    m_AlchemyMaterials[i].SetLock(false);
                    m_AlchemyMaterials[i].SetLock(true);
                }
            }
        }
@@ -143,29 +145,18 @@
            m_LuckValue.text = PlayerDatas.Instance.extersion.luckValue.ToString();
        }
        int GetStoveState()
        {
            uint tick = 0;
            if (model.TryGetAlchemyStartTime(model.selectAlchemy, out tick)
                && tick > 0)
            {
                var config = AlchemyConfig.Get(model.selectAlchemy);
                var startTime = TimeUtility.GetTime(tick);
                var seconds = Mathf.CeilToInt(config.NeedTime - (float)(TimeUtility.ServerNow - startTime).TotalSeconds);
                return seconds > 0 ? 1 : 2;
            }
            return 0;
        }
        private void SelectAlchemyRefresh()
        {
            m_State = model.GetStoveState(model.selectAlchemy);
            DisplayStove();
            DisplayAlchemyMaterials();
        }
        private void AlchemyStateRefresh()
        {
            m_State = GetStoveState();
            m_State = model.GetStoveState(model.selectAlchemy);
            DisplayStove();
            DisplayAlchemyMaterials();
        }
        private void PlayerDataRefreshEvent(PlayerDataType dataType)
@@ -178,7 +169,7 @@
        private void PerSecond()
        {
            var _state = GetStoveState();
            var _state = model.GetStoveState(model.selectAlchemy);
            if (_state == state)
            {
@@ -194,6 +185,39 @@
        }
        private void OnFunc()
        {
            switch (state)
            {
                case 0:
                    if (model.IsStoveAlcheming(model.selectAlchemyType))
                    {
                        return;
                    }
                    Item item;
                    if (!model.IsAlchemyEnoughMaterial(model.selectAlchemy, out item))
                    {
                        ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(item.id);
                        return;
                    }
                    var succRate = model.GetAlchemySuccRate(model.selectAlchemy);
                    if (succRate / 100 < 100)
                    {
                        ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), "", (bool isOk) =>
                          {
                              if (isOk)
                              {
                                  SendAlchemyPackage();
                              }
                          });
                        return;
                    }
                    break;
            }
            SendAlchemyPackage();
        }
        void SendAlchemyPackage()
        {
            var pak = new CA576_tagCMPlayerRefine();
            pak.AlchemyID = (uint)model.selectAlchemy;
@@ -212,12 +236,31 @@
            GameNetSystem.Instance.SendInfo(pak);
        }
        private void RefreshItemCountEvent(PackType packType, int index, int itemId)
        {
            if (packType == PackType.Item)
            {
                List<Item> items;
                if (model.TryGetAlchemyMaterials(model.selectAlchemy, out items))
                {
                    if (items.FindIndex((x) =>
                     {
                         return x.id == itemId;
                     }) != -1)
                    {
                        DisplayAlchemyMaterials();
                    }
                }
            }
        }
        public void Dispose()
        {
            model.selectAlchemyRefresh -= SelectAlchemyRefresh;
            GlobalTimeEvent.Instance.secondEvent -= PerSecond;
            model.alchemyStateRefresh -= AlchemyStateRefresh;
            PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
            packModel.refreshItemCountEvent -= RefreshItemCountEvent;
        }
    }
@@ -228,6 +271,7 @@
        [SerializeField] Image m_Icon;
        [SerializeField] Text m_Count;
        [SerializeField] Transform m_ContainerLock;
        [SerializeField] Button m_Func;
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -245,6 +289,11 @@
            var enough = packCount >= count;
            var label = UIHelper.AppendColor(enough ? TextColType.Green : TextColType.Red, packCount.ToString());
            m_Count.text = StringUtility.Contact(label, "/", count);
            m_Func.SetListener(() =>
            {
                ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(id);
            });
        }
        public void SetLock(bool _lock)
System/EquipTrain/EquipTrainModel.cs
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
namespace Snxxz.UI
{
@@ -17,6 +18,7 @@
        public readonly LogicList<EquipTrainCandidate> candidatePlaces = new LogicList<EquipTrainCandidate>();
        public readonly LogicList<EquipTrainPropertyBar> propertyBars = new LogicList<EquipTrainPropertyBar>();
        public readonly LogicBool trainLimit = new LogicBool();
        public readonly LogicInt trainEffect = new LogicInt();
        static Dictionary<int, int> trainTypes = new Dictionary<int, int>();
        Dictionary<int, EquipTrainSet> equipTrains = new Dictionary<int, EquipTrainSet>();
@@ -56,6 +58,7 @@
            equipTrainMaxLevel.value = 0;
            material.value = Int3.zero;
            inevitableMaterialCount.value = 0;
            trainEffect.value = 0;
            operateType.value = TrainOperateType.None;
            candidatePlaces.Clear();
            propertyBars.Clear();
@@ -142,6 +145,17 @@
                code += inevitables[i] ? MathUtility.Power(2, i) : 0;
            }
            Action processTrain = () =>
            {
                trainEffect.dirty = true;
                trainEffect.value = code > 0 ? 2 : 1;
                var equipWash = new CA325_tagCMEquipXLAttrChange();
                equipWash.EquipPlace = (byte)EquipSet.ClientPlaceToServerPlace(equipPosition);
                equipWash.CheckUseGoldAttr = (byte)code;
                GameNetSystem.Instance.SendInfo(equipWash);
            };
            if (inevitableCount > 0)
            {
                var trainLevel = GetTrainLevel(equipPosition);
@@ -173,19 +187,23 @@
                                    DayRemind.Instance.SetDayRemind(DayRemind.EQUIPTRAIN_COSTDIAMOND, true);
                                }
                                if (!ok)
                                if (ok)
                                {
                                    return;
                                    processTrain();
                                }
                            });
                    }
                    else
                    {
                        processTrain();
                    }
                }
            }
            else
            {
                processTrain();
            }
            var equipWash = new CA325_tagCMEquipXLAttrChange();
            equipWash.EquipPlace = (byte)EquipSet.ClientPlaceToServerPlace(equipPosition);
            equipWash.CheckUseGoldAttr = (byte)code;
            GameNetSystem.Instance.SendInfo(equipWash);
        }
        public void Save(Int2 equipPosition)
@@ -552,19 +570,19 @@
            if (data != null)
            {
                var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1, trainState);
                var propertyBar = new EquipTrainPropertyBar(data.config.attType1, data.config.attMax1, data.config.attCostMoney1, trainState);
                propertyBar.propertyValue.value = trainedProperties.x;
                propertyBar.deltaValue.value = unSavedProperties.x;
                propertyBar.operateType.value = operateType;
                propertyBars.Add(propertyBar);
                propertyBar = new EquipTrainPropertyBar(data.config.attType2, data.config.attMax2, trainState);
                propertyBar = new EquipTrainPropertyBar(data.config.attType2, data.config.attMax2, data.config.attCostMoney2, trainState);
                propertyBar.propertyValue.value = trainedProperties.y;
                propertyBar.deltaValue.value = unSavedProperties.y;
                propertyBar.operateType.value = operateType;
                propertyBars.Add(propertyBar);
                propertyBar = new EquipTrainPropertyBar(data.config.attType3, data.config.attMax3, trainState);
                propertyBar = new EquipTrainPropertyBar(data.config.attType3, data.config.attMax3, data.config.attCostMoney3, trainState);
                propertyBar.propertyValue.value = trainedProperties.z;
                propertyBar.deltaValue.value = unSavedProperties.z;
                propertyBar.operateType.value = operateType;
System/EquipTrain/EquipTrainPropertyBar.cs
@@ -9,6 +9,7 @@
    {
        public readonly int propertyId;
        public readonly int upperLimit;
        public readonly int deltaMax;
        public readonly EquipTrainModel.TrainState trainState;
        public readonly LogicInt propertyValue = new LogicInt();
        public readonly LogicInt deltaValue = new LogicInt();
@@ -16,10 +17,11 @@
        public readonly LogicEnum<EquipTrainModel.TrainOperateType> operateType
            = new LogicEnum<EquipTrainModel.TrainOperateType>(EquipTrainModel.TrainOperateType.None);
        public EquipTrainPropertyBar(int propertyId, int upperLimit, EquipTrainModel.TrainState trainState)
        public EquipTrainPropertyBar(int propertyId, int upperLimit, int detalMax, EquipTrainModel.TrainState trainState)
        {
            this.propertyId = propertyId;
            this.upperLimit = upperLimit;
            this.deltaMax = detalMax;
            this.trainState = trainState;
        }
System/EquipTrain/EquipTrainPropertyBarBehaviour.cs
@@ -15,6 +15,7 @@
        [SerializeField] Text m_PropertyName;
        [SerializeField] Text m_Value;
        [SerializeField] Slider m_Progress;
        [SerializeField] Text m_DeltaValueMax;
        [SerializeField] Text m_DeltaValue;
        [SerializeField] ToggleButton m_Inevitable;
@@ -48,23 +49,27 @@
                    m_Progress.value = 0;
                    m_Value.text = "0";
                    m_DeltaValue.gameObject.SetActive(false);
                    m_DeltaValueMax.gameObject.SetActive(false);
                    m_Inevitable.gameObject.SetActive(true);
                    break;
                case EquipTrainModel.TrainState.StarLimit:
                    m_Progress.value = 1;
                    m_Value.text = string.Format("{0}/{1}", propertyBar.propertyValue, propertyBar.upperLimit);
                    m_DeltaValue.gameObject.SetActive(true);
                    m_DeltaValueMax.gameObject.SetActive(true);
                    m_Inevitable.gameObject.SetActive(true);
                    break;
                case EquipTrainModel.TrainState.MaxLevel:
                    m_Progress.value = 1;
                    m_Value.text = string.Format("{0}/{1}", propertyBar.propertyValue, propertyBar.upperLimit);
                    m_DeltaValue.gameObject.SetActive(true);
                    m_DeltaValueMax.gameObject.SetActive(true);
                    m_Inevitable.gameObject.SetActive(false);
                    break;
                case EquipTrainModel.TrainState.Allowable:
                    m_Inevitable.gameObject.SetActive(true);
                    m_DeltaValue.gameObject.SetActive(true);
                    m_DeltaValueMax.gameObject.SetActive(true);
                    break;
            }
@@ -91,6 +96,7 @@
                var isPerfect = propertyBar.upperLimit > 0 && propertyBar.propertyValue.value >= propertyBar.upperLimit;
                if (isPerfect)
                {
                    m_DeltaValueMax.text = "";
                    m_DeltaValue.text = "完美";
                    m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true);
                }
@@ -100,9 +106,11 @@
                    {
                        m_DeltaValue.text = inevitable ? "最大" : "";
                        m_DeltaValue.color = UIHelper.GetUIColor(TextColType.Green, true);
                        m_DeltaValueMax.text = inevitable ? string.Format("+{0}", propertyBar.deltaMax) : "";
                    }
                    else if (operateType == EquipTrainModel.TrainOperateType.Save)
                    {
                        m_DeltaValueMax.text = "";
                        if (deltaValue > 0)
                        {
                            m_DeltaValue.text = string.Format("+{0}", deltaValue);
@@ -121,6 +129,7 @@
                    }
                    else
                    {
                        m_DeltaValueMax.text = "";
                        m_DeltaValue.text = "";
                    }
                }
System/EquipTrain/EquipTrainWin.cs
@@ -30,6 +30,9 @@
        [SerializeField] EquipTrainPropertyBarBehaviour[] m_PropertyBarBehaviours;
        [SerializeField] RectTransform m_MaxLevelContainer;
        [SerializeField] UIEffect m_EffectNormal;
        [SerializeField] UIEffect m_EffectMust;
        [SerializeField] Button m_Train;
        [SerializeField] Button m_Save;
        [SerializeField] Button m_GiveUp;
@@ -133,6 +136,7 @@
                    m_EquipEmpty.gameObject.SetActive(false);
                    m_TargetEquip.gameObject.SetActive(true);
                    m_TargetEquip.Init(equip);
                    m_TargetEquip.button.SetListener(ViewEquipTip);
                    var starLevel = starModel.GetEquipStarLevel(equipPosition);
                    m_EquipStar.gameObject.SetActive(true);
@@ -198,6 +202,11 @@
                DisplayProperty(model.propertyBars.Fetch());
            }
            if (force || model.trainEffect.dirty)
            {
                DisplayTrainEffect(model.trainEffect.Fetch());
            }
        }
        private void DisplayMaterial(Int3 material)
@@ -256,6 +265,19 @@
            m_UpdateLevel.gameObject.SetActive(opreateType == EquipTrainModel.TrainOperateType.LevelUp);
        }
        private void DisplayTrainEffect(int value)
        {
            switch (value)
            {
                case 1:
                    m_EffectNormal.Play();
                    break;
                case 2:
                    m_EffectMust.Play();
                    break;
            }
        }
        private void Train()
        {
            var equipPosition = new Int2(model.selectedLevel.value, model.selectedPlace.value);
@@ -285,6 +307,18 @@
            model.UpdateLevel(equipPosition);
        }
        private void ViewEquipTip()
        {
            var level = model.selectedLevel.value;
            var place = model.selectedPlace.value;
            var equipPosition = new Int2(level, place);
            var equipGuid = equipModel.GetEquip(equipPosition);
            var itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>();
            itemTipsModel.SetItemTipsModel(PackType.Item, equipGuid, false, true);
            itemTipsModel.ShowTip();
        }
        private void CreateLevelBehaviours()
        {
            var levels = equipModel.GetUnLockedEquipSets();
System/HazyRegion/HazyDemonKingModel.cs
@@ -7,6 +7,7 @@
    public class HazyDemonKingModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    {
        Dictionary<uint, HazyDemonKingPlayerInfo> m_PlayerInfos = new Dictionary<uint, HazyDemonKingPlayerInfo>();
        List<uint> m_AttackHeroPlayers = new List<uint>();
        public bool IsInDungeon { get; private set; }
@@ -53,11 +54,35 @@
        {
            var mapId = PlayerDatas.Instance.baseData.MapID;
            GA_Hero.OnStartBeAttacked -= OnStartBeAttacked;
            GA_Hero.OnStopBeAttacked -= OnStopBeAttacked;
            m_AttackHeroPlayers.Clear();
            IsInDungeon = false;
            if (IsInDemonKingDungeon(mapId))
            {
                IsInDungeon = true;
                RefreshAroundPlayer();
                GA_Hero.OnStartBeAttacked += OnStartBeAttacked;
                GA_Hero.OnStopBeAttacked += OnStopBeAttacked;
            }
        }
        private void OnStopBeAttacked(uint sid)
        {
            if (m_AttackHeroPlayers.Contains(sid))
            {
                m_AttackHeroPlayers.Remove(sid);
            }
        }
        private void OnStartBeAttacked(uint sid)
        {
            if (!m_AttackHeroPlayers.Contains(sid))
            {
                m_AttackHeroPlayers.Add(sid);
            }
        }
@@ -211,13 +236,13 @@
            }
        }
        public uint GetPlayerAtkTarget(uint serverInstId)
        public uint GetPlayerAtkTarget(uint sid)
        {
            if (ClientDungeonStageUtility.clientMapId == Client_MapID)
            {
                return ClientHazyDemonKingStage.GetClientBossSid();
            }
            if (serverInstId == PlayerDatas.Instance.PlayerId)
            if (sid == PlayerDatas.Instance.PlayerId)
            {
                var hero = PlayerDatas.Instance.hero;
                if (hero != null && hero.SelectTarget != null)
@@ -227,7 +252,10 @@
            }
            else
            {
                if (m_AttackHeroPlayers.Contains(sid))
                {
                    return PlayerDatas.Instance.PlayerId;
                }
            }
            return 0;
        }
System/HazyRegion/HazyGrassDungeonWin.cs
@@ -94,7 +94,15 @@
        void DisplayGrassCount()
        {
            var mapId = hazyGrassModel.GetGrassMapId(hazyRegionModel.processingIncidentId);
            var mapId = 0;
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                mapId = hazyGrassModel.GetGrassMapId(hazyRegionModel.processingIncidentId);
            }
            else
            {
                mapId = PlayerDatas.Instance.baseData.MapID;
            }
            var npcInfos = hazyGrassModel.GetGrassNpcInfos(mapId);
            for (int i = 0; i < m_GrassCountBehas.Length; i++)
            {
@@ -113,14 +121,30 @@
        void DisplayGrassRefreshTime()
        {
            var mapId = hazyGrassModel.GetGrassMapId(hazyRegionModel.processingIncidentId);
            var mapId = 0;
            if (ClientDungeonStageUtility.isClientDungeon)
            {
                mapId = hazyGrassModel.GetGrassMapId(hazyRegionModel.processingIncidentId);
            }
            else
            {
                mapId = PlayerDatas.Instance.baseData.MapID;
            }
            var npcInfos = hazyGrassModel.GetGrassNpcInfos(mapId);
            for (int i = 0; i < m_GrassTimes.Length; i++)
            {
                if (npcInfos != null && i < npcInfos.Count)
                {
                    m_GrassTimes[i].gameObject.SetActive(true);
                    var used = TimeUtility.Minute * 60 + TimeUtility.Second;
                    var used = 0;
                    if (ClientDungeonStageUtility.isClientDungeon)
                    {
                        used = TimeUtility.Minute * 60 + TimeUtility.Second;
                    }
                    else
                    {
                        used = TimeUtility.CrossServerNow.Minute * 60 + TimeUtility.CrossServerNow.Second;
                    }
                    var refreshSeconds = npcInfos[i].refreshMinute * 60;
                    var seconds = refreshSeconds - used % refreshSeconds;
                    var npcConfig = NPCConfig.Get(npcInfos[i].npcId);
@@ -138,25 +162,22 @@
        {
            if (!ClientDungeonStageUtility.isClientDungeon)
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                if (config != null)
                var mapId = PlayerDatas.Instance.baseData.MapID;
                var npcInfos = hazyGrassModel.GetGrassNpcInfos(mapId);
                if (npcInfos != null)
                {
                    var npcInfos = hazyGrassModel.GetGrassNpcInfos(config.dungeonId);
                    if (npcInfos != null)
                    int[] npcs = new int[npcInfos.Count];
                    for (int i = 0; i < npcInfos.Count; i++)
                    {
                        int[] npcs = new int[npcInfos.Count];
                        for (int i = 0; i < npcInfos.Count; i++)
                        {
                            npcs[i] = npcInfos[i].npcId;
                        }
                        var pak = new CA227_tagCMQueryNPCCntInfo();
                        pak.MapID = (uint)config.dungeonId;
                        pak.LineID = (ushort)config.lineId;
                        pak.NPCIDList = LitJson.JsonMapper.ToJson(npcs);
                        pak.NPCIDListLen = (byte)pak.NPCIDList.Length;
                        GameNetSystem.Instance.SendInfo(pak);
                        npcs[i] = npcInfos[i].npcId;
                    }
                    var pak = new CA227_tagCMQueryNPCCntInfo();
                    pak.MapID = (uint)mapId;
                    pak.LineID = (ushort)PlayerDatas.Instance.baseData.dungeonLineId;
                    pak.NPCIDList = LitJson.JsonMapper.ToJson(npcs);
                    pak.NPCIDListLen = (byte)pak.NPCIDList.Length;
                    GameNetSystem.Instance.SendToCrossServer(pak);
                }
            }
        }
System/HazyRegion/HazyRegionIncidentBehaviour.cs
@@ -8,11 +8,12 @@
{
    public class HazyRegionIncidentBehaviour : ScrollItem
    {
        [SerializeField] SmoothMask m_SmoothMask;
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] UILinerMove m_LinerMove;
        [SerializeField] Text m_IncidentTitle;
        [SerializeField] Text m_DepletionPoint;
        [SerializeField] Image m_Icon;
        [SerializeField] ImageEx m_Icon;
        [SerializeField] Transform m_ContainerCrossServer;
@@ -36,8 +37,25 @@
        public UILinerMove linerMove { get { return m_LinerMove; } }
        HazyRegionModel model { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
        FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
        int incidentId = 0;
        bool m_BossAlive = false;
        bool bossAlive
        {
            get { return m_BossAlive; }
            set
            {
                if (m_BossAlive != value)
                {
                    m_BossAlive = value;
                    DisplayBossState();
                }
            }
        }
        float timer = 0f;
        HazyRegionIncidentType incidentType = HazyRegionIncidentType.Adventure;
@@ -54,6 +72,11 @@
            var config = HazyRegionConfig.Get(incidentId);
            incidentType = (HazyRegionIncidentType)config.incidentType;
            if (incidentType == HazyRegionIncidentType.DemonKing)
            {
                m_BossAlive = findPreciousModel.IsBossAlive(config.npcId);
            }
            DisplayBase();
            DisplayItems();
            DisplayState();
@@ -64,6 +87,8 @@
            model.selectIncidentRefresh += SelectIncidentRefresh;
            model.onHazyRegionIncidentRefresh -= OnHazyRegionIncidentRefresh;
            model.onHazyRegionIncidentRefresh += OnHazyRegionIncidentRefresh;
            findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
            findPreciousModel.bossInfoUpdateEvent += BossInfoUpdateEvent;
        }
        void DisplayBase()
@@ -73,6 +98,7 @@
            m_IncidentTitle.text = config.name;
            m_Icon.SetSprite(config.PortraitID);
            m_Icon.SetNativeSize();
            m_Icon.material = m_SmoothMask.imageMaterials[0];
            m_ContainerCrossServer.gameObject.SetActive(config.crossServer == 1);
        }
@@ -123,8 +149,51 @@
                }
                else
                {
                    m_PlayerCount.gameObject.SetActive(false);
                    m_RebornTime.gameObject.SetActive(false);
                    var config = HazyRegionConfig.Get(incidentId);
                    m_PlayerCount.gameObject.SetActive(bossAlive);
                    m_RebornTime.gameObject.SetActive(!bossAlive);
                    m_Icon.material = bossAlive ? m_SmoothMask.imageMaterials[0] : m_SmoothMask.imageMaterials[1];
                    if (!bossAlive)
                    {
                        DisplayBossRebornTime();
                    }
                    else
                    {
                        m_PlayerCount.text = Language.Get("HazyDemonKingPlayerCount", 0);
                    }
                }
            }
        }
        void DisplayBossRebornTime()
        {
            var config = HazyRegionConfig.Get(incidentId);
            if (config != null)
            {
                FindPreciousModel.BossInfo bossInfo;
                if (findPreciousModel.TryGetBossInfo(config.npcId, out bossInfo))
                {
                    var seconds = Mathf.Max(0, Mathf.CeilToInt((float)(bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds));
                    m_RebornTime.text = string.Format("{0}后刷新", TimeUtility.SecondsToHMS(seconds));
                }
            }
        }
        private void LateUpdate()
        {
            timer += Time.deltaTime;
            if (timer >= 0.5f)
            {
                timer = 0f;
                if (incidentType == HazyRegionIncidentType.DemonKing)
                {
                    if (!bossAlive)
                    {
                        DisplayBossRebornTime();
                    }
                    var config = HazyRegionConfig.Get(incidentId);
                    bossAlive = findPreciousModel.IsBossAlive(config.npcId);
                }
            }
        }
@@ -159,9 +228,22 @@
            model.selectIncident = incidentId;
        }
        private void BossInfoUpdateEvent(int npcId)
        {
            if (incidentType == HazyRegionIncidentType.DemonKing)
            {
                var config = HazyRegionConfig.Get(incidentId);
                if (config.npcId == npcId)
                {
                    DisplayBossState();
                }
            }
        }
        public override void Dispose()
        {
            base.Dispose();
            findPreciousModel.bossInfoUpdateEvent -= BossInfoUpdateEvent;
            model.selectIncidentRefresh -= SelectIncidentRefresh;
            model.onHazyRegionIncidentRefresh -= OnHazyRegionIncidentRefresh;
        }
System/WorldMap/LocalMapTag.cs
@@ -5,7 +5,6 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
Utility/ConfigInitiator.cs
@@ -244,7 +244,6 @@
        normalTasks.Add(new ConfigInitTask("EquipGSParamConfig", () => { EquipGSParamConfig.Init(); }, () => { return EquipGSParamConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("EquipSuitAttrConfig", () => { EquipSuitAttrConfig.Init(); }, () => { return EquipSuitAttrConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("EquipWashConfig", () => { EquipWashConfig.Init(); }, () => { return EquipWashConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("EquipWashSpecConfig", () => { EquipWashSpecConfig.Init(); }, () => { return EquipWashSpecConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("FaceConfig", () => { FaceConfig.Init(); }, () => { return FaceConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("FairyGrabBossConfig", () => { FairyGrabBossConfig.Init(); }, () => { return FairyGrabBossConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("FamilyConfig", () => { FamilyConfig.Init(); }, () => { return FamilyConfig.inited; }));
Utility/TimeUtility.cs
@@ -22,6 +22,19 @@
        private set { s_ServerTime = value; }
    }
    static DateTime s_CrossServerTime = DateTime.Now;
    static float _crossCheckTime = 0;
    public static DateTime CrossServerNow
    {
        get
        {
            float tick = Time.realtimeSinceStartup - _crossCheckTime;
            DateTime real = s_CrossServerTime.AddSeconds(tick);
            return real;
        }
        private set { s_CrossServerTime = value; }
    }
    /// <summary>
    /// 年份
    /// </summary>
@@ -151,19 +164,22 @@
    public static event Action OnServerTimeRefresh;
    public static void OnRefreshServerTime(HA004_tagServerDateTime vNetData)
    {
        var dateTime = new DateTime(vNetData.Year, vNetData.Month, vNetData.Day, vNetData.Hour, vNetData.Minute, vNetData.Second);
        if (vNetData.socketType == ServerType.CrossSever)
        {
            return;
            s_CrossServerTime = dateTime;
            _crossCheckTime = Time.realtimeSinceStartup;
        }
        DateTime n = new DateTime(vNetData.Year, vNetData.Month, vNetData.Day, vNetData.Hour, vNetData.Minute, vNetData.Second);
        s_ServerTime = n;
        DebugEx.Log("OnRefreshServerTime月份:" + s_ServerTime.Month);
        _checkTime = Time.realtimeSinceStartup;
        if (OnServerTimeRefresh != null)
        else
        {
            OnServerTimeRefresh();
            s_ServerTime = dateTime;
            _checkTime = Time.realtimeSinceStartup;
            if (OnServerTimeRefresh != null)
            {
                OnServerTimeRefresh();
            }
        }
        TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.SyncServerTime, 60, (float tick) =>
        {
            SyncServerTime();
@@ -173,15 +189,14 @@
    public static event Action OnServerOpenDayRefresh;
    public static void OnRefreshServerOpenDay(HA005_tagOpenServerDay package)
    {
        if (package.socketType == ServerType.CrossSever)
        if (package.socketType != ServerType.CrossSever)
        {
            return;
            OpenDay = package.Day;
            IsMixServer = package.IsMixServer == 1;
            MixOpenDay = package.MixDay;
            openServerDayOfWeek = package.OpenWeekday == 7 ? DayOfWeek.Sunday : (DayOfWeek)package.OpenWeekday;
        }
        OpenDay = package.Day;
        IsMixServer = package.IsMixServer == 1;
        MixOpenDay = package.MixDay;
        openServerDayOfWeek = package.OpenWeekday == 7 ? DayOfWeek.Sunday : (DayOfWeek)package.OpenWeekday;
        OnRefreshServerTime(new HA004_tagServerDateTime()
        {
            Year = package.NowYear,
@@ -191,9 +206,12 @@
            Minute = package.NowMinute,
            Second = package.NowSecond,
            MicSecond = package.NowMicSecond,
            socketType = package.socketType,
        });
        //DateTime.TryParse(package.OpenServerTime, out openServerTime);
        if (OnServerOpenDayRefresh != null)
        if (package.socketType != ServerType.CrossSever
            && OnServerOpenDayRefresh != null)
        {
            OnServerOpenDayRefresh();
        }
@@ -201,8 +219,12 @@
    public static void SyncServerTime()
    {
        CA002_tagClientRequestServerTime pack = new CA002_tagClientRequestServerTime();
        GameNetSystem.Instance.SendInfo(pack);
        CA002_tagClientRequestServerTime pak = new CA002_tagClientRequestServerTime();
        GameNetSystem.Instance.SendInfo(pak);
        if (GameNetSystem.Instance.crossServerSocketConnected)
        {
            GameNetSystem.Instance.SendToCrossServer(pak);
        }
    }
    /// <summary>
    /// 根据服务器下发的秒数获取时间