Help! Returning the felds value (int)

DieckyAwsm

Platinian
Original poster
Feb 23, 2022
22
3
3
27
Indonesia
Example int fields offset :
public int fireRate; //0x66
Then this is my hook :
void(*old_UpdateFireRate)(void *instance);
void FireRate(void *instance) {
if (instance != NULL) {
if (FireRate) {
*(int *) ((uint64_t) instance + 0x66) = 4; //

}
}
old_UpdateFireRate(instance);
}
How to returned old or original value of field offset when toggle deactivate?