diff --git a/src/strategy/actions/MovementActions.cpp b/src/strategy/actions/MovementActions.cpp index c5024d58..7ab12027 100644 --- a/src/strategy/actions/MovementActions.cpp +++ b/src/strategy/actions/MovementActions.cpp @@ -1674,7 +1674,8 @@ bool AvoidAoeAction::FleePosition(Position pos, float radius, std::string name) } if (farestDis > 0.0f) { if (MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(), false, false, true)) { - if (sPlayerbotAIConfig->tellWhenAvoidAoe) { + if (sPlayerbotAIConfig->tellWhenAvoidAoe && lastTellTimer < time(NULL) - 10) { + lastTellTimer = time(NULL); std::ostringstream out; out << "I'm avoiding " << name << "..."; bot->Say(out.str(), LANG_UNIVERSAL); diff --git a/src/strategy/actions/MovementActions.h b/src/strategy/actions/MovementActions.h index 1f6ee401..c53bf25e 100644 --- a/src/strategy/actions/MovementActions.h +++ b/src/strategy/actions/MovementActions.h @@ -82,6 +82,7 @@ class AvoidAoeAction : public MovementAction // Position PositionForMelee(Position pos, float radius); // Position PositionForRanged(Position pos, float radius); bool FleePosition(Position pos, float radius, std::string name); + time_t lastTellTimer = 0; }; class RunAwayAction : public MovementAction