A limitation of the inventory api is not being able to query for one item name and get back how many of each quality there are, you'd have to call it once for each quality or just go through get_contents().
it would be nice if we could get like a get_item_countS function or expand get_contents() support to add a filter for the name or something.
LuaInventory::get_item_counts(item) to get all counts of a quality
Re: LuaInventory::get_item_counts(item) to get all counts of a quality
For 2.0.67 i added 2 methods to LuaInventory:
- LuaInventory::get_item_count_filtered(ItemFilter) -> uint32
- LuaInventory::get_item_quality_counts(ItemID?) -> dictionary(string, uint32)