mirror of
https://github.com/kwsch/NHSE.git
synced 2026-08-05 09:19:12 -05:00
fix ItemKind.UnitIcon_FlwTulip out of range
ty verballyinsane for report & replication file
This commit is contained in:
parent
0cd7776656
commit
42a16ea35e
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user