/// <summary> /// Initializes a new instance of the <see cref="VltClassField"/> class. /// </summary> /// <param name="key">The field's hashed key.</param> /// <param name="name">The name of the field.</param> /// <param name="typeName">The type ID of the field.</param> /// <param name="flags">The field's flags.</param> /// <param name="alignment">The field's alignment.</param> /// <param name="size">The field's data size.</param> /// <param name="maxCount">The maximum number of instances of the field.</param> /// <param name="offset">The field's data offset.</param> public VltClassField(ulong key, string name, string typeName, DefinitionFlags flags, int alignment, ushort size, ushort maxCount, ushort offset) { Name = name; TypeName = typeName; Flags = flags; Alignment = alignment; Size = size; MaxCount = maxCount; Offset = offset; Key = key; }
public MapObject(string[] tokens) : base(tokens) { if (tokens.Length == 5) { ObjectCount = 1; DrawDistance = float.Parse(tokens[3]); } else { ObjectCount = int.Parse(tokens[3]); DrawDistance = float.Parse(tokens[4]); } Flags = (DefinitionFlags)int.Parse(tokens[tokens.Length - 1]); }
/// <summary> /// Indexer for fast flag access<para/> /// Индексер для быстрого доступа к флагам /// </summary> /// <param name="flag">Definition flag<para/>Флаг дефайна</param> /// <returns>True if flag is set<para/>True если флаг установлен</returns> public bool this[DefinitionFlags flag] { get { return((Container & (uint)flag) != 0); } }
/// <summary> /// Indexer for fast flag access<para/> /// Индексер для быстрого доступа к флагам /// </summary> /// <param name="flag">Definition flag<para/>Флаг дефайна</param> /// <returns>True if flag is set<para/>True если флаг установлен</returns> public bool this[DefinitionFlags flag] { get { return (Container & (uint)flag) != 0; } }