Originally Posted by
DreamDesire
not sure how im doing that
Here's the 474 readvalues for the objects.
Replace your readValues method in ObjectDef class with this
Code:
private void readValues(Stream byteBuffer) {
int i = -1;
label0: do {
int j;
do {
j = byteBuffer.readUnsignedByte();
if (j == 0)
break label0;
if (j == 1) {
int k = byteBuffer.readUnsignedByte();
if (k > 0)
if (anIntArray773 == null || lowMem) {
anIntArray776 = new int[k];
anIntArray773 = new int[k];
for (int k1 = 0; k1 < k; k1++) {
anIntArray773[k1] = byteBuffer
.readUnsignedWord();
anIntArray776[k1] = byteBuffer
.readUnsignedByte();
}
} else {
byteBuffer.currentOffset += k * 3;
}
} else if (j == 2)
name = byteBuffer.readString();
else if (j == 3)
description = byteBuffer.readBytes();
else if (j == 5) {
int l = byteBuffer.readUnsignedByte();
if (l > 0)
if (anIntArray773 == null || lowMem) {
anIntArray776 = null;
anIntArray773 = new int[l];
for (int l1 = 0; l1 < l; l1++)
anIntArray773[l1] = byteBuffer
.readUnsignedWord();
} else {
byteBuffer.currentOffset += l * 2;
}
} else if (j == 14)
anInt744 = byteBuffer.readUnsignedByte();
else if (j == 15)
anInt761 = byteBuffer.readUnsignedByte();
else if (j == 17)
aBoolean767 = false;
else if (j == 18)
aBoolean757 = false;
else if (j == 19) {
i = byteBuffer.readUnsignedByte();
if (i == 1)
hasActions = true;
} else if (j == 21)
aBoolean762 = true;
else if (j == 22)
aBoolean769 = false;
else if (j == 23)
aBoolean764 = true;
else if (j == 24) {
anInt781 = byteBuffer.readUnsignedWord();
if (anInt781 == 65535)
anInt781 = -1;
} else if (j == 28)
anInt775 = byteBuffer.readUnsignedByte();
else if (j == 29)
aByte737 = byteBuffer.readSignedByte();
else if (j == 39)
aByte742 = byteBuffer.readSignedByte();
else if (j >= 30 && j < 39) {
if (itemActions == null)
itemActions = new String[5];
itemActions[j - 30] = byteBuffer.readString();
if (itemActions[j - 30].equalsIgnoreCase("hidden"))
itemActions[j - 30] = null;
} else if (j == 40) {
int i1 = byteBuffer.readUnsignedByte();
modifiedModelColors = new int[i1];
originalModelColors = new int[i1];
for (int i2 = 0; i2 < i1; i2++) {
modifiedModelColors[i2] = byteBuffer.readUnsignedWord();
originalModelColors[i2] = byteBuffer.readUnsignedWord();
}
} else if (j == 60)
anInt746 = byteBuffer.readUnsignedWord();
else if (j == 62)
aBoolean751 = true;
else if (j == 64)
aBoolean779 = false;
else if (j == 65)
anInt748 = byteBuffer.readUnsignedWord();
else if (j == 66)
anInt772 = byteBuffer.readUnsignedWord();
else if (j == 67)
anInt740 = byteBuffer.readUnsignedWord();
else if (j == 68)
anInt758 = byteBuffer.readUnsignedWord();
else if (j == 69)
anInt768 = byteBuffer.readUnsignedByte();
else if (j == 70)
anInt738 = byteBuffer.readSignedWord();
else if (j == 71)
anInt745 = byteBuffer.readSignedWord();
else if (j == 72)
anInt783 = byteBuffer.readSignedWord();
else if (j == 73)
aBoolean736 = true;
else if (j == 74) {
aBoolean766 = true;
} else {
if (j != 75)
continue;
anInt760 = byteBuffer.readUnsignedByte();
}
continue label0;
} while (j != 77);
anInt774 = byteBuffer.readUnsignedWord();
if (anInt774 == 65535)
anInt774 = -1;
anInt749 = byteBuffer.readUnsignedWord();
if (anInt749 == 65535)
anInt749 = -1;
int j1 = byteBuffer.readUnsignedByte();
childrenIDs = new int[j1 + 1];
for (int j2 = 0; j2 <= j1; j2++) {
childrenIDs[j2] = byteBuffer.readUnsignedWord();
if (childrenIDs[j2] == 65535)
childrenIDs[j2] = -1;
}
} while (true);
//if (i == -1) {
if (i == -1 && name != "null" && name != null) {
hasActions = anIntArray773 != null
&& (anIntArray776 == null || anIntArray776[0] == 10);
if (itemActions != null)
hasActions = true;
}
if (aBoolean766) {
aBoolean767 = false;
aBoolean757 = false;
}
if (anInt760 == -1)
anInt760 = aBoolean767 ? 1 : 0;
}