public StaticDataType(KeyValuePair <int, RawTypeId> data)
        {
            if (data.Value == null)
            {
                Invalid = true;
                return;
            }

            _type = data.Value;

            this.Id        = _type.typeID;
            this.Published = _type.published;
        }
Example #2
0
        internal void Add(RawTypeId type, int quantity, double price)
        {
            var item = Items.FirstOrDefault(x => x.TypeId == type.typeID && x.Price == price);

            if (item == null)
            {
                item        = new InventoryItem();
                item.TypeId = type.typeID;
                item.Price  = price;

                Items.Add(item);
            }

            item.Quantity += quantity;
        }