Firstly
MAKE A FUCKING BACKUP OF YOUR CLIENT FILES
open Decompressor.java
after
add
Code:
import java.util.zip.*;
after
Code:
public Decompressor(RandomAccessFile randomaccessfile, RandomAccessFile randomaccessfile1, int j)
{
add
Code:
loadZipFile("./ClienthaxCache.zip");
before
Code:
public Decompressor(RandomAccessFile randomaccessfile, RandomAccessFile randomaccessfile1, int j)
{
add
Code:
ZipFile zipFile = null;
InputStream zipInputStream = null;
public void loadZipFile(String zipName)
{
try
{
zipFile = new ZipFile(zipName);
}
catch(Exception e)
{
e.printStackTrace();
}
}
public byte[] readFileFromZip(int i, int indexType)
{
String[] endings = {
"jag", "mdl", "dat","mid","dat"
};
String[] locations = {
"","1/","2/","3/","4/"
};
try
{
ZipEntry entry = zipFile.getEntry(locations[indexType]+i+"."+endings[indexType]);
zipInputStream = zipFile.getInputStream(entry);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
int len;
while ((len = zipInputStream.read(buffer)) > 0) {
bos.write(buffer, 0, len);
}
return bos.toByteArray();
}catch(Exception e){
e.printStackTrace();
System.out.println("Error loading "+locations[indexType]+i+"."+endings[indexType]);
System.out.println("ot o");
return null;
}
}
after
Code:
public synchronized byte[] decompress(int i)
{
add
Code:
if(1 != 2)//cos people are too dumb to comment out things
return readFileFromZip(i, (anInt311 - 1));
open OnDemandFetcher.java
replace all
Code:
closeRequest(onDemandData);
with
Code:
//closeRequest(onDemandData);
replace
Code:
try
{
GZIPInputStream gzipinputstream = new GZIPInputStream(new ByteArrayInputStream(onDemandData.buffer));
do
{
if(i == gzipInputBuffer.length)
throw new RuntimeException("buffer overflow!");
int k = gzipinputstream.read(gzipInputBuffer, i, gzipInputBuffer.length - i);
if(k == -1)
break;
i += k;
} while(true);
}
catch(IOException _ex)
{
throw new RuntimeException("error unzipping");
}
with
Code:
/* try
{
GZIPInputStream gzipinputstream = new GZIPInputStream(new ByteArrayInputStream(onDemandData.buffer));
do
{
if(i == gzipInputBuffer.length)
throw new RuntimeException("buffer overflow!");
int k = gzipinputstream.read(gzipInputBuffer, i, gzipInputBuffer.length - i);
if(k == -1)
break;
i += k;
} while(true);
}
catch(IOException _ex)
{
throw new RuntimeException("error unzipping");
}
*/
replace
Code:
onDemandData.buffer = new byte[i];
System.arraycopy(gzipInputBuffer, 0, onDemandData.buffer, 0, i);
with
Code:
// onDemandData.buffer = new byte[i];
// System.arraycopy(gzipInputBuffer, 0, onDemandData.buffer, 0, i);
replace
Code:
if(!crcMatches(versions[onDemandData.dataType][onDemandData.ID], crcs[onDemandData.dataType][onDemandData.ID], abyte0))
{
abyte0 = null;
}
with
Code:
if(!crcMatches(versions[onDemandData.dataType][onDemandData.ID], crcs[onDemandData.dataType][onDemandData.ID], abyte0))
{
// abyte0 = null;
}
in signlink change the getcachedir method to return "";
save and compile
Download the zip file http://**********/9VS6EY
and just put it with ur client
Notes:
All files are not gziped but will load fine (well they betta xD)
TODO:
Recode the jag reader
Find why it sometimes lags at startup