public static void HandleRequest(ClientInfo client, QPacket p, RMCP rmc) { ProcessRequest(client, p, rmc); if (rmc.callID > client.callCounterRMC) { client.callCounterRMC = rmc.callID; } WriteLog(1, "Received Request : " + rmc.ToString()); string payload = rmc.PayLoadToString(); if (payload != "") { WriteLog(5, payload); } switch (rmc.proto) { case RMCP.PROTOCOL.AuthenticationService: AuthenticationService.HandleAuthenticationServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.SecureService: SecureService.HandleSecureServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.TelemetryService: TelemetryService.HandleTelemetryServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.AMMGameClientService: AMMGameClientService.HandleAMMGameClientRequest(p, rmc, client); break; case RMCP.PROTOCOL.PlayerProfileService: PlayerProfileService.HandlePlayerProfileServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.ArmorService: ArmorService.HandleArmorServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.InventoryService: InventoryService.HandleInventoryServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.LootService: LootService.HandleLootServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.WeaponService: WeaponService.HandleWeaponServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.FriendsService: FriendsService.HandleFriendsServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.ChatService: ChatService.ProcessChatServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.MissionService: MissionService.HandleMissionServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.PartyService: PartyService.HandlePartyServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.StatisticsService: StatisticsService.HandleStatisticsServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.AchievementsService: AchievementsService.HandleAchievementsServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.ProgressionService: ProgressionService.HandleProgressionServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.DBGTelemetryService: DBGTelemetryService.HandleDBGTelemetryServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.RewardService: RewardService.HandleRewardServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.StoreService: StoreService.HandleStoreServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.AdvertisementsService: AdvertisementsService.HandleAdvertisementsServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.SkillsService: SkillService.HandleSkillsServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.LoadoutService: LoadoutService.HandleLoadoutServiceLoadout(p, rmc, client); break; case RMCP.PROTOCOL.UnlockService: UnlockService.HandleUnlockServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.AvatarService: AvatarService.HandleAvatarServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.WeaponProficiencyService: WeaponProficiencyService.HandleWeaponProficiencyServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.OpsProtocolService: OpsProtocolService.HandleOpsProtocolServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.ServerInfoService: ServerInfoService.HandleServerInfoRequest(p, rmc, client); break; case RMCP.PROTOCOL.LeaderboardService: LeaderboardService.HandleLeaderboardServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.PveArchetypeService: PveArchetypeService.HandlePveArchetypeServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.InboxMessageService: InboxMessageService.HandleInboxMessageServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.ProfanityFilterService: ProfanityFilterService.HandleProfanityFilterServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.AbilityService: AbilityService.HandleAbilityServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.SurveyService: SurveyService.HandleSurveyServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.OverlordNewsProtocolService: OverlordNewsProtocolService.HandleOverlordNewsProtocolRequest(p, rmc, client); break; case RMCP.PROTOCOL.AMMDedicatedServerService: AMMDedicatedServerService.HandleAMMDedicatedServerServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.MatchMakingService: MatchMakingService.HandleMatchMakingServiceRequest(p, rmc, client); break; case RMCP.PROTOCOL.NATTraversalRelayProtocol: NATTraversalService.HandleNATTraversalServiceRequest(p, rmc, client); break; default: WriteLog(1, "Error: No handler implemented for packet protocol " + rmc.proto); break; } }
public static void ProcessRequest(ClientInfo client, QPacket p, RMCP rmc) { MemoryStream m = new MemoryStream(p.payload); m.Seek(rmc._afterProtocolOffset, 0); rmc.callID = Helper.ReadU32(m); rmc.methodID = Helper.ReadU32(m); switch (rmc.proto) { case RMCP.PROTOCOL.AuthenticationService: AuthenticationService.ProcessAuthenticationServiceRequest(m, rmc); break; case RMCP.PROTOCOL.SecureService: SecureService.ProcessSecureServiceRequest(m, rmc); break; case RMCP.PROTOCOL.TelemetryService: TelemetryService.ProcessTelemetryServiceRequest(m, rmc); break; case RMCP.PROTOCOL.AMMGameClientService: case RMCP.PROTOCOL.PlayerProfileService: case RMCP.PROTOCOL.ArmorService: case RMCP.PROTOCOL.InventoryService: case RMCP.PROTOCOL.LootService: case RMCP.PROTOCOL.WeaponService: case RMCP.PROTOCOL.FriendsService: case RMCP.PROTOCOL.ChatService: case RMCP.PROTOCOL.MissionService: case RMCP.PROTOCOL.PartyService: case RMCP.PROTOCOL.StatisticsService: case RMCP.PROTOCOL.AchievementsService: case RMCP.PROTOCOL.ProgressionService: case RMCP.PROTOCOL.DBGTelemetryService: case RMCP.PROTOCOL.RewardService: case RMCP.PROTOCOL.StoreService: case RMCP.PROTOCOL.AdvertisementsService: case RMCP.PROTOCOL.SkillsService: case RMCP.PROTOCOL.LoadoutService: case RMCP.PROTOCOL.UnlockService: case RMCP.PROTOCOL.AvatarService: case RMCP.PROTOCOL.WeaponProficiencyService: case RMCP.PROTOCOL.OpsProtocolService: case RMCP.PROTOCOL.ServerInfoService: case RMCP.PROTOCOL.LeaderboardService: case RMCP.PROTOCOL.PveArchetypeService: case RMCP.PROTOCOL.InboxMessageService: case RMCP.PROTOCOL.ProfanityFilterService: case RMCP.PROTOCOL.AbilityService: case RMCP.PROTOCOL.SurveyService: case RMCP.PROTOCOL.OverlordNewsProtocolService: case RMCP.PROTOCOL.AMMDedicatedServerService: case RMCP.PROTOCOL.MatchMakingService: case RMCP.PROTOCOL.NATTraversalRelayProtocol: break; default: WriteLog(1, "Error: No request reader implemented for packet protocol " + rmc.proto); break; } }