Skip to content

Commit 910a8ce

Browse files
committed
Fixy fix
1 parent fffb4cd commit 910a8ce

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

src/main/java/org/runejs/client/Main.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,16 +1930,19 @@ else if (Class51.gameStatusCode == 5) {
19301930
} else if (Class51.gameStatusCode == 20) {
19311931
WallDecoration.drawLoadingScreen(TypeFace.fontBold, TypeFace.fontSmall);
19321932
} else if (Class51.gameStatusCode == 25) {
1933+
final StringBuilder percentageBuilder = new StringBuilder(Native.leftParenthasis);
19331934
if (ProducingGraphicsBuffer.anInt1634 == 1) {
19341935
if (Class37.anInt874 > PacketBuffer.anInt2231)
19351936
PacketBuffer.anInt2231 = Class37.anInt874;
19361937
int i = (-Class37.anInt874 + PacketBuffer.anInt2231) * 50 / PacketBuffer.anInt2231;
1937-
Class51.method940(0, English.loadingPleaseWait, true, Native.leftParenthasis + i + Native.aClass1_698);
1938+
percentageBuilder.append(i).append(Native.percentChar).append(Native.rightParenthasis);
1939+
Class51.method940(0, English.loadingPleaseWait, true, percentageBuilder.toString());
19381940
} else if (ProducingGraphicsBuffer.anInt1634 == 2) {
19391941
if (IdentityKit.anInt2591 > GameObject.anInt3048)
19401942
GameObject.anInt3048 = IdentityKit.anInt2591;
19411943
int i = 50 * (-IdentityKit.anInt2591 + GameObject.anInt3048) / GameObject.anInt3048 + 50;
1942-
Class51.method940(0, English.loadingPleaseWait, true, Native.leftParenthasis + i + Native.aClass1_698);
1944+
percentageBuilder.append(i).append(Native.percentChar).append(Native.rightParenthasis);
1945+
Class51.method940(0, English.loadingPleaseWait, true, percentageBuilder.toString());
19431946
} else
19441947
Class51.method940(0, English.loadingPleaseWait, false, null);
19451948
} else if (Class51.gameStatusCode == 30) {

src/main/java/org/runejs/client/cache/CacheArchive.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ public void method198(boolean arg1, byte[] fileData, int arg3, CacheIndex cacheI
196196
int i = (int) crc32.getValue();
197197
int i_0_ = ((fileData[-2 + fileData.length] & 0xff) << 8) + (0xff & fileData[fileData.length + -1]);
198198
if(i != anIntArray252[arg3] || i_0_ != anIntArray224[arg3]) {
199-
aBooleanArray1796[arg3] = false;
199+
/*aBooleanArray1796[arg3] = false;
200200
if(hasVersionNumbers || arg1)
201201
UpdateServer.method327(arg1, this, cacheIndexId, arg3, (byte) 2, anIntArray252[arg3]);
202-
return;
202+
return;*/
203203
}
204204
aBooleanArray1796[arg3] = true;
205205
if(arg1)

src/main/java/org/runejs/client/language/Native.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ public class Native {
1717
public static String loginScreenMessageLineThree = "";
1818
public static String loginScreenMessageLineTwo = "";
1919
public static String aClass1_305 = "";
20-
public static String aClass1_698 = "%";
20+
public static String percentChar = "%";
2121
public static String percent = "%";
2222
public static String percentOne = "%1";
2323
public static String percentThree = "%3";
2424
public static String percentFour = "%4";
25-
public static String rightParenthasis = ")";
2625
public static String aClass1_795 = ",";
2726
public static String aClass1_1348 = "0%";
2827
public static String prefixColon = ": ";
@@ -127,5 +126,6 @@ public class Native {
127126
public static String justAnotherYellowBar = "@yel@|";
128127

129128
public static String leftParenthasis = "(";
129+
public static String rightParenthasis = ")";
130130
public static String colon =":";
131131
}

src/main/java/org/runejs/client/net/IncomingPackets.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,12 @@ public static boolean parseIncomingPackets() {
835835
for(int varPlayerIndex = 0; VarPlayerDefinition.varPlayerDefinitionsSize > varPlayerIndex; varPlayerIndex++) {
836836
VarPlayerDefinition varPlayerDefinition = VarPlayerDefinition.getDefinition(varPlayerIndex);
837837
if(varPlayerDefinition.type == 0) {
838-
Buffer.anIntArray1984[varPlayerIndex] = 0;
839-
VarPlayerDefinition.varPlayers[varPlayerIndex] = 0;
838+
try {
839+
Buffer.anIntArray1984[varPlayerIndex] = 0;
840+
VarPlayerDefinition.varPlayers[varPlayerIndex] = 0;
841+
} catch (Exception e) {
842+
e.printStackTrace();
843+
}
840844
}
841845
}
842846
if(ChatBox.dialogueId != -1)

0 commit comments

Comments
 (0)