Beispiel #1
0
        public override NET_RESULT_DEFINE.PACKET_EXE Execute(PacketBase pPacket, ref Peer pPlayer)
        {
            try
            {
                if (GameProcedure.GetActiveProcedure() == GameProcedure.s_ProcMain)
                {
                    CUIDataPool     pUIDataPool            = GameProcedure.s_pUIDataPool;
                    GCMissionModify newMissionModifyPacket = (GCMissionModify)pPacket;

                    SCommand_DPC cmdTemp = new SCommand_DPC();
                    cmdTemp.m_wID = DPC_SCRIPT_DEFINE.DPC_UPDATE_MISSION_MODIFY;

                    cmdTemp.SetValue <int>(1, newMissionModifyPacket.Flag);

                    if (newMissionModifyPacket.Flag == (int)GCMissionModify.MISSIONMODIFY.MISSIONMODIFY_MISSION)
                    {
                        cmdTemp.SetValue <_OWN_MISSION>(0, newMissionModifyPacket.GetMission());
                    }
                    else if (newMissionModifyPacket.Flag == (int)GCMissionModify.MISSIONMODIFY.MISSIONMODIFY_MISSIONDATA)
                    {
                        cmdTemp.SetValue <int[]>(0, newMissionModifyPacket.GetMissionData());
                    }
                    pUIDataPool.OnCommand_(cmdTemp);
                }

                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            catch (Exception e)
            {
                LogManager.LogError("--------------------GCMissionModifyHandler的Execute()方法出错。--------------------");
                LogManager.LogError(e.ToString());
                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_ERROR);
            }
        }
        public override NET_RESULT_DEFINE.PACKET_EXE Execute(PacketBase pPacket, ref Peer pPlayer)
        {
            try
            {
                if (GameProcedure.GetActiveProcedure() == GameProcedure.s_ProcMain)
                {
                    CUIDataPool      pUIDataPool    = GameProcedure.s_pUIDataPool;
                    GCRetMissionDesc newMissionDesc = (GCRetMissionDesc)pPacket;


                    SCommand_DPC cmdTemp = new SCommand_DPC();
                    cmdTemp.m_wID = DPC_SCRIPT_DEFINE.DPC_UPDATE_MISSION_DESC;

                    cmdTemp.SetValue <GCRetMissionDesc>(0, newMissionDesc);
                    pUIDataPool.OnCommand_(cmdTemp);
                }

                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            catch (Exception e)
            {
                LogManager.LogError("--------------------GCRetMissionDescHandler的Execute()方法出错。--------------------");
                LogManager.LogError(e.ToString());
                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_ERROR);
            }
        }
Beispiel #3
0
        public override NET_RESULT_DEFINE.PACKET_EXE Execute(PacketBase pPacket, ref Peer pPlayer)
        {
            try
            {
                GCMissionList newGCMissionList = (GCMissionList)pPacket;
                CUIDataPool   pUIDataPool      = GameProcedure.s_pUIDataPool;

                if (GameProcedure.GetActiveProcedure() == GameProcedure.s_ProcMain)
                {
                    // 保存任务是否完成标志
                    if (CDetailAttrib_Player.Instance != null)
                    {
                        CDetailAttrib_Player.Instance.SetMissionHaveDone(newGCMissionList.GetMissionHaveDone());
                    }

                    SCommand_DPC cmdTemp = new SCommand_DPC();
                    cmdTemp.m_wID = DPC_SCRIPT_DEFINE.DPC_UPDATE_MISSION_LIST;

                    cmdTemp.SetValue <uint>(0, newGCMissionList.ObjID);
                    cmdTemp.SetValue <uint>(1, newGCMissionList.MissionListFlags);
                    cmdTemp.SetValue <_OWN_MISSION[]>(2, newGCMissionList.GetMissionBuf());
                    pUIDataPool.OnCommand_(cmdTemp);
                }

                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            catch (Exception e)
            {
                LogManager.LogError("--------------------GCMissionListHandler的Execute()方法出错。--------------------");
                LogManager.LogError(e.ToString());
                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_ERROR);
            }
        }
Beispiel #4
0
        public override NET_RESULT_DEFINE.PACKET_EXE Execute(PacketBase pPacket, ref Peer pPlayer)
        {
            try
            {
                if (GameProcedure.GetActiveProcedure() == GameProcedure.s_ProcMain)
                {
                    //加入UI数据池
                    CUIDataPool pUIDataPool = GameProcedure.s_pUIDataPool;
                    GCRemoveCanPickMissionItem newRemoveCanPickMissionItem = (GCRemoveCanPickMissionItem)pPacket;

                    SCommand_DPC cmdTemp = new SCommand_DPC();
                    cmdTemp.m_wID = DPC_SCRIPT_DEFINE.DPC_REMOVE_CAN_PICK_MISSION_ITEM;
                    cmdTemp.SetValue <uint>(0, newRemoveCanPickMissionItem.ItemDataID);

                    pUIDataPool.OnCommand_(cmdTemp);
                }

                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_CONTINUE);
            }
            catch (Exception e)
            {
                LogManager.LogError("--------------------GCRemoveCanPickMissionItemHandler的Execute()方法出错。--------------------");
                LogManager.LogError(e.ToString());
                return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_ERROR);
            }
        }
        public override NET_RESULT_DEFINE.PACKET_EXE Execute(PacketBase pPacket, ref Peer pPlayer)
        {
            if (GameProcedure.GetActiveProcedure() == (GameProcedure)GameProcedure.s_ProcMain)
            {
                GCTeamResult packet    = pPacket as GCTeamResult;
                CUIDataPool  pDataPool = CUIDataPool.Instance;

                SCommand_DPC cmdTemp = new SCommand_DPC();
                cmdTemp.m_wID = DPC_SCRIPT_DEFINE.DPC_UPDATE_TEAM_OR_GROUP;

                cmdTemp.SetValue <byte> (0, packet.Return);
                cmdTemp.SetValue <uint> (1, packet.GUID);
                cmdTemp.SetValue <short>(2, packet.TeamId);
                cmdTemp.SetValue <uint> (3, packet.GUIDEx);
                cmdTemp.SetValue <short>(4, packet.SceneId);
                cmdTemp.SetValue <int>  (5, packet.Portrait);
                cmdTemp.SetValue <short>(6, packet.DataID);
                cmdTemp.SetValue <byte> (7, packet.AllocRuler);
                cmdTemp.SetValue <byte[]>(8, packet.Name);
                pDataPool.OnCommand_(cmdTemp);
                CEventSystem.Instance.PushEvent(GAME_EVENT_ID.GE_TEAM_CHANG_WORLD);
            }
            return(NET_RESULT_DEFINE.PACKET_EXE.PACKET_EXE_CONTINUE);
        }