mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-10 10:20:41 -07:00
Added + handled varbit packet
This commit is contained in:
parent
2a1e082485
commit
eb2517ef3e
8 changed files with 74 additions and 9 deletions
|
|
@ -1,5 +1,6 @@
|
|||
package org.runite.client;
|
||||
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.client.data.NodeCache;
|
||||
|
||||
import java.util.Objects;
|
||||
|
|
@ -11,10 +12,10 @@ public class Class163 {
|
|||
public static int localNPCCount = 0;
|
||||
|
||||
|
||||
static void method2209(byte var0, int var1, int var2) {
|
||||
static void updateVarbit(byte var0, int var1, int var2) {
|
||||
try {
|
||||
if (var0 >= -99) {
|
||||
method2209((byte) 57, -14, 120);
|
||||
updateVarbit((byte) 57, -14, 120);
|
||||
}
|
||||
|
||||
Class79 var3 = CS2Script.method378(var2, (byte) 127);
|
||||
|
|
@ -22,12 +23,15 @@ public class Class163 {
|
|||
int var6 = var3.anInt1125;
|
||||
int var5 = var3.anInt1123;
|
||||
int var7 = Class3_Sub6.anIntArray2288[var6 - var5];
|
||||
if (var1 < 0 || var7 < var1) {
|
||||
if (var1 < 0) { //|| var7 < var1) { <-- commented out due to heavy suspicion of it being an Arios modification. Things work fine without it.
|
||||
var1 = 0;
|
||||
}
|
||||
|
||||
var7 <<= var5;
|
||||
TextureOperation39.method281(var1 << var5 & var7 | ~var7 & Class57.varpArray[var4], var4);
|
||||
int arg1 = var1 << var5 & var7 | ~var7 & Class57.varpArray[var4];
|
||||
int arg2 = var4;
|
||||
SystemLogger.logInfo("Setting " + arg1 + " to " + arg2);
|
||||
TextureOperation39.method281(arg1, arg2);
|
||||
} catch (RuntimeException var8) {
|
||||
throw ClientErrorException.clientError(var8, "wd.K(" + var0 + ',' + var1 + ',' + var2 + ')');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package org.runite.client;
|
|||
|
||||
import org.rs09.Discord;
|
||||
import org.rs09.SlayerTracker;
|
||||
import org.rs09.SystemLogger;
|
||||
import org.rs09.XPGainDraw;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
|
@ -1123,7 +1124,7 @@ public final class PacketParser {
|
|||
} else if (37 == Unsorted.incomingOpcode) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readUnsignedByte128();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShortLE();
|
||||
Class163.method2209((byte) -122, nodeModelId, var19);
|
||||
Class163.updateVarbit((byte) -122, nodeModelId, var19);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else if (Unsorted.incomingOpcode == 155) {
|
||||
|
|
@ -1400,7 +1401,7 @@ public final class PacketParser {
|
|||
} else if (Unsorted.incomingOpcode == 84) {
|
||||
nodeModelId = BufferedDataStream.incomingBuffer.readIntLE();
|
||||
var19 = BufferedDataStream.incomingBuffer.readUnsignedShortLE128();
|
||||
Class163.method2209((byte) -106, nodeModelId, var19);
|
||||
Class163.updateVarbit((byte) -106, nodeModelId, var19);
|
||||
Unsorted.incomingOpcode = -1;
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue