public BlissHiveLogItem(String key, Location location, int quantity) { this.key = key; this.location = location; this.quantity = quantity; this.itemType = BlissHiveLogItemType.Item; }
/// <summary> /// Get the count for a certain item type in the current inventory. /// </summary> /// <param name="itemType"></param> /// <returns>The amount.</returns> public int GetObjectTypeCount(BlissHiveLogItemType itemType) { if (this.inventories.Count > 0) { BlissHiveLogInventory inv = this.inventories.Last.Value; int count = 0; foreach (BlissHiveLogItem item in inv.items) { if (item.itemType == itemType) { count++; } } return(count); } else { return(0); } }