Пример #1
0
    public void ResponseEventReturnReceive(RES_EVENT_COMEBACK_RECEIVE info)
    {
        m_isReturnEventUpdate = true;

        List <int> newIndexList = m_returnEventInfo.GetNewRewardIndexList(info.rewardIdxs);

        UpdateEventInfoNew((int)EVENT_TYPE.EVENT_COMEBACK);
        m_returnEventInfo.UpdateInfo(info);

        m_eventWindow.UIWindowResponse(EVENT_TYPE.EVENT_COMEBACK, newIndexList);
    }
Пример #2
0
    public void UpdateInfo(RES_EVENT_COMEBACK_RECEIVE info)
    {
        this.m_groupIndex = info.group;

        this.m_rewardComplete = info.evtConfirm;
        this.m_rewardTime     = info.rewardTime;

        this.m_rewardCompleteIdxList = Util.ToList(info.rewardIdxs);

        this.m_dailyRewardList   = new List <EventReturnInfo>();
        this.m_packageRewardList = new List <EventReturnInfo>();

        this.m_packageRewardComplete = false;
        this.m_rewardEnableDay       = 0;

        List <EventReturnInfo> infoList = EventManager.instance.GetEventTable.GetEventReturnInfo(info.group);

        if (infoList != null)
        {
            for (int i = 0; i < infoList.Count; i++)
            {
                if (infoList[i].sort.Equals(SORT_PACKAGE_INDEX))
                {
                    m_packageRewardList.Add(infoList[i]);

                    if (m_packageRewardComplete == false && CheckRewardComplete(infoList[i].index))
                    {
                        m_packageRewardComplete = true;
                    }
                }

                else
                {
                    m_dailyRewardList.Add(infoList[i]);

                    if (CheckRewardComplete(infoList[i].index))
                    {
                        m_rewardEnableDay++;
                    }
                }
            }

            m_packageRewardList.Sort(delegate(EventReturnInfo a, EventReturnInfo b) {
                return(a.index.CompareTo(b.index));
            });

            m_dailyRewardList.Sort(delegate(EventReturnInfo a, EventReturnInfo b) {
                return(a.index.CompareTo(b.index));
            });
        }
    }