Exemplo n.º 1
0
        private void ReadHeader()
        {
            string classID;
            bool   hardcore;
            byte   sex;
            string name;

            bool testVal;
            bool testVal2;
            byte testVal3;
            byte testVal4;
            uint testVal5;

            byte testVal6;
            uint testVal7;
            byte testVal8;

            reader.ReadCryptoWString(out name);
            Name = name;

            reader.ReadCryptoByte(out sex);
            charSex = sex;
            if (!reader.ReadCryptoString(out classID))
            {
                throw new FormatException("Could not read class id");
            }
            charClass = classID;
            Level     = reader.ReadCryptoIntUnchecked();

            reader.ReadCryptoBool(out hardcore);
            isHardcore = hardcore;

            /* Del */
            //reader.ReadBlockStart(Constants.BLOCK);
            //reader.ReadBlockStart(1);

            //reader.ReadCryptoIntUnchecked();

            //Console.WriteLine("Test (Main quest): " + reader.ReadCryptoBool(out testVal));     // Bool - In main quest?
            //Console.WriteLine("Test 2 (Been in game): " + reader.ReadCryptoBool(out testVal2));  // Bool - Has been in game?

            //reader.ReadCryptoByte(out testVal3);  // Byte - Difficulty?
            //Console.WriteLine("Test 3 (Diff): " + testVal3);

            //reader.ReadCryptoByte(out testVal4);  // Byte - Greatest Diff?
            //Console.WriteLine("Test 4 (Grt Diff): " + testVal4);

            //reader.ReadCryptoUInt(out testVal5);  // Byte - Money?
            //Console.WriteLine("Test 5 (Money): " + testVal5);

            //reader.ReadCryptoByte(out testVal6);  // Byte - greatestSurvivalDifficulty
            //Console.WriteLine("Test 6 (Grt crucible): " + testVal6);

            //reader.ReadCryptoUInt(out testVal7);  // Byte - currentTribute
            //Console.WriteLine("Test 7 (Tribute): " + testVal7);

            //reader.ReadCryptoByte(out testVal8);  // Byte - compass state
            //Console.WriteLine("Test 8 (Compass state): " + testVal8);

            reader.ReadBlockEnd();
            //Console.WriteLine("Test val (string): " + charTestVal);
            /* Del */
        }