diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 537588fa2..7e121bb86 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -368,6 +368,10 @@ AiPlayerbot.SyncQuestWithPlayer = 1 # Default: 0 (disabled) AiPlayerbot.SyncQuestForPlayer = 0 +# Bots will drop obsolete quests +# Default: 1 (enabled) +AiPlayerbot.DropObsoleteQuests = 1 + # # # diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 53a7b7207..06a8a00d9 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -491,6 +491,7 @@ bool PlayerbotAIConfig::Initialize() twoRoundsGearInit = sConfigMgr->GetOption("AiPlayerbot.TwoRoundsGearInit", false); syncQuestWithPlayer = sConfigMgr->GetOption("AiPlayerbot.SyncQuestWithPlayer", true); syncQuestForPlayer = sConfigMgr->GetOption("AiPlayerbot.SyncQuestForPlayer", false); + dropObsoleteQuests = sConfigMgr->GetOption("AiPlayerbot.DropObsoleteQuests", true); autoTrainSpells = sConfigMgr->GetOption("AiPlayerbot.AutoTrainSpells", "yes"); autoPickTalents = sConfigMgr->GetOption("AiPlayerbot.AutoPickTalents", true); autoUpgradeEquip = sConfigMgr->GetOption("AiPlayerbot.AutoUpgradeEquip", false); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 0f34b41e5..ac0b86077 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -275,6 +275,7 @@ class PlayerbotAIConfig bool twoRoundsGearInit; bool syncQuestWithPlayer; bool syncQuestForPlayer; + bool dropObsoleteQuests; std::string autoTrainSpells; bool autoPickTalents; bool autoUpgradeEquip; diff --git a/src/strategy/actions/DropQuestAction.cpp b/src/strategy/actions/DropQuestAction.cpp index ffdbb942e..eea9337ff 100644 --- a/src/strategy/actions/DropQuestAction.cpp +++ b/src/strategy/actions/DropQuestAction.cpp @@ -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)) {