rev185
This commit is contained in:
@@ -8,121 +8,130 @@ 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("bd")
|
||||
@ObfuscatedName("bc")
|
||||
@Implements("MouseHandler")
|
||||
public class MouseHandler implements MouseListener, MouseMotionListener, FocusListener {
|
||||
@ObfuscatedName("u")
|
||||
@ObfuscatedName("sz")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1607868689
|
||||
)
|
||||
@Export("foundItemIdCount")
|
||||
static int foundItemIdCount;
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lbd;"
|
||||
signature = "Lbc;"
|
||||
)
|
||||
@Export("MouseHandler_instance")
|
||||
static MouseHandler MouseHandler_instance;
|
||||
@ObfuscatedName("r")
|
||||
public static MouseHandler MouseHandler_instance;
|
||||
@ObfuscatedName("v")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1294175143
|
||||
intValue = -1338190935
|
||||
)
|
||||
@Export("MouseHandler_idleCycles")
|
||||
public static volatile int MouseHandler_idleCycles;
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedName("l")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -528827615
|
||||
intValue = 252420693
|
||||
)
|
||||
@Export("MouseHandler_currentButtonVolatile")
|
||||
static volatile int MouseHandler_currentButtonVolatile;
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 965678779
|
||||
)
|
||||
@Export("MouseHandler_xVolatile")
|
||||
static volatile int MouseHandler_xVolatile;
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1390089149
|
||||
)
|
||||
@Export("MouseHandler_yVolatile")
|
||||
static volatile int MouseHandler_yVolatile;
|
||||
@ObfuscatedName("y")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -6736454451996007549L
|
||||
)
|
||||
@Export("MouseHandler_millis")
|
||||
public static long MouseHandler_millis;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -1086707197767215489L
|
||||
)
|
||||
@Export("MouseHandler_lastMovedVolatile")
|
||||
static volatile long MouseHandler_lastMovedVolatile;
|
||||
public static volatile int MouseHandler_currentButtonVolatile;
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1174248655
|
||||
intValue = -1728347419
|
||||
)
|
||||
@Export("MouseHandler_xVolatile")
|
||||
public static volatile int MouseHandler_xVolatile;
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 890239403
|
||||
)
|
||||
@Export("MouseHandler_yVolatile")
|
||||
public static volatile int MouseHandler_yVolatile;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 3750789225615290729L
|
||||
)
|
||||
@Export("MouseHandler_lastMovedVolatile")
|
||||
public static volatile long MouseHandler_lastMovedVolatile;
|
||||
@ObfuscatedName("d")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1269401967
|
||||
)
|
||||
@Export("MouseHandler_currentButton")
|
||||
public static int MouseHandler_currentButton;
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -180428827
|
||||
intValue = 811280401
|
||||
)
|
||||
@Export("MouseHandler_x")
|
||||
public static int MouseHandler_x;
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 97221829
|
||||
intValue = 1526824115
|
||||
)
|
||||
@Export("MouseHandler_y")
|
||||
public static int MouseHandler_y;
|
||||
@ObfuscatedName("a")
|
||||
@ObfuscatedName("h")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1906360683
|
||||
longValue = -8173787367368651405L
|
||||
)
|
||||
@Export("MouseHandler_millis")
|
||||
public static long MouseHandler_millis;
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -2004292417
|
||||
)
|
||||
@Export("MouseHandler_lastButtonVolatile")
|
||||
static volatile int MouseHandler_lastButtonVolatile;
|
||||
@ObfuscatedName("e")
|
||||
public static volatile int MouseHandler_lastButtonVolatile;
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1404319225
|
||||
intValue = 587328271
|
||||
)
|
||||
@Export("MouseHandler_lastPressedXVolatile")
|
||||
static volatile int MouseHandler_lastPressedXVolatile;
|
||||
@ObfuscatedName("w")
|
||||
public static volatile int MouseHandler_lastPressedXVolatile;
|
||||
@ObfuscatedName("j")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 955503415
|
||||
intValue = -1352074073
|
||||
)
|
||||
@Export("MouseHandler_lastPressedYVolatile")
|
||||
static volatile int MouseHandler_lastPressedYVolatile;
|
||||
@ObfuscatedName("t")
|
||||
public static volatile int MouseHandler_lastPressedYVolatile;
|
||||
@ObfuscatedName("r")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -1390704279211599925L
|
||||
longValue = -4279926973257874399L
|
||||
)
|
||||
@Export("MouseHandler_lastPressedTimeMillisVolatile")
|
||||
static volatile long MouseHandler_lastPressedTimeMillisVolatile;
|
||||
@ObfuscatedName("g")
|
||||
public static volatile long MouseHandler_lastPressedTimeMillisVolatile;
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1367970229
|
||||
intValue = 268486097
|
||||
)
|
||||
@Export("MouseHandler_lastButton")
|
||||
public static int MouseHandler_lastButton;
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedName("s")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 371149673
|
||||
intValue = -209058807
|
||||
)
|
||||
@Export("MouseHandler_lastPressedX")
|
||||
public static int MouseHandler_lastPressedX;
|
||||
@ObfuscatedName("h")
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1499115361
|
||||
intValue = -775281431
|
||||
)
|
||||
@Export("MouseHandler_lastPressedY")
|
||||
public static int MouseHandler_lastPressedY;
|
||||
@ObfuscatedName("s")
|
||||
@ObfuscatedName("z")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -6248133867474392459L
|
||||
longValue = -7966461350873745939L
|
||||
)
|
||||
@Export("MouseHandler_lastPressedTimeMillis")
|
||||
public static long MouseHandler_lastPressedTimeMillis;
|
||||
@ObfuscatedName("ge")
|
||||
@Export("regions")
|
||||
static int[] regions;
|
||||
@ObfuscatedName("bx")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lhp;"
|
||||
)
|
||||
static StudioGame field458;
|
||||
|
||||
static {
|
||||
MouseHandler_instance = new MouseHandler();
|
||||
@@ -148,10 +157,10 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
|
||||
MouseHandler() {
|
||||
}
|
||||
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Ljava/awt/event/MouseEvent;I)I",
|
||||
garbageValue = "1818791609"
|
||||
signature = "(Ljava/awt/event/MouseEvent;B)I",
|
||||
garbageValue = "-1"
|
||||
)
|
||||
@Export("getButton")
|
||||
final int getButton(MouseEvent var1) {
|
||||
@@ -173,6 +182,28 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
|
||||
|
||||
}
|
||||
|
||||
public final synchronized void mouseDragged(MouseEvent var1) {
|
||||
this.mouseMoved(var1);
|
||||
}
|
||||
|
||||
public final synchronized void mousePressed(MouseEvent var1) {
|
||||
if (MouseHandler_instance != null) {
|
||||
MouseHandler_idleCycles = 0;
|
||||
MouseHandler_lastPressedXVolatile = var1.getX();
|
||||
MouseHandler_lastPressedYVolatile = var1.getY();
|
||||
MouseHandler_lastPressedTimeMillisVolatile = PlayerAppearance.currentTimeMillis();
|
||||
MouseHandler_lastButtonVolatile = this.getButton(var1);
|
||||
if (MouseHandler_lastButtonVolatile != 0) {
|
||||
MouseHandler_currentButtonVolatile = MouseHandler_lastButtonVolatile;
|
||||
}
|
||||
}
|
||||
|
||||
if (var1.isPopupTrigger()) {
|
||||
var1.consume();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final synchronized void mouseReleased(MouseEvent var1) {
|
||||
if (MouseHandler_instance != null) {
|
||||
MouseHandler_idleCycles = 0;
|
||||
@@ -185,14 +216,7 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
|
||||
|
||||
}
|
||||
|
||||
public final void mouseClicked(MouseEvent var1) {
|
||||
if (var1.isPopupTrigger()) {
|
||||
var1.consume();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final synchronized void mouseDragged(MouseEvent var1) {
|
||||
public final synchronized void mouseEntered(MouseEvent var1) {
|
||||
this.mouseMoved(var1);
|
||||
}
|
||||
|
||||
@@ -206,10 +230,6 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
|
||||
|
||||
}
|
||||
|
||||
public final synchronized void mouseEntered(MouseEvent var1) {
|
||||
this.mouseMoved(var1);
|
||||
}
|
||||
|
||||
public final synchronized void mouseExited(MouseEvent var1) {
|
||||
if (MouseHandler_instance != null) {
|
||||
MouseHandler_idleCycles = 0;
|
||||
@@ -220,21 +240,145 @@ public class MouseHandler implements MouseListener, MouseMotionListener, FocusLi
|
||||
|
||||
}
|
||||
|
||||
public final synchronized void mousePressed(MouseEvent var1) {
|
||||
if (MouseHandler_instance != null) {
|
||||
MouseHandler_idleCycles = 0;
|
||||
MouseHandler_lastPressedXVolatile = var1.getX();
|
||||
MouseHandler_lastPressedYVolatile = var1.getY();
|
||||
MouseHandler_lastPressedTimeMillisVolatile = class30.currentTimeMillis();
|
||||
MouseHandler_lastButtonVolatile = this.getButton(var1);
|
||||
if (MouseHandler_lastButtonVolatile != 0) {
|
||||
MouseHandler_currentButtonVolatile = MouseHandler_lastButtonVolatile;
|
||||
}
|
||||
}
|
||||
|
||||
public final void mouseClicked(MouseEvent var1) {
|
||||
if (var1.isPopupTrigger()) {
|
||||
var1.consume();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ObfuscatedName("af")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ILcj;ZB)I",
|
||||
garbageValue = "-21"
|
||||
)
|
||||
static int method1176(int var0, Script var1, boolean var2) {
|
||||
if (var0 == ScriptOpcodes.VIEWPORT_SETFOV) {
|
||||
Interpreter.Interpreter_intStackSize -= 2;
|
||||
Client.field881 = (short)Buddy.method5298(Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize]);
|
||||
if (Client.field881 <= 0) {
|
||||
Client.field881 = 256;
|
||||
}
|
||||
|
||||
Client.field882 = (short)Buddy.method5298(Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1]);
|
||||
if (Client.field882 <= 0) {
|
||||
Client.field882 = 256;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.VIEWPORT_SETZOOM) {
|
||||
Interpreter.Interpreter_intStackSize -= 2;
|
||||
Client.zoomHeight = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
|
||||
if (Client.zoomHeight <= 0) {
|
||||
Client.zoomHeight = 256;
|
||||
}
|
||||
|
||||
Client.zoomWidth = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
|
||||
if (Client.zoomWidth <= 0) {
|
||||
Client.zoomWidth = 320;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.VIEWPORT_CLAMPFOV) {
|
||||
Interpreter.Interpreter_intStackSize -= 4;
|
||||
Client.field885 = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize];
|
||||
if (Client.field885 <= 0) {
|
||||
Client.field885 = 1;
|
||||
}
|
||||
|
||||
Client.field886 = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 1];
|
||||
if (Client.field886 <= 0) {
|
||||
Client.field886 = 32767;
|
||||
} else if (Client.field886 < Client.field885) {
|
||||
Client.field886 = Client.field885;
|
||||
}
|
||||
|
||||
Client.field844 = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 2];
|
||||
if (Client.field844 <= 0) {
|
||||
Client.field844 = 1;
|
||||
}
|
||||
|
||||
Client.field888 = (short)Interpreter.Interpreter_intStack[Interpreter.Interpreter_intStackSize + 3];
|
||||
if (Client.field888 <= 0) {
|
||||
Client.field888 = 32767;
|
||||
} else if (Client.field888 < Client.field844) {
|
||||
Client.field888 = Client.field844;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.VIEWPORT_GETEFFECTIVESIZE) {
|
||||
if (Client.viewportWidget != null) {
|
||||
Calendar.setViewportShape(0, 0, Client.viewportWidget.width, Client.viewportWidget.height, false);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.viewportWidth;
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.viewportHeight;
|
||||
} else {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = -1;
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.VIEWPORT_GETZOOM) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.zoomHeight;
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = Client.zoomWidth;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.VIEWPORT_GETFOV) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = class30.method608(Client.field881);
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = class30.method608(Client.field882);
|
||||
return 1;
|
||||
} else if (var0 == 6220) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 0;
|
||||
return 1;
|
||||
} else if (var0 == 6221) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = 0;
|
||||
return 1;
|
||||
} else if (var0 == 6222) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = class286.canvasWidth;
|
||||
return 1;
|
||||
} else if (var0 == 6223) {
|
||||
Interpreter.Interpreter_intStack[++Interpreter.Interpreter_intStackSize - 1] = FloorUnderlayDefinition.canvasHeight;
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("hx")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "790198016"
|
||||
)
|
||||
static final void method1172() {
|
||||
for (Projectile var0 = (Projectile)Client.projectiles.last(); var0 != null; var0 = (Projectile)Client.projectiles.previous()) {
|
||||
if (var0.plane == Player.Scene_plane && Client.cycle <= var0.cycleEnd) {
|
||||
if (Client.cycle >= var0.cycleStart) {
|
||||
if (var0.targetIndex > 0) {
|
||||
NPC var1 = Client.npcs[var0.targetIndex - 1];
|
||||
if (var1 != null && var1.x >= 0 && var1.x < 13312 && var1.y >= 0 && var1.y < 13312) {
|
||||
var0.setDestination(var1.x, var1.y, GraphicsObject.getTileHeight(var1.x, var1.y, var0.plane) - var0.endHeight, Client.cycle);
|
||||
}
|
||||
}
|
||||
|
||||
if (var0.targetIndex < 0) {
|
||||
int var2 = -var0.targetIndex - 1;
|
||||
Player var3;
|
||||
if (var2 == Client.localPlayerIndex) {
|
||||
var3 = class215.localPlayer;
|
||||
} else {
|
||||
var3 = Client.players[var2];
|
||||
}
|
||||
|
||||
if (var3 != null && var3.x >= 0 && var3.x < 13312 && var3.y >= 0 && var3.y < 13312) {
|
||||
var0.setDestination(var3.x, var3.y, GraphicsObject.getTileHeight(var3.x, var3.y, var0.plane) - var0.endHeight, Client.cycle);
|
||||
}
|
||||
}
|
||||
|
||||
var0.advance(Client.field693);
|
||||
WorldMapArea.scene.drawEntity(Player.Scene_plane, (int)var0.x, (int)var0.y, (int)var0.z, 60, var0, var0.yaw, -1L, false);
|
||||
}
|
||||
} else {
|
||||
var0.remove();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user