FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Fri Nov 16, 2018 6:09 am Post subject: |
|
|
I don't see anything in monoscript.lua that does exactly that but I think you can take function mono_class_enumFields(class, includeParents) and function mono_class_getStaticFieldAddress(domain, class) and build your own
Code: | function findStatic(domain, class, fieldname)
local klass = mono_findClass(domain, class)
local base = mono_class_getStaticFieldAddress(domain, class)
for _, field in ipairs(mono_class_enumFields(klass, false)) do
if field.name == fieldname and field.isStatic then return base + field.offset end
end
end |
disclaimer: untested, simply cobbled together from what I saw searching for static in monoscript.lua after just waking up lol
_________________
|
|