Make RSApiInjector prioritize same-class methods/fields over static

This commit is contained in:
Lucwousin
2019-11-06 17:37:21 +01:00
parent b07ad10afc
commit a7344a7773
3 changed files with 40 additions and 6 deletions

View File

@@ -265,9 +265,14 @@ public interface InjectUtil
throw new Injexception("Field " + name + " doesn't exist");
}
static ClassFile fromApiMethod(InjectData data, RSApiMethod apiMethod)
static ClassFile deobFromApiMethod(InjectData data, RSApiMethod apiMethod)
{
return data.toVanilla(data.toDeob(apiMethod.getClazz().getName()));
return data.toDeob(apiMethod.getClazz().getName());
}
static ClassFile vanillaFromApiMethod(InjectData data, RSApiMethod apiMethod)
{
return data.toVanilla(deobFromApiMethod(data, apiMethod));
}
static Signature apiToDeob(InjectData data, Signature api)