Пример #1
0
        /// <summary>
        ///     Gets a item by id.
        /// </summary>
        public LogicData GetItemById(int globalId)
        {
            int instanceId = GlobalID.GetInstanceID(globalId);

            if (instanceId < 0 || instanceId >= this._items.Count)
            {
                Debugger.Warning("LogicDataTable::getItemById() - Instance id out of bounds! " + (instanceId + 1) + "/" + this._items.Count);
                return(null);
            }

            return(this._items[instanceId]);
        }
Пример #2
0
 /// <summary>
 ///     Gets the instance id.
 /// </summary>
 public int GetInstanceID()
 {
     return(GlobalID.GetInstanceID(this._globalId));
 }