mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user