This is my ex default function:
I want to return like this:
Ex enum function:
So I hook this function as I think it will work:
And a result, it get crash immediately after enable this function.
Can you guys have any idea or solution for this issue?
C#:
public override NPC.Status GetMoveStatus(ref object[] p)
{
return NPC.Status.Running;
}
C#:
public override NPC.Status GetMoveStatus(ref object[] p)
{
return NPC.Status.Walking;
}
C#:
public enum Status
{
Running, // 0
Walking, // 1
Stopped // 2
}
C++:
bool walk;
int (*old_GetMoveStatus)(void *instance, void p);
int GetMoveStatus(void *instance, void p) {
if (instance != NULL && walk) {
return 1;
}
return old_GetMoveStatus(instance, p);
}
Can you guys have any idea or solution for this issue?