minor modification

This commit is contained in:
Yunfan Li
2023-08-29 20:20:59 +08:00
parent 4dd6649323
commit 4be7461b73
5 changed files with 5 additions and 5 deletions

View File

@@ -492,7 +492,7 @@ AiPlayerbot.LootDelay = 1000
# Distances # Distances
AiPlayerbot.FarDistance = 20.0 AiPlayerbot.FarDistance = 20.0
AiPlayerbot.SightDistance = 100.0 AiPlayerbot.SightDistance = 75.0
AiPlayerbot.SpellDistance = 28.5 AiPlayerbot.SpellDistance = 28.5
AiPlayerbot.ShootDistance = 5.0 AiPlayerbot.ShootDistance = 5.0
AiPlayerbot.ReactDistance = 150.0 AiPlayerbot.ReactDistance = 150.0

View File

@@ -1255,7 +1255,7 @@ void RandomPlayerbotMgr::Randomize(Player* bot)
if (bot->InBattleground()) if (bot->InBattleground())
return; 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); RandomizeFirst(bot);
} }
else if (bot->getLevel() < sPlayerbotAIConfig->randomBotMaxLevel || !sPlayerbotAIConfig->downgradeMaxLevelBot) { else if (bot->getLevel() < sPlayerbotAIConfig->randomBotMaxLevel || !sPlayerbotAIConfig->downgradeMaxLevelBot) {

View File

@@ -68,7 +68,7 @@ class TriggerContext : public NamedObjectContext<Trigger>
creators["not dps target active"] = &TriggerContext::not_dps_target_active; creators["not dps target active"] = &TriggerContext::not_dps_target_active;
creators["not dps aoe target active"] = &TriggerContext::not_dps_aoe_target_active; creators["not dps aoe target active"] = &TriggerContext::not_dps_aoe_target_active;
creators["has nearest adds"] = &TriggerContext::has_nearest_adds; 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["tank assist"] = &TriggerContext::TankAssist;
creators["lose aggro"] = &TriggerContext::LoseAggro; creators["lose aggro"] = &TriggerContext::LoseAggro;

View File

@@ -16,7 +16,7 @@ class Unit;
class AttackersValue : public ObjectGuidListCalculatedValue class AttackersValue : public ObjectGuidListCalculatedValue
{ {
public: public:
AttackersValue(PlayerbotAI* botAI) : ObjectGuidListCalculatedValue(botAI, "attackers", 2 * 1000) { } AttackersValue(PlayerbotAI* botAI) : ObjectGuidListCalculatedValue(botAI, "attackers", 1 * 1000) { }
GuidVector Calculate(); GuidVector Calculate();
static bool IsPossibleTarget(Unit* attacker, Player* bot, float range = sPlayerbotAIConfig->sightDistance); static bool IsPossibleTarget(Unit* attacker, Player* bot, float range = sPlayerbotAIConfig->sightDistance);

View File

@@ -69,7 +69,7 @@ Unit* GrindTargetValue::FindTargetForGrinding(uint32 assistCount)
continue; continue;
} }
if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > sPlayerbotAIConfig->spellDistance) if (abs(bot->GetPositionZ() - unit->GetPositionZ()) > INTERACTION_DISTANCE)
continue; continue;
if (!bot->InBattleground() && GetTargetingPlayerCount(unit) > assistCount) if (!bot->InBattleground() && GetTargetingPlayerCount(unit) > assistCount)