revert injector change to do it safe way for now
This commit is contained in:
@@ -525,7 +525,7 @@ public class MixinInjector
|
||||
String deobMethodName = (String) replaceAnnotation.getElement().getValue();
|
||||
|
||||
ClassFile deobCf = inject.toDeobClass(cf);
|
||||
Method deobMethod = findDeobMethod(deobCf, deobMethodName, method);
|
||||
Method deobMethod = findDeobMethod(deobCf, deobMethodName, method.getDescriptor());
|
||||
|
||||
if (deobMethod == null)
|
||||
{
|
||||
@@ -739,16 +739,14 @@ public class MixinInjector
|
||||
}
|
||||
}
|
||||
|
||||
private Method findDeobMethod(ClassFile deobCf, String deobMethodName, Method mixinMethod)
|
||||
private Method findDeobMethod(ClassFile deobCf, String deobMethodName, Signature descriptor)
|
||||
throws InjectionException
|
||||
{
|
||||
final Signature descriptor = mixinMethod.getDescriptor();
|
||||
final List<Method> matchingMethods = new ArrayList<>();
|
||||
final boolean stat = mixinMethod.isStatic();
|
||||
List<Method> matchingMethods = new ArrayList<>();
|
||||
|
||||
for (Method m : deobCf.getMethods())
|
||||
{
|
||||
if (!deobMethodName.equals(m.getName()) || m.isStatic() != stat)
|
||||
if (!deobMethodName.equals(m.getName()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -968,7 +966,7 @@ public class MixinInjector
|
||||
String hookName = methodHook.getElement().getString();
|
||||
boolean end = methodHook.getElements().size() == 2 && methodHook.getElements().get(1).getValue().equals(true);
|
||||
ClassFile deobCf = inject.toDeobClass(cf);
|
||||
Method targetMethod = findDeobMethod(deobCf, hookName, method);
|
||||
Method targetMethod = findDeobMethod(deobCf, hookName, method.getDescriptor());
|
||||
|
||||
if (targetMethod == null)
|
||||
{
|
||||
|
||||
@@ -832,7 +832,7 @@ public class GrandExchangeOfferOwnWorldComparator implements Comparator {
|
||||
|
||||
if (var2 != 1007) {
|
||||
if (var2 == 1011 || var2 == 1008 || var2 == 1010 || var2 == 1009 || var2 == 1012) {
|
||||
Login.worldMap.menuAction(var2, var3, new Coord(var0), new Coord(var1));
|
||||
Login.worldMap.worldMapMenuAction(var2, var3, new Coord(var0), new Coord(var1));
|
||||
}
|
||||
break label795;
|
||||
}
|
||||
|
||||
@@ -1375,8 +1375,8 @@ public class WorldMap {
|
||||
signature = "(IILhf;Lhf;B)V",
|
||||
garbageValue = "0"
|
||||
)
|
||||
@Export("menuAction")
|
||||
public void menuAction(int var1, int var2, Coord var3, Coord var4) {
|
||||
@Export("worldMapMenuAction")
|
||||
public void worldMapMenuAction(int var1, int var2, Coord var3, Coord var4) {
|
||||
ScriptEvent var5 = new ScriptEvent();
|
||||
WorldMapEvent var6 = new WorldMapEvent(var2, var3, var4);
|
||||
var5.setArgs(new Object[]{var6});
|
||||
|
||||
Reference in New Issue
Block a user