mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Avoid aoe] Tell avoiding timer
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user