Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

How to hook classes with : such as battleperformancecommandcard: basemonobehavior #18

Closed
oobbb opened this issue Aug 27, 2022 · 2 comments

Comments

@oobbb
Copy link

oobbb commented Aug 27, 2022

This is how I write it now

auto bsvtd = LoadClass("", "BattlePerformanceCommandCard:BaseMonoBehaviour");
HOOK(bsvtd.GetMethodOffsetByName("updateCardMag", 0), fp, &old_fp);
HOOK(bsvtd.GetMethodOffsetByName("GetBaseCommandCard", 0), up, &old_up);

But it will cause the game to jam
Please help me

@YummyBacon5
Copy link

Try without the & for the old function

@geokar2006
Copy link
Owner

@oobbb, HOOK automatically add & to old method. Use it without &.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants