From 575645ff44ef2338b730306af747a2c6b8745c6e Mon Sep 17 00:00:00 2001 From: Max Weber Date: Thu, 26 Apr 2018 17:26:15 -0600 Subject: [PATCH] cache: Name ObjectDefiniton's varpID and configID correctly --- .../net/runelite/cache/definitions/ObjectDefinition.java | 4 ++-- .../runelite/cache/definitions/loaders/ObjectLoader.java | 8 ++++---- .../runelite/cache/definitions/savers/ObjectSaver.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cache/src/main/java/net/runelite/cache/definitions/ObjectDefinition.java b/cache/src/main/java/net/runelite/cache/definitions/ObjectDefinition.java index 9512cb32f4b..007c9e2ebfe 100644 --- a/cache/src/main/java/net/runelite/cache/definitions/ObjectDefinition.java +++ b/cache/src/main/java/net/runelite/cache/definitions/ObjectDefinition.java @@ -49,7 +49,7 @@ public class ObjectDefinition private boolean nonFlatShading = false; private int anInt2088 = -1; private int animationID = -1; - private int varpID = -1; + private int varbitID = -1; private int ambient = 0; private int contrast = 0; private String[] actions = new String[5]; @@ -68,7 +68,7 @@ public class ObjectDefinition private int anInt2106 = -1; private int[] configChangeDest; private boolean isRotated = false; - private int configId = -1; + private int varpID = -1; private int anInt2110 = -1; private boolean aBool2111 = false; private int anInt2112 = 0; diff --git a/cache/src/main/java/net/runelite/cache/definitions/loaders/ObjectLoader.java b/cache/src/main/java/net/runelite/cache/definitions/loaders/ObjectLoader.java index 2f8972287ee..13a3eab7547 100644 --- a/cache/src/main/java/net/runelite/cache/definitions/loaders/ObjectLoader.java +++ b/cache/src/main/java/net/runelite/cache/definitions/loaders/ObjectLoader.java @@ -253,14 +253,14 @@ else if (opcode == 77) { varpID = -1; } - def.setVarpID(varpID); + def.setVarbitID(varpID); int configId = is.readUnsignedShort(); if (configId == 0xFFFF) { configId = -1; } - def.setConfigId(configId); + def.setVarpID(configId); int length = is.readUnsignedByte(); int[] configChangeDest = new int[length + 2]; @@ -313,14 +313,14 @@ else if (opcode == 92) { varpID = -1; } - def.setVarpID(varpID); + def.setVarbitID(varpID); int configId = is.readUnsignedShort(); if (configId == 0xFFFF) { configId = -1; } - def.setConfigId(configId); + def.setVarpID(configId); int var = is.readUnsignedShort(); diff --git a/cache/src/main/java/net/runelite/cache/definitions/savers/ObjectSaver.java b/cache/src/main/java/net/runelite/cache/definitions/savers/ObjectSaver.java index f5b7d42a6d0..e1bb77896d7 100644 --- a/cache/src/main/java/net/runelite/cache/definitions/savers/ObjectSaver.java +++ b/cache/src/main/java/net/runelite/cache/definitions/savers/ObjectSaver.java @@ -196,8 +196,8 @@ else if (!obj.isBlocksProjectile()) if (obj.getConfigChangeDest() != null) { out.writeByte(92); + out.writeShort(obj.getVarbitID()); out.writeShort(obj.getVarpID()); - out.writeShort(obj.getConfigId()); int[] c = obj.getConfigChangeDest(); out.writeShort(c[c.length - 1]);