Added static getter Stat#index(String) to get stat id from String name

This commit is contained in:
Collin Smith 2020-09-03 18:34:34 -07:00
parent a3b3840b20
commit 948f1a189c

View File

@ -391,6 +391,10 @@ public class Stat {
return Riiablo.files.ItemStatCost.get(stat);
}
static short index(String stat) {
return (short) Riiablo.files.ItemStatCost.index(stat);
}
static boolean hasParams(short stat) {
final ItemStatCost.Entry entry = entry(stat);
return entry.Encode >= 1 && entry.Encode <= 3; // TODO: determine if stat requires params