kittype: use ordinal for index

This commit is contained in:
Adam
2021-01-19 15:00:31 -05:00
parent e9be96f8ae
commit f8b407f79a

View File

@@ -36,28 +36,18 @@ import net.runelite.api.PlayerComposition;
*/
public enum KitType
{
HEAD(0),
CAPE(1),
AMULET(2),
WEAPON(3),
TORSO(4),
SHIELD(5),
ARMS(6),
LEGS(7),
HAIR(8),
HANDS(9),
BOOTS(10),
JAW(11);
/**
* Raw equipment index.
*/
private final int index;
KitType(int index)
{
this.index = index;
}
HEAD,
CAPE,
AMULET,
WEAPON,
TORSO,
SHIELD,
ARMS,
LEGS,
HAIR,
HANDS,
BOOTS,
JAW;
/**
* Gets the raw equipment index for use in {@link PlayerComposition#getEquipmentIds()}.
@@ -66,6 +56,6 @@ public enum KitType
*/
public int getIndex()
{
return index;
return ordinal();
}
}