rs-client/apis
This commit is contained in:
@@ -3,158 +3,232 @@ 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("cs")
|
||||
@ObfuscatedName("cn")
|
||||
@Implements("MenuAction")
|
||||
public class MenuAction {
|
||||
@ObfuscatedName("iz")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -2062450631
|
||||
)
|
||||
@Export("selectedItemId")
|
||||
static int selectedItemId;
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 305977315
|
||||
)
|
||||
@Export("argument1")
|
||||
int argument1;
|
||||
@ObfuscatedName("f")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1764645917
|
||||
)
|
||||
@Export("argument2")
|
||||
int argument2;
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1483856253
|
||||
)
|
||||
@Export("opcode")
|
||||
int opcode;
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -2057883817
|
||||
)
|
||||
@Export("argument0")
|
||||
int argument0;
|
||||
@ObfuscatedName("o")
|
||||
@Export("action")
|
||||
String action;
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1339211825
|
||||
)
|
||||
static int field1160;
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 627171033
|
||||
)
|
||||
@Export("argument1")
|
||||
int argument1;
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1724157347
|
||||
)
|
||||
@Export("argument2")
|
||||
int argument2;
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -748556303
|
||||
)
|
||||
@Export("opcode")
|
||||
int opcode;
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 641907059
|
||||
)
|
||||
@Export("argument0")
|
||||
int argument0;
|
||||
@ObfuscatedName("k")
|
||||
@Export("action")
|
||||
String action;
|
||||
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lir;Ljava/lang/String;Ljava/lang/String;B)Llq;",
|
||||
garbageValue = "0"
|
||||
)
|
||||
@Export("loadIndexedSpriteByName")
|
||||
public static IndexedSprite loadIndexedSpriteByName(AbstractArchive var0, String var1, String var2) {
|
||||
int var3 = var0.getGroupId(var1);
|
||||
int var4 = var0.getFileId(var3, var2);
|
||||
IndexedSprite var5;
|
||||
if (!SpriteMask.loadSprite(var0, var3, var4)) {
|
||||
var5 = null;
|
||||
} else {
|
||||
var5 = ServerPacket.createIndexedSprite();
|
||||
}
|
||||
MenuAction() {
|
||||
}
|
||||
|
||||
return var5;
|
||||
}
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Lgu;B)I",
|
||||
garbageValue = "-1"
|
||||
)
|
||||
public static int method1993(CharSequence var0, CharSequence var1, class190 var2) {
|
||||
int var3 = var0.length();
|
||||
int var4 = var1.length();
|
||||
int var5 = 0;
|
||||
int var6 = 0;
|
||||
byte var7 = 0;
|
||||
byte var8 = 0;
|
||||
|
||||
@ObfuscatedName("jd")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lbx;ZI)V",
|
||||
garbageValue = "1537219807"
|
||||
)
|
||||
@Export("closeInterface")
|
||||
static final void closeInterface(InterfaceParent var0, boolean var1) {
|
||||
int var2 = var0.group;
|
||||
int var3 = (int)var0.key;
|
||||
var0.remove();
|
||||
if (var1) {
|
||||
AbstractByteArrayCopier.unloadInterface(var2);
|
||||
}
|
||||
while (var5 - var7 < var3 || var6 - var8 < var4) {
|
||||
if (var5 - var7 >= var3) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (IntegerNode var4 = (IntegerNode)Client.widgetClickMasks.first(); var4 != null; var4 = (IntegerNode)Client.widgetClickMasks.next()) {
|
||||
if ((long)var2 == (var4.key >> 48 & 65535L)) {
|
||||
var4.remove();
|
||||
}
|
||||
}
|
||||
if (var6 - var8 >= var4) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
Widget var12 = Huffman.getWidget(var3);
|
||||
if (var12 != null) {
|
||||
WorldMapRectangle.method295(var12);
|
||||
}
|
||||
char var9;
|
||||
if (var7 != 0) {
|
||||
var9 = (char)var7;
|
||||
boolean var14 = false;
|
||||
} else {
|
||||
var9 = var0.charAt(var5++);
|
||||
}
|
||||
|
||||
int var5;
|
||||
int var6;
|
||||
for (var5 = 0; var5 < Client.menuOptionsCount; ++var5) {
|
||||
if (WorldMapManager.isWidgetMenuOpcode(Client.menuOpcodes[var5])) {
|
||||
if (var5 < Client.menuOptionsCount - 1) {
|
||||
for (var6 = var5; var6 < Client.menuOptionsCount - 1; ++var6) {
|
||||
Client.menuActions[var6] = Client.menuActions[var6 + 1];
|
||||
Client.menuTargetNames[var6] = Client.menuTargetNames[var6 + 1];
|
||||
Client.menuOpcodes[var6] = Client.menuOpcodes[var6 + 1];
|
||||
Client.menuArguments0[var6] = Client.menuArguments0[var6 + 1];
|
||||
Client.menuArguments1[var6] = Client.menuArguments1[var6 + 1];
|
||||
Client.menuArguments2[var6] = Client.menuArguments2[var6 + 1];
|
||||
Client.menuShiftClick[var6] = Client.menuShiftClick[var6 + 1];
|
||||
}
|
||||
}
|
||||
char var10;
|
||||
if (var8 != 0) {
|
||||
var10 = (char)var8;
|
||||
boolean var15 = false;
|
||||
} else {
|
||||
var10 = var1.charAt(var6++);
|
||||
}
|
||||
|
||||
--var5;
|
||||
--Client.menuOptionsCount;
|
||||
}
|
||||
}
|
||||
byte var11;
|
||||
if (var9 == 198) {
|
||||
var11 = 69;
|
||||
} else if (var9 == 230) {
|
||||
var11 = 101;
|
||||
} else if (var9 == 223) {
|
||||
var11 = 115;
|
||||
} else if (var9 == 338) {
|
||||
var11 = 69;
|
||||
} else if (var9 == 339) {
|
||||
var11 = 101;
|
||||
} else {
|
||||
var11 = 0;
|
||||
}
|
||||
|
||||
var5 = class214.menuWidth / 2 + WorldMapDecoration.menuX;
|
||||
var6 = GameShell.menuY;
|
||||
int var7 = class2.fontBold12.stringWidth("Choose Option");
|
||||
var7 = var11;
|
||||
byte var12;
|
||||
if (var10 == 198) {
|
||||
var12 = 69;
|
||||
} else if (var10 == 230) {
|
||||
var12 = 101;
|
||||
} else if (var10 == 223) {
|
||||
var12 = 115;
|
||||
} else if (var10 == 338) {
|
||||
var12 = 69;
|
||||
} else if (var10 == 339) {
|
||||
var12 = 101;
|
||||
} else {
|
||||
var12 = 0;
|
||||
}
|
||||
|
||||
int var8;
|
||||
for (var8 = 0; var8 < Client.menuOptionsCount; ++var8) {
|
||||
Font var9 = class2.fontBold12;
|
||||
String var10;
|
||||
if (var8 < 0) {
|
||||
var10 = "";
|
||||
} else if (Client.menuTargetNames[var8].length() > 0) {
|
||||
var10 = Client.menuActions[var8] + " " + Client.menuTargetNames[var8];
|
||||
} else {
|
||||
var10 = Client.menuActions[var8];
|
||||
}
|
||||
var8 = var12;
|
||||
var9 = PacketBufferNode.method3623(var9, var2);
|
||||
var10 = PacketBufferNode.method3623(var10, var2);
|
||||
if (var10 != var9 && Character.toUpperCase(var9) != Character.toUpperCase(var10)) {
|
||||
var9 = Character.toLowerCase(var9);
|
||||
var10 = Character.toLowerCase(var10);
|
||||
if (var10 != var9) {
|
||||
return WorldMapArea.method387(var9, var2) - WorldMapArea.method387(var10, var2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int var11 = var9.stringWidth(var10);
|
||||
if (var11 > var7) {
|
||||
var7 = var11;
|
||||
}
|
||||
}
|
||||
int var16 = Math.min(var3, var4);
|
||||
|
||||
var7 += 8;
|
||||
var8 = Client.menuOptionsCount * 15 + 22;
|
||||
int var13 = var5 - var7 / 2;
|
||||
if (var7 + var13 > SoundCache.canvasWidth) {
|
||||
var13 = SoundCache.canvasWidth - var7;
|
||||
}
|
||||
int var17;
|
||||
char var20;
|
||||
for (var17 = 0; var17 < var16; ++var17) {
|
||||
if (var2 == class190.field2347) {
|
||||
var5 = var3 - 1 - var17;
|
||||
var6 = var4 - 1 - var17;
|
||||
} else {
|
||||
var6 = var17;
|
||||
var5 = var17;
|
||||
}
|
||||
|
||||
if (var13 < 0) {
|
||||
var13 = 0;
|
||||
}
|
||||
char var18 = var0.charAt(var5);
|
||||
var20 = var1.charAt(var6);
|
||||
if (var18 != var20 && Character.toUpperCase(var18) != Character.toUpperCase(var20)) {
|
||||
var18 = Character.toLowerCase(var18);
|
||||
var20 = Character.toLowerCase(var20);
|
||||
if (var18 != var20) {
|
||||
return WorldMapArea.method387(var18, var2) - WorldMapArea.method387(var20, var2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int var14 = var6;
|
||||
if (var6 + var8 > Huffman.canvasHeight) {
|
||||
var14 = Huffman.canvasHeight - var8;
|
||||
}
|
||||
var17 = var3 - var4;
|
||||
if (var17 != 0) {
|
||||
return var17;
|
||||
} else {
|
||||
for (int var19 = 0; var19 < var16; ++var19) {
|
||||
var20 = var0.charAt(var19);
|
||||
char var13 = var1.charAt(var19);
|
||||
if (var13 != var20) {
|
||||
return WorldMapArea.method387(var20, var2) - WorldMapArea.method387(var13, var2);
|
||||
}
|
||||
}
|
||||
|
||||
if (var14 < 0) {
|
||||
var14 = 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
WorldMapDecoration.menuX = var13;
|
||||
GameShell.menuY = var14;
|
||||
class214.menuWidth = var7;
|
||||
AbstractWorldMapIcon.menuHeight = Client.menuOptionsCount * 15 + 22;
|
||||
if (Client.rootInterface != -1) {
|
||||
GrandExchangeEvents.method74(Client.rootInterface, 1);
|
||||
}
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([Ljava/lang/String;[SS)V",
|
||||
garbageValue = "-2750"
|
||||
)
|
||||
@Export("startSortingItemsByName")
|
||||
public static void startSortingItemsByName(String[] var0, short[] var1) {
|
||||
GrandExchangeOffer.sortItemsByName(var0, var1, 0, var0.length - 1);
|
||||
}
|
||||
|
||||
}
|
||||
@ObfuscatedName("y")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ILcx;ZI)I",
|
||||
garbageValue = "-426931132"
|
||||
)
|
||||
static int method1992(int var0, Script var1, boolean var2) {
|
||||
Widget var3 = var2 ? Interpreter.field1111 : Calendar.field2507;
|
||||
if (var0 == ScriptOpcodes.CC_GETSCROLLX) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.scrollX;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETSCROLLY) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.scrollY;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETTEXT) {
|
||||
Interpreter.Interpreter_stringStack[++Skills.Interpreter_stringStackSize - 1] = var3.text;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETSCROLLWIDTH) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.scrollWidth;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETSCROLLHEIGHT) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.scrollHeight;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETMODELZOOM) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.modelZoom;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_X) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.modelAngleX;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_Z) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.modelAngleZ;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETMODELANGLE_Y) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.modelAngleY;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETTRANSTOP) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.transparencyTop;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETTRANSBOT) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.transparencyBot;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETCOLOUR) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.color;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETFILLCOLOUR) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.color2;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETFILLMODE) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.fillMode.rsOrdinal();
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CC_GETMODELTRANSPARENT) {
|
||||
Interpreter.Interpreter_intStack[++HealthBarUpdate.Interpreter_intStackSize - 1] = var3.modelTransparency ? 1 : 0;
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user