Exemplo n.º 1
0
        public uint Execute(PacketDistributed ipacket)
        {
            GC_DAILYMISSION_UPDATE_RET packet = (GC_DAILYMISSION_UPDATE_RET )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            GameManager.gameManager.PlayerDataPool.DailyMissionData.HandlePacket(packet);
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Exemplo n.º 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);
                }
            }
        }