少年修仙传客户端代码仓库
client_Hale
2018-09-18 bc49768eaf9757e20bd264dc6183b2497780ee08
System/Vip/LimitedTimePackageWin.cs
@@ -107,9 +107,19 @@
                            if (limitedTimePackageItemModel.IsExpired())
                            {
                                m_Buy_Btn.interactable = false;
                                time = 0;
                                limitedTimePackageItemModel.OpenFreePlat(str, gift.gifts[0].rmb, gift.gifts[0].OrderInfo);
                                if (OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage))
                                {
                                    SysNotifyMgr.Instance.ShowTip("LimitGilt1");
                                    return;
                                }
                                else
                                {
                                    m_Buy_Btn.interactable = false;
                                    time = 0;
                                    limitedTimePackageItemModel.OpenFreePlat(str, gift.gifts[0].rmb, gift.gifts[0].OrderInfo);
                                    return;
                                }
                            }
                            else
                            {
@@ -160,8 +170,8 @@
                        }
                    }
                }
                // m_Text_ActivityTimeTo.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"), operation.ToDisplayTime());
            }
            DisplaySurplusTime();
        }
@@ -190,18 +200,42 @@
        }
        private void secondEvent()
        {
            int time = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.GiftPackage);
            if (time <= 0)
            DisplaySurplusTime();
        }
        private void DisplaySurplusTime()
        {
            OperationBase operationBase;
            OperationTimeHepler.Instance.TryGetOperationTime(Operation.GiftPackage, out operationBase);
            var seconds = 0;
            var inAdvance = false;
            if (operationBase != null)
            {
                m_Text_ActivityTimeTo.text = Language.Get("LimitGift2");
                if (operationBase.InAdvanceTime(TimeUtility.ServerNow))
                {
                    inAdvance = true;
                    seconds = operationBase.GetSecondsBeforeStart(TimeUtility.ServerNow);
                }
                else
                {
                    GiftPackageClass operation = operationBase as GiftPackageClass;
                    seconds = operation.GetResetSurplusTime();
                }
            }
            if (time > 0)
            if (seconds > 0)
            {
                string str = String.Format(Language.Get("LimitGift1"), TimeUtility.SecondsToDHMSCHS(time));
                m_Text_ActivityTimeTo.text = str;
             //  m_Text_ActivityTimeTo.color = UIHelper.GetUIColor(TextColType.Green);
                if (inAdvance)
                {
                    m_Text_ActivityTimeTo.text = Language.Get("OperationAdvanceOpen", TimeUtility.SecondsToDHMSCHS(seconds));
                }
                else
                {
                    m_Text_ActivityTimeTo.text = Language.Get("LimitGift1", TimeUtility.SecondsToDHMSCHS(seconds));
                }
            }
            else
            {
                m_Text_ActivityTimeTo.text = Language.Get("ActivityEnd");
            }
        }
        #endregion