From 15f8c75856b9395cf34f0c80634d14a22d67a235 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 10 May 2018 07:49:03 -0400 Subject: [PATCH] runescape-client: export rsOrdinal --- .../src/main/java/AttackOption.java | 2 +- runescape-client/src/main/java/Client.java | 2 +- runescape-client/src/main/java/Enumerated.java | 4 +++- .../src/main/java/HorizontalAlignment.java | 2 +- runescape-client/src/main/java/JagexGame.java | 2 +- runescape-client/src/main/java/Permission.java | 2 +- .../src/main/java/VerticalAlignment.java | 2 +- .../src/main/java/WorldMapDecorationType.java | 2 +- .../src/main/java/WorldMapManager.java | 18 +++++++++--------- .../src/main/java/WorldMapRegion.java | 4 ++-- runescape-client/src/main/java/class146.java | 2 +- runescape-client/src/main/java/class15.java | 2 +- runescape-client/src/main/java/class240.java | 2 +- runescape-client/src/main/java/class316.java | 2 +- runescape-client/src/main/java/class32.java | 2 +- runescape-client/src/main/java/class52.java | 2 +- runescape-client/src/main/java/class7.java | 2 +- 17 files changed, 28 insertions(+), 26 deletions(-) diff --git a/runescape-client/src/main/java/AttackOption.java b/runescape-client/src/main/java/AttackOption.java index 2904a1b0962..cf83ca8de5b 100644 --- a/runescape-client/src/main/java/AttackOption.java +++ b/runescape-client/src/main/java/AttackOption.java @@ -54,7 +54,7 @@ public enum AttackOption implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.id; } diff --git a/runescape-client/src/main/java/Client.java b/runescape-client/src/main/java/Client.java index 5b725e9ae00..022c1c39f11 100644 --- a/runescape-client/src/main/java/Client.java +++ b/runescape-client/src/main/java/Client.java @@ -2956,7 +2956,7 @@ final void method1201() { int[] var12 = new int[]{(int)(Math.random() * 9.9999999E7D), (int)(Math.random() * 9.9999999E7D), (int)(class165.field2065 >> 32), (int)(class165.field2065 & -1L)}; var17.offset = 0; var17.putByte(1); - var17.putByte(field716.vmethod5860()); + var17.putByte(field716.rsOrdinal()); var17.putInt(var12[0]); var17.putInt(var12[1]); var17.putInt(var12[2]); diff --git a/runescape-client/src/main/java/Enumerated.java b/runescape-client/src/main/java/Enumerated.java index 2d9728683ff..daa48eda2e1 100644 --- a/runescape-client/src/main/java/Enumerated.java +++ b/runescape-client/src/main/java/Enumerated.java @@ -1,3 +1,4 @@ +import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; @@ -10,5 +11,6 @@ public interface Enumerated { signature = "(B)I", garbageValue = "60" ) - int vmethod5860(); + @Export("rsOrdinal") + int rsOrdinal(); } diff --git a/runescape-client/src/main/java/HorizontalAlignment.java b/runescape-client/src/main/java/HorizontalAlignment.java index 5533a0a61f8..57363f94ddc 100644 --- a/runescape-client/src/main/java/HorizontalAlignment.java +++ b/runescape-client/src/main/java/HorizontalAlignment.java @@ -45,7 +45,7 @@ public enum HorizontalAlignment implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field3497; } } diff --git a/runescape-client/src/main/java/JagexGame.java b/runescape-client/src/main/java/JagexGame.java index 4300fbae923..8238b80fa4d 100644 --- a/runescape-client/src/main/java/JagexGame.java +++ b/runescape-client/src/main/java/JagexGame.java @@ -58,7 +58,7 @@ public enum JagexGame implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.id; } diff --git a/runescape-client/src/main/java/Permission.java b/runescape-client/src/main/java/Permission.java index 37fd42d6ce0..9325ec65248 100644 --- a/runescape-client/src/main/java/Permission.java +++ b/runescape-client/src/main/java/Permission.java @@ -71,7 +71,7 @@ public enum Permission implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field3141; } } diff --git a/runescape-client/src/main/java/VerticalAlignment.java b/runescape-client/src/main/java/VerticalAlignment.java index a373b38ba51..0e31b763b56 100644 --- a/runescape-client/src/main/java/VerticalAlignment.java +++ b/runescape-client/src/main/java/VerticalAlignment.java @@ -45,7 +45,7 @@ public enum VerticalAlignment implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field3245; } } diff --git a/runescape-client/src/main/java/WorldMapDecorationType.java b/runescape-client/src/main/java/WorldMapDecorationType.java index 8fe0742e91e..2ce37415fed 100644 --- a/runescape-client/src/main/java/WorldMapDecorationType.java +++ b/runescape-client/src/main/java/WorldMapDecorationType.java @@ -143,7 +143,7 @@ public enum WorldMapDecorationType implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.rsOrdinal; } } diff --git a/runescape-client/src/main/java/WorldMapManager.java b/runescape-client/src/main/java/WorldMapManager.java index 8f523b47e2c..451d2c9ab0e 100644 --- a/runescape-client/src/main/java/WorldMapManager.java +++ b/runescape-client/src/main/java/WorldMapManager.java @@ -268,18 +268,18 @@ void method524(int var1, int var2, WorldMapRegion[] var3) { boolean var6 = var2 <= 0; boolean var7 = var2 >= this.mapRegions[0].length - 1; if(var7) { - var3[class240.field3128.vmethod5860()] = null; + var3[class240.field3128.rsOrdinal()] = null; } else { - var3[class240.field3128.vmethod5860()] = this.mapRegions[var1][var2 + 1]; + var3[class240.field3128.rsOrdinal()] = this.mapRegions[var1][var2 + 1]; } - var3[class240.field3121.vmethod5860()] = !var7 && !var5?this.mapRegions[var1 + 1][var2 + 1]:null; - var3[class240.field3120.vmethod5860()] = !var7 && !var4?this.mapRegions[var1 - 1][var2 + 1]:null; - var3[class240.field3125.vmethod5860()] = var5?null:this.mapRegions[var1 + 1][var2]; - var3[class240.field3127.vmethod5860()] = var4?null:this.mapRegions[var1 - 1][var2]; - var3[class240.field3124.vmethod5860()] = var6?null:this.mapRegions[var1][var2 - 1]; - var3[class240.field3123.vmethod5860()] = !var6 && !var5?this.mapRegions[var1 + 1][var2 - 1]:null; - var3[class240.field3122.vmethod5860()] = !var6 && !var4?this.mapRegions[var1 - 1][var2 - 1]:null; + var3[class240.field3121.rsOrdinal()] = !var7 && !var5?this.mapRegions[var1 + 1][var2 + 1]:null; + var3[class240.field3120.rsOrdinal()] = !var7 && !var4?this.mapRegions[var1 - 1][var2 + 1]:null; + var3[class240.field3125.rsOrdinal()] = var5?null:this.mapRegions[var1 + 1][var2]; + var3[class240.field3127.rsOrdinal()] = var4?null:this.mapRegions[var1 - 1][var2]; + var3[class240.field3124.rsOrdinal()] = var6?null:this.mapRegions[var1][var2 - 1]; + var3[class240.field3123.rsOrdinal()] = !var6 && !var5?this.mapRegions[var1 + 1][var2 - 1]:null; + var3[class240.field3122.rsOrdinal()] = !var6 && !var4?this.mapRegions[var1 - 1][var2 - 1]:null; } @ObfuscatedName("a") diff --git a/runescape-client/src/main/java/WorldMapRegion.java b/runescape-client/src/main/java/WorldMapRegion.java index 5ae22df6b50..00f1ca903b2 100644 --- a/runescape-client/src/main/java/WorldMapRegion.java +++ b/runescape-client/src/main/java/WorldMapRegion.java @@ -420,7 +420,7 @@ void method322(WorldMapRegion[] var1, class32 var2) { for(int var6 = 0; var6 < var5.length; ++var6) { class240 var7 = var5[var6]; - if(var1[var7.vmethod5860()] != null) { + if(var1[var7.rsOrdinal()] != null) { byte var8 = 0; byte var9 = 0; byte var10 = 64; @@ -469,7 +469,7 @@ void method322(WorldMapRegion[] var1, class32 var2) { var10 = 5; } - this.method326(var12, var13, var8, var9, var10, var11, var1[var7.vmethod5860()], var2); + this.method326(var12, var13, var8, var9, var10, var11, var1[var7.rsOrdinal()], var2); } } diff --git a/runescape-client/src/main/java/class146.java b/runescape-client/src/main/java/class146.java index 65598b13220..fd997fb1d0f 100644 --- a/runescape-client/src/main/java/class146.java +++ b/runescape-client/src/main/java/class146.java @@ -53,7 +53,7 @@ public enum class146 implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field1931; } } diff --git a/runescape-client/src/main/java/class15.java b/runescape-client/src/main/java/class15.java index b2e913b89c1..83f9aeda148 100644 --- a/runescape-client/src/main/java/class15.java +++ b/runescape-client/src/main/java/class15.java @@ -45,7 +45,7 @@ public enum class15 implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field127; } diff --git a/runescape-client/src/main/java/class240.java b/runescape-client/src/main/java/class240.java index 8ff789ed3cd..587d094313d 100644 --- a/runescape-client/src/main/java/class240.java +++ b/runescape-client/src/main/java/class240.java @@ -69,7 +69,7 @@ public enum class240 implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field3129; } diff --git a/runescape-client/src/main/java/class316.java b/runescape-client/src/main/java/class316.java index 0ca7dc4bbf8..6f99816fe5e 100644 --- a/runescape-client/src/main/java/class316.java +++ b/runescape-client/src/main/java/class316.java @@ -51,7 +51,7 @@ public enum class316 implements Enumerated { signature = "(B)I", garbageValue = "60" ) - public int vmethod5860() { + public int rsOrdinal() { return this.field3783; } } diff --git a/runescape-client/src/main/java/class32.java b/runescape-client/src/main/java/class32.java index eba9530c4b9..c7f2f875262 100644 --- a/runescape-client/src/main/java/class32.java +++ b/runescape-client/src/main/java/class32.java @@ -507,7 +507,7 @@ static int method600(int var0, Script var1, boolean var2) { class69.intStack[++class45.intStackSize - 1] = var3.field2640; return 1; } else if(var0 == 2613) { - class69.intStack[++class45.intStackSize - 1] = var3.field2700.vmethod5860(); + class69.intStack[++class45.intStackSize - 1] = var3.field2700.rsOrdinal(); return 1; } else if(var0 == 2614) { class69.intStack[++class45.intStackSize - 1] = var3.field2679?1:0; diff --git a/runescape-client/src/main/java/class52.java b/runescape-client/src/main/java/class52.java index e5124907631..ee6093367a0 100644 --- a/runescape-client/src/main/java/class52.java +++ b/runescape-client/src/main/java/class52.java @@ -121,7 +121,7 @@ static int method1066(int var0, Script var1, boolean var2) { class69.intStack[++class45.intStackSize - 1] = var3.field2640; return 1; } else if(var0 == 1613) { - class69.intStack[++class45.intStackSize - 1] = var3.field2700.vmethod5860(); + class69.intStack[++class45.intStackSize - 1] = var3.field2700.rsOrdinal(); return 1; } else if(var0 == 1614) { class69.intStack[++class45.intStackSize - 1] = var3.field2679?1:0; diff --git a/runescape-client/src/main/java/class7.java b/runescape-client/src/main/java/class7.java index 577162b0f37..21005fc36ae 100644 --- a/runescape-client/src/main/java/class7.java +++ b/runescape-client/src/main/java/class7.java @@ -39,7 +39,7 @@ public static Enumerated forOrdinal(Enumerated[] var0, int var1) { for(int var3 = 0; var3 < var2.length; ++var3) { Enumerated var4 = var2[var3]; - if(var1 == var4.vmethod5860()) { + if(var1 == var4.rsOrdinal()) { return var4; } }