Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CFakeClass {};
- typedef void (CFakeClass::*Func)(PLAYER_STATE);
- Func pp = (Func)&CPlayer::SetPlayerState;
- void *pPl = const_cast<void *>(pChoosedCard->GetPlayer());
- void (*foo)(PLAYER_STATE ff);
- foo = nullptr;
- memcpy((void *)(&foo), (void *)(&pp), 4);
- _asm
- {
- mov ecx, pPl
- push 3
- call foo
- };
- //((CFakeClass *)pPl->*pp)(PLAYER_STATE_COVERING_CARD);
Add Comment
Please, Sign In to add comment