| using System.Collections; | 
| using System.Collections.Generic; | 
| using UnityEngine; | 
| namespace vnxbqy.UI  | 
| {  | 
|     public class OperationFestivalRedpack : OperationBase  | 
|     {  | 
|         List<RedpackInfo> m_Redpacks = new List<RedpackInfo>();  | 
|         public List<RedpackInfo> redpacks  | 
|         {  | 
|             get { return m_Redpacks; }  | 
|         }  | 
|   | 
|         public void ParsePackage(HAC11_tagGCFeastRedPacketInfo package)  | 
|         {  | 
|             m_Redpacks.Clear();  | 
|             if (package.RedPacketDays > 0)  | 
|             {  | 
|                 foreach (var info in package.RedPacketDayList)  | 
|                 {  | 
|                     var redpack = new RedpackInfo();  | 
|                     for (int i = 0; i < info.RedPacketCount; i++)  | 
|                     {  | 
|                         redpack.redpacks.Add(info.RedPacketIDList[i]);  | 
|                     }  | 
|                     m_Redpacks.Add(redpack);  | 
|                 }  | 
|             }  | 
|         }  | 
|   | 
|         public int GetCurrentDay()  | 
|         {  | 
|             return IndexOfDays(TimeUtility.ServerNow);  | 
|         }  | 
|   | 
|         public int GetIndexOfTime()  | 
|         {  | 
|             return IndexOfTime(TimeUtility.ServerNow);  | 
|         }  | 
|   | 
|         public override void Reset()  | 
|         {  | 
|             base.Reset();  | 
|             m_Redpacks.Clear();  | 
|         }  | 
|   | 
|         public override string ToDisplayTime()  | 
|         {  | 
|             var textBuilder = OperationTimeHepler.textBuilder;  | 
|             textBuilder.Length = 0;  | 
|             textBuilder.Append(startDate.ToDisplay());  | 
|             if (startDate != endDate)  | 
|             {  | 
|                 textBuilder.Append("—");  | 
|                 textBuilder.Append(endDate.ToDisplay());  | 
|             }  | 
|             return textBuilder.ToString();  | 
|         }  | 
|   | 
|         public class RedpackInfo  | 
|         {  | 
|             public List<int> redpacks = new List<int>();  | 
|         }  | 
|     }  | 
| } |