cache: rename additional npc definition fields
This commit is contained in:
@@ -34,7 +34,7 @@ public class NpcDefinition
|
||||
|
||||
public final int id;
|
||||
public short[] recolorToFind;
|
||||
public int anInt2156 = 32;
|
||||
public int rotation = 32;
|
||||
public String name = "null";
|
||||
public short[] recolorToReplace;
|
||||
public int[] models;
|
||||
@@ -49,7 +49,7 @@ public class NpcDefinition
|
||||
public int resizeX = 128;
|
||||
public int contrast = 0;
|
||||
public int rotate180Animation = -1;
|
||||
public int anInt2174 = -1;
|
||||
public int varbitIndex = -1;
|
||||
public String[] options = new String[5];
|
||||
public boolean renderOnMinimap = true;
|
||||
public int combatLevel = -1;
|
||||
@@ -58,9 +58,9 @@ public class NpcDefinition
|
||||
public boolean hasRenderPriority = false;
|
||||
public int ambient = 0;
|
||||
public int headIcon = -1;
|
||||
public int[] anIntArray2185;
|
||||
public int[] configs;
|
||||
public short[] retextureToFind;
|
||||
public int anInt2187 = -1;
|
||||
public int varpIndex = -1;
|
||||
public boolean isClickable = true;
|
||||
public int anInt2189 = -1;
|
||||
public boolean aBool2190 = false;
|
||||
|
||||
@@ -179,35 +179,35 @@ public class NpcLoader
|
||||
}
|
||||
else if (opcode == 103)
|
||||
{
|
||||
def.anInt2156 = stream.readUnsignedShort();
|
||||
def.rotation = stream.readUnsignedShort();
|
||||
}
|
||||
else if (opcode == 106)
|
||||
{
|
||||
def.anInt2174 = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.anInt2174)
|
||||
def.varbitIndex = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.varbitIndex)
|
||||
{
|
||||
def.anInt2174 = -1;
|
||||
def.varbitIndex = -1;
|
||||
}
|
||||
|
||||
def.anInt2187 = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.anInt2187)
|
||||
def.varpIndex = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.varpIndex)
|
||||
{
|
||||
def.anInt2187 = -1;
|
||||
def.varpIndex = -1;
|
||||
}
|
||||
|
||||
length = stream.readUnsignedByte();
|
||||
def.anIntArray2185 = new int[length + 2];
|
||||
def.configs = new int[length + 2];
|
||||
|
||||
for (index = 0; index <= length; ++index)
|
||||
{
|
||||
def.anIntArray2185[index] = stream.readUnsignedShort();
|
||||
if (def.anIntArray2185[index] == '\uffff')
|
||||
def.configs[index] = stream.readUnsignedShort();
|
||||
if (def.configs[index] == '\uffff')
|
||||
{
|
||||
def.anIntArray2185[index] = -1;
|
||||
def.configs[index] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
def.anIntArray2185[length + 1] = -1;
|
||||
def.configs[length + 1] = -1;
|
||||
|
||||
}
|
||||
else if (opcode == 107)
|
||||
@@ -224,16 +224,16 @@ public class NpcLoader
|
||||
}
|
||||
else if (opcode == 118)
|
||||
{
|
||||
def.anInt2174 = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.anInt2174)
|
||||
def.varbitIndex = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.varbitIndex)
|
||||
{
|
||||
def.anInt2174 = -1;
|
||||
def.varbitIndex = -1;
|
||||
}
|
||||
|
||||
def.anInt2187 = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.anInt2187)
|
||||
def.varpIndex = stream.readUnsignedShort();
|
||||
if ('\uffff' == def.varpIndex)
|
||||
{
|
||||
def.anInt2187 = -1;
|
||||
def.varpIndex = -1;
|
||||
}
|
||||
|
||||
int var = stream.readUnsignedShort();
|
||||
@@ -243,18 +243,18 @@ public class NpcLoader
|
||||
}
|
||||
|
||||
length = stream.readUnsignedByte();
|
||||
def.anIntArray2185 = new int[length + 2];
|
||||
def.configs = new int[length + 2];
|
||||
|
||||
for (index = 0; index <= length; ++index)
|
||||
{
|
||||
def.anIntArray2185[index] = stream.readUnsignedShort();
|
||||
if (def.anIntArray2185[index] == '\uffff')
|
||||
def.configs[index] = stream.readUnsignedShort();
|
||||
if (def.configs[index] == '\uffff')
|
||||
{
|
||||
def.anIntArray2185[index] = -1;
|
||||
def.configs[index] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
def.anIntArray2185[length + 1] = var;
|
||||
def.configs[length + 1] = var;
|
||||
}
|
||||
else if (opcode == 249)
|
||||
{
|
||||
|
||||
@@ -144,7 +144,7 @@ public class NpcSaver
|
||||
out.writeShort(npc.headIcon);
|
||||
}
|
||||
out.writeByte(103);
|
||||
out.writeShort(npc.anInt2156);
|
||||
out.writeShort(npc.rotation);
|
||||
if (!npc.isClickable)
|
||||
{
|
||||
out.writeByte(107);
|
||||
@@ -157,13 +157,13 @@ public class NpcSaver
|
||||
{
|
||||
out.writeByte(111);
|
||||
}
|
||||
if (npc.anIntArray2185 != null)
|
||||
if (npc.configs != null)
|
||||
{
|
||||
out.writeByte(118);
|
||||
out.writeShort(npc.anInt2174);
|
||||
out.writeShort(npc.anInt2187);
|
||||
out.writeShort(npc.varbitIndex);
|
||||
out.writeShort(npc.varpIndex);
|
||||
|
||||
int[] c = npc.anIntArray2185;
|
||||
int[] c = npc.configs;
|
||||
out.writeShort(c[c.length - 1]);
|
||||
out.writeByte(c.length - 2);
|
||||
for (int i = 0; i <= c.length - 2; ++i)
|
||||
|
||||
Reference in New Issue
Block a user