Even more... you guessed it! REFACTORING. Removes the need for @Export for methods overriding base java methods
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import java.util.Comparator;
|
||||
import net.runelite.mapping.Export;
|
||||
import net.runelite.mapping.Implements;
|
||||
import net.runelite.mapping.ObfuscatedName;
|
||||
import net.runelite.mapping.ObfuscatedSignature;
|
||||
import net.runelite.rs.ScriptOpcodes;
|
||||
|
||||
@ObfuscatedName("bj")
|
||||
@Implements("GrandExchangeOfferOwnWorldComparator")
|
||||
public class GrandExchangeOfferOwnWorldComparator implements Comparator {
|
||||
@ObfuscatedName("m")
|
||||
@Export("compareOwnWorld")
|
||||
boolean compareOwnWorld;
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Ll;Ll;B)I",
|
||||
garbageValue = "21"
|
||||
)
|
||||
@Export("compareTyped")
|
||||
int compareTyped(GrandExchangeEvent var1, GrandExchangeEvent var2) {
|
||||
if (var2.world == var1.world) {
|
||||
return 0;
|
||||
} else {
|
||||
if (this.compareOwnWorld) {
|
||||
if (Client.worldId == var1.world) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (var2.world == Client.worldId) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return var1.world < var2.world ? -1 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean equals(Object var1) {
|
||||
return super.equals(var1);
|
||||
}
|
||||
|
||||
public int compare(Object var1, Object var2) {
|
||||
return this.compareTyped((GrandExchangeEvent)var1, (GrandExchangeEvent)var2);
|
||||
}
|
||||
|
||||
@ObfuscatedName("al")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(ILcg;ZI)I",
|
||||
garbageValue = "-662838966"
|
||||
)
|
||||
static int method1285(int var0, Script var1, boolean var2) {
|
||||
int var3;
|
||||
if (var0 == ScriptOpcodes.CAM_FORCEANGLE) {
|
||||
RouteStrategy.Interpreter_intStackSize -= 2;
|
||||
var3 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize];
|
||||
int var4 = Interpreter.Interpreter_intStack[RouteStrategy.Interpreter_intStackSize + 1];
|
||||
if (!Client.isCameraLocked) {
|
||||
Client.camAngleX = var3;
|
||||
Client.camAngleY = var4;
|
||||
}
|
||||
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CAM_GETANGLE_XA) {
|
||||
Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.camAngleX;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CAM_GETANGLE_YA) {
|
||||
Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.camAngleY;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CAM_SETFOLLOWHEIGHT) {
|
||||
var3 = Interpreter.Interpreter_intStack[--RouteStrategy.Interpreter_intStackSize];
|
||||
if (var3 < 0) {
|
||||
var3 = 0;
|
||||
}
|
||||
|
||||
Client.camFollowHeight = var3;
|
||||
return 1;
|
||||
} else if (var0 == ScriptOpcodes.CAM_GETFOLLOWHEIGHT) {
|
||||
Interpreter.Interpreter_intStack[++RouteStrategy.Interpreter_intStackSize - 1] = Client.camFollowHeight;
|
||||
return 1;
|
||||
} else {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user