Do not show LockTarget messages in log if LockTarget is disabled

This commit is contained in:
alexey.min 2012-05-24 21:56:38 +00:00
parent 9b3c92fce3
commit 09e36d4007

View File

@ -37,13 +37,15 @@ void UserAI_LockTargetMgr::onUserRequestAction( unsigned int actionObjectID )
if( g_game_client->ai.usr.targetObjectID != actionObjectID )
{
m_toid = 0;
log_error( LOG_USERAI, "[LockTarget]: user wishes to change target\n" );
if( m_enabled )
log_error( LOG_USERAI, "[LockTarget]: user wishes to change target\n" );
}
}
void UserAI_LockTargetMgr::onUserRequestUnselectTarget()
{
log_error( LOG_USERAI, "[LockTarget]: user wishes to unselect target\n" );
if( m_enabled )
log_error( LOG_USERAI, "[LockTarget]: user wishes to unselect target\n" );
m_toid = 0;
}