| | |
| | | operation.limitLv = package.LimitLV;
|
| | | operation.startDate = ParseOperationDate(package.StartDate);
|
| | | operation.endDate = ParseOperationDate(package.EndtDate);
|
| | | operation.dateEnumerator = new OperationDateEnumerator(operation.startDate, operation.endDate);
|
| | | operation.dayReset = package.IsDayReset == 1;
|
| | | if (package.ActivityTimeCount == 0)
|
| | | {
|
| | |
| | | {
|
| | | return 0;
|
| | | }
|
| | | var _dayIndex = IndexOfOpenDay(TimeUtility.ServerNow);
|
| | | if (_dayIndex == -1)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | var _timeIndex = IndexOfOpenTime(TimeUtility.ServerNow);
|
| | | if (_timeIndex == -1)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | return Mathf.Min(flashShops.Count - 1, allDay ? _dayIndex : _dayIndex * 2 + _timeIndex);
|
| | | return Mathf.Min(flashShops.Count - 1, allDay ? 0 : _timeIndex);
|
| | | }
|
| | |
|
| | | public FlashSaleGift GetFlashSaleGift(int _index, int _id)
|
| | |
| | | return textBuilder.ToString();
|
| | | }
|
| | |
|
| | | public int GetSurplusTime(int index)
|
| | | {
|
| | | if (!InTime(TimeUtility.ServerNow))
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var seconds = 0;
|
| | | if (times.Count == 0)
|
| | | {
|
| | | DateTime endOperationTime = new DateTime(TimeUtility.Year, TimeUtility.Month,
|
| | | TimeUtility.Day, 0, 0, 0);
|
| | | endOperationTime = endOperationTime.AddDays(1);
|
| | | seconds = (int)(endOperationTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | }
|
| | | if (index >= 0 && index < times.Count)
|
| | | {
|
| | | var _endTime = times[index];
|
| | | DateTime endOperationTime = new DateTime(TimeUtility.Year, TimeUtility.Month,
|
| | | TimeUtility.Day, _endTime.endHour, _endTime.endMinute, 0);
|
| | | seconds = (int)(endOperationTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | }
|
| | | return seconds;
|
| | | }
|
| | |
|
| | | public struct FlashSale
|
| | | {
|
| | | public FlashSaleGift[] gifts;
|
| | |
| | | {
|
| | | return 0;
|
| | | }
|
| | | var _dayIndex = IndexOfOpenDay(TimeUtility.ServerNow);
|
| | | if (_dayIndex == -1)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | var _timeIndex = IndexOfOpenTime(TimeUtility.ServerNow);
|
| | | if (_timeIndex == -1)
|
| | | {
|
| | | return -1;
|
| | | }
|
| | | return Mathf.Min(giftpackage1.Count - 1, allDay ? _dayIndex : _dayIndex * 2 + _timeIndex);
|
| | | return Mathf.Min(giftpackage1.Count - 1, allDay ? 0 : _timeIndex);
|
| | | }
|
| | |
|
| | | public GiftPackageGift GetFlashSaleGift(int _index, int _id)
|