public void OnOperationResponse(OperationResponse operationResponse) { Log.debug("==> MobaGateClientPeer : OnOperationResponse " + operationResponse.OperationCode); object obj = 0; MobaChannel mobaChannel = MobaChannel.Default; if (operationResponse.Parameters.TryGetValue(255, out obj)) { mobaChannel = (MobaChannel)obj; } MobaChannel mobaChannel2 = mobaChannel; switch (mobaChannel2) { case MobaChannel.Game: this.mClient.ExecSendMsg2Client((MobaGameCode)operationResponse.OperationCode, operationResponse); break; case MobaChannel.Lobby: this.mClient.ExecSendMsg2Client((LobbyCode)operationResponse.OperationCode, operationResponse); break; default: switch (mobaChannel2) { case MobaChannel.Friend: this.mClient.ExecSendMsg2Client((MobaFriendCode)operationResponse.OperationCode, operationResponse); return; case MobaChannel.Chat: this.mClient.ExecSendMsg2Client((MobaChatCode)operationResponse.OperationCode, operationResponse); return; case MobaChannel.Team: this.mClient.ExecSendMsg2Client((MobaTeamRoomCode)operationResponse.OperationCode, operationResponse); return; case MobaChannel.UserData: this.mClient.ExecSendMsg2Client((MobaUserDataCode)operationResponse.OperationCode, operationResponse); return; } this.mClient.ExecSendMsg2Client((MobaGateCode)operationResponse.OperationCode, operationResponse); break; } }
protected override void OnGetMsg(MobaMessage msg) { if (msg == null) { return; } OperationResponse operationResponse = msg.Param as OperationResponse; if (operationResponse == null) { return; } base.LastMsgType = (int)msg.MessageType; base.LastMsgID = msg.ID; byte b = (byte)operationResponse.Parameters[255]; MobaChannel mobaChannel = (MobaChannel)b; if (!Singleton <MenuView> .Instance.IsOpen && this.data.otherMsgQueue.Count >= 5) { this.data.otherMsgQueue.Dequeue(); } if (Singleton <MenuView> .Instance.IsOpen && this.data.otherMsgQueue.Count >= 99) { return; } MobaChannel mobaChannel2 = mobaChannel; if (mobaChannel2 != MobaChannel.Lobby) { if (mobaChannel2 == MobaChannel.UserData) { this.OnGetMsg_UserDataCode(operationResponse); } } else { this.OnGetMsg_LobbyCode(operationResponse); } }