少年修仙传客户端代码仓库
client_Wu Xijin
2018-12-07 fc14844134b5ed2c8a4e2e3ad9042c8cbaab43ef
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
1个文件已修改
46 ■■■■■ 已修改文件
System/OpenServerActivity/FlashRushToBuyCoolDown.cs 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashRushToBuyCoolDown.cs
@@ -14,21 +14,23 @@
        private void OnEnable()
        {
            SecondEvent();
            GlobalTimeEvent.Instance.secondEvent -= SecondEvent;
            GlobalTimeEvent.Instance.secondEvent += SecondEvent;
            DisplayTime();
            WindowCenter.Instance.windowBeforeOpenEvent += OpenWindow;
        }
        private void OnDisable()
        {
            GlobalTimeEvent.Instance.secondEvent -= SecondEvent;
            WindowCenter.Instance.windowBeforeOpenEvent -= OpenWindow;
        }
        private void SecondEvent()
        private void OpenWindow(Window win)
        {
            if (win.name != typeof(MainInterfaceWin).Name) return;
            DisplayTime();
        }
        void DisplayTime()
        {
@@ -43,22 +45,38 @@
                case FlashRushToBuyModel.FlashRushToBuySate.NoOpen:
                    break;
                case FlashRushToBuyModel.FlashRushToBuySate.InAdvance:
                    if(seconds <= 3600)
                    int saleDay = operation.startDate.day + saleShop.dayIndex;
                    int offsetDay = saleDay - TimeUtility.ServerNow.Day;
                    if(offsetDay > 1)
                    {
                        int split = (3600 - seconds)/30 % 2;
                        if(split == 0)
                        string saleDate = StringUtility.Contact(operation.startDate.month, Language.Get("Month"),saleDay,Language.Get("Day"));
                        timeText.text = saleDate;
                    }
                    else if(offsetDay == 1)
                        {
                            timeText.text = Language.Get("FlashRushToBuy109", TimeUtility.SecondsToMS(seconds));
                        timeText.text = Language.Get("FlashRushToBuy110");
                        }
                        else
                        {
                            timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute));
                        }
                    }
                    else
                    {
                        timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute));
                    }
                    //if(seconds <= 3600)
                    //{
                    //    int split = (3600 - seconds)/30 % 2;
                    //    if(split == 0)
                    //    {
                    //        timeText.text = Language.Get("FlashRushToBuy109", TimeUtility.SecondsToMS(seconds));
                    //    }
                    //    else
                    //    {
                    //        timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute));
                    //    }
                    //}
                    //else
                    //{
                    //    timeText.text = Language.Get("FlashRushToBuy106", operation.ToDisplayBuyTime(operationTime.startHour, operationTime.startMinute));
                    //}
                    break;
                case FlashRushToBuyModel.FlashRushToBuySate.Begining:
                    timeText.text = Language.Get("FlashRushToBuy107");