Rename IndexStore to be more accurate, rename rest in Archive
This commit is contained in:
@@ -15,14 +15,14 @@ public class Archive extends AbstractArchive {
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lff;"
|
||||
)
|
||||
@Export("indexStore")
|
||||
IndexStore indexStore;
|
||||
@Export("archiveDisk")
|
||||
ArchiveDisk archiveDisk;
|
||||
@ObfuscatedName("r")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lff;"
|
||||
)
|
||||
@Export("referenceStore")
|
||||
IndexStore referenceStore;
|
||||
@Export("masterDisk")
|
||||
ArchiveDisk masterDisk;
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1579549759
|
||||
@@ -34,20 +34,20 @@ public class Archive extends AbstractArchive {
|
||||
@ObfuscatedName("ag")
|
||||
boolean field404;
|
||||
@ObfuscatedName("aq")
|
||||
@Export("validArchives")
|
||||
volatile boolean[] validArchives;
|
||||
@Export("validGroups")
|
||||
volatile boolean[] validGroups;
|
||||
@ObfuscatedName("av")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1472870917
|
||||
)
|
||||
@Export("indexReferenceCrc")
|
||||
int indexReferenceCrc;
|
||||
@Export("indexCrc")
|
||||
int indexCrc;
|
||||
@ObfuscatedName("ar")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -785528219
|
||||
)
|
||||
@Export("indexReferenceVersion")
|
||||
int indexReferenceVersion;
|
||||
@Export("indexVersion")
|
||||
int indexVersion;
|
||||
@ObfuscatedName("ac")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1884661133
|
||||
@@ -57,13 +57,13 @@ public class Archive extends AbstractArchive {
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lff;Lff;IZZZ)V"
|
||||
)
|
||||
public Archive(IndexStore var1, IndexStore var2, int var3, boolean var4, boolean var5, boolean var6) {
|
||||
public Archive(ArchiveDisk var1, ArchiveDisk var2, int var3, boolean var4, boolean var5, boolean var6) {
|
||||
super(var4, var5);
|
||||
this.field403 = false;
|
||||
this.field404 = false;
|
||||
this.field405 = -1;
|
||||
this.indexStore = var1;
|
||||
this.referenceStore = var2;
|
||||
this.archiveDisk = var1;
|
||||
this.masterDisk = var2;
|
||||
this.index = var3;
|
||||
this.field404 = var6;
|
||||
int var7 = this.index;
|
||||
@@ -101,7 +101,7 @@ public class Archive extends AbstractArchive {
|
||||
)
|
||||
@Export("groupLoadPercent")
|
||||
int groupLoadPercent(int var1) {
|
||||
return super.groups[var1] != null ? 100 : (this.validArchives[var1] ? 100 : class54.method1086(this.index, var1));
|
||||
return super.groups[var1] != null ? 100 : (this.validGroups[var1] ? 100 : class54.method1086(this.index, var1));
|
||||
}
|
||||
|
||||
@ObfuscatedName("z")
|
||||
@@ -111,13 +111,13 @@ public class Archive extends AbstractArchive {
|
||||
)
|
||||
@Export("loadGroup")
|
||||
void loadGroup(int group) {
|
||||
if (this.indexStore != null && this.validArchives != null && this.validArchives[group]) {
|
||||
IndexStore var2 = this.indexStore;
|
||||
if (this.archiveDisk != null && this.validGroups != null && this.validGroups[group]) {
|
||||
ArchiveDisk var2 = this.archiveDisk;
|
||||
byte[] var3 = null;
|
||||
NodeDeque var4 = IndexStoreActionHandler.IndexStoreActionHandler_requestQueue;
|
||||
synchronized(IndexStoreActionHandler.IndexStoreActionHandler_requestQueue) {
|
||||
for (IndexStoreAction var6 = (IndexStoreAction)IndexStoreActionHandler.IndexStoreActionHandler_requestQueue.last(); var6 != null; var6 = (IndexStoreAction)IndexStoreActionHandler.IndexStoreActionHandler_requestQueue.previous()) {
|
||||
if (var6.key == (long) group && var2 == var6.indexStore && var6.type == 0) {
|
||||
if (var6.key == (long) group && var2 == var6.archiveDisk && var6.type == 0) {
|
||||
var3 = var6.data;
|
||||
break;
|
||||
}
|
||||
@@ -173,16 +173,16 @@ public class Archive extends AbstractArchive {
|
||||
)
|
||||
@Export("loadIndexReference")
|
||||
public void loadIndexReference(int var1, int var2) {
|
||||
this.indexReferenceCrc = var1;
|
||||
this.indexReferenceVersion = var2;
|
||||
if (this.referenceStore != null) {
|
||||
this.indexCrc = var1;
|
||||
this.indexVersion = var2;
|
||||
if (this.masterDisk != null) {
|
||||
int var3 = this.index;
|
||||
IndexStore var4 = this.referenceStore;
|
||||
ArchiveDisk var4 = this.masterDisk;
|
||||
byte[] var5 = null;
|
||||
NodeDeque var6 = IndexStoreActionHandler.IndexStoreActionHandler_requestQueue;
|
||||
synchronized(IndexStoreActionHandler.IndexStoreActionHandler_requestQueue) {
|
||||
for (IndexStoreAction var8 = (IndexStoreAction)IndexStoreActionHandler.IndexStoreActionHandler_requestQueue.last(); var8 != null; var8 = (IndexStoreAction)IndexStoreActionHandler.IndexStoreActionHandler_requestQueue.previous()) {
|
||||
if (var8.key == (long)var3 && var4 == var8.indexStore && var8.type == 0) {
|
||||
if (var8.key == (long)var3 && var4 == var8.archiveDisk && var8.type == 0) {
|
||||
var5 = var8.data;
|
||||
break;
|
||||
}
|
||||
@@ -196,7 +196,7 @@ public class Archive extends AbstractArchive {
|
||||
this.load(var4, var3, var7, true);
|
||||
}
|
||||
} else {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexReferenceCrc, (byte)0, true);
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexCrc, (byte)0, true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -213,8 +213,8 @@ public class Archive extends AbstractArchive {
|
||||
throw new RuntimeException();
|
||||
}
|
||||
|
||||
if (this.referenceStore != null) {
|
||||
Widget.method4499(this.index, var2, this.referenceStore);
|
||||
if (this.masterDisk != null) {
|
||||
Widget.method4499(this.index, var2, this.masterDisk);
|
||||
}
|
||||
|
||||
this.decodeIndex(var2);
|
||||
@@ -222,9 +222,9 @@ public class Archive extends AbstractArchive {
|
||||
} else {
|
||||
var2[var2.length - 2] = (byte)(super.groupVersions[var1] >> 8);
|
||||
var2[var2.length - 1] = (byte)super.groupVersions[var1];
|
||||
if (this.indexStore != null) {
|
||||
Widget.method4499(var1, var2, this.indexStore);
|
||||
this.validArchives[var1] = true;
|
||||
if (this.archiveDisk != null) {
|
||||
Widget.method4499(var1, var2, this.archiveDisk);
|
||||
this.validGroups[var1] = true;
|
||||
}
|
||||
|
||||
if (var4) {
|
||||
@@ -240,19 +240,19 @@ public class Archive extends AbstractArchive {
|
||||
garbageValue = "-2045340856"
|
||||
)
|
||||
@Export("load")
|
||||
void load(IndexStore var1, int var2, byte[] var3, boolean var4) {
|
||||
void load(ArchiveDisk var1, int var2, byte[] var3, boolean var4) {
|
||||
int var5;
|
||||
if (var1 == this.referenceStore) {
|
||||
if (var1 == this.masterDisk) {
|
||||
if (this.field403) {
|
||||
throw new RuntimeException();
|
||||
} else if (var3 == null) {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexReferenceCrc, (byte)0, true);
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexCrc, (byte)0, true);
|
||||
} else {
|
||||
IndexCache_crc.reset();
|
||||
IndexCache_crc.update(var3, 0, var3.length);
|
||||
var5 = (int)IndexCache_crc.getValue();
|
||||
if (var5 != this.indexReferenceCrc) {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexReferenceCrc, (byte)0, true);
|
||||
if (var5 != this.indexCrc) {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexCrc, (byte)0, true);
|
||||
} else {
|
||||
Buffer var9 = new Buffer(Strings.decompressBytes(var3));
|
||||
int var7 = var9.readUnsignedByte();
|
||||
@@ -264,8 +264,8 @@ public class Archive extends AbstractArchive {
|
||||
var8 = var9.readInt();
|
||||
}
|
||||
|
||||
if (var8 != this.indexReferenceVersion) {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexReferenceCrc, (byte)0, true);
|
||||
if (var8 != this.indexVersion) {
|
||||
PacketBuffer.requestNetFile(this, 255, this.index, this.indexCrc, (byte)0, true);
|
||||
} else {
|
||||
this.decodeIndex(var3);
|
||||
this.loadAllLocal();
|
||||
@@ -284,20 +284,20 @@ public class Archive extends AbstractArchive {
|
||||
var5 = (int)IndexCache_crc.getValue();
|
||||
int var6 = ((var3[var3.length - 2] & 255) << 8) + (var3[var3.length - 1] & 255);
|
||||
if (var5 == super.groupCrcs[var2] && var6 == super.groupVersions[var2]) {
|
||||
this.validArchives[var2] = true;
|
||||
this.validGroups[var2] = true;
|
||||
if (var4) {
|
||||
super.groups[var2] = Projectile.byteArrayToObject(var3, false);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.validArchives[var2] = false;
|
||||
this.validGroups[var2] = false;
|
||||
if (this.field404 || var4) {
|
||||
PacketBuffer.requestNetFile(this, this.index, var2, super.groupCrcs[var2], (byte)2, var4);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
this.validArchives[var2] = false;
|
||||
this.validGroups[var2] = false;
|
||||
if (this.field404 || var4) {
|
||||
PacketBuffer.requestNetFile(this, this.index, var2, super.groupCrcs[var2], (byte)2, var4);
|
||||
}
|
||||
@@ -313,21 +313,21 @@ public class Archive extends AbstractArchive {
|
||||
)
|
||||
@Export("loadAllLocal")
|
||||
void loadAllLocal() {
|
||||
this.validArchives = new boolean[super.groups.length];
|
||||
this.validGroups = new boolean[super.groups.length];
|
||||
|
||||
int var1;
|
||||
for (var1 = 0; var1 < this.validArchives.length; ++var1) {
|
||||
this.validArchives[var1] = false;
|
||||
for (var1 = 0; var1 < this.validGroups.length; ++var1) {
|
||||
this.validGroups[var1] = false;
|
||||
}
|
||||
|
||||
if (this.indexStore == null) {
|
||||
if (this.archiveDisk == null) {
|
||||
this.field403 = true;
|
||||
} else {
|
||||
this.field405 = -1;
|
||||
|
||||
for (var1 = 0; var1 < this.validArchives.length; ++var1) {
|
||||
for (var1 = 0; var1 < this.validGroups.length; ++var1) {
|
||||
if (super.fileCounts[var1] > 0) {
|
||||
NPC.method2009(var1, this.indexStore, this);
|
||||
NPC.method2009(var1, this.archiveDisk, this);
|
||||
this.field405 = var1;
|
||||
}
|
||||
}
|
||||
@@ -345,7 +345,7 @@ public class Archive extends AbstractArchive {
|
||||
garbageValue = "0"
|
||||
)
|
||||
public boolean method132(int var1) {
|
||||
return this.validArchives[var1];
|
||||
return this.validGroups[var1];
|
||||
}
|
||||
|
||||
@ObfuscatedName("df")
|
||||
|
||||
Reference in New Issue
Block a user