コード例 #1
0
        public static void HandleMissionServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 3:
                reply = new RMCPacketResponseMissionService_Method3();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 4:
                reply = new RMCPacketResponseMissionService_GetAllMissionTemplate();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 7:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC MissionService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #2
0
        public static void HandlePlayerProfileServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 2:
                reply = new RMCPResponseEmpty();
                break;

            case 0xF:
                reply = new RMCPacketResponsePlayerProfileService_GetAllFaceSkinTones();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0x10:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0x11:
                reply = new RMCPacketResponsePlayerProfileService_Method11();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0x12:
                reply = new RMCPacketResponsePlayerProfileService_LoadCharacterProfiles(client);
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC PlayerProfileService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #3
0
        public static void HandlePartyServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 1:
                reply = new RMCPacketResponsePartyService_GetInviteeList();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 4:
                reply = new RMCPacketResponsePartyService_GetInviteList();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 7:
            case 8:
            case 9:
            case 0xB:
            case 0xC:
            case 0xD:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC PartyService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #4
0
        public static void ProcessChatServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 0x5:
                reply = new RMCPacketResponseChatService_Method5();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0x9:
            case 0xA:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0xE:
                reply = new RMCPacketResponseChatService_GetPlayerStatuses();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0x10:
                reply = new RMCPacketResponseChatService_Method10();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC ChatService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #5
0
        public static void HandleStoreServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 1:
                reply = new RMCPacketResponseStoreService_GetSKUs();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 8:
                reply = new RMCPacketResponseStoreService_EnterCoupons();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 9:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0xB:
                reply = new RMCPacketResponseStoreService_GetShoppingDetails();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC StoreService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #6
0
        public static void HandleAuthenticationServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 2:
                RMCPacketRequestLoginCustomData h = (RMCPacketRequestLoginCustomData)rmc.request;
                switch (h.className)
                {
                case "UbiAuthenticationLoginCustomData":
                    reply = new RMCPResponseEmpty();
                    ClientInfo user = DBHelper.GetUserByName(h.username);
                    if (user != null)
                    {
                        if (user.pass == h.password)
                        {
                            reply             = new RMCPacketResponseLoginCustomData(client.PID, client.sPID, client.sPort);
                            client.name       = h.username;
                            client.pass       = h.password;
                            client.sessionKey = ((RMCPacketResponseLoginCustomData)reply).ticket.sessionKey;
                            RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                        }
                        else
                        {
                            RMC.SendResponseWithACK(client.udp, p, rmc, client, reply, true, 0x80030065);
                        }
                    }
                    else
                    {
                        RMC.SendResponseWithACK(client.udp, p, rmc, client, reply, true, 0x80030064);
                    }
                    break;

                default:
                    Log.WriteLine(1, "[RMC Authentication] Error: Unknown Custom Data class " + h.className);
                    break;
                }
                break;

            case 3:
                reply = new RMCPacketResponseRequestTicket(client.PID, client.sPID);
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC Authentication] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #7
0
        public static void HandleNATTraversalServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 1:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC NATTraversalService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }
コード例 #8
0
        public static void HandleAchievementsServiceRequest(QPacket p, RMCP rmc, ClientInfo client)
        {
            RMCPResponse reply;

            switch (rmc.methodID)
            {
            case 2:
                reply = new RMCPacketResponseAchievementsService_Method2();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 4:
                reply = new RMCPacketResponseAchievementsService_Method4();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 9:
                reply = new RMCPacketResponseAchievementsService_Method9();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0xC:
                reply = new RMCPResponseEmpty();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            case 0xD:
                reply = new RMCPacketResponseAchievementsService_MethodD();
                RMC.SendResponseWithACK(client.udp, p, rmc, client, reply);
                break;

            default:
                Log.WriteLine(1, "[RMC AchievementsService] Error: Unknown Method 0x" + rmc.methodID.ToString("X"));
                break;
            }
        }