Ahh - good find, I was on my phone for my previous post, so I wasn't really in the mood for searching for the change list (especially as my Android phone makes it rather difficult to post here sometimes - grr). Back on the laptop now though!
Suggestions...
1. So you should be able to test for the presence of the getStatistic method without actually calling it.
Code: Select all
if ( getStatistic ) then
print("Version 1.3.6 or above");
else
print("Below Version 1.3.6");
end
2. If the global methods are injected into the lua state using a method that I'm not sure about (some sort of global method look-up instead of added in as C funcs) then you might have to use the onHook method, but I'm pretty confident (1) above should work.
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onDrawGui = function (g)
isVersion136 = true;
end
}
However, this second solution makes me feel queasy as the idea of running that every frame of the mod just to find out the value once seems untidy. A less ugly version would be to override an item's Item:onEquipItem(champion, slot) and make the user equip it I guess.