示例#1
0
        public DailyMission GetDailyMissionByKind(int nKind)
        {
            if (nKind >= 0 && nKind < MAX_DAILYMISSION_KINDS)
            {
                return(m_DailyMissionList[nKind]);
            }

            DailyMission mission = new DailyMission();

            mission.CleanUp();
            return(mission);
        }
示例#2
0
        public void HandlePacket(GC_DAILYMISSION_UPDATE_RET packet)
        {
            DailyMissionDoneCount = packet.Donecount;
            int nKind = packet.Type;

            if (nKind == MAX_DAILYMISSION_KINDS)
            {
                for (int i = 0; i < packet.missionIDCount; i++)
                {
                    DailyMission data = new DailyMission();
                    data.CleanUp();
                    data.MissionID = packet.GetMissionID(i);
                    data.Quality   = (byte)packet.GetQualityType(i);
                    if (i < m_DailyMissionList.Length)
                    {
                        m_DailyMissionList[i] = data;
                    }
                }

                if (ActivityController.Instance())
                {
                    ActivityController.Instance().UpdateDailyMissionList();
                }
            }
            else if (nKind > GlobeVar.INVALID_ID && nKind < MAX_DAILYMISSION_KINDS)
            {
                DailyMission data = new DailyMission();
                data.CleanUp();
                data.MissionID            = packet.GetMissionID(0);
                data.Quality              = (byte)packet.GetQualityType(0);
                m_DailyMissionList[nKind] = data;
                if (ActivityController.Instance())
                {
                    ActivityController.Instance().UpdateMissionItemByKind(nKind);
                }
            }
        }