[Avoid aoe] Tell when avoid aoe configuration

This commit is contained in:
Yunfan Li
2024-04-20 18:51:37 +08:00
parent 45ffd4bd07
commit c6f1da1170
4 changed files with 11 additions and 3 deletions

View File

@@ -1674,9 +1674,11 @@ bool AvoidAoeAction::FleePostion(Position pos, float radius, std::string name)
}
if (farestDis > 0.0f) {
if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false, false, true)) {
std::ostringstream out;
out << "Avoiding spell " << name << "...";
bot->Say(out.str(), LANG_UNIVERSAL);
if (sPlayerbotAIConfig->tellWhenAvoidAoe) {
std::ostringstream out;
out << "Avoiding spell " << name << "...";
bot->Say(out.str(), LANG_UNIVERSAL);
}
return true;
}
}