How do I only count items with a certain quality?
How do I only count items with a certain quality?
Pretty much what the title says. I noticed that when I use get_item_count It does not factor in quality, so when I want to try and count all uncommon pipe, I get all pipes in the inventory, not just the uncommon one.
Re: How do I only count items with a certain quality?
What are you using the `get_item_count()` on? `LuaInventory` defines `get_item_count()` with a parameter `item::ItemWithQualityID?`, so you can easily filter by quality:
Re: How do I only count items with a certain quality?
I did it directly on LuaPlayer. When I changed it so I get the inventory before calling get_item_count then it works like it should. Thank you so much