Combat::canDoCombat.. function
if(player->getVocationId() == 0 || targetPlayer->getVocationId() == 0) {
return RETURNVALUE_MAYNOTATTACK;
}
Now, i wrote this on my phone and it's not the actual real code, but it would look like that, just maybe another function to get vocationId and another...