Thread: 3.1 Update
View Single Post
07/16/17, 09:49 AM   #26
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
It basically lead to the same thing.

GetNumValidItemStyles() only returns craftable styles in an indexlist.

So basically :

styleItemIndex styleId 59 (hollowjack) == itemStyleId 53

Your code is correct, after for meetsUsageRequirement, for me, it's basically always true for a style in the loop of GetNumValidItemStyles() and with GetValidItemStyleId() > 0 ..

But I'll keep GetHighestItemStyleId() because this one contains non craftable styles and they can be interesting. (I've added the list and the code snippet).
ex : 10 Unique, 18 Bandit, 32 Maormer, 37 Reach Winter, 38 Tsaesci, 55 Worm Cult

Also, this lead to ANOTHER index which will also confuse everyone.
We had before ITEMSTYLES_ constants and styleItemIndex
Now styleItemIndex is renamed into itemStyleId (or styleId depends where it's used).. so i'm not fan of GetNumValidItemStyles.. it's maybe proper but it's another table of correspondance..

Last edited by Ayantir : 07/16/17 at 10:02 AM.
  Reply With Quote