chore: revision 189
This commit is contained in:
@@ -3,52 +3,53 @@ import net.runelite.mapping.Implements;
|
||||
import net.runelite.mapping.ObfuscatedGetter;
|
||||
import net.runelite.mapping.ObfuscatedName;
|
||||
import net.runelite.mapping.ObfuscatedSignature;
|
||||
import net.runelite.rs.ScriptOpcodes;
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedName("b")
|
||||
@Implements("GrandExchangeOffer")
|
||||
public class GrandExchangeOffer {
|
||||
@ObfuscatedName("du")
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lia;"
|
||||
signature = "Liy;"
|
||||
)
|
||||
@Export("archive11")
|
||||
static Archive archive11;
|
||||
@ObfuscatedName("hd")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1999981463
|
||||
@Export("ItemDefinition_modelArchive")
|
||||
public static AbstractArchive ItemDefinition_modelArchive;
|
||||
@ObfuscatedName("dk")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lih;"
|
||||
)
|
||||
@Export("cameraPitch")
|
||||
static int cameraPitch;
|
||||
@ObfuscatedName("c")
|
||||
@Export("archive2")
|
||||
static Archive archive2;
|
||||
@ObfuscatedName("x")
|
||||
@Export("state")
|
||||
byte state;
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1202522813
|
||||
intValue = -1191314621
|
||||
)
|
||||
@Export("id")
|
||||
public int id;
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -286950223
|
||||
intValue = -1373983325
|
||||
)
|
||||
@Export("unitPrice")
|
||||
public int unitPrice;
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedName("d")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -191142567
|
||||
intValue = -435168387
|
||||
)
|
||||
@Export("totalQuantity")
|
||||
public int totalQuantity;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1418175861
|
||||
intValue = 1383495981
|
||||
)
|
||||
@Export("currentQuantity")
|
||||
public int currentQuantity;
|
||||
@ObfuscatedName("g")
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 45465727
|
||||
intValue = 1519014469
|
||||
)
|
||||
@Export("currentPrice")
|
||||
public int currentPrice;
|
||||
@@ -57,7 +58,7 @@ public class GrandExchangeOffer {
|
||||
}
|
||||
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lkp;Z)V",
|
||||
signature = "(Lkb;Z)V",
|
||||
garbageValue = "0"
|
||||
)
|
||||
public GrandExchangeOffer(Buffer var1, boolean var2) {
|
||||
@@ -69,42 +70,42 @@ public class GrandExchangeOffer {
|
||||
this.currentPrice = var1.readInt();
|
||||
}
|
||||
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)I",
|
||||
garbageValue = "-51"
|
||||
signature = "(I)I",
|
||||
garbageValue = "1689314705"
|
||||
)
|
||||
@Export("status")
|
||||
public int status() {
|
||||
return this.state & 7;
|
||||
}
|
||||
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedName("d")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)I",
|
||||
garbageValue = "-96"
|
||||
signature = "(I)I",
|
||||
garbageValue = "-1922096625"
|
||||
)
|
||||
@Export("type")
|
||||
public int type() {
|
||||
return (this.state & 8) == 8 ? 1 : 0;
|
||||
}
|
||||
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(IB)V",
|
||||
garbageValue = "-38"
|
||||
signature = "(II)V",
|
||||
garbageValue = "587802237"
|
||||
)
|
||||
void method120(int var1) {
|
||||
void method211(int var1) {
|
||||
this.state &= -8;
|
||||
this.state = (byte)(this.state | var1 & 7);
|
||||
}
|
||||
|
||||
@ObfuscatedName("g")
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(II)V",
|
||||
garbageValue = "-59985742"
|
||||
garbageValue = "-582599399"
|
||||
)
|
||||
void method112(int var1) {
|
||||
void method187(int var1) {
|
||||
this.state &= -9;
|
||||
if (var1 == 1) {
|
||||
this.state = (byte)(this.state | 8);
|
||||
@@ -112,65 +113,196 @@ public class GrandExchangeOffer {
|
||||
|
||||
}
|
||||
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(IB)I",
|
||||
garbageValue = "-27"
|
||||
signature = "([Ljava/lang/String;[SIII)V",
|
||||
garbageValue = "922781737"
|
||||
)
|
||||
public static int method128(int var0) {
|
||||
long var2 = ViewportMouse.ViewportMouse_entityTags[var0];
|
||||
int var1 = (int)(var2 >>> 0 & 127L);
|
||||
return var1;
|
||||
}
|
||||
@Export("sortItemsByName")
|
||||
static void sortItemsByName(String[] var0, short[] var1, int var2, int var3) {
|
||||
if (var2 < var3) {
|
||||
int var4 = (var3 + var2) / 2;
|
||||
int var5 = var2;
|
||||
String var6 = var0[var4];
|
||||
var0[var4] = var0[var3];
|
||||
var0[var3] = var6;
|
||||
short var7 = var1[var4];
|
||||
var1[var4] = var1[var3];
|
||||
var1[var3] = var7;
|
||||
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)Z",
|
||||
garbageValue = "1764789679"
|
||||
)
|
||||
public static boolean method129() {
|
||||
try {
|
||||
if (class197.field2414 == 2) {
|
||||
if (FileSystem.musicTrack == null) {
|
||||
FileSystem.musicTrack = MusicTrack.readTrack(UserComparator5.musicTrackArchive, class197.musicTrackGroupId, class83.musicTrackFileId);
|
||||
if (FileSystem.musicTrack == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (class197.soundCache == null) {
|
||||
class197.soundCache = new SoundCache(UserComparator10.soundEffectsArchive, class197.musicSamplesArchive);
|
||||
}
|
||||
|
||||
if (class197.midiPcmStream.loadMusicTrack(FileSystem.musicTrack, class197.musicPatchesArchive, class197.soundCache, 22050)) {
|
||||
class197.midiPcmStream.clearAll();
|
||||
class197.midiPcmStream.setPcmStreamVolume(AttackOption.musicTrackVolume);
|
||||
class197.midiPcmStream.setMusicTrack(FileSystem.musicTrack, KeyHandler.musicTrackBoolean);
|
||||
class197.field2414 = 0;
|
||||
FileSystem.musicTrack = null;
|
||||
class197.soundCache = null;
|
||||
UserComparator5.musicTrackArchive = null;
|
||||
return true;
|
||||
for (int var8 = var2; var8 < var3; ++var8) {
|
||||
if (var6 == null || var0[var8] != null && var0[var8].compareTo(var6) < (var8 & 1)) {
|
||||
String var9 = var0[var8];
|
||||
var0[var8] = var0[var5];
|
||||
var0[var5] = var9;
|
||||
short var10 = var1[var8];
|
||||
var1[var8] = var1[var5];
|
||||
var1[var5++] = var10;
|
||||
}
|
||||
}
|
||||
} catch (Exception var1) {
|
||||
var1.printStackTrace();
|
||||
class197.midiPcmStream.clear();
|
||||
class197.field2414 = 0;
|
||||
FileSystem.musicTrack = null;
|
||||
class197.soundCache = null;
|
||||
UserComparator5.musicTrackArchive = null;
|
||||
|
||||
var0[var3] = var0[var5];
|
||||
var0[var5] = var6;
|
||||
var1[var3] = var1[var5];
|
||||
var1[var5] = var7;
|
||||
sortItemsByName(var0, var1, var2, var5 - 1);
|
||||
sortItemsByName(var0, var1, var5 + 1, var3);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ObfuscatedName("kn")
|
||||
@ObfuscatedName("n")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(II)V",
|
||||
garbageValue = "1055020085"
|
||||
signature = "(ILce;ZB)I",
|
||||
garbageValue = "19"
|
||||
)
|
||||
static void method127(int var0) {
|
||||
Client.oculusOrbState = var0;
|
||||
static int method191(int var0, Script var1, boolean var2) {
|
||||
Widget var3 = var2 ? GrandExchangeOfferNameComparator.field115 : Interpreter.field1130;
|
||||
if (var0 == ScriptOpcodes.CC_GETX) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.x;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETY) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.y;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETWIDTH) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.width;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETHEIGHT) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.height;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETHIDE) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.isHidden ? 1 : 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETLAYER) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.parentId;
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("hj")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ZLkj;B)V",
|
||||
garbageValue = "18"
|
||||
)
|
||||
@Export("updateNpcs")
|
||||
static final void updateNpcs(boolean var0, PacketBuffer var1) {
|
||||
Client.field801 = 0;
|
||||
Client.field851 = 0;
|
||||
WorldMapIcon_0.method304();
|
||||
|
||||
int var2;
|
||||
while (var1.bitsRemaining(Client.packetWriter.serverPacketLength) >= 27) {
|
||||
var2 = var1.readBits(15);
|
||||
if (var2 == 32767) {
|
||||
break;
|
||||
}
|
||||
|
||||
boolean var3 = false;
|
||||
if (Client.npcs[var2] == null) {
|
||||
Client.npcs[var2] = new NPC();
|
||||
var3 = true;
|
||||
}
|
||||
|
||||
NPC var4 = Client.npcs[var2];
|
||||
Client.npcIndices[++Client.npcCount - 1] = var2;
|
||||
var4.npcCycle = Client.cycle;
|
||||
int var5;
|
||||
if (var0) {
|
||||
var5 = var1.readBits(8);
|
||||
if (var5 > 127) {
|
||||
var5 -= 256;
|
||||
}
|
||||
} else {
|
||||
var5 = var1.readBits(5);
|
||||
if (var5 > 15) {
|
||||
var5 -= 32;
|
||||
}
|
||||
}
|
||||
|
||||
int var6 = Client.defaultRotations[var1.readBits(3)];
|
||||
if (var3) {
|
||||
var4.orientation = var4.rotation = var6;
|
||||
}
|
||||
|
||||
int var7 = var1.readBits(1);
|
||||
int var8 = var1.readBits(1);
|
||||
if (var8 == 1) {
|
||||
Client.field725[++Client.field851 - 1] = var2;
|
||||
}
|
||||
|
||||
int var9;
|
||||
if (var0) {
|
||||
var9 = var1.readBits(8);
|
||||
if (var9 > 127) {
|
||||
var9 -= 256;
|
||||
}
|
||||
} else {
|
||||
var9 = var1.readBits(5);
|
||||
if (var9 > 15) {
|
||||
var9 -= 32;
|
||||
}
|
||||
}
|
||||
|
||||
var4.definition = class237.getNpcDefinition(var1.readBits(14));
|
||||
var4.field976 = var4.definition.size;
|
||||
var4.field1026 = var4.definition.rotation;
|
||||
if (var4.field1026 == 0) {
|
||||
var4.rotation = 0;
|
||||
}
|
||||
|
||||
var4.walkSequence = var4.definition.walkSequence;
|
||||
var4.walkBackSequence = var4.definition.walkBackSequence;
|
||||
var4.walkLeftSequence = var4.definition.walkLeftSequence;
|
||||
var4.walkRightSequence = var4.definition.walkRightSequence;
|
||||
var4.readySequence = var4.definition.readySequence;
|
||||
var4.turnLeftSequence = var4.definition.turnLeftSequence;
|
||||
var4.turnRightSequence = var4.definition.turnRightSequence;
|
||||
var4.method2136(ByteArrayPool.localPlayer.pathX[0] + var9, ByteArrayPool.localPlayer.pathY[0] + var5, var7 == 1);
|
||||
}
|
||||
|
||||
var1.exportIndex();
|
||||
WorldMapSection0.method335(var1);
|
||||
|
||||
for (var2 = 0; var2 < Client.field801; ++var2) {
|
||||
int var10 = Client.field918[var2];
|
||||
if (Client.npcs[var10].npcCycle != Client.cycle) {
|
||||
Client.npcs[var10].definition = null;
|
||||
Client.npcs[var10] = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (var1.offset != Client.packetWriter.serverPacketLength) {
|
||||
throw new RuntimeException(var1.offset + "," + Client.packetWriter.serverPacketLength);
|
||||
} else {
|
||||
for (var2 = 0; var2 < Client.npcCount; ++var2) {
|
||||
if (Client.npcs[Client.npcIndices[var2]] == null) {
|
||||
throw new RuntimeException(var2 + "," + Client.npcCount);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("iz")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)V",
|
||||
garbageValue = "-21"
|
||||
)
|
||||
@Export("Widget_runOnTargetLeave")
|
||||
static void Widget_runOnTargetLeave() {
|
||||
if (Client.isSpellSelected) {
|
||||
Widget var0 = GrandExchangeOfferUnitPriceComparator.getWidgetChild(class7.selectedSpellWidget, Client.selectedSpellChildIndex);
|
||||
if (var0 != null && var0.onTargetLeave != null) {
|
||||
ScriptEvent var1 = new ScriptEvent();
|
||||
var1.widget = var0;
|
||||
var1.args = var0.onTargetLeave;
|
||||
GrandExchangeOfferOwnWorldComparator.runScriptEvent(var1);
|
||||
}
|
||||
|
||||
Client.isSpellSelected = false;
|
||||
ItemContainer.invalidateWidget(var0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user