Closed wwwww56 closed 1 year ago
i mean hook field just like : float、int、double...
You can't hook field, you can only get or set it. From Examples.cpp • Define field • Find field • Get field
You can't hook field, you can only get or set it. From Examples.cpp • Define field • Find field • Get field
so how can i set it, example i want to set that field CoolTime = 0 , and how to do ?
CoolTime
static?
public float CoolTime or private float CoolTime
You need instance of class where field placed
in class SkillManager
no namespace
I have dump.cs or DummyDll?
yes you have telegram ? i contact on it
sir this is .cs files
i want set these three fields value to 0
I have only one idea, hook CreateSkill, and change fields in it.
BNM::Field<float> skillCooldown;
void *(*old_CreateSkill)(int, int);
void *CreateSkill(int skillT, int skillId) {
auto skill = old_CreateSkill(skillT, skillId); // Get created Skill
skillCooldown(skill) = 0.f; // Set skillCooldown to zero
return skill; // Return modded skill
}
OK thanks sir i will try it
your example.cpp don't have hook field
i hook like:
HOOK(FPSController.GetFieldByName(OBFUSCATE_BNM("Update")).GetOffset(), Update, old_Update);
and it crash
pls give one example which can hook field
Thank you very much!