Skip to content

Commit

Permalink
Fixy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tynarus committed Sep 1, 2021
1 parent fffb4cd commit 910a8ce
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/runejs/client/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1930,16 +1930,19 @@ else if (Class51.gameStatusCode == 5) {
} else if (Class51.gameStatusCode == 20) {
WallDecoration.drawLoadingScreen(TypeFace.fontBold, TypeFace.fontSmall);
} else if (Class51.gameStatusCode == 25) {
final StringBuilder percentageBuilder = new StringBuilder(Native.leftParenthasis);
if (ProducingGraphicsBuffer.anInt1634 == 1) {
if (Class37.anInt874 > PacketBuffer.anInt2231)
PacketBuffer.anInt2231 = Class37.anInt874;
int i = (-Class37.anInt874 + PacketBuffer.anInt2231) * 50 / PacketBuffer.anInt2231;
Class51.method940(0, English.loadingPleaseWait, true, Native.leftParenthasis + i + Native.aClass1_698);
percentageBuilder.append(i).append(Native.percentChar).append(Native.rightParenthasis);
Class51.method940(0, English.loadingPleaseWait, true, percentageBuilder.toString());
} else if (ProducingGraphicsBuffer.anInt1634 == 2) {
if (IdentityKit.anInt2591 > GameObject.anInt3048)
GameObject.anInt3048 = IdentityKit.anInt2591;
int i = 50 * (-IdentityKit.anInt2591 + GameObject.anInt3048) / GameObject.anInt3048 + 50;
Class51.method940(0, English.loadingPleaseWait, true, Native.leftParenthasis + i + Native.aClass1_698);
percentageBuilder.append(i).append(Native.percentChar).append(Native.rightParenthasis);
Class51.method940(0, English.loadingPleaseWait, true, percentageBuilder.toString());
} else
Class51.method940(0, English.loadingPleaseWait, false, null);
} else if (Class51.gameStatusCode == 30) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/runejs/client/cache/CacheArchive.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public void method198(boolean arg1, byte[] fileData, int arg3, CacheIndex cacheI
int i = (int) crc32.getValue();
int i_0_ = ((fileData[-2 + fileData.length] & 0xff) << 8) + (0xff & fileData[fileData.length + -1]);
if(i != anIntArray252[arg3] || i_0_ != anIntArray224[arg3]) {

This comment has been minimized.

Copy link
@Promises

Promises Sep 1, 2021

Collaborator

Is this if statement needed?

aBooleanArray1796[arg3] = false;
/*aBooleanArray1796[arg3] = false;
if(hasVersionNumbers || arg1)
UpdateServer.method327(arg1, this, cacheIndexId, arg3, (byte) 2, anIntArray252[arg3]);
return;
return;*/
}
aBooleanArray1796[arg3] = true;
if(arg1)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/runejs/client/language/Native.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ public class Native {
public static String loginScreenMessageLineThree = "";
public static String loginScreenMessageLineTwo = "";
public static String aClass1_305 = "";
public static String aClass1_698 = "%";
public static String percentChar = "%";
public static String percent = "%";
public static String percentOne = "%1";
public static String percentThree = "%3";
public static String percentFour = "%4";
public static String rightParenthasis = ")";
public static String aClass1_795 = ",";
public static String aClass1_1348 = "0%";
public static String prefixColon = ": ";
Expand Down Expand Up @@ -127,5 +126,6 @@ public class Native {
public static String justAnotherYellowBar = "@yel@|";

public static String leftParenthasis = "(";
public static String rightParenthasis = ")";
public static String colon =":";
}
8 changes: 6 additions & 2 deletions src/main/java/org/runejs/client/net/IncomingPackets.java
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,12 @@ public static boolean parseIncomingPackets() {
for(int varPlayerIndex = 0; VarPlayerDefinition.varPlayerDefinitionsSize > varPlayerIndex; varPlayerIndex++) {
VarPlayerDefinition varPlayerDefinition = VarPlayerDefinition.getDefinition(varPlayerIndex);
if(varPlayerDefinition.type == 0) {
Buffer.anIntArray1984[varPlayerIndex] = 0;
VarPlayerDefinition.varPlayers[varPlayerIndex] = 0;
try {
Buffer.anIntArray1984[varPlayerIndex] = 0;
VarPlayerDefinition.varPlayers[varPlayerIndex] = 0;
} catch (Exception e) {
e.printStackTrace();
}
}
}
if(ChatBox.dialogueId != -1)
Expand Down

0 comments on commit 910a8ce

Please sign in to comment.