mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
增加是否允许登录其它玩家角色为机器人的配置
This commit is contained in:
@@ -98,6 +98,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
iterationsPerTick = sConfigMgr->GetOption<int32>("AiPlayerbot.IterationsPerTick", 100);
|
||||
|
||||
allowGuildBots = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowGuildBots", true);
|
||||
allowPlayerBots = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowPlayerBots", false);
|
||||
|
||||
randomBotMapsAsString = sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotMaps", "0,1,530,571");
|
||||
LoadList<std::vector<uint32>>(randomBotMapsAsString, randomBotMaps);
|
||||
@@ -106,7 +107,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotSpellIds", "54197"), randomBotSpellIds);
|
||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedZoneIds", "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323,4395"), pvpProhibitedZoneIds);
|
||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedAreaIds", "976,35"), pvpProhibitedAreaIds);
|
||||
|
||||
|
||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"), randomBotQuestIds);
|
||||
|
||||
botAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.BotAutologin", false);
|
||||
@@ -171,7 +172,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
}
|
||||
for (uint32 spec = 0; spec < MAX_SPECNO; ++spec)
|
||||
{
|
||||
std::ostringstream os;
|
||||
std::ostringstream os;
|
||||
os << "AiPlayerbot.PremadeSpecName." << cls << "." << spec;
|
||||
premadeSpecName[cls][spec] = sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false);
|
||||
os.str("");
|
||||
@@ -193,7 +194,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
}
|
||||
for (uint32 spec = 0; spec < 3; ++spec)
|
||||
{
|
||||
std::ostringstream os;
|
||||
std::ostringstream os;
|
||||
os << "AiPlayerbot.RandomClassSpecProb." << cls << "." << spec;
|
||||
randomClassSpecProb[cls][spec] = sConfigMgr->GetOption<uint32>(os.str().c_str(), 33);
|
||||
os.str("");
|
||||
@@ -298,7 +299,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
autoUpgradeEquip = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoUpgradeEquip", false);
|
||||
autoLearnTrainerSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnTrainerSpells", true);
|
||||
autoLearnQuestSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnQuestSpells", false);
|
||||
autoTeleportForLevel = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoTeleportForLevel", false);
|
||||
autoTeleportForLevel = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoTeleportForLevel", false);
|
||||
autoDoQuests = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoDoQuests", false);
|
||||
syncLevelWithPlayers = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncLevelWithPlayers", false);
|
||||
freeFood = sConfigMgr->GetOption<bool>("AiPlayerbot.FreeFood", true);
|
||||
@@ -531,7 +532,7 @@ static std::vector<std::string> split(const std::string &str, const std::string
|
||||
|
||||
std::vector<std::vector<uint32>> PlayerbotAIConfig::ParseTempTalentsOrder(uint32 cls, std::string tab_link) {
|
||||
// check bad link
|
||||
uint32 classMask = 1 << (cls - 1);
|
||||
uint32 classMask = 1 << (cls - 1);
|
||||
std::vector<std::vector<uint32>> res;
|
||||
std::vector<std::string> tab_links = split(tab_link, "-");
|
||||
std::map<uint32, std::vector<TalentEntry const*>> spells;
|
||||
@@ -575,4 +576,4 @@ std::vector<std::vector<uint32>> PlayerbotAIConfig::ParseTempTalentsOrder(uint32
|
||||
res.insert(res.end(), order.begin(), order.end());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user