250 lines
12 KiB
Java
250 lines
12 KiB
Java
import java.util.Comparator;
|
|
import java.util.Date;
|
|
import net.runelite.mapping.Export;
|
|
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("h")
|
|
@Implements("GrandExchangeOfferAgeComparator")
|
|
final class GrandExchangeOfferAgeComparator implements Comparator {
|
|
@ObfuscatedName("hk")
|
|
@ObfuscatedGetter(
|
|
intValue = -1448356175
|
|
)
|
|
@Export("cameraZ")
|
|
static int cameraZ;
|
|
|
|
@ObfuscatedName("a")
|
|
@ObfuscatedSignature(
|
|
signature = "(Lo;Lo;B)I",
|
|
garbageValue = "46"
|
|
)
|
|
@Export("compare_bridged")
|
|
int compare_bridged(GrandExchangeEvent var1, GrandExchangeEvent var2) {
|
|
return var1.age < var2.age ? -1 : (var1.age == var2.age ? 0 : 1);
|
|
}
|
|
|
|
public boolean equals(Object var1) {
|
|
return super.equals(var1);
|
|
}
|
|
|
|
public int compare(Object var1, Object var2) {
|
|
return this.compare_bridged((GrandExchangeEvent)var1, (GrandExchangeEvent)var2);
|
|
}
|
|
|
|
@ObfuscatedName("a")
|
|
@ObfuscatedSignature(
|
|
signature = "(Lbi;I)V",
|
|
garbageValue = "-794060784"
|
|
)
|
|
@Export("runScriptEvent")
|
|
public static void runScriptEvent(ScriptEvent var0) {
|
|
class4.runScript(var0, 500000);
|
|
}
|
|
|
|
@ObfuscatedName("d")
|
|
@ObfuscatedSignature(
|
|
signature = "(IIIII)I",
|
|
garbageValue = "1637402959"
|
|
)
|
|
static final int method195(int var0, int var1, int var2, int var3) {
|
|
int var4 = 65536 - Rasterizer3D.Rasterizer3D_cosine[var2 * 1024 / var3] >> 1;
|
|
return ((65536 - var4) * var0 >> 16) + (var4 * var1 >> 16);
|
|
}
|
|
|
|
@ObfuscatedName("ax")
|
|
@ObfuscatedSignature(
|
|
signature = "(ILcj;ZB)I",
|
|
garbageValue = "88"
|
|
)
|
|
static int method196(int var0, Script var1, boolean var2) {
|
|
String var3;
|
|
int var4;
|
|
if (var0 == ScriptOpcodes.APPEND_NUM) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
var4 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3 + var4;
|
|
return 1;
|
|
} else {
|
|
String var9;
|
|
if (var0 == ScriptOpcodes.APPEND) {
|
|
WorldMapDecoration.Interpreter_stringStackSize -= 2;
|
|
var3 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize];
|
|
var9 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize + 1];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3 + var9;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.APPEND_SIGNNUM) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
var4 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3 + WorldMapData_0.intToString(var4, true);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.LOWERCASE) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3.toLowerCase();
|
|
return 1;
|
|
} else {
|
|
int var6;
|
|
int var10;
|
|
if (var0 == ScriptOpcodes.FROMDATE) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
long var11 = (11745L + (long)var10) * 86400000L;
|
|
Interpreter.Interpreter_calendar.setTime(new Date(var11));
|
|
var6 = Interpreter.Interpreter_calendar.get(5);
|
|
int var16 = Interpreter.Interpreter_calendar.get(2);
|
|
int var8 = Interpreter.Interpreter_calendar.get(1);
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var6 + "-" + Interpreter.Interpreter_MONTHS[var16] + "-" + var8;
|
|
return 1;
|
|
} else if (var0 != ScriptOpcodes.TEXT_GENDER) {
|
|
if (var0 == ScriptOpcodes.TOSTRING) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = Integer.toString(var10);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.COMPARE) {
|
|
WorldMapDecoration.Interpreter_stringStackSize -= 2;
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = class326.method6375(ArchiveDiskAction.compareStrings(Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize], Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize + 1], WorldMapSection1.clientLanguage));
|
|
return 1;
|
|
} else {
|
|
int var5;
|
|
byte[] var13;
|
|
Font var14;
|
|
if (var0 == ScriptOpcodes.PARAHEIGHT) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_intStackSize -= 2;
|
|
var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
|
|
var5 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
|
|
var13 = UrlRequest.archive13.takeFile(var5, 0);
|
|
var14 = new Font(var13);
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var14.lineCount(var3, var4);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.PARAWIDTH) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_intStackSize -= 2;
|
|
var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
|
|
var5 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
|
|
var13 = UrlRequest.archive13.takeFile(var5, 0);
|
|
var14 = new Font(var13);
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var14.lineWidth(var3, var4);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.TEXT_SWITCH) {
|
|
WorldMapDecoration.Interpreter_stringStackSize -= 2;
|
|
var3 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize];
|
|
var9 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize + 1];
|
|
if (Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize] == 1) {
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3;
|
|
} else {
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var9;
|
|
}
|
|
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.ESCAPE) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = AbstractFont.escapeBrackets(var3);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.APPEND_CHAR) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
var4 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3 + (char)var4;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CHAR_ISPRINTABLE) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = WorldMapElement.isCharPrintable((char)var10) ? 1 : 0;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CHAR_ISALPHANUMERIC) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = UserComparator8.isAlphaNumeric((char)var10) ? 1 : 0;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CHAR_ISALPHA) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = ChatChannel.isCharAlphabetic((char)var10) ? 1 : 0;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.CHAR_ISNUMERIC) {
|
|
var10 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = ClientPacket.isDigit((char)var10) ? 1 : 0;
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.STRING_LENGTH) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
if (var3 != null) {
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.length();
|
|
} else {
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 0;
|
|
}
|
|
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.SUBSTRING) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_intStackSize -= 2;
|
|
var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
|
|
var5 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3.substring(var4, var5);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.REMOVETAGS) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
StringBuilder var17 = new StringBuilder(var3.length());
|
|
boolean var15 = false;
|
|
|
|
for (var6 = 0; var6 < var3.length(); ++var6) {
|
|
char var7 = var3.charAt(var6);
|
|
if (var7 == '<') {
|
|
var15 = true;
|
|
} else if (var7 == '>') {
|
|
var15 = false;
|
|
} else if (!var15) {
|
|
var17.append(var7);
|
|
}
|
|
}
|
|
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var17.toString();
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.STRING_INDEXOF_CHAR) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
var4 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.indexOf(var4);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.STRING_INDEXOF_STRING) {
|
|
WorldMapDecoration.Interpreter_stringStackSize -= 2;
|
|
var3 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize];
|
|
var9 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize + 1];
|
|
var5 = Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize];
|
|
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = var3.indexOf(var9, var5);
|
|
return 1;
|
|
} else if (var0 == ScriptOpcodes.UPPERCASE) {
|
|
var3 = Interpreter.Interpreter_stringStack[--WorldMapDecoration.Interpreter_stringStackSize];
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3.toUpperCase();
|
|
return 1;
|
|
} else {
|
|
return 2;
|
|
}
|
|
}
|
|
} else {
|
|
WorldMapDecoration.Interpreter_stringStackSize -= 2;
|
|
var3 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize];
|
|
var9 = Interpreter.Interpreter_stringStack[WorldMapDecoration.Interpreter_stringStackSize + 1];
|
|
if (class215.localPlayer.appearance != null && class215.localPlayer.appearance.isFemale) {
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var9;
|
|
} else {
|
|
Interpreter.Interpreter_stringStack[++WorldMapDecoration.Interpreter_stringStackSize - 1] = var3;
|
|
}
|
|
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@ObfuscatedName("kq")
|
|
@ObfuscatedSignature(
|
|
signature = "(Lhi;I)V",
|
|
garbageValue = "-1910417202"
|
|
)
|
|
@Export("invalidateWidget")
|
|
static void invalidateWidget(Widget var0) {
|
|
if (var0.cycle == Client.field835) {
|
|
Client.field842[var0.rootIndex] = true;
|
|
}
|
|
|
|
}
|
|
}
|