This is the AMP version of this page.
If you want to load the real page instead, click this text.

Help! Hook void multi parameter & different type

C++:
bool (*old_CanAttack)(void* instance, bool check_block, const char** reason, void* sbase);
bool (*old_CanBeAttack)(void* instance, const char** reason, bool ignore_attack_failed);
bool (*old_IsEnemy)(void* instance, void* target);

// Hooked method for CanAttack
bool Hooked_CanAttack(void* instance, bool check_block, const char** reason, void* sbase) {
    // Add your logic here
    if (instance != nullptr) {
        // Log or modify behavior as needed
        return true; // Force always true, or customize
    }

    return old_CanAttack(instance, check_block, reason, sbase);
}

// Hooked method for CanBeAttack
bool Hooked_CanBeAttack(void* instance, const char** reason, bool ignore_attack_failed) {
    // Add your logic here
    if (instance != nullptr) {
        // Log or modify behavior as needed
        return true; // Force always true, or customize
    }

    return old_CanBeAttack(instance, reason, ignore_attack_failed);
}

// Hooked method for IsEnemy
bool Hooked_IsEnemy(void* instance, void* target) {
    // Add your logic here
    if (instance != nullptr) {
        // Log or modify behavior as needed
        return true; // Force always true, or customize
    }

    return old_IsEnemy(instance, target);
}
 
It doesn't have nothing to do with unlinking lol, if the 2 methods was witht he enemy then yes