Skip to content

Commit 5e670f2

Browse files
committed
Renaming some things and removing the CRC check temp for the dev-store
1 parent 84201e6 commit 5e670f2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,9 @@ public void method198(boolean arg1, byte[] arg2, int arg3, CacheIndex arg4) {
175175
crc32.update(arg2, 0, arg2.length);
176176
int i = (int) crc32.getValue();
177177
if(i != archiveCrcValue) {
178-
UpdateServer.method327(true, this, 255, cacheIndexId, (byte) 0,
178+
/*UpdateServer.method327(true, this, 255, cacheIndexId, (byte) 0,
179179
archiveCrcValue);
180-
return;
180+
return;*/
181181
}
182182

183183
decodeArchive(arg2);
@@ -393,7 +393,8 @@ public void decodeArchive(byte[] data) {
393393

394394
public int method179(int arg1, String arg2) {
395395
arg2 = arg2.toLowerCase();
396-
return aNameHashCollectionArray217[arg1].method882(RSString.stringHash(arg2));
396+
int newHash = RSString.stringHash(arg2);
397+
return aNameHashCollectionArray217[arg1].method882(newHash);
397398
}
398399

399400
public boolean method181(int arg0, int[] arg2) {
@@ -477,7 +478,8 @@ public byte[] method182(int arg0, int arg2) {
477478

478479
public int getHash(String arg1) {
479480
arg1 = arg1.toLowerCase();
480-
return nameHashCollection.method882(RSString.stringHash(arg1));
481+
int newHash = RSString.stringHash(arg1);
482+
return nameHashCollection.method882(newHash);
481483
}
482484

483485
public boolean method185(byte arg0) {

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static boolean processUpdateServerResponse() {
112112

113113
try {
114114
if(MovedStatics.msSinceLastUpdate > 30000) {
115-
throw new IOException();
115+
// throw new IOException();
116116
}
117117

118118
// Immediate file requests
@@ -194,14 +194,14 @@ public static boolean processUpdateServerResponse() {
194194
crc32.update(aClass40_Sub1_2752.buffer, 0, inboundFileLength);
195195
int fileRealCrcValue = (int) crc32.getValue();
196196
if(~aUpdateServerNode_2250.crc != ~fileRealCrcValue) {
197-
try {
197+
/*try {
198198
updateServerSocket.kill();
199199
} catch(Exception exception) {
200200
}
201201
aByte302 = (byte) (int) (Math.random() * 255.0 + 1.0);
202202
updateServerSocket = null;
203203
MovedStatics.anInt813++;
204-
return false;
204+
return false;*/
205205
}
206206

207207
anInt2278 = 0;
@@ -251,6 +251,7 @@ public static boolean processUpdateServerResponse() {
251251
int fileId = fileDataBuffer.getUnsignedShortBE();
252252
int fileCompression = fileDataBuffer.getUnsignedByte();
253253
int fileSize = fileDataBuffer.getIntBE();
254+
// System.out.println("Update server response, index=" + fileIndexId + ", file=" + fileId);
254255
long fileKey = ((long) fileIndexId << 16) + fileId;
255256
UpdateServerNode updateServerNode = (UpdateServerNode) activeRequests.getNode(fileKey);
256257
Npc.aBoolean3298 = true;

0 commit comments

Comments
 (0)