25 lines
929 B
C#
25 lines
929 B
C#
using System;
|
|
using System.Reflection;
|
|
using System.Linq;
|
|
|
|
class Program
|
|
{
|
|
static void Main()
|
|
{
|
|
var asmPath = "c:\\Users\\FERDINANDO\\Desktop\\JotunnModStub-master\\RacesOfValheim\\JotunnModStub\\bin\\Debug\\net48\\assembly_valheim.dll";
|
|
if (!System.IO.File.Exists(asmPath)) {
|
|
Console.WriteLine("File not found: " + asmPath);
|
|
return;
|
|
}
|
|
Assembly asm = Assembly.LoadFrom(asmPath);
|
|
Type playerType = asm.GetType("Player");
|
|
if (playerType == null) {
|
|
Console.WriteLine("Player type not found");
|
|
return;
|
|
}
|
|
|
|
foreach (var m in playerType.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).Where(x => x.Name.Contains("Attack"))) {
|
|
Console.WriteLine(m.Name + "(" + string.Join(", ", m.GetParameters().Select(p => p.ParameterType.Name + " " + p.Name)) + ")");
|
|
}
|
|
}
|
|
}
|