From 4be7461b7396123ff3737d1b90ed0a79d661a186 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Tue, 29 Aug 2023 20:20:59 +0800 Subject: [PATCH] minor modification --- conf/playerbots.conf.dist | 2 +- src/RandomPlayerbotMgr.cpp | 2 +- src/strategy/triggers/TriggerContext.h | 2 +- src/strategy/values/AttackersValue.h | 2 +- src/strategy/values/GrindTargetValue.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 235940fc..38ee5509 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -492,7 +492,7 @@ AiPlayerbot.LootDelay = 1000 # Distances AiPlayerbot.FarDistance = 20.0 -AiPlayerbot.SightDistance = 100.0 +AiPlayerbot.SightDistance = 75.0 AiPlayerbot.SpellDistance = 28.5 AiPlayerbot.ShootDistance = 5.0 AiPlayerbot.ReactDistance = 150.0 diff --git a/src/RandomPlayerbotMgr.cpp b/src/RandomPlayerbotMgr.cpp index 921e6d4e..947dfdc9 100644 --- a/src/RandomPlayerbotMgr.cpp +++ b/src/RandomPlayerbotMgr.cpp @@ -1255,7 +1255,7 @@ void RandomPlayerbotMgr::Randomize(Player* bot) if (bot->InBattleground()) return; - if (bot->getLevel() < 2 || (bot->getLevel() < 56 && bot->getClass() == CLASS_DEATH_KNIGHT)) { + if (bot->getLevel() < 3 || (bot->getLevel() < 56 && bot->getClass() == CLASS_DEATH_KNIGHT)) { RandomizeFirst(bot); } else if (bot->getLevel() < sPlayerbotAIConfig->randomBotMaxLevel || !sPlayerbotAIConfig->downgradeMaxLevelBot) { diff --git a/src/strategy/triggers/TriggerContext.h b/src/strategy/triggers/TriggerContext.h index a1fe2c27..de8ca78d 100644 --- a/src/strategy/triggers/TriggerContext.h +++ b/src/strategy/triggers/TriggerContext.h @@ -68,7 +68,7 @@ class TriggerContext : public NamedObjectContext creators["not dps target active"] = &TriggerContext::not_dps_target_active; creators["not dps aoe target active"] = &TriggerContext::not_dps_aoe_target_active; creators["has nearest adds"] = &TriggerContext::has_nearest_adds; - creators["enemy player inear"] = &TriggerContext::enemy_player_near; + creators["enemy player near"] = &TriggerContext::enemy_player_near; creators["tank assist"] = &TriggerContext::TankAssist; creators["lose aggro"] = &TriggerContext::LoseAggro; diff --git a/src/strategy/values/AttackersValue.h b/src/strategy/values/AttackersValue.h index 5a586038..b3bb38b4 100644 --- a/src/strategy/values/AttackersValue.h +++ b/src/strategy/values/AttackersValue.h @@ -16,7 +16,7 @@ class Unit; class AttackersValue : public ObjectGuidListCalculatedValue { public: - AttackersValue(PlayerbotAI* botAI) : ObjectGuidListCalculatedValue(botAI, "attackers", 2 * 1000) { } + AttackersValue(PlayerbotAI* botAI) : ObjectGuidListCalculatedValue(botAI, "attackers", 1 * 1000) { } GuidVector Calculate(); static bool IsPossibleTarget(Unit* attacker, Player* bot, float range = sPlayerbotAIConfig->sightDistance); diff --git a/src/strategy/values/GrindTargetValue.cpp b/src/strategy/values/GrindTargetValue.cpp index 75e6375e..403510fb 100644 --- a/src/strategy/values/GrindTargetValue.cpp +++ b/src/strategy/values/GrindTargetValue.cpp @@ -69,7 +69,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount) continue; } - if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > sPlayerbotAIConfig->spellDistance) + if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > INTERACTION_DISTANCE) continue; if (!bot->InBattleground() && GetTargetingPlayerCount(unit) > assistCount)