Auto save mana strategy

This commit is contained in:
Yunfan Li
2024-03-23 18:11:46 +08:00
parent 68fdf57c3c
commit 5f31941820
18 changed files with 242 additions and 141 deletions

View File

@@ -91,7 +91,7 @@ class CasterFindTargetSmartStrategy : public FindTargetStrategy
return true;
}
int32_t level = GetIntervalLevel(new_unit);
if (level % 10 == 2 || level % 10 == 0) {
if (level % 10 == 2 || level % 10 == 1) {
return new_time < old_time;
}
// dont switch targets when all of them with low health
@@ -110,10 +110,10 @@ class CasterFindTargetSmartStrategy : public FindTargetStrategy
float attackRange = botAI->IsRanged(botAI->GetBot()) ? sPlayerbotAIConfig->spellDistance : sPlayerbotAIConfig->meleeDistance;
attackRange += 5.0f;
int level = dis < attackRange ? 10 : 0;
if (time >= 5 && time <= 20) {
if (time >= 3 && time <= 20) {
return level + 2;
}
if (time < 5) {
if (time > 20) {
return level + 1;
}
return level;