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);
}