public static SubMessage ExtractSubMessage(byte[] Buffer, int StartIndex) { SubMessage returnValue = null; // try to parse the submessage switch ((MessageTypeGameMode)Buffer[StartIndex]) { case MessageTypeGameMode.NewCharInfo: returnValue = new SubMessageNewCharInfo(Buffer, StartIndex); break; case MessageTypeGameMode.SendCharInfo: returnValue = new SubMessageSendCharInfo(Buffer, StartIndex); break; default: returnValue = new SubMessageGeneric(Buffer, StartIndex); break; } return(returnValue); }
public SystemMessage(SubMessage.SubMessage Command) : base(MessageTypeGameMode.System) { this.Command = Command; }