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

@@ -6,6 +6,7 @@
#include "BattlegroundMgr.h"
#include "Item.h"
#include "PlayerbotAI.h"
#include "PlayerbotAIConfig.h"
#include "Playerbots.h"
#include "Engine.h"
#include "Group.h"
@@ -273,8 +274,9 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
{
engine->addStrategies("dps", "shadow debuff", "shadow aoe", "threat", nullptr);
}
else
else {
engine->addStrategies("heal", "threat", nullptr);
}
engine->addStrategies("dps assist", "cure", nullptr);
break;
@@ -362,6 +364,9 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
engine->addStrategy("boost");
engine->addStrategy("dps assist");
engine->removeStrategy("threat");
if (sPlayerbotAIConfig->autoSaveMana) {
engine->addStrategy("auto save mana");
}
// engine-
switch (player->getClass()) {
case CLASS_PRIEST: {
@@ -426,7 +431,7 @@ void AiFactory::AddDefaultCombatStrategies(Player* player, PlayerbotAI* const fa
engine->addStrategy("arena");
}
engine->addStrategies("boost", "racials", "chat", "default", "aoe", "potions", "conserve mana", "cast time", "dps assist", nullptr);
engine->addStrategies("boost", "racials", "chat", "default", "aoe", "potions", "cast time", "dps assist", nullptr);
engine->removeStrategy("custom::say");
engine->removeStrategy("flee");
engine->removeStrategy("threat");
@@ -603,6 +608,9 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const
nonCombatEngine->addStrategy("pvp");
nonCombatEngine->ChangeStrategy(sPlayerbotAIConfig->nonCombatStrategies);
}
if (sPlayerbotAIConfig->autoSaveMana) {
nonCombatEngine->addStrategy("auto save mana");
}
}
}
}