C++:
protected ObscuredInt _currentRoomID; // 0x18
// RVA: 0x1113008 Offset: 0x1113008 VA: 0x1113008
private void room_update() { }
// RVA: 0x1113518 Offset: 0x1113518 VA: 0x1113518 Slot: 25
protected override void OnEnterDoorAfter() { }
bool istele;
int teleValue;
void(* old_UpdateRoom)(void * instance);
void UpdateRoom(void*instance) {
if(instance != NULL) {
if(istele) {
istele = false;
*(int *)((uint32_t ) instance + 0x18, teleValue);
}
}
old_UpdateRoom(instance);
}
MSHookFunction((void *) getAbsoluteAddress("libil2cpp.so", 0x1113008), (void*)UpdateRoom, (void**)&old_UpdateRoom);
the problem is: the update function will update when the openDoorAfter function is executed.
help me How to call openDoorAfter function so that update hook can work.