diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 5dff66d0..e023f2fc 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -23,6 +23,7 @@ # LEVELS # GEAR # QUESTS +# ACTIVITIES # SPELLS # STRATEGIES # TELEPORTS @@ -612,6 +613,50 @@ AiPlayerbot.EquipmentPersistenceLevel = 80 # Default: 1 (enabled) AiPlayerbot.AutoUpgradeEquip = 1 +# Only set wolf pets for hunters to have higher damage (0 = disabled, 1 = enabled for max-level, 2 = enabled) +# Default: 0 (disabled) +AiPlayerbot.HunterWolfPet = 0 + +# +# +# +#################################################################################################### + + +#################################################################################################### +# ACTIVITIES +# +# +# Specify percent of active bots +# The default is 10. With 10% of all bots going active or inactive each minute. Regardless +# This value is only applied to inactive areas where no real-players are detected, when +# real-players are nearby, friend, group, guild, bg, instances etc the value is always +# enforced to 100% +AiPlayerbot.BotActiveAlone = 100 + +# Force botActiveAlone when bot is ... of real player +AiPlayerbot.BotActiveAloneForceWhenInRadius = 150 +AiPlayerbot.BotActiveAloneForceWhenInZone = 1 +AiPlayerbot.BotActiveAloneForceWhenInMap = 0 +AiPlayerbot.BotActiveAloneForceWhenIsFriend = 1 +AiPlayerbot.BotActiveAloneForceWhenInGuild = 1 + +# SmartScale is enabled or not. +# The default is 1. When enabled (smart) scales the 'BotActiveAlone' value. +# (The scaling will be overruled by the BotActiveAloneForceWhen...rules) +# +# Limitfloor - when DIFF (latency) above floor, activity scaling is applied starting with 90% +# LimitCeiling - when DIFF (latency) above ceiling, activity is 0%; +# +# MinLevel - only apply scaling when level is above or equal to min(bot)Level +# MaxLevel - only apply scaling when level is lower or equal of max(bot)Level +# +AiPlayerbot.botActiveAloneSmartScale = 1 +AiPlayerbot.botActiveAloneSmartScaleDiffLimitfloor = 50 +AiPlayerbot.botActiveAloneSmartScaleDiffLimitCeiling = 200 +AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 1 +AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 + # # # @@ -1551,36 +1596,6 @@ AiPlayerbot.RandombotsWalkingRPG = 0 # Set randombots movement speed to walking only inside buildings AiPlayerbot.RandombotsWalkingRPG.InDoors = 0 -# Specify percent of active bots -# The default is 10. With 10% of all bots going active or inactive each minute. Regardless -# This value is only applied to inactive areas where no real-players are detected, when -# real-players are nearby, friend, group, guild, bg, instances etc the value is always -# enforced to 100% -AiPlayerbot.BotActiveAlone = 100 - -# Force botActiveAlone when bot is ... of real player -AiPlayerbot.BotActiveAloneForceWhenInRadius = 150 -AiPlayerbot.BotActiveAloneForceWhenInZone = 1 -AiPlayerbot.BotActiveAloneForceWhenInMap = 0 -AiPlayerbot.BotActiveAloneForceWhenIsFriend = 1 -AiPlayerbot.BotActiveAloneForceWhenInGuild = 1 - -# SmartScale is enabled or not. -# The default is 1. When enabled (smart) scales the 'BotActiveAlone' value. -# (The scaling will be overruled by the BotActiveAloneForceWhen...rules) -# -# Limitfloor - when DIFF (latency) above floor, activity scaling is applied starting with 90% -# LimitCeiling - when DIFF (latency) above ceiling, activity is 0%; -# -# MinLevel - only apply scaling when level is above or equal to min(bot)Level -# MaxLevel - only apply scaling when level is lower or equal of max(bot)Level -# -AiPlayerbot.botActiveAloneSmartScale = 1 -AiPlayerbot.botActiveAloneSmartScaleDiffLimitfloor = 50 -AiPlayerbot.botActiveAloneSmartScaleDiffLimitCeiling = 200 -AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 1 -AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 - # Premade spell to avoid (undetected spells) # spellid-radius, ... AiPlayerbot.PremadeAvoidAoe = 62234-4 diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index ea223dda..739b400e 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -511,6 +511,7 @@ bool PlayerbotAIConfig::Initialize() autoTrainSpells = sConfigMgr->GetOption("AiPlayerbot.AutoTrainSpells", "yes"); autoPickTalents = sConfigMgr->GetOption("AiPlayerbot.AutoPickTalents", true); autoUpgradeEquip = sConfigMgr->GetOption("AiPlayerbot.AutoUpgradeEquip", false); + hunterWolfPet = sConfigMgr->GetOption("AiPlayerbot.HunterWolfPet", 0); autoLearnTrainerSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnTrainerSpells", true); autoLearnQuestSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnQuestSpells", false); autoTeleportForLevel = sConfigMgr->GetOption("AiPlayerbot.AutoTeleportForLevel", false); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 1c54a0cd..14ee21c8 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -289,6 +289,7 @@ public: std::string autoTrainSpells; bool autoPickTalents; bool autoUpgradeEquip; + int32 hunterWolfPet; bool autoLearnTrainerSpells; bool autoDoQuests; bool enableNewRpgStrategy; diff --git a/src/factory/PlayerbotFactory.cpp b/src/factory/PlayerbotFactory.cpp index 436a58b2..6acf2b2a 100644 --- a/src/factory/PlayerbotFactory.cpp +++ b/src/factory/PlayerbotFactory.cpp @@ -36,6 +36,7 @@ #include "SharedDefines.h" #include "SpellAuraDefines.h" #include "StatsWeightCalculator.h" +#include "World.h" #define PLAYER_SKILL_INDEX(x) (PLAYER_SKILL_INFO_1_1 + ((x)*3)) @@ -786,6 +787,13 @@ void PlayerbotFactory::InitPet() if (itr->second.minlevel > bot->GetLevel()) continue; + bool onlyWolf = sPlayerbotAIConfig->hunterWolfPet == 2 || + (sPlayerbotAIConfig->hunterWolfPet == 1 && + bot->GetLevel() >= sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)); + // Wolf only (for higher dps) + if (onlyWolf && itr->second.family != CREATURE_FAMILY_WOLF) + continue; + ids.push_back(itr->first); }