| | |
| | |
|
| | | public int timeOverdueGiftId { get; private set; }
|
| | | public DateTime overDueTime = DateTime.Now;
|
| | | public bool allOverdue { get; private set; }
|
| | | public void UpdateTime(HAA16_tagMCSuperGiftInfo package)
|
| | | {
|
| | | timeOverdueGiftId = (int)package.GiftID;
|
| | | var _time = new DateTime(TimeUtility.Year, TimeUtility.Month, TimeUtility.Day, 0, 0, 0);
|
| | | overDueTime = _time.AddDays(package.RemainDay);
|
| | | allOverdue = package.RemainDay == 0;
|
| | | overDueTime = ParseOverdueTime(package.EndtDate);
|
| | | bool _activate = CheckActivate();
|
| | | if (activate != _activate)
|
| | | {
|
| | |
| | | timeLimitUpdate();
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | DateTime ParseOverdueTime(string _date)
|
| | | {
|
| | | var array = _date.Split('-');
|
| | | var year = int.Parse(array[0]);
|
| | | var month = int.Parse(array[1]);
|
| | | var day = int.Parse(array[2]);
|
| | | var time = new DateTime(year, month, day, 0, 0, 0);
|
| | | return time.AddDays(1);
|
| | | }
|
| | |
|
| | | private void FirstChargeRewardEvent()
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | if (allOverdue)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | List<StoreConfig> _list = null;
|
| | | StoreConfig.TryGetStoreConfigs((int)StoreFunc.OSGift,out _list);
|
| | | for (int i = 0; i < _list.Count; i++)
|
| | |
| | |
|
| | | public bool IsGiftOverdue(int _id)
|
| | | {
|
| | | if (allOverdue || _id < timeOverdueGiftId)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | if (_id == timeOverdueGiftId)
|
| | | {
|
| | | return TimeUtility.ServerNow >= overDueTime;
|
| | | }
|
| | | return false;
|
| | | return true;
|
| | | }
|
| | |
|
| | | public bool IsGiftBuy(int _id)
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | allOverdue = false;
|
| | | timeOverdueGiftId = 0;
|
| | | }
|
| | |
|