[Log] Reduced spam of 'xxx failed because has current channeled spell' by making it respect the AiPlayerbot.LogInGroupOnly setting (like related spell errors)

This commit is contained in:
Fuzz
2024-06-26 16:34:47 +10:00
parent 7513b528b1
commit 762ef49e4a

View File

@@ -2174,8 +2174,10 @@ bool PlayerbotAI::CanCastSpell(uint32 spellid, Unit* target, bool checkHasSpell,
} }
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) { if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) {
if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && HasRealPlayerMaster())) {
LOG_DEBUG("playerbots", "CanCastSpell() target name: {}, spellid: {}, bot name: {}, failed because has current channeled spell", LOG_DEBUG("playerbots", "CanCastSpell() target name: {}, spellid: {}, bot name: {}, failed because has current channeled spell",
target->GetName(), spellid, bot->GetName()); target->GetName(), spellid, bot->GetName());
}
return false; return false;
} }