Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25802 Location: The netherlands
|
Posted: Fri Feb 19, 2021 8:41 pm Post subject: |
|
|
you can use
Code: |
LaunchMonoDataCollector()
function GetMethods(ImageName,ClassName,MethodName)
local result={}
local assemblies=mono_enumAssemblies()
if assemblies then
local i
for i=1,#assemblies do
local image=mono_getImageFromAssembly(assemblies[i])
if image and mono_image_get_name(image)==ImageName then
local classes=mono_image_enumClasses(image)
if classes then
local j
for j=1,#classes do
local class=classes[j].class
local classname=mono_class_getName(class)
if classname==ClassName then
local methods=mono_class_enumMethods(class)
local j
for k=1,#methods do
if methods[k].name==MethodName then
local r={}
r.signature, r.parameters, r.ret=mono_method_getSignature(methods[k].method)
r.method=methods[k].method
table.insert(result,r)
end
end
end
end
end
end
end
end
return result;
end
|
to get a list of methods with this name and their signature
then you can go through that list to find the one you need
I recommend first printing out the results so you know what to search for
Code: |
r=GetMethods('assembly_valheim','Inventory','AddItem')
for i=1,#r do
print(r[i].signature)
end
|
(it's probably "ItemDrop/ItemData")
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|