Merge pull request #561 from Lucwousin/lolnumbersnshit

use Character.isDigit() for bankpin
This commit is contained in:
Lucwousin
2019-06-11 17:53:52 +02:00
committed by GitHub
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.PluginType;
import net.runelite.client.ui.ClientUI;
import org.apache.commons.lang3.ArrayUtils;
@PluginDescriptor(
loadWhenOutdated = true, // prevent users from disabling
@@ -66,7 +65,7 @@ public class RuneLitePlusPlugin extends Plugin
@Override
public void keyTyped(KeyEvent keyEvent)
{
if (!isNumber(keyEvent))
if (!Character.isDigit(keyEvent.getKeyChar()))
{
return;
}
@@ -92,12 +91,6 @@ public class RuneLitePlusPlugin extends Plugin
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?
@@ -126,7 +119,6 @@ public class RuneLitePlusPlugin extends Plugin
public static boolean customPresenceEnabled = false;
public static final String rlPlusDiscordApp = "560644885250572289";
public static final String rlDiscordApp = "409416265891971072";
private static final char[] numbers = "0123456789".toCharArray();
@Inject
public RuneLitePlusConfig config;

View File

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

View File

@@ -994,8 +994,8 @@ public final class Client extends GameShell implements Usernamed {
@ObfuscatedGetter(
intValue = 1005832199
)
@Export("__client_ho")
static int __client_ho;
@Export("cameraFollowHeight")
static int cameraFollowHeight;
@ObfuscatedName("hc")
@ObfuscatedGetter(
intValue = -441913785
@@ -1442,7 +1442,7 @@ public final class Client extends GameShell implements Usernamed {
__client_hi = 0;
__client_ht = 0;
oculusOrbState = 0;
__client_ho = 50;
cameraFollowHeight = 50;
__client_hc = 0;
__client_hk = 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;
if(var3 < 0) {
var3 = 0;

View File

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

View File

@@ -76,10 +76,10 @@ public class OwnWorldComparator implements Comparator {
var3 = 0;
}
Client.__client_ho = var3;
Client.cameraFollowHeight = var3;
return 1;
} 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;
} else {
return 2;

View File

@@ -266,8 +266,8 @@ public class WorldMap {
@Export("mouseCoord")
TileLocation mouseCoord;
@ObfuscatedName("bc")
@Export("__bc")
public boolean __bc;
@Export("showCoord")
public boolean showCoord;
@ObfuscatedName("bo")
@ObfuscatedSignature(
signature = "Lln;"
@@ -332,7 +332,7 @@ public class WorldMap {
this.__bs = new int[]{1008, 1009, 1010, 1011, 1012};
this.__bk = new HashSet();
this.mouseCoord = null;
this.__bc = false;
this.showCoord = false;
this.__by = -1;
this.__bu = -1;
this.__bm = -1;
@@ -478,7 +478,7 @@ public class WorldMap {
if(this.mouseCoord != null && var3) {
int var9;
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;
var9 = this.mouseCoord.y;
var10 = this.mouseCoord.plane;
@@ -801,7 +801,7 @@ public class WorldMap {
}
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);
}

View File

@@ -1065,14 +1065,14 @@ public final class class54 {
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) {
if(Client.__client_ij && Canvas.localPlayer != null) {
var0 = Canvas.localPlayer.pathX[0];
var1 = Canvas.localPlayer.pathY[0];
if(var0 >= 0 && var1 >= 0 && var0 < 104 && var1 < 104) {
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) {
MouseRecorder.__bu_hy = var2;
}