cache: newer stuff for itemloader, from @UniquePassive
This commit is contained in:
@@ -22,82 +22,79 @@
|
|||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package net.runelite.cache.definitions;
|
package net.runelite.cache.definitions;
|
||||||
|
|
||||||
public class ItemDefinition
|
public class ItemDefinition
|
||||||
{
|
{
|
||||||
public int id;
|
public int id;
|
||||||
public int resizeY;
|
|
||||||
|
public String name = "null";
|
||||||
|
|
||||||
|
public int resizeX = 128;
|
||||||
|
public int resizeY = 128;
|
||||||
|
public int resizeZ = 128;
|
||||||
|
|
||||||
public int xan2d = 0;
|
public int xan2d = 0;
|
||||||
|
public int yan2d = 0;
|
||||||
|
public int zan2d = 0;
|
||||||
|
|
||||||
public int cost = 1;
|
public int cost = 1;
|
||||||
|
public boolean isTradeable;
|
||||||
|
public int stackable = 0;
|
||||||
public int inventoryModel;
|
public int inventoryModel;
|
||||||
public int resizeZ;
|
public boolean members = false;
|
||||||
|
|
||||||
public short[] colorFind;
|
public short[] colorFind;
|
||||||
public short[] colorReplace;
|
public short[] colorReplace;
|
||||||
public short[] textureFind;
|
public short[] textureFind;
|
||||||
public String name = "null";
|
|
||||||
public int zoom2d = 200000;
|
|
||||||
public int yan2d = 0;
|
|
||||||
public int zan2d = 0;
|
|
||||||
public int maleOffset;
|
|
||||||
public int yOffset2d = 0;
|
|
||||||
public int stackable = 0;
|
|
||||||
public int[] countCo;
|
|
||||||
public boolean members = false;
|
|
||||||
public String[] options;
|
|
||||||
public String[] interfaceOptions;
|
|
||||||
public int maleModel0;
|
|
||||||
public int maleModel1;
|
|
||||||
public short[] textureReplace;
|
public short[] textureReplace;
|
||||||
public int femaleModel1;
|
|
||||||
public int femaleOffset;
|
public int zoom2d = 200000;
|
||||||
public int maleModel2;
|
|
||||||
public int xOffset2d = 0;
|
public int xOffset2d = 0;
|
||||||
public int maleHeadModel;
|
public int yOffset2d = 0;
|
||||||
public int maleHeadModel2;
|
|
||||||
public int femaleHeadModel;
|
|
||||||
public int femaleHeadModel2;
|
|
||||||
public int[] countObj;
|
|
||||||
public int femaleModel2;
|
|
||||||
public int notedID;
|
|
||||||
public int femaleModel0;
|
|
||||||
public int resizeX;
|
|
||||||
public int notedTemplate;
|
|
||||||
public int ambient;
|
public int ambient;
|
||||||
public int contrast;
|
public int contrast;
|
||||||
|
|
||||||
|
public int[] countCo;
|
||||||
|
public int[] countObj;
|
||||||
|
|
||||||
|
public String[] options = new String[]
|
||||||
|
{
|
||||||
|
null, null, "Take", null, null
|
||||||
|
};
|
||||||
|
|
||||||
|
public String[] interfaceOptions = new String[]
|
||||||
|
{
|
||||||
|
null, null, null, null, "Drop"
|
||||||
|
};
|
||||||
|
|
||||||
|
public int maleModel0 = -1;
|
||||||
|
public int maleModel1 = -1;
|
||||||
|
public int maleModel2 = -1;
|
||||||
|
public int maleOffset;
|
||||||
|
public int maleHeadModel = -1;
|
||||||
|
public int maleHeadModel2 = -1;
|
||||||
|
|
||||||
|
public int femaleModel0 = -1;
|
||||||
|
public int femaleModel1 = -1;
|
||||||
|
public int femaleModel2 = -1;
|
||||||
|
public int femaleOffset;
|
||||||
|
public int femaleHeadModel = -1;
|
||||||
|
public int femaleHeadModel2 = -1;
|
||||||
|
|
||||||
|
public int notedID = -1;
|
||||||
|
public int notedTemplate = -1;
|
||||||
|
|
||||||
public int team;
|
public int team;
|
||||||
|
|
||||||
|
public int shiftClickDropIndex = -2;
|
||||||
|
|
||||||
|
public int placeholderId = -1;
|
||||||
|
public int placeholderTemplateId = -1;
|
||||||
|
|
||||||
public ItemDefinition(int definitionID)
|
public ItemDefinition(int definitionID)
|
||||||
{
|
{
|
||||||
this.id = definitionID;
|
this.id = definitionID;
|
||||||
this.options = new String[]
|
|
||||||
{
|
|
||||||
null, null, "Take", null, null
|
|
||||||
};
|
|
||||||
this.interfaceOptions = new String[]
|
|
||||||
{
|
|
||||||
null, null, null, null, "Drop"
|
|
||||||
};
|
|
||||||
this.maleModel0 = -1;
|
|
||||||
this.maleModel1 = -1;
|
|
||||||
this.maleOffset = 0;
|
|
||||||
this.femaleModel0 = -1;
|
|
||||||
this.femaleModel1 = -1;
|
|
||||||
this.femaleOffset = 0;
|
|
||||||
this.maleModel2 = -1;
|
|
||||||
this.femaleModel2 = -1;
|
|
||||||
this.maleHeadModel = -1;
|
|
||||||
this.maleHeadModel2 = -1;
|
|
||||||
this.femaleHeadModel = -1;
|
|
||||||
this.femaleHeadModel2 = -1;
|
|
||||||
this.notedID = -1;
|
|
||||||
this.notedTemplate = -1;
|
|
||||||
this.resizeX = 0;
|
|
||||||
this.resizeY = 0;
|
|
||||||
this.resizeZ = 0;
|
|
||||||
this.ambient = 0;
|
|
||||||
this.contrast = 0;
|
|
||||||
this.team = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class ItemLoader
|
|||||||
{
|
{
|
||||||
def.yan2d = stream.readUnsignedShort();
|
def.yan2d = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (7 == opcode)
|
else if (opcode == 7)
|
||||||
{
|
{
|
||||||
def.xOffset2d = stream.readUnsignedShort();
|
def.xOffset2d = stream.readUnsignedShort();
|
||||||
if (def.xOffset2d > 32767)
|
if (def.xOffset2d > 32767)
|
||||||
@@ -82,7 +82,7 @@ public class ItemLoader
|
|||||||
def.xOffset2d -= 65536;
|
def.xOffset2d -= 65536;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (8 == opcode)
|
else if (opcode == 8)
|
||||||
{
|
{
|
||||||
def.yOffset2d = stream.readUnsignedShort();
|
def.yOffset2d = stream.readUnsignedShort();
|
||||||
if (def.yOffset2d > 32767)
|
if (def.yOffset2d > 32767)
|
||||||
@@ -90,7 +90,7 @@ public class ItemLoader
|
|||||||
def.yOffset2d -= 65536;
|
def.yOffset2d -= 65536;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (11 == opcode)
|
else if (opcode == 11)
|
||||||
{
|
{
|
||||||
def.stackable = 1;
|
def.stackable = 1;
|
||||||
}
|
}
|
||||||
@@ -111,12 +111,12 @@ public class ItemLoader
|
|||||||
{
|
{
|
||||||
def.maleModel1 = stream.readUnsignedShort();
|
def.maleModel1 = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (25 == opcode)
|
else if (opcode == 25)
|
||||||
{
|
{
|
||||||
def.femaleModel0 = stream.readUnsignedShort();
|
def.femaleModel0 = stream.readUnsignedShort();
|
||||||
def.femaleOffset = stream.readUnsignedByte();
|
def.femaleOffset = stream.readUnsignedByte();
|
||||||
}
|
}
|
||||||
else if (26 == opcode)
|
else if (opcode == 26)
|
||||||
{
|
{
|
||||||
def.femaleModel1 = stream.readUnsignedShort();
|
def.femaleModel1 = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
@@ -145,6 +145,27 @@ public class ItemLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (opcode == 41)
|
||||||
|
{
|
||||||
|
int var5 = stream.readUnsignedByte();
|
||||||
|
def.textureFind = new short[var5];
|
||||||
|
def.textureReplace = new short[var5];
|
||||||
|
|
||||||
|
for (int var4 = 0; var4 < var5; ++var4)
|
||||||
|
{
|
||||||
|
def.textureFind[var4] = (short) stream.readUnsignedShort();
|
||||||
|
def.textureReplace[var4] = (short) stream.readUnsignedShort();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (opcode == 42)
|
||||||
|
{
|
||||||
|
def.shiftClickDropIndex = stream.readByte();
|
||||||
|
}
|
||||||
|
else if (opcode == 65)
|
||||||
|
{
|
||||||
|
def.isTradeable = true;
|
||||||
|
}
|
||||||
else if (opcode == 78)
|
else if (opcode == 78)
|
||||||
{
|
{
|
||||||
def.maleModel2 = stream.readUnsignedShort();
|
def.maleModel2 = stream.readUnsignedShort();
|
||||||
@@ -153,15 +174,15 @@ public class ItemLoader
|
|||||||
{
|
{
|
||||||
def.femaleModel2 = stream.readUnsignedShort();
|
def.femaleModel2 = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (90 == opcode)
|
else if (opcode == 90)
|
||||||
{
|
{
|
||||||
def.maleHeadModel = stream.readUnsignedShort();
|
def.maleHeadModel = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (91 == opcode)
|
else if (opcode == 91)
|
||||||
{
|
{
|
||||||
def.femaleHeadModel = stream.readUnsignedShort();
|
def.femaleHeadModel = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (92 == opcode)
|
else if (opcode == 92)
|
||||||
{
|
{
|
||||||
def.maleHeadModel2 = stream.readUnsignedShort();
|
def.maleHeadModel2 = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
@@ -173,11 +194,11 @@ public class ItemLoader
|
|||||||
{
|
{
|
||||||
def.zan2d = stream.readUnsignedShort();
|
def.zan2d = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (97 == opcode)
|
else if (opcode == 97)
|
||||||
{
|
{
|
||||||
def.notedID = stream.readUnsignedShort();
|
def.notedID = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (98 == opcode)
|
else if (opcode == 98)
|
||||||
{
|
{
|
||||||
def.notedTemplate = stream.readUnsignedShort();
|
def.notedTemplate = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
@@ -192,7 +213,7 @@ public class ItemLoader
|
|||||||
def.countObj[opcode - 100] = stream.readUnsignedShort();
|
def.countObj[opcode - 100] = stream.readUnsignedShort();
|
||||||
def.countCo[opcode - 100] = stream.readUnsignedShort();
|
def.countCo[opcode - 100] = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else if (110 == opcode)
|
else if (opcode == 110)
|
||||||
{
|
{
|
||||||
def.resizeX = stream.readUnsignedShort();
|
def.resizeX = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
@@ -208,34 +229,13 @@ public class ItemLoader
|
|||||||
{
|
{
|
||||||
def.ambient = stream.readByte();
|
def.ambient = stream.readByte();
|
||||||
}
|
}
|
||||||
else if (114 == opcode)
|
else if (opcode == 114)
|
||||||
{
|
{
|
||||||
def.contrast = stream.readByte();
|
def.contrast = stream.readByte();
|
||||||
}
|
}
|
||||||
else if (115 == opcode)
|
else if (opcode == 115)
|
||||||
{
|
{
|
||||||
def.team = stream.readUnsignedByte();
|
def.team = stream.readUnsignedByte();
|
||||||
}
|
|
||||||
else if (opcode == 41)
|
|
||||||
{
|
|
||||||
int var5 = stream.readUnsignedByte();
|
|
||||||
def.textureFind = new short[var5];
|
|
||||||
def.textureReplace = new short[var5];
|
|
||||||
|
|
||||||
for (int var4 = 0; var4 < var5; ++var4)
|
|
||||||
{
|
|
||||||
def.textureFind[var4] = (short) stream.readUnsignedShort();
|
|
||||||
def.textureReplace[var4] = (short) stream.readUnsignedShort();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (opcode == 148)
|
|
||||||
{
|
|
||||||
stream.readUnsignedShort();
|
|
||||||
}
|
|
||||||
else if (opcode == 65)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (opcode == 139)
|
else if (opcode == 139)
|
||||||
{
|
{
|
||||||
@@ -243,7 +243,15 @@ public class ItemLoader
|
|||||||
}
|
}
|
||||||
else if (opcode == 140)
|
else if (opcode == 140)
|
||||||
{
|
{
|
||||||
|
stream.readUnsignedShort();
|
||||||
|
}
|
||||||
|
else if (opcode == 148)
|
||||||
|
{
|
||||||
|
def.placeholderId = stream.readUnsignedShort();
|
||||||
|
}
|
||||||
|
else if (opcode == 149)
|
||||||
|
{
|
||||||
|
def.placeholderTemplateId = stream.readUnsignedShort();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user