Hmm.. New revision and now my invoke isn't working anymore.
My updater found out:
Code:
Item : ar
ItemID : ar.f * 986946269
ItemDefinition : bv
ItemName : u
GetItemDefinition : au.f (II)Lbv;
This is my invoke method: (removed dynamic hook loading for test purposes, I added the hooks straight away, but that also has to work):
Code:
int test = 0;
return GlobalVariables.classLoader.loadClass("au").getMethod("f", int.class, int.class).invoke(null, itemID, test);
ItemID is a parameter that is passed and that ID is correct.
After all I receive a null object when I run that invoke.
So when I try to print the item name, it will give the following error because the itemdefinition object is null:
Code:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:57)
at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)
Can someone maybe give me a hand?
Thanks in advance!
Edit:
Fixed it myself. For everyone:
The get itemdefinition method in class au (f) will throw a illegalstateException if the dummy parameter isn't a certain number:
Code:
if (-1303086541 * localbv.az != -1) { if (paramInt2 != -503467057) throw new IllegalStateException();