Jump to content

gigi99

Newbie
  • Posts

    3
  • Joined

  • Last visited

Everything posted by gigi99

  1. I have tried to use hook recently, I get the game crash when calling the "origIsEnemy" bool function, but "origIsDead" is work, how to write the code can read IsEnemy(BaseUnit unit) correctly, please? ingame dump.cs function: public bool get_isDead(); // RVA: 0xC636F8 Offset: 0xC636F8 public bool IsEnemy(BaseUnit unit); // RVA: 0xC6EE38 Offset: 0xC6EE38 my hook script: bool (*origIsDead)(void *_this); bool _hookIsDead(void * _this) { bool mydata1 = origIsDead(_this); return origIsDead(_this); } bool (*origIsEnemy)(void *_this); bool _hookIsEnemy(void * _this) { bool mydata2 = origIsEnemy(_this); return origIsEnemy(_this); } MSHookFunction((void *)getRealOffset(0xC636F8), (void *)_hookIsDead, (void **)&origIsDead); MSHookFunction((void *)getRealOffset(0xC6EE38), (void *)_hookIsEnemy, (void **)&origIsEnemy);
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines