Пример #1
0
        protected void ReadCharacterInfo(NoxBinaryReader rdr)
        {
            long finish = rdr.ReadInt64() + rdr.BaseStream.Position;

            rdr.ReadBytes(6);          //UNKNOWN header seems to always = 0c 00 02 00 00 00
            SavePath = rdr.ReadString(System.Type.GetType("System.Int16"));
            rdr.ReadByte();            //terminating null not included in length

            //the time this file was written
            FileTime = new DateTime(
                rdr.ReadInt16(),               //year
                rdr.ReadInt32() & 0xFFFF,      //month --skip the next 16bytes
                //rdr.ReadInt16(),//day of the week (not needed)
                rdr.ReadInt16(),               //day
                rdr.ReadInt16(),               //hour
                rdr.ReadInt16(),               //minute
                rdr.ReadInt16(),               //seconds
                rdr.ReadInt16()                //milliseconds
                );

            //these colors are RGB
            HairColor      = rdr.ReadColor();
            SkinColor      = rdr.ReadColor();
            MustacheColor  = rdr.ReadColor();
            BeardColor     = rdr.ReadColor();
            SideburnsColor = rdr.ReadColor();

            PantsColor     = rdr.ReadUserColor();
            ShirtColor     = rdr.ReadUserColor();
            ShirtTrimColor = rdr.ReadUserColor();
            ShoesColor     = rdr.ReadUserColor();
            ShoesTrimColor = rdr.ReadUserColor();

            Name  = rdr.ReadUnicodeString();
            Class = (CharacterClass)rdr.ReadByte();
            rdr.ReadBytes(2);          //UNKNOWN: always 00 0A?
            LastMapPlayed = rdr.ReadString();
            rdr.ReadByte();            //null terminator not included in string length

            System.Diagnostics.Debug.Assert(rdr.BaseStream.Position == finish, "Bad CharacterInfo length");
        }
Пример #2
0
        protected void ReadCharacterInfo(NoxBinaryReader rdr)
        {
            long finish = rdr.ReadInt64() + rdr.BaseStream.Position;

            rdr.ReadBytes(6);//UNKNOWN header seems to always = 0c 00 02 00 00 00
            SavePath = rdr.ReadString(System.Type.GetType("System.Int16"));
            rdr.ReadByte();//terminating null not included in length

            //the time this file was written
            FileTime = new DateTime(
                rdr.ReadInt16(),//year
                rdr.ReadInt32() & 0xFFFF,//month --skip the next 16bytes
                //rdr.ReadInt16(),//day of the week (not needed)
                rdr.ReadInt16(),//day
                rdr.ReadInt16(),//hour
                rdr.ReadInt16(),//minute
                rdr.ReadInt16(),//seconds
                rdr.ReadInt16()//milliseconds
            );

            //these colors are RGB
            HairColor = rdr.ReadColor();
            SkinColor = rdr.ReadColor();
            MustacheColor = rdr.ReadColor();
            BeardColor = rdr.ReadColor();
            SideburnsColor = rdr.ReadColor();

            PantsColor = rdr.ReadUserColor();
            ShirtColor = rdr.ReadUserColor();
            ShirtTrimColor = rdr.ReadUserColor();
            ShoesColor = rdr.ReadUserColor();
            ShoesTrimColor = rdr.ReadUserColor();

            Name = rdr.ReadUnicodeString();
            Class = (CharacterClass) rdr.ReadByte();
            rdr.ReadBytes(2);//UNKNOWN: always 00 0A?
            LastMapPlayed = rdr.ReadString();
            rdr.ReadByte();//null terminator not included in string length

            System.Diagnostics.Debug.Assert(rdr.BaseStream.Position == finish, "Bad CharacterInfo length");
        }