Hi all. Is it possible to somehow hook this:
I'm trying to change the damage multiplier, but either nothing changes, or the character simply stops attacking.
All I've tried:
Code:
RVA: 0x604820 VA: 0xc0204820
private Void NormalDamage(Int32 newDamage, EnemyInfo enemy, Single multiplier) { }
// RVA: 0x5e8008 VA: 0xc01e8008
private Void Update() { }
All I've tried:
Code:
void (*old_Damage)(void *instance, float value);
void Damage(void *instance, float value) {
if (instance != NULL) {
old_Damage(instance, 9999.0f);
return;
}
return old_Damage(instance,value);
}
MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", 0x604820), (void *) Damage, (void **) &old_Damage);
Code:
void (*isDamage)(void *instance,float value);
void (*old_Damage)(void *instance);
void Damage(void *instance) {
if (instance != NULL) {
isDamage(instance, 9999.0f);
}
return old_Damage(instance);
}
isDamage = (void (*)(void *, int))getAbsoluteAddress("libil2cpp.so",0x604820);
MSHookFunction((void *)getAbsoluteAddress(targetLibName, 0x5e8008), (void *) Damage, (void **) &old_Damage);
Code:
void (*old_Damage)(void *instance, float value);
void Damage(void *instance, float value) {
if (instance == nullptr)return;
value == 9999.0f;
old_Damage(instance,value);
}
HOOK_LIB("libil2cpp.so", "0x604820", Damage, old_Damage);