use Character.isDigit() for bankpin

This commit is contained in:
Lucas
2019-06-11 17:06:54 +02:00
parent ba4964d37f
commit ffe42de972
7 changed files with 17 additions and 24 deletions

View File

@@ -46,7 +46,6 @@ import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.plugins.PluginType; import net.runelite.client.plugins.PluginType;
import net.runelite.client.ui.ClientUI; import net.runelite.client.ui.ClientUI;
import org.apache.commons.lang3.ArrayUtils;
@PluginDescriptor( @PluginDescriptor(
loadWhenOutdated = true, // prevent users from disabling loadWhenOutdated = true, // prevent users from disabling
@@ -66,7 +65,7 @@ public class RuneLitePlusPlugin extends Plugin
@Override @Override
public void keyTyped(KeyEvent keyEvent) public void keyTyped(KeyEvent keyEvent)
{ {
if (!isNumber(keyEvent)) if (!Character.isDigit(keyEvent.getKeyChar()))
{ {
return; return;
} }
@@ -92,12 +91,6 @@ public class RuneLitePlusPlugin extends Plugin
public void keyReleased(KeyEvent keyEvent) public void keyReleased(KeyEvent keyEvent)
{ {
} }
private boolean isNumber(KeyEvent keyEvent)
{
char character = keyEvent.getKeyChar();
return ArrayUtils.contains(numbers, character);
}
} }
/* Can't feed this as args to runscript? /* Can't feed this as args to runscript?
@@ -126,7 +119,6 @@ public class RuneLitePlusPlugin extends Plugin
public static boolean customPresenceEnabled = false; public static boolean customPresenceEnabled = false;
public static final String rlPlusDiscordApp = "560644885250572289"; public static final String rlPlusDiscordApp = "560644885250572289";
public static final String rlDiscordApp = "409416265891971072"; public static final String rlDiscordApp = "409416265891971072";
private static final char[] numbers = "0123456789".toCharArray();
@Inject @Inject
public RuneLitePlusConfig config; public RuneLitePlusConfig config;

View File

@@ -107,7 +107,7 @@ public final class BoundaryObject {
} }
if(var0.equalsIgnoreCase("showcoord")) { if(var0.equalsIgnoreCase("showcoord")) {
class60.worldMap0.__bc = !class60.worldMap0.__bc; class60.worldMap0.showCoord = !class60.worldMap0.showCoord;
} }
if(var0.equalsIgnoreCase("fpson")) { if(var0.equalsIgnoreCase("fpson")) {

View File

@@ -994,8 +994,8 @@ public final class Client extends GameShell implements Usernamed {
@ObfuscatedGetter( @ObfuscatedGetter(
intValue = 1005832199 intValue = 1005832199
) )
@Export("__client_ho") @Export("cameraFollowHeight")
static int __client_ho; static int cameraFollowHeight;
@ObfuscatedName("hc") @ObfuscatedName("hc")
@ObfuscatedGetter( @ObfuscatedGetter(
intValue = -441913785 intValue = -441913785
@@ -1442,7 +1442,7 @@ public final class Client extends GameShell implements Usernamed {
__client_hi = 0; __client_hi = 0;
__client_ht = 0; __client_ht = 0;
oculusOrbState = 0; oculusOrbState = 0;
__client_ho = 50; cameraFollowHeight = 50;
__client_hc = 0; __client_hc = 0;
__client_hk = 0; __client_hk = 0;
__client_if = 0; __client_if = 0;
@@ -4281,7 +4281,7 @@ public final class Client extends GameShell implements Usernamed {
} }
} }
if(FriendSystem.method1868() && KeyHandler.KeyHandler_pressedKeys[82] && KeyHandler.KeyHandler_pressedKeys[81] && mouseWheelRotation != 0) { if(FriendSystem.jmodCheck() && KeyHandler.KeyHandler_pressedKeys[82] && KeyHandler.KeyHandler_pressedKeys[81] && mouseWheelRotation != 0) {
var3 = Canvas.localPlayer.plane - mouseWheelRotation; var3 = Canvas.localPlayer.plane - mouseWheelRotation;
if(var3 < 0) { if(var3 < 0) {
var3 = 0; var3 = 0;

View File

@@ -327,7 +327,8 @@ public class FriendSystem {
signature = "(B)Z", signature = "(B)Z",
garbageValue = "0" garbageValue = "0"
) )
public static boolean method1868() { @Export("jmodCheck")
public static boolean jmodCheck() {
return Client.rights >= 2; return Client.rights >= 2;
} }
} }

View File

@@ -76,10 +76,10 @@ public class OwnWorldComparator implements Comparator {
var3 = 0; var3 = 0;
} }
Client.__client_ho = var3; Client.cameraFollowHeight = var3;
return 1; return 1;
} else if(var0 == 5531) { } else if(var0 == 5531) {
Interpreter.Interpreter_intStack[++class179.Interpreter_intStackSize - 1] = Client.__client_ho; Interpreter.Interpreter_intStack[++class179.Interpreter_intStackSize - 1] = Client.cameraFollowHeight;
return 1; return 1;
} else { } else {
return 2; return 2;

View File

@@ -266,8 +266,8 @@ public class WorldMap {
@Export("mouseCoord") @Export("mouseCoord")
TileLocation mouseCoord; TileLocation mouseCoord;
@ObfuscatedName("bc") @ObfuscatedName("bc")
@Export("__bc") @Export("showCoord")
public boolean __bc; public boolean showCoord;
@ObfuscatedName("bo") @ObfuscatedName("bo")
@ObfuscatedSignature( @ObfuscatedSignature(
signature = "Lln;" signature = "Lln;"
@@ -332,7 +332,7 @@ public class WorldMap {
this.__bs = new int[]{1008, 1009, 1010, 1011, 1012}; this.__bs = new int[]{1008, 1009, 1010, 1011, 1012};
this.__bk = new HashSet(); this.__bk = new HashSet();
this.mouseCoord = null; this.mouseCoord = null;
this.__bc = false; this.showCoord = false;
this.__by = -1; this.__by = -1;
this.__bu = -1; this.__bu = -1;
this.__bm = -1; this.__bm = -1;
@@ -478,7 +478,7 @@ public class WorldMap {
if(this.mouseCoord != null && var3) { if(this.mouseCoord != null && var3) {
int var9; int var9;
int var10; int var10;
if(FriendSystem.method1868() && KeyHandler.KeyHandler_pressedKeys[82] && KeyHandler.KeyHandler_pressedKeys[81]) { if(FriendSystem.jmodCheck() && KeyHandler.KeyHandler_pressedKeys[82] && KeyHandler.KeyHandler_pressedKeys[81]) {
int var13 = this.mouseCoord.x; int var13 = this.mouseCoord.x;
var9 = this.mouseCoord.y; var9 = this.mouseCoord.y;
var10 = this.mouseCoord.plane; var10 = this.mouseCoord.plane;
@@ -801,7 +801,7 @@ public class WorldMap {
} }
this.__v_528(var1, var2, var3, var4, var8, var9); this.__v_528(var1, var2, var3, var4, var8, var9);
if(FriendSystem.method1868() && this.__bc && this.mouseCoord != null) { if(FriendSystem.jmodCheck() && this.showCoord && this.mouseCoord != null) {
this.font.draw("Coord: " + this.mouseCoord, Rasterizer2D.Rasterizer2D_xClipStart + 10, Rasterizer2D.Rasterizer2D_yClipStart + 20, 16776960, -1); this.font.draw("Coord: " + this.mouseCoord, Rasterizer2D.Rasterizer2D_xClipStart + 10, Rasterizer2D.Rasterizer2D_yClipStart + 20, 16776960, -1);
} }

View File

@@ -1065,14 +1065,14 @@ public final class class54 {
Client.__client_ik += (var6 - Client.__client_ik) / 80; Client.__client_ik += (var6 - Client.__client_ik) / 80;
} }
MouseRecorder.__bu_hy = class32.getTileHeight(Canvas.localPlayer.x, Canvas.localPlayer.y, SoundSystem.plane) - Client.__client_ho; MouseRecorder.__bu_hy = class32.getTileHeight(Canvas.localPlayer.x, Canvas.localPlayer.y, SoundSystem.plane) - Client.cameraFollowHeight;
} else if(Client.oculusOrbState == 1) { } else if(Client.oculusOrbState == 1) {
if(Client.__client_ij && Canvas.localPlayer != null) { if(Client.__client_ij && Canvas.localPlayer != null) {
var0 = Canvas.localPlayer.pathX[0]; var0 = Canvas.localPlayer.pathX[0];
var1 = Canvas.localPlayer.pathY[0]; var1 = Canvas.localPlayer.pathY[0];
if(var0 >= 0 && var1 >= 0 && var0 < 104 && var1 < 104) { if(var0 >= 0 && var1 >= 0 && var0 < 104 && var1 < 104) {
MouseHandler.oculusOrbFocalPointX = Canvas.localPlayer.x; MouseHandler.oculusOrbFocalPointX = Canvas.localPlayer.x;
var2 = class32.getTileHeight(Canvas.localPlayer.x, Canvas.localPlayer.y, SoundSystem.plane) - Client.__client_ho; var2 = class32.getTileHeight(Canvas.localPlayer.x, Canvas.localPlayer.y, SoundSystem.plane) - Client.cameraFollowHeight;
if(var2 < MouseRecorder.__bu_hy) { if(var2 < MouseRecorder.__bu_hy) {
MouseRecorder.__bu_hy = var2; MouseRecorder.__bu_hy = var2;
} }