예제 #1
0
        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);
        }
예제 #2
0
 public SystemMessage(SubMessage.SubMessage Command)
     : base(MessageTypeGameMode.System)
 {         
     this.Command = Command;          
 }