bool Player::checkPzBlock

mail@pastecode.io avatar
unknown
plain_text
a year ago
481 B
2
Indexable
Never
bool Player::checkPzBlock(Player* targetPlayer)
{
	if(hasFlag(PlayerFlag_NotGainInFight) || Combat::isInPvpZone(this, targetPlayer))
		return false;

	if(isGuildEnemy(targetPlayer))
		return true;

	if(isPartner(targetPlayer) || isGuildPartner(targetPlayer) || isWarPartner(targetPlayer))
		return false;

	#ifdef __SKULLSYSTEM__
	if(targetPlayer->hasAttacked(this) && !g_config.getNumber(ConfigManager::DEFENSIVE_PZ_LOCK))
		return false;
	#endif

	return true;
}