Exemplo n.º 1
0
 public void AddNew7DayOnlineAwardLine(OnlineAwardLine DataLine)
 {
     if (m_New7DayOnlineAwardTable.ContainsKey(DataLine.ID))
     {
         m_New7DayOnlineAwardTable[DataLine.ID] = DataLine;
     }
     else
     {
         m_New7DayOnlineAwardTable.Add(DataLine.ID, DataLine);
     }
 }
Exemplo n.º 2
0
        public void HandlePacket(GC_SYNC_NEW7DAYONLINEAWARDTABLE packet)
        {
            bool isShow = packet.IsShow > 0;

            ShowNew7DayOnlineAwardWindow = isShow;
            if (isShow)
            {
                for (int i = 0; i < packet.idCount; i++)
                {
                    OnlineAwardLine DataLine = new OnlineAwardLine();
                    DataLine.ID          = packet.GetId(i);
                    DataLine.LeftTime    = packet.GetLefttime(i);
                    DataLine.Exp         = packet.GetExp(i);
                    DataLine.Money       = packet.GetMoney(i);
                    DataLine.BindYuanbao = packet.GetBindyuanbao(i);
                    DataLine.Item1DataID = packet.GetItem1dataid(i);
                    DataLine.Item1Count  = packet.GetItem1count(i);
                    DataLine.Item2DataID = packet.GetItem2dataid(i);
                    DataLine.Item2count  = packet.GetItem2count(i);
                    AddNew7DayOnlineAwardLine(DataLine);

                    if (packet.HasStartDate)
                    {
                        m_sNew7DayOnlineDateTime.StartDate = packet.StartDate;
                    }
                    if (packet.HasEndDate)
                    {
                        m_sNew7DayOnlineDateTime.EndDate = packet.EndDate;
                    }
                    if (packet.HasStartTime)
                    {
                        m_sNew7DayOnlineDateTime.StartTime = packet.StartTime;
                    }
                    if (packet.HasEndTime)
                    {
                        m_sNew7DayOnlineDateTime.EndTime = packet.EndTime;
                    }
                }
            }
        }