diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index f76afa53..a6e45782 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -8,6 +8,7 @@ # PLAYERBOT SETTINGS # GENERAL # SUMMON OPTIONS +# MOUNT # GEAR # LOOTING # TIMERS @@ -199,6 +200,36 @@ AiPlayerbot.BotRepairWhenSummon = 1 # #################################################################################################### +#################################################################################################### +# MOUNT +# +# + +# Defines at what level a bot will naturally use its 60% ground mount +# note: was level 20 during WotLK, 30 during TBC, 40 during Vanilla +# default: 20 +AiPlayerbot.UseGroundMountAtMinLevel = 20 + +# Defines at what level a bot will naturally use its 100% fast ground mount +# note: was level 40 during WotLK, 60 during Vanilla +# default: 40 +AiPlayerbot.UseFastGroundMountAtMinLevel = 40 + +# Defines at what level a bot will naturally use its 150% fly mount +# note: was level 60 during WotLK, 70 during TBC +# default: 60 +AiPlayerbot.UseFlyMountAtMinLevel = 60; + +# Defines at what level a bot will naturally use its 280% fast fly mount +# note: was level 70 during WotLK and TBC +# default: 70 +AiPlayerbot.UseFastFlyMountAtMinLevel = 70; + +# +# +# +#################################################################################################### + #################################################################################################### # GEAR # diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 347c3033..ea223dda 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -312,6 +312,11 @@ bool PlayerbotAIConfig::Initialize() commandServerPort = sConfigMgr->GetOption("AiPlayerbot.CommandServerPort", 8888); perfMonEnabled = sConfigMgr->GetOption("AiPlayerbot.PerfMonEnabled", false); + useGroundMountAtMinLevel = sConfigMgr->GetOption("AiPlayerbot.UseGroundMountAtMinLevel", 20); + useFastGroundMountAtMinLevel = sConfigMgr->GetOption("AiPlayerbot.UseFastGroundMountAtMinLevel", 40); + useFlyMountAtMinLevel = sConfigMgr->GetOption("AiPlayerbot.UseFlyMountAtMinLevel", 60); + useFastFlyMountAtMinLevel = sConfigMgr->GetOption("AiPlayerbot.UseFastFlyMountAtMinLevel", 70); + LOG_INFO("server.loading", "---------------------------------------"); LOG_INFO("server.loading", " Loading TalentSpecs "); LOG_INFO("server.loading", "---------------------------------------"); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 4c49fec1..1c54a0cd 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -326,6 +326,11 @@ public: int32 maintenanceCommand; int32 autoGearCommand, autoGearCommandAltBots, autoGearQualityLimit, autoGearScoreLimit; + uint32 useGroundMountAtMinLevel; + uint32 useFastGroundMountAtMinLevel; + uint32 useFlyMountAtMinLevel; + uint32 useFastFlyMountAtMinLevel; + std::string const GetTimestampStr(); bool hasLog(std::string const fileName) { diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index ab9da381..64d93bd8 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -2825,10 +2825,10 @@ uint32 PlayerbotFactory::CalcMixedGearScore(uint32 gs, uint32 quality) void PlayerbotFactory::InitMounts() { - uint32 firstmount = 20; - uint32 secondmount = 40; - uint32 thirdmount = 60; - uint32 fourthmount = 70; + uint32 firstmount = sPlayerbotAIConfig->useGroundMountAtMinLevel; + uint32 secondmount = sPlayerbotAIConfig->useFastGroundMountAtMinLevel; + uint32 thirdmount = sPlayerbotAIConfig->useFlyMountAtMinLevel; + uint32 fourthmount = sPlayerbotAIConfig->useFastFlyMountAtMinLevel; if (bot->GetLevel() < firstmount) return; diff --git a/src/strategy/actions/CheckMountStateAction.cpp b/src/strategy/actions/CheckMountStateAction.cpp index 953f47c6..62d32020 100644 --- a/src/strategy/actions/CheckMountStateAction.cpp +++ b/src/strategy/actions/CheckMountStateAction.cpp @@ -152,7 +152,7 @@ bool CheckMountStateAction::isUseful() if (!GET_PLAYERBOT_AI(bot)->HasStrategy("mount", BOT_STATE_NON_COMBAT) && !bot->IsMounted()) return false; - bool firstmount = bot->GetLevel() >= 20; + bool firstmount = bot->GetLevel() >= sPlayerbotAIConfig->useGroundMountAtMinLevel; if (!firstmount) return false; @@ -178,7 +178,7 @@ bool CheckMountStateAction::isUseful() bool CheckMountStateAction::Mount() { - uint32 secondmount = 40; + uint32 secondmount = sPlayerbotAIConfig->useFastGroundMountAtMinLevel; if (bot->isMoving()) {