private void Parse() { //not parsing, just checking on sReturnToLobby if (OpcodeFinder.Instance.IsKnown(OpcodeEnum.S_RETURN_TO_LOBBY)) { return; } var msg = OpcodeFinder.Instance.GetMessage(OpcodeFinder.Instance.PacketCount - 1); if (msg.Payload.Count == 0 && msg.Direction == MessageDirection.ServerToClient && msg.OpCode == S_RETURN_TO_LOBBY.PossibleOpcode) { S_RETURN_TO_LOBBY.Confirm(); } }
public new void Process(ParsedMessage message) { base.Process(message); if (IsKnown || OpcodeFinder.Instance.IsKnown(message.OpCode)) { return; } if (message.Payload.Count != 0) { return; } if (!waiting) { return; } OpcodeFinder.Instance.SetOpcode(message.OpCode, OPCODE); S_RETURN_TO_LOBBY.Wait(); waiting = false; }