rsclient: rev 191
This commit is contained in:
@@ -1,189 +1,164 @@
|
||||
import java.awt.FontMetrics;
|
||||
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("bs")
|
||||
@ObfuscatedName("bv")
|
||||
@Implements("ApproximateRouteStrategy")
|
||||
public class ApproximateRouteStrategy extends RouteStrategy {
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 955958433
|
||||
@ObfuscatedName("qm")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Llp;"
|
||||
)
|
||||
static int field630;
|
||||
@ObfuscatedName("lp")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -2033733379
|
||||
@Export("sceneMinimapSprite")
|
||||
static Sprite sceneMinimapSprite;
|
||||
@ObfuscatedName("an")
|
||||
@Export("loginScreenFontMetrics")
|
||||
static FontMetrics loginScreenFontMetrics;
|
||||
@ObfuscatedName("dp")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "Liw;"
|
||||
)
|
||||
@Export("menuHeight")
|
||||
static int menuHeight;
|
||||
@Export("archive12")
|
||||
static Archive archive12;
|
||||
|
||||
ApproximateRouteStrategy() {
|
||||
}
|
||||
} // L: 10971
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedName("z")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(IIILfz;I)Z",
|
||||
garbageValue = "-1966963917"
|
||||
descriptor = "(IIILft;I)Z",
|
||||
garbageValue = "-1274441547"
|
||||
)
|
||||
@Export("hasArrived")
|
||||
protected boolean hasArrived(int var1, int var2, int var3, CollisionMap var4) {
|
||||
return var2 == super.approxDestinationX && var3 == super.approxDestinationY;
|
||||
return var2 == super.approxDestinationX && var3 == super.approxDestinationY; // L: 10974
|
||||
}
|
||||
|
||||
@ObfuscatedName("ha")
|
||||
@ObfuscatedName("z")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Lby;IIBI)V",
|
||||
garbageValue = "-549376931"
|
||||
descriptor = "(B)[Lix;",
|
||||
garbageValue = "64"
|
||||
)
|
||||
static final void method1284(Player var0, int var1, int var2, byte var3) {
|
||||
int var4 = var0.pathX[0];
|
||||
int var5 = var0.pathY[0];
|
||||
int var6 = var0.transformedSize();
|
||||
if (var4 >= var6 && var4 < 104 - var6 && var5 >= var6 && var5 < 104 - var6) {
|
||||
if (var1 >= var6 && var1 < 104 - var6 && var2 >= var6 && var2 < 104 - var6) {
|
||||
int var7 = Login.method2235(var4, var5, var0.transformedSize(), class52.method877(var1, var2), Client.collisionMaps[var0.plane], true, Client.field947, Client.field948);
|
||||
if (var7 >= 1) {
|
||||
for (int var8 = 0; var8 < var7 - 1; ++var8) {
|
||||
var0.method1302(Client.field947[var8], Client.field948[var8], var3);
|
||||
@Export("PlayerType_values")
|
||||
public static PlayerType[] PlayerType_values() {
|
||||
return new PlayerType[]{PlayerType.PlayerType_jagexModerator, PlayerType.PlayerType_playerModerator, PlayerType.PlayerType_ultimateIronman, PlayerType.PlayerType_hardcoreIronman, PlayerType.PlayerType_ironman, PlayerType.PlayerType_normal, PlayerType.field3131}; // L: 20
|
||||
}
|
||||
|
||||
@ObfuscatedName("t")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(ILcy;ZI)I",
|
||||
garbageValue = "-1823919909"
|
||||
)
|
||||
static int method1274(int var0, Script var1, boolean var2) {
|
||||
int var4;
|
||||
int var9;
|
||||
if (var0 == ScriptOpcodes.CC_CREATE) { // L: 430
|
||||
Interpreter.Interpreter_intStackSize -= 3; // L: 431
|
||||
var9 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize]; // L: 432
|
||||
var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1]; // L: 433
|
||||
int var11 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 2]; // L: 434
|
||||
if (var4 == 0) { // L: 435
|
||||
throw new RuntimeException(); // L: 436
|
||||
} else {
|
||||
Widget var6 = TileItem.getWidget(var9); // L: 438
|
||||
if (var6.children == null) { // L: 439
|
||||
var6.children = new Widget[var11 + 1];
|
||||
}
|
||||
|
||||
if (var6.children.length <= var11) { // L: 440
|
||||
Widget[] var7 = new Widget[var11 + 1]; // L: 441
|
||||
|
||||
for (int var8 = 0; var8 < var6.children.length; ++var8) { // L: 442
|
||||
var7[var8] = var6.children[var8];
|
||||
}
|
||||
|
||||
var6.children = var7; // L: 443
|
||||
}
|
||||
|
||||
if (var11 > 0 && var6.children[var11 - 1] == null) { // L: 445
|
||||
throw new RuntimeException("" + (var11 - 1));
|
||||
} else {
|
||||
Widget var12 = new Widget(); // L: 446
|
||||
var12.type = var4; // L: 447
|
||||
var12.parentId = var12.id = var6.id; // L: 448
|
||||
var12.childIndex = var11; // L: 449
|
||||
var12.isIf3 = true; // L: 450
|
||||
var6.children[var11] = var12; // L: 451
|
||||
if (var2) { // L: 452
|
||||
Canvas.field438 = var12;
|
||||
} else {
|
||||
class3.field12 = var12; // L: 453
|
||||
}
|
||||
|
||||
class52.invalidateWidget(var6); // L: 454
|
||||
return 1; // L: 455
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("hc")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Ljava/lang/String;Ljava/lang/String;IIIIZB)V",
|
||||
garbageValue = "-63"
|
||||
)
|
||||
@Export("insertMenuItem")
|
||||
static final void insertMenuItem(String var0, String var1, int var2, int var3, int var4, int var5, boolean var6) {
|
||||
if (!Client.isMenuOpen) {
|
||||
if (Client.menuOptionsCount < 500) {
|
||||
Client.menuActions[Client.menuOptionsCount] = var0;
|
||||
Client.menuTargets[Client.menuOptionsCount] = var1;
|
||||
Client.menuOpcodes[Client.menuOptionsCount] = var2;
|
||||
Client.menuIdentifiers[Client.menuOptionsCount] = var3;
|
||||
Client.menuArguments1[Client.menuOptionsCount] = var4;
|
||||
Client.menuArguments2[Client.menuOptionsCount] = var5;
|
||||
Client.menuShiftClick[Client.menuOptionsCount] = var6;
|
||||
++Client.menuOptionsCount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("id")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(Ljz;IIII)V",
|
||||
garbageValue = "1974138271"
|
||||
)
|
||||
@Export("addNpcToMenu")
|
||||
static final void addNpcToMenu(NPCDefinition npcDef, int npcIdx, int sceneX, int sceneY) {
|
||||
if (Client.menuOptionsCount < 400) {
|
||||
if (npcDef.transforms != null) {
|
||||
npcDef = npcDef.transform();
|
||||
}
|
||||
|
||||
if (npcDef != null) {
|
||||
if (npcDef.isInteractable) {
|
||||
if (!npcDef.isFollower || Client.followerIndex == npcIdx) {
|
||||
String npcName = npcDef.name;
|
||||
if (npcDef.combatLevel != 0) {
|
||||
npcName = npcName + Canvas.getColorForCombatDifference(npcDef.combatLevel, class60.localPlayer.combatLevel) + " " + " (" + "level-" + npcDef.combatLevel + ")";
|
||||
}
|
||||
|
||||
if (npcDef.isFollower && Client.followerOpsLowPriority) {
|
||||
ScriptEvent.insertMenuItemNoShift("Examine", ItemContainer.colorStartTag(16776960) + npcName, 1003, npcIdx, sceneX, sceneY);
|
||||
}
|
||||
|
||||
if (Client.isItemSelected == 1) {
|
||||
ScriptEvent.insertMenuItemNoShift("Use", Client.selectedItemName + " " + "->" + " " + ItemContainer.colorStartTag(16776960) + npcName, 7, npcIdx, sceneX, sceneY);
|
||||
} else if (Client.isSpellSelected) {
|
||||
if ((WorldMapSprite.selectedSpellFlags & 2) == 2) {
|
||||
ScriptEvent.insertMenuItemNoShift(Client.selectedSpellActionName, Client.selectedSpellName + " " + "->" + " " + ItemContainer.colorStartTag(16776960) + npcName, 8, npcIdx, sceneX, sceneY);
|
||||
}
|
||||
} else {
|
||||
Widget var3;
|
||||
if (var0 == ScriptOpcodes.CC_DELETE) { // L: 457
|
||||
var3 = var2 ? Canvas.field438 : class3.field12; // L: 458
|
||||
Widget var10 = TileItem.getWidget(var3.id); // L: 459
|
||||
var10.children[var3.childIndex] = null; // L: 460
|
||||
class52.invalidateWidget(var10); // L: 461
|
||||
return 1; // L: 462
|
||||
} else if (var0 == ScriptOpcodes.CC_DELETEALL) { // L: 464
|
||||
var3 = TileItem.getWidget(Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize]); // L: 465
|
||||
var3.children = null; // L: 466
|
||||
class52.invalidateWidget(var3); // L: 467
|
||||
return 1; // L: 468
|
||||
} else if (var0 != ScriptOpcodes.CC_FIND) { // L: 470
|
||||
if (var0 == ScriptOpcodes.IF_FIND) { // L: 483
|
||||
var3 = TileItem.getWidget(Interpreter.Interpreter_intStack[--Interpreter.Interpreter_intStackSize]); // L: 484
|
||||
if (var3 != null) { // L: 485
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 1; // L: 486
|
||||
if (var2) { // L: 487
|
||||
Canvas.field438 = var3;
|
||||
} else {
|
||||
int flwrOffset = npcDef.isFollower && Client.followerOpsLowPriority ? 2000 : 0;
|
||||
String[] actions = npcDef.actions;
|
||||
int i;
|
||||
int opcode;
|
||||
if (actions != null) {
|
||||
for (i = 4; i >= 0; --i) {
|
||||
if (actions[i] != null && !actions[i].equalsIgnoreCase("Attack")) {
|
||||
opcode = 0;
|
||||
if (i == 0) {
|
||||
opcode = flwrOffset + 9;
|
||||
}
|
||||
|
||||
if (i == 1) {
|
||||
opcode = flwrOffset + 10;
|
||||
}
|
||||
|
||||
if (i == 2) {
|
||||
opcode = flwrOffset + 11;
|
||||
}
|
||||
|
||||
if (i == 3) {
|
||||
opcode = flwrOffset + 12;
|
||||
}
|
||||
|
||||
if (i == 4) {
|
||||
opcode = flwrOffset + 13;
|
||||
}
|
||||
|
||||
ScriptEvent.insertMenuItemNoShift(actions[i], ItemContainer.colorStartTag(16776960) + npcName, opcode, npcIdx, sceneX, sceneY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (actions != null) {
|
||||
for (i = 4; i >= 0; --i) {
|
||||
if (actions[i] != null && actions[i].equalsIgnoreCase("Attack")) {
|
||||
short atkOffset = 0;
|
||||
if (AttackOption.AttackOption_hidden != Client.npcAttackOption) {
|
||||
if (Client.npcAttackOption == AttackOption.AttackOption_alwaysRightClick || Client.npcAttackOption == AttackOption.AttackOption_dependsOnCombatLevels && npcDef.combatLevel > class60.localPlayer.combatLevel) {
|
||||
atkOffset = 2000;
|
||||
}
|
||||
|
||||
opcode = 0;
|
||||
if (i == 0) {
|
||||
opcode = atkOffset + 9;
|
||||
}
|
||||
|
||||
if (i == 1) {
|
||||
opcode = atkOffset + 10;
|
||||
}
|
||||
|
||||
if (i == 2) {
|
||||
opcode = atkOffset + 11;
|
||||
}
|
||||
|
||||
if (i == 3) {
|
||||
opcode = atkOffset + 12;
|
||||
}
|
||||
|
||||
if (i == 4) {
|
||||
opcode = atkOffset + 13;
|
||||
}
|
||||
|
||||
ScriptEvent.insertMenuItemNoShift(actions[i], ItemContainer.colorStartTag(16776960) + npcName, opcode, npcIdx, sceneX, sceneY);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!npcDef.isFollower || !Client.followerOpsLowPriority) {
|
||||
ScriptEvent.insertMenuItemNoShift("Examine", ItemContainer.colorStartTag(16776960) + npcName, 1003, npcIdx, sceneX, sceneY);
|
||||
}
|
||||
class3.field12 = var3; // L: 488
|
||||
}
|
||||
|
||||
} else {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 0; // L: 490
|
||||
}
|
||||
|
||||
return 1; // L: 491
|
||||
} else {
|
||||
return 2; // L: 493
|
||||
}
|
||||
} else {
|
||||
Interpreter.Interpreter_intStackSize -= 2; // L: 471
|
||||
var9 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize]; // L: 472
|
||||
var4 = Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1]; // L: 473
|
||||
Widget var5 = SecureRandomCallable.getWidgetChild(var9, var4); // L: 474
|
||||
if (var5 != null && var4 != -1) { // L: 475
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 1; // L: 476
|
||||
if (var2) { // L: 477
|
||||
Canvas.field438 = var5;
|
||||
} else {
|
||||
class3.field12 = var5; // L: 478
|
||||
}
|
||||
} else {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 0; // L: 480
|
||||
}
|
||||
|
||||
return 1; // L: 481
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("ia")
|
||||
@ObfuscatedSignature(
|
||||
descriptor = "(II)Ljava/lang/String;",
|
||||
garbageValue = "1053633300"
|
||||
)
|
||||
static String method1273(int var0) {
|
||||
if (var0 < 0) { // L: 8283
|
||||
return "";
|
||||
} else {
|
||||
return Client.menuTargets[var0].length() > 0 ? Client.menuActions[var0] + " " + Client.menuTargets[var0] : Client.menuActions[var0]; // L: 8284 8285
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user