diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 182a8cec..bc7510aa 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 0688c6b2..48ff9b63 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -494,6 +494,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 b2687fe8..714b7073 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -276,6 +276,7 @@ public: 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 ffdbb942..eea9337f 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)) {