Ejemplo n.º 1
0
        public static string GetName(BinaryReader br)
        {
            var    s          = new AlbionReader(br, br.BaseStream.Length);
            ushort nameLength = s.UInt16("NameLength", 0);

            if (nameLength > 1024)
            {
                return("Invalid");
            }

            s.UInt16(nameof(Unk0), 0);
            return(s.FixedLengthString(nameof(Name), null, nameLength));
        }
Ejemplo n.º 2
0
        public static string GetName(BinaryReader br)
        {
            if (br == null)
            {
                throw new ArgumentNullException(nameof(br));
            }
            using var s = new AlbionReader(br, br.BaseStream.Length);
            ushort nameLength = s.UInt16("NameLength", 0);

            if (nameLength > 1024)
            {
                return("Invalid");
            }

            s.UInt16(nameof(Unk0), 0);
            return(s.FixedLengthString(nameof(Name), null, nameLength));
        }