ByteX
Platinian
tried using the Unlink Method, but there's no tutorial on how to create function pointers for Team or Enemy. What should I do?
Problem:
When I Active HealTeam or HealEnemy it Heal Both
I found the following classes:
Class Unit :
Class Team :
if I use the Team class, it only works for the team
HOOKING :
Could you please help me create function pointers for Team or Enemy methods Thanks
Problem:
When I Active HealTeam or HealEnemy it Heal Both
I found the following classes:
Class Unit :
public class Unit
{
// Fields
public Team Team; // 0x1D8
// Methods
void Update() { }
public void Heal(int amount, bool canCure = true, bool isLifeSteal = false) { }
}
Class Team :
public class Team
{
// Methods
public Team enemyTeam; // 0x2C
if I use the Team class, it only works for the team
HOOKING :
C++:
bool HealTeam = false;
bool HealEnemy = false;
void (*HealX)(void* instance, int amount, bool canCure, bool isLifeSteal);
void (*old_Unit_Update)(void* instance);
void new_Unit_Update(void* instance) {
if (instance != NULL) {
void* team = *(void**)((uint64_t)instance + 0x1D8);
if (team != NULL) {
if (HealTeam) {
HealX(instance, 100, true, false);
}
void* enemyTeam = *(void**)((uint64_t)team + 0x2C);
if (enemyTeam != NULL) {
if (HealEnemy) {
if (instance != enemyTeam) {
HealX(instance, 100, true, false);
}
}
}
}
}
old_Unit_Update(instance);
}
Could you please help me create function pointers for Team or Enemy methods Thanks