3
3
import org .runejs .client .*;
4
4
import org .runejs .client .cache .bzip .BZip ;
5
5
import org .runejs .client .io .Buffer ;
6
- import org .runejs .client .net .UpdateServer ;
7
6
import org .runejs .client .node .Class40_Sub6 ;
8
7
9
8
import java .io .ByteArrayInputStream ;
@@ -60,7 +59,7 @@ public CacheArchive(CacheIndex dataIndex, CacheIndex metaIndex, int cacheIndexId
60
59
aBoolean1811 = arg5 ;
61
60
this .metaIndex = metaIndex ;
62
61
this .cacheIndexId = cacheIndexId ;
63
- Game .updateServer .getArchiveChecksum (this , this .cacheIndexId );
62
+ Game .updateServer .requestArchiveChecksum (this , this .cacheIndexId );
64
63
}
65
64
66
65
public static CacheArchive loadArchive (int cacheIndexId , boolean arg1 , boolean arg2 , boolean arg4 ) {
@@ -164,7 +163,7 @@ public int getPercentLoaded() {
164
163
return 100 ;
165
164
if (aByteArrayArray212 != null )
166
165
return 99 ;
167
- int i = Game .updateServer .calculateDataLoaded (255 , cacheIndexId );
166
+ int i = Game .updateServer .getLoadedPercentage (255 , cacheIndexId );
168
167
if (i >= 100 )
169
168
i = 99 ;
170
169
return i ;
@@ -176,15 +175,15 @@ public void method198(boolean arg1, byte[] arg2, int arg3, CacheIndex arg4) {
176
175
if (aBoolean1800 )
177
176
throw new RuntimeException ();
178
177
if (arg2 == null ) {
179
- Game .updateServer .method327 (true , this , 255 , cacheIndexId , (byte ) 0 ,
178
+ Game .updateServer .enqueueFileRequest (true , this , 255 , cacheIndexId , (byte ) 0 ,
180
179
archiveCrcValue );
181
180
return ;
182
181
}
183
182
crc32 .reset ();
184
183
crc32 .update (arg2 , 0 , arg2 .length );
185
184
int i = (int ) crc32 .getValue ();
186
185
if (i != archiveCrcValue ) {
187
- Game .updateServer .method327 (true , this , 255 , cacheIndexId , (byte ) 0 ,
186
+ Game .updateServer .enqueueFileRequest (true , this , 255 , cacheIndexId , (byte ) 0 ,
188
187
archiveCrcValue );
189
188
return ;
190
189
}
@@ -197,7 +196,7 @@ public void method198(boolean arg1, byte[] arg2, int arg3, CacheIndex arg4) {
197
196
if (arg2 == null || arg2 .length <= 2 ) {
198
197
aBooleanArray1796 [arg3 ] = false ;
199
198
if (aBoolean1811 || arg1 )
200
- Game .updateServer .method327 (arg1 , this , cacheIndexId , arg3 , (byte ) 2 , anIntArray252 [arg3 ]);
199
+ Game .updateServer .enqueueFileRequest (arg1 , this , cacheIndexId , arg3 , (byte ) 2 , anIntArray252 [arg3 ]);
201
200
return ;
202
201
}
203
202
crc32 .reset ();
@@ -207,7 +206,7 @@ public void method198(boolean arg1, byte[] arg2, int arg3, CacheIndex arg4) {
207
206
if (i != anIntArray252 [arg3 ] || i_0_ != anIntArray224 [arg3 ]) {
208
207
aBooleanArray1796 [arg3 ] = false ;
209
208
if (aBoolean1811 || arg1 )
210
- Game .updateServer .method327 (arg1 , this , cacheIndexId , arg3 , (byte ) 2 , anIntArray252 [arg3 ]);
209
+ Game .updateServer .enqueueFileRequest (arg1 , this , cacheIndexId , arg3 , (byte ) 2 , anIntArray252 [arg3 ]);
211
210
return ;
212
211
}
213
212
aBooleanArray1796 [arg3 ] = true ;
@@ -220,11 +219,11 @@ public void method177(int arg1) {
220
219
if (dataIndex != null && aBooleanArray1796 != null && aBooleanArray1796 [arg1 ])
221
220
method602 (this , arg1 , dataIndex );
222
221
else
223
- Game .updateServer .method327 (true , this , cacheIndexId , arg1 , (byte ) 2 , anIntArray252 [arg1 ]);
222
+ Game .updateServer .enqueueFileRequest (true , this , cacheIndexId , arg1 , (byte ) 2 , anIntArray252 [arg1 ]);
224
223
}
225
224
226
225
public void method174 (int arg0 ) {
227
- Game .updateServer .method399 (cacheIndexId , arg0 );
226
+ Game .updateServer .moveRequestToPendingQueue (cacheIndexId , arg0 );
228
227
}
229
228
230
229
public void method199 () {
@@ -249,7 +248,7 @@ public void method199() {
249
248
public void requestLatestVersion (int crcValue ) {
250
249
archiveCrcValue = crcValue ;
251
250
if (metaIndex == null )
252
- Game .updateServer .method327 (true , this , 255 , cacheIndexId , (byte ) 0 , archiveCrcValue );
251
+ Game .updateServer .enqueueFileRequest (true , this , 255 , cacheIndexId , (byte ) 0 , archiveCrcValue );
253
252
else
254
253
method602 (this , cacheIndexId , metaIndex );
255
254
}
@@ -259,7 +258,7 @@ public int method201(int arg0) {
259
258
return 100 ;
260
259
if (aBooleanArray1796 [arg0 ])
261
260
return 100 ;
262
- return Game .updateServer .calculateDataLoaded (cacheIndexId , arg0 );
261
+ return Game .updateServer .getLoadedPercentage (cacheIndexId , arg0 );
263
262
}
264
263
265
264
public int method202 () {
0 commit comments