public bool HandlePvpMsg(PvpCode msgID, object msgParam) { if (this.IsReplaying) { return(true); } if (this.IsRecording && msgID != PvpCode.C2P_Ping && msgID != PvpCode.P2C_TipMessage) { OperationResponse operationResponse = msgParam as OperationResponse; ReplayMessage msg; if (operationResponse != null) { msg = new ReplayMessage { time = ReplayController.GetRecordTimeOffset(), code = msgID, param = operationResponse.Parameters[0] as byte[] }; } else { msg = new ReplayMessage { time = ReplayController.GetRecordTimeOffset(), code = msgID, param = msgParam as byte[] }; } this._replayMessageIO.Push(msg); } return(false); }
public void Push(ReplayMessage msg) { this._savedMsgs.Add(msg); }