少年修仙传客户端代码仓库
lcy
7 天以前 e59112d8aecdd863bd04965bd6e2de883753bb5a
10290 运势-客户端

1.修复活动时间计算方式
2.运势礼包展示的时间改为入口开放时间
3.当运势活动关闭时关闭界面
3个文件已修改
76 ■■■■ 已修改文件
System/LoopAct/YunShi/OperationYunShi.cs 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/LoopAct/YunShi/YunShiRechargeGiftActWin.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/LoopAct/YunShi/YunShiXBActModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/LoopAct/YunShi/OperationYunShi.cs
@@ -14,14 +14,45 @@
        {
            var textBuilder = OperationTimeHepler.textBuilder;
            textBuilder.Length = 0;
            textBuilder.Append(startDate.ToDisplay(false));
            textBuilder.Append(string.Format(" {0}:{1}", joinStartHour.ToString("D2"), joinStartMinute.ToString("D2")));
            if (startDate != endDate)
            OperationDate adjustedStartDate = startDate;
            int adjustedStartHour = joinStartHour;
            int adjustedStartMinute = joinStartMinute;
            if (resetType == 0)
            {
                textBuilder.Append(" - ");
                textBuilder.Append(endDate.ToDisplay(false));
                textBuilder.Append(string.Format(" {0}:{1}", joinEndHour.ToString("D2"), joinEndMinute.ToString("D2")));
                adjustedStartHour = 0;
                adjustedStartMinute = 0;
            }
            else if (resetType == 1)
            {
                adjustedStartHour = 4;
                adjustedStartMinute = 59;
            }
            textBuilder.Append(adjustedStartDate.ToDisplay(false));
            textBuilder.Append(string.Format(" {0}:{1}", adjustedStartHour.ToString("D2"), adjustedStartMinute.ToString("D2")));
            OperationDate adjustedEndDate = endDate;
            int adjustedEndHour = joinEndHour;
            int adjustedEndMinute = joinEndMinute;
            if (resetType == 0)
            {
                adjustedEndDate.day += 1;
            }
            else if (resetType == 1)
            {
                adjustedEndDate.day += 1;
                adjustedEndHour = 4;
                adjustedEndMinute = 59;
            }
            textBuilder.Append(" - ");
            textBuilder.Append(adjustedEndDate.ToDisplay(false));
            textBuilder.Append(string.Format(" {0}:{1}", adjustedEndHour.ToString("D2"), adjustedEndMinute.ToString("D2")));
            return textBuilder.ToString();
        }
System/LoopAct/YunShi/YunShiRechargeGiftActWin.cs
@@ -9,7 +9,7 @@
        [SerializeField] TextEx actTime;
        YunShiRechargeGiftActModel model { get { return ModelCenter.Instance.GetModel<YunShiRechargeGiftActModel>(); } }
        VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
        HappyXBModel happyXBModel { get { return ModelCenter.Instance.GetModelEx<HappyXBModel>(); } }
        StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
        #region Built-in
@@ -25,11 +25,18 @@
        protected override void OnPreOpen()
        {
            scroller.OnRefreshCell += OnRefreshCell;
            GlobalTimeEvent.Instance.secondEvent += secondEvent;
            vipModel.rechargeCountEvent += VipModel_rechargeCountEvent;
            storeModel.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent;
            DisplayScroll();
            secondEvent();
            OperationYunShi act;
            OperationTimeHepler.Instance.TryGetOperation(YunShiXBActModel.operaType, out act);
            if (act == null)
                return;
            int type = act.treasureType;
            var xbInfo = happyXBModel.GetXBInfoByType(type);
            if (xbInfo == null)
                return;
            actTime.text = Language.Get("RidingPetBossQuestTime", act.ToDisplayTime());
        }
        private void VipModel_rechargeCountEvent(int obj)
@@ -44,7 +51,6 @@
        protected override void OnPreClose()
        {
            scroller.OnRefreshCell -= OnRefreshCell;
            GlobalTimeEvent.Instance.secondEvent -= secondEvent;
            vipModel.rechargeCountEvent -= VipModel_rechargeCountEvent;
            storeModel.RefreshBuyShopLimitEvent -= RefreshBuyShopLimitEvent;
        }
@@ -122,13 +128,6 @@
            return 0;
        }
        private void secondEvent()
        {
            OperationRechargeGiftAct act;
            OperationTimeHepler.Instance.TryGetOperation(YunShiRechargeGiftActModel.operaType, out act);
            if (act == null)
                return;
            actTime.text = Language.Get("RidingPetBossQuestTime", act.ToDisplayTimeEx());
        }
    }
}
System/LoopAct/YunShi/YunShiXBActModel.cs
@@ -122,7 +122,15 @@
        private void OnOperationTimeUpdateEvent(Operation operation)
        {
            UpdateRedPoint();
            if (operation == Operation.default48)
            {
                if (WindowCenter.Instance.IsOpen<YunShiWin>())
                {
                    WindowCenter.Instance.Close<YunShiWin>();
                }
                UpdateRedPoint();
            }
        }
        private void OnRefreshXBTypeInfoAct()