Пример #1
0
        internal Npc(MemoryReader reader, int version)
        {
            if (190 <= version)
            {
                SpriteId = reader.ReadInt32();
                Type     = "default";
            }
            else
            {
                SpriteId = 0;
                Type     = reader.ReadBString();
            }

            Name       = reader.ReadBString();
            X          = reader.ReadSingle();
            Y          = reader.ReadSingle();
            IsHomeless = reader.ReadBoolean();
            HomeX      = reader.ReadInt32();
            HomeY      = reader.ReadInt32();

            if (213 <= version && reader.ReadBoolean())
            {
                TownVariationIndex = reader.ReadInt32();
            }
            else
            {
                TownVariationIndex = 0;
            }
        }