From 762ef49e4a8a12ddb8a6763931615d49f486b9e6 Mon Sep 17 00:00:00 2001 From: Fuzz Date: Wed, 26 Jun 2024 16:34:47 +1000 Subject: [PATCH] [Log] Reduced spam of 'xxx failed because has current channeled spell' by making it respect the AiPlayerbot.LogInGroupOnly setting (like related spell errors) --- src/PlayerbotAI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 310cc3ad..f3e865d6 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -2174,8 +2174,10 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell, } if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) { - LOG_DEBUG("playerbots", "CanCastSpell() target name: {}, spellid: {}, bot name: {}, failed because has current channeled spell", - target->GetName(), spellid, bot->GetName()); + if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && HasRealPlayerMaster())) { + LOG_DEBUG("playerbots", "CanCastSpell() target name: {}, spellid: {}, bot name: {}, failed because has current channeled spell", + target->GetName(), spellid, bot->GetName()); + } return false; }