optimize class spell

This commit is contained in:
Yunfan Li
2023-09-08 12:44:38 +08:00
parent 762ac0142b
commit 243a4df967
20 changed files with 169 additions and 97 deletions

View File

@@ -63,10 +63,10 @@ bool CastSpellAction::Execute(Event event)
bool CastSpellAction::isPossible()
{
if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true)) {
// if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
// LOG_DEBUG("playerbots", "Can cast spell failed. Vehicle. - bot name: {}",
// bot->GetName());
// }
if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && botAI->HasRealPlayerMaster())) {
LOG_DEBUG("playerbots", "Can cast spell failed. Vehicle. - bot name: {}",
bot->GetName());
}
return false;
}
@@ -75,10 +75,10 @@ bool CastSpellAction::isPossible()
if (spell == "mount" && bot->IsInCombat())
{
// if (!sPlayerbotAIConfig->logInGroupOnly || bot->GetGroup()) {
// LOG_DEBUG("playerbots", "Can cast spell failed. Mount. - bot name: {}",
// bot->GetName());
// }
if (!sPlayerbotAIConfig->logInGroupOnly || (bot->GetGroup() && botAI->HasRealPlayerMaster())) {
LOG_DEBUG("playerbots", "Can cast spell failed. Mount. - bot name: {}",
bot->GetName());
}
bot->Dismount();
return false;
}