mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-26 20:07:11 -05:00
fix ItemKind.UnitIcon_FlwTulip out of range
ty verballyinsane for report & replication file
This commit is contained in:
@@ -9,7 +9,12 @@ public static Color GetItemColor(Item item)
|
||||
if (item.DisplayItemId >= Item.FieldItemMin)
|
||||
return GetItemColor60000(item);
|
||||
var kind = ItemInfo.GetItemKind(item);
|
||||
return ColorUtil.Colors[(int)kind];
|
||||
|
||||
// grab a deterministic random known color
|
||||
var arr = ColorUtil.Colors;
|
||||
if ((uint) kind >= arr.Length)
|
||||
kind = (ItemKind)((int)kind % arr.Length);
|
||||
return arr[(int)kind];
|
||||
}
|
||||
|
||||
private static Color GetItemColor60000(Item item)
|
||||
|
||||
Reference in New Issue
Block a user