Add a config option for dropping obsolete quests (#745)

This commit is contained in:
Revision
2024-12-06 08:45:41 +01:00
committed by GitHub
parent 8c84026116
commit f096c2089f
4 changed files with 11 additions and 0 deletions

View File

@@ -368,6 +368,10 @@ AiPlayerbot.SyncQuestWithPlayer = 1
# Default: 0 (disabled)
AiPlayerbot.SyncQuestForPlayer = 0
# Bots will drop obsolete quests
# Default: 1 (enabled)
AiPlayerbot.DropObsoleteQuests = 1
#
#
#

View File

@@ -494,6 +494,7 @@ bool PlayerbotAIConfig::Initialize()
twoRoundsGearInit = sConfigMgr->GetOption<bool>("AiPlayerbot.TwoRoundsGearInit", false);
syncQuestWithPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestWithPlayer", true);
syncQuestForPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestForPlayer", false);
dropObsoleteQuests = sConfigMgr->GetOption<bool>("AiPlayerbot.DropObsoleteQuests", true);
autoTrainSpells = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoTrainSpells", "yes");
autoPickTalents = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoPickTalents", true);
autoUpgradeEquip = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoUpgradeEquip", false);

View File

@@ -276,6 +276,7 @@ public:
bool twoRoundsGearInit;
bool syncQuestWithPlayer;
bool syncQuestForPlayer;
bool dropObsoleteQuests;
std::string autoTrainSpells;
bool autoPickTalents;
bool autoUpgradeEquip;

View File

@@ -68,6 +68,11 @@ bool CleanQuestLogAction::Execute(Event event)
return false;
}
if (!sPlayerbotAIConfig->dropObsoleteQuests)
{
return false;
}
// Only output this message if "debug rpg" strategy is enabled
if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
{