rev185
This commit is contained in:
@@ -1,191 +1,166 @@
|
||||
import net.runelite.mapping.Export;
|
||||
import net.runelite.mapping.ObfuscatedName;
|
||||
import net.runelite.mapping.ObfuscatedSignature;
|
||||
import net.runelite.rs.ScriptOpcodes;
|
||||
|
||||
@ObfuscatedName("hq")
|
||||
@ObfuscatedName("hb")
|
||||
public class class216 {
|
||||
@ObfuscatedName("z")
|
||||
@ObfuscatedName("sd")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(II)Liy;",
|
||||
garbageValue = "1314955897"
|
||||
signature = "Llk;"
|
||||
)
|
||||
@Export("KitDefinition_get")
|
||||
public static KitDefinition KitDefinition_get(int var0) {
|
||||
KitDefinition var1 = (KitDefinition)KitDefinition.KitDefinition_cached.get((long)var0);
|
||||
if (var1 != null) {
|
||||
return var1;
|
||||
@Export("platformInfo")
|
||||
static PlatformInfo platformInfo;
|
||||
@ObfuscatedName("dg")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lij;"
|
||||
)
|
||||
@Export("archive6")
|
||||
static Archive archive6;
|
||||
|
||||
@ObfuscatedName("am")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ILcj;ZI)I",
|
||||
garbageValue = "-855506422"
|
||||
)
|
||||
static int method4196(int var0, Script var1, boolean var2) {
|
||||
int var3;
|
||||
if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERTYPE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].type();
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERITEM) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].id;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERPRICE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].unitPrice;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOUNT) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].totalQuantity;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOMPLETEDCOUNT) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].currentQuantity;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_GETOFFERCOMPLETEDGOLD) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.grandExchangeOffers[var3].currentPrice;
|
||||
return 1;
|
||||
} else {
|
||||
byte[] var2 = KitDefinition.KitDefinition_archive.takeFile(3, var0);
|
||||
var1 = new KitDefinition();
|
||||
if (var2 != null) {
|
||||
var1.decode(new Buffer(var2));
|
||||
}
|
||||
|
||||
KitDefinition.KitDefinition_cached.put(var1, (long)var0);
|
||||
return var1;
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("ia")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lho;IB)I",
|
||||
garbageValue = "25"
|
||||
)
|
||||
static final int method4015(Widget var0, int var1) {
|
||||
if (var0.cs1Instructions != null && var1 < var0.cs1Instructions.length) {
|
||||
try {
|
||||
int[] var2 = var0.cs1Instructions[var1];
|
||||
int var3 = 0;
|
||||
int var4 = 0;
|
||||
byte var5 = 0;
|
||||
|
||||
while (true) {
|
||||
int var6 = var2[var4++];
|
||||
int var7 = 0;
|
||||
byte var8 = 0;
|
||||
if (var6 == 0) {
|
||||
return var3;
|
||||
int var12;
|
||||
if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFEREMPTY) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var12 = Client.grandExchangeOffers[var3].status();
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var12 == 0 ? 1 : 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERSTABLE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var12 = Client.grandExchangeOffers[var3].status();
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var12 == 2 ? 1 : 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERFINISHED) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var12 = Client.grandExchangeOffers[var3].status();
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var12 == 5 ? 1 : 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.STOCKMARKET_ISOFFERADDING) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var12 = Client.grandExchangeOffers[var3].status();
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var12 == 1 ? 1 : 0;
|
||||
return 1;
|
||||
} else {
|
||||
boolean var13;
|
||||
if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_NAME) {
|
||||
var13 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
|
||||
if (WorldMapData_1.grandExchangeEvents != null) {
|
||||
WorldMapData_1.grandExchangeEvents.sort(GrandExchangeEvents.GrandExchangeEvents_nameComparator, var13);
|
||||
}
|
||||
|
||||
if (var6 == 1) {
|
||||
var7 = Client.currentLevels[var2[var4++]];
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_PRICE) {
|
||||
var13 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
|
||||
if (WorldMapData_1.grandExchangeEvents != null) {
|
||||
WorldMapData_1.grandExchangeEvents.sort(GrandExchangeEvents.GrandExchangeEvents_priceComparator, var13);
|
||||
}
|
||||
|
||||
if (var6 == 2) {
|
||||
var7 = Client.levels[var2[var4++]];
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_SORTFILTERBY_WORLD) {
|
||||
Interpreter.Interpreter_intStackSize -= 2;
|
||||
var13 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize] == 1;
|
||||
boolean var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1] == 1;
|
||||
if (WorldMapData_1.grandExchangeEvents != null) {
|
||||
Client.GrandExchangeEvents_worldComparator.filterWorlds = var4;
|
||||
WorldMapData_1.grandExchangeEvents.sort(Client.GrandExchangeEvents_worldComparator, var13);
|
||||
}
|
||||
|
||||
if (var6 == 3) {
|
||||
var7 = Client.experience[var2[var4++]];
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_AGE) {
|
||||
var13 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
|
||||
if (WorldMapData_1.grandExchangeEvents != null) {
|
||||
WorldMapData_1.grandExchangeEvents.sort(GrandExchangeEvents.GrandExchangeEvents_ageComparator, var13);
|
||||
}
|
||||
|
||||
int var9;
|
||||
Widget var10;
|
||||
int var11;
|
||||
int var12;
|
||||
if (var6 == 4) {
|
||||
var9 = var2[var4++] << 16;
|
||||
var9 += var2[var4++];
|
||||
var10 = Canvas.getWidget(var9);
|
||||
var11 = var2[var4++];
|
||||
if (var11 != -1 && (!Occluder.ItemDefinition_get(var11).isMembersOnly || Client.isMembersWorld)) {
|
||||
for (var12 = 0; var12 < var10.itemIds.length; ++var12) {
|
||||
if (var11 + 1 == var10.itemIds[var12]) {
|
||||
var7 += var10.itemQuantities[var12];
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_SORTBY_COUNT) {
|
||||
var13 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1;
|
||||
if (WorldMapData_1.grandExchangeEvents != null) {
|
||||
WorldMapData_1.grandExchangeEvents.sort(GrandExchangeEvents.GrandExchangeEvents_quantityComparator, var13);
|
||||
}
|
||||
|
||||
if (var6 == 5) {
|
||||
var7 = Varps.Varps_main[var2[var4++]];
|
||||
}
|
||||
|
||||
if (var6 == 6) {
|
||||
var7 = Skills.Skills_experienceTable[Client.levels[var2[var4++]] - 1];
|
||||
}
|
||||
|
||||
if (var6 == 7) {
|
||||
var7 = Varps.Varps_main[var2[var4++]] * 100 / 46875;
|
||||
}
|
||||
|
||||
if (var6 == 8) {
|
||||
var7 = class223.localPlayer.combatLevel;
|
||||
}
|
||||
|
||||
if (var6 == 9) {
|
||||
for (var9 = 0; var9 < 25; ++var9) {
|
||||
if (Skills.Skills_enabled[var9]) {
|
||||
var7 += Client.levels[var9];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var6 == 10) {
|
||||
var9 = var2[var4++] << 16;
|
||||
var9 += var2[var4++];
|
||||
var10 = Canvas.getWidget(var9);
|
||||
var11 = var2[var4++];
|
||||
if (var11 != -1 && (!Occluder.ItemDefinition_get(var11).isMembersOnly || Client.isMembersWorld)) {
|
||||
for (var12 = 0; var12 < var10.itemIds.length; ++var12) {
|
||||
if (var11 + 1 == var10.itemIds[var12]) {
|
||||
var7 = 999999999;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var6 == 11) {
|
||||
var7 = Client.runEnergy;
|
||||
}
|
||||
|
||||
if (var6 == 12) {
|
||||
var7 = Client.weight;
|
||||
}
|
||||
|
||||
if (var6 == 13) {
|
||||
var9 = Varps.Varps_main[var2[var4++]];
|
||||
int var13 = var2[var4++];
|
||||
var7 = (var9 & 1 << var13) != 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
if (var6 == 14) {
|
||||
var9 = var2[var4++];
|
||||
var7 = WorldMapSprite.getVarbit(var9);
|
||||
}
|
||||
|
||||
if (var6 == 15) {
|
||||
var8 = 1;
|
||||
}
|
||||
|
||||
if (var6 == 16) {
|
||||
var8 = 2;
|
||||
}
|
||||
|
||||
if (var6 == 17) {
|
||||
var8 = 3;
|
||||
}
|
||||
|
||||
if (var6 == 18) {
|
||||
var7 = class223.baseX * 64 + (class223.localPlayer.x >> 7);
|
||||
}
|
||||
|
||||
if (var6 == 19) {
|
||||
var7 = class286.baseY * 64 + (class223.localPlayer.y >> 7);
|
||||
}
|
||||
|
||||
if (var6 == 20) {
|
||||
var7 = var2[var4++];
|
||||
}
|
||||
|
||||
if (var8 == 0) {
|
||||
if (var5 == 0) {
|
||||
var3 += var7;
|
||||
}
|
||||
|
||||
if (var5 == 1) {
|
||||
var3 -= var7;
|
||||
}
|
||||
|
||||
if (var5 == 2 && var7 != 0) {
|
||||
var3 /= var7;
|
||||
}
|
||||
|
||||
if (var5 == 3) {
|
||||
var3 *= var7;
|
||||
}
|
||||
|
||||
var5 = 0;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETTOTALOFFERS) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = WorldMapData_1.grandExchangeEvents == null ? 0 : WorldMapData_1.grandExchangeEvents.events.size();
|
||||
return 1;
|
||||
} else {
|
||||
GrandExchangeEvent var11;
|
||||
if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERWORLD) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var11.world;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERNAME) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var11.getOfferName();
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERPREVIOUSNAME) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var11.getPreviousOfferName();
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERAGE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
long var5 = PlayerAppearance.currentTimeMillis() - Message.field584 - var11.age;
|
||||
int var7 = (int)(var5 / 3600000L);
|
||||
int var8 = (int)((var5 - (long)(var7 * 3600000)) / 60000L);
|
||||
int var9 = (int)((var5 - (long)(var7 * 3600000) - (long)(var8 * 60000)) / 1000L);
|
||||
String var10 = var7 + ":" + var8 / 10 + var8 % 10 + ":" + var9 / 10 + var9 % 10;
|
||||
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var10;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERCOUNT) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var11.grandExchangeOffer.totalQuantity;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERPRICE) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var11.grandExchangeOffer.unitPrice;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.TRADINGPOST_GETOFFERITEM) {
|
||||
var3 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
||||
var11 = (GrandExchangeEvent)WorldMapData_1.grandExchangeEvents.events.get(var3);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var11.grandExchangeOffer.id;
|
||||
return 1;
|
||||
} else {
|
||||
var5 = var8;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
} catch (Exception var14) {
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user