mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Add a config option for dropping obsolete quests (#745)
This commit is contained in:
@@ -368,6 +368,10 @@ AiPlayerbot.SyncQuestWithPlayer = 1
|
|||||||
# Default: 0 (disabled)
|
# Default: 0 (disabled)
|
||||||
AiPlayerbot.SyncQuestForPlayer = 0
|
AiPlayerbot.SyncQuestForPlayer = 0
|
||||||
|
|
||||||
|
# Bots will drop obsolete quests
|
||||||
|
# Default: 1 (enabled)
|
||||||
|
AiPlayerbot.DropObsoleteQuests = 1
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
twoRoundsGearInit = sConfigMgr->GetOption<bool>("AiPlayerbot.TwoRoundsGearInit", false);
|
twoRoundsGearInit = sConfigMgr->GetOption<bool>("AiPlayerbot.TwoRoundsGearInit", false);
|
||||||
syncQuestWithPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestWithPlayer", true);
|
syncQuestWithPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestWithPlayer", true);
|
||||||
syncQuestForPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestForPlayer", false);
|
syncQuestForPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestForPlayer", false);
|
||||||
|
dropObsoleteQuests = sConfigMgr->GetOption<bool>("AiPlayerbot.DropObsoleteQuests", true);
|
||||||
autoTrainSpells = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoTrainSpells", "yes");
|
autoTrainSpells = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoTrainSpells", "yes");
|
||||||
autoPickTalents = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoPickTalents", true);
|
autoPickTalents = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoPickTalents", true);
|
||||||
autoUpgradeEquip = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoUpgradeEquip", false);
|
autoUpgradeEquip = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoUpgradeEquip", false);
|
||||||
|
|||||||
@@ -276,6 +276,7 @@ public:
|
|||||||
bool twoRoundsGearInit;
|
bool twoRoundsGearInit;
|
||||||
bool syncQuestWithPlayer;
|
bool syncQuestWithPlayer;
|
||||||
bool syncQuestForPlayer;
|
bool syncQuestForPlayer;
|
||||||
|
bool dropObsoleteQuests;
|
||||||
std::string autoTrainSpells;
|
std::string autoTrainSpells;
|
||||||
bool autoPickTalents;
|
bool autoPickTalents;
|
||||||
bool autoUpgradeEquip;
|
bool autoUpgradeEquip;
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ bool CleanQuestLogAction::Execute(Event event)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sPlayerbotAIConfig->dropObsoleteQuests)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Only output this message if "debug rpg" strategy is enabled
|
// Only output this message if "debug rpg" strategy is enabled
|
||||||
if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
if (botAI->HasStrategy("debug rpg", BotState::BOT_STATE_COMBAT))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user