deprecate invalid kittypes
This commit is contained in:
@@ -27,7 +27,7 @@ object ProjectVersions {
|
||||
const val launcherVersion = "2.2.0"
|
||||
const val rlVersion = "1.7.7"
|
||||
|
||||
const val openosrsVersion = "4.6.1"
|
||||
const val openosrsVersion = "4.6.2"
|
||||
|
||||
const val rsversion = 195
|
||||
const val cacheversion = 165
|
||||
|
||||
@@ -51,7 +51,10 @@ public enum KitType
|
||||
HANDS("Hands"),
|
||||
BOOTS("Boots"),
|
||||
JAW("Jaw"),
|
||||
// When removing these, make sure you also remove the type.ordinal() > 11 checks in RSPlayerCompositionMixin
|
||||
@Deprecated(since = "4.6.2", forRemoval = true)
|
||||
RING("Ring"),
|
||||
@Deprecated(since = "4.6.2", forRemoval = true)
|
||||
AMMUNITION("Ammo");
|
||||
|
||||
private final String name;
|
||||
|
||||
@@ -12,6 +12,11 @@ public abstract class RSPlayerCompositionMixin implements RSPlayerComposition
|
||||
@Override
|
||||
public int getEquipmentId(KitType type)
|
||||
{
|
||||
if (type.ordinal() > 11)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int id = getEquipmentIds()[type.getIndex()];
|
||||
if (id < 512)
|
||||
{
|
||||
@@ -24,6 +29,11 @@ public abstract class RSPlayerCompositionMixin implements RSPlayerComposition
|
||||
@Override
|
||||
public int getKitId(KitType type)
|
||||
{
|
||||
if (type.ordinal() > 11)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int id = getEquipmentIds()[type.getIndex()];
|
||||
if (id < 256 || id >= 512)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user