mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Hunter wolf pet config and modify config file layout for activities
This commit is contained in:
@@ -511,6 +511,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
autoTrainSpells = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoTrainSpells", "yes");
|
||||
autoPickTalents = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoPickTalents", true);
|
||||
autoUpgradeEquip = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoUpgradeEquip", false);
|
||||
hunterWolfPet = sConfigMgr->GetOption<int32>("AiPlayerbot.HunterWolfPet", 0);
|
||||
autoLearnTrainerSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnTrainerSpells", true);
|
||||
autoLearnQuestSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnQuestSpells", false);
|
||||
autoTeleportForLevel = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoTeleportForLevel", false);
|
||||
|
||||
@@ -289,6 +289,7 @@ public:
|
||||
std::string autoTrainSpells;
|
||||
bool autoPickTalents;
|
||||
bool autoUpgradeEquip;
|
||||
int32 hunterWolfPet;
|
||||
bool autoLearnTrainerSpells;
|
||||
bool autoDoQuests;
|
||||
bool enableNewRpgStrategy;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user