From 09e36d4007b7a602cca72588a74aaba0f9b51207 Mon Sep 17 00:00:00 2001 From: "alexey.min" Date: Thu, 24 May 2012 21:56:38 +0000 Subject: [PATCH] Do not show LockTarget messages in log if LockTarget is disabled --- l2detect/UserAI_LockTargetMgr.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/l2detect/UserAI_LockTargetMgr.cpp b/l2detect/UserAI_LockTargetMgr.cpp index 0ae4991..8e1d63b 100644 --- a/l2detect/UserAI_LockTargetMgr.cpp +++ b/l2detect/UserAI_LockTargetMgr.cpp @@ -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; }