From 421947a464cecb5bc8b531626cacd380ff088a48 Mon Sep 17 00:00:00 2001 From: whipowill Date: Fri, 20 May 2022 13:00:49 -0500 Subject: [PATCH] Compile bug fixes. --- src/PlayerbotAIConfig.cpp | 164 +++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 82 deletions(-) diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index 52bebcc8..ac0acfab 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -52,18 +52,18 @@ bool PlayerbotAIConfig::Initialize() return false; } - globalCoolDown = sConfigMgr->GetIntDefault("AiPlayerbot.GlobalCooldown", 1500); - maxWaitForMove = sConfigMgr->GetIntDefault("AiPlayerbot.MaxWaitForMove", 5000); - expireActionTime = sConfigMgr->GetIntDefault("AiPlayerbot.ExpireActionTime", 5000); - dispelAuraDuration = sConfigMgr->GetIntDefault("AiPlayerbot.DispelAuraDuration", 7000); - reactDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ReactDelay", 500); - passiveDelay = sConfigMgr->GetIntDefault("AiPlayerbot.PassiveDelay", 10000); - repeatDelay = sConfigMgr->GetIntDefault("AiPlayerbot.RepeatDelay", 5000); - errorDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ErrorDelay", 5000); - rpgDelay = sConfigMgr->GetIntDefault("AiPlayerbot.RpgDelay", 10000); - sitDelay = sConfigMgr->GetIntDefault("AiPlayerbot.SitDelay", 30000); - returnDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ReturnDelay", 7000); - lootDelay = sConfigMgr->GetIntDefault("AiPlayerbot.LootDelay", 1000); + globalCoolDown = sConfigMgr->GetOption("AiPlayerbot.GlobalCooldown", 1500); + maxWaitForMove = sConfigMgr->GetOption("AiPlayerbot.MaxWaitForMove", 5000); + expireActionTime = sConfigMgr->GetOption("AiPlayerbot.ExpireActionTime", 5000); + dispelAuraDuration = sConfigMgr->GetOption("AiPlayerbot.DispelAuraDuration", 7000); + reactDelay = sConfigMgr->GetOption("AiPlayerbot.ReactDelay", 500); + passiveDelay = sConfigMgr->GetOption("AiPlayerbot.PassiveDelay", 10000); + repeatDelay = sConfigMgr->GetOption("AiPlayerbot.RepeatDelay", 5000); + errorDelay = sConfigMgr->GetOption("AiPlayerbot.ErrorDelay", 5000); + rpgDelay = sConfigMgr->GetOption("AiPlayerbot.RpgDelay", 10000); + sitDelay = sConfigMgr->GetOption("AiPlayerbot.SitDelay", 30000); + returnDelay = sConfigMgr->GetOption("AiPlayerbot.ReturnDelay", 7000); + lootDelay = sConfigMgr->GetOption("AiPlayerbot.LootDelay", 1000); farDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.FarDistance", 20.0f); sightDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.SightDistance", 75.0f); @@ -83,47 +83,47 @@ bool PlayerbotAIConfig::Initialize() grindDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.GrindDistance", 75.0f); reactDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.ReactDistance", 150.0f); - criticalHealth = sConfigMgr->GetIntDefault("AiPlayerbot.CriticalHealth", 20); - lowHealth = sConfigMgr->GetIntDefault("AiPlayerbot.LowHealth", 45); - mediumHealth = sConfigMgr->GetIntDefault("AiPlayerbot.MediumHealth", 65); - almostFullHealth = sConfigMgr->GetIntDefault("AiPlayerbot.AlmostFullHealth", 85); - lowMana = sConfigMgr->GetIntDefault("AiPlayerbot.LowMana", 15); - mediumMana = sConfigMgr->GetIntDefault("AiPlayerbot.MediumMana", 40); + criticalHealth = sConfigMgr->GetOption("AiPlayerbot.CriticalHealth", 20); + lowHealth = sConfigMgr->GetOption("AiPlayerbot.LowHealth", 45); + mediumHealth = sConfigMgr->GetOption("AiPlayerbot.MediumHealth", 65); + almostFullHealth = sConfigMgr->GetOption("AiPlayerbot.AlmostFullHealth", 85); + lowMana = sConfigMgr->GetOption("AiPlayerbot.LowMana", 15); + mediumMana = sConfigMgr->GetOption("AiPlayerbot.MediumMana", 40); randomGearLoweringChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomGearLoweringChance", 0.15f); randomBotMaxLevelChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomBotMaxLevelChance", 0.15f); randomBotRpgChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomBotRpgChance", 0.20f); - iterationsPerTick = sConfigMgr->GetIntDefault("AiPlayerbot.IterationsPerTick", 100); + iterationsPerTick = sConfigMgr->GetOption("AiPlayerbot.IterationsPerTick", 100); allowGuildBots = sConfigMgr->GetOption("AiPlayerbot.AllowGuildBots", true); - randomBotMapsAsString = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotMaps", "0,1,530,571"); + randomBotMapsAsString = sConfigMgr->GetOption("AiPlayerbot.RandomBotMaps", "0,1,530,571"); LoadList>(randomBotMapsAsString, randomBotMaps); - LoadList>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotQuestItems", "6948,5175,5176,5177,5178,16309,12382,13704,11000"), randomBotQuestItems); - LoadList>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotSpellIds", "54197"), randomBotSpellIds); - LoadList>(sConfigMgr->GetStringDefault("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"), pvpProhibitedZoneIds); - LoadList>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"), randomBotQuestIds); + LoadList>(sConfigMgr->GetOption("AiPlayerbot.RandomBotQuestItems", "6948,5175,5176,5177,5178,16309,12382,13704,11000"), randomBotQuestItems); + LoadList>(sConfigMgr->GetOption("AiPlayerbot.RandomBotSpellIds", "54197"), randomBotSpellIds); + LoadList>(sConfigMgr->GetOption("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"), pvpProhibitedZoneIds); + LoadList>(sConfigMgr->GetOption("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"), randomBotQuestIds); botAutologin = sConfigMgr->GetOption("AiPlayerbot.BotAutologin", false); randomBotAutologin = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutologin", true); - minRandomBots = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBots", 50); - maxRandomBots = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBots", 200); - randomBotUpdateInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotUpdateInterval", MINUTE); - randomBotCountChangeMinInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotCountChangeMinInterval", 30 * MINUTE); - randomBotCountChangeMaxInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotCountChangeMaxInterval", 2 * HOUR); - minRandomBotInWorldTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotInWorldTime", 2 * HOUR); - maxRandomBotInWorldTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotInWorldTime", 12 * HOUR); - minRandomBotRandomizeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotRandomizeTime", 2 * HOUR); - maxRandomBotRandomizeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomRandomizeTime", 14 * 24 * HOUR); - minRandomBotChangeStrategyTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotChangeStrategyTime", 30 * MINUTE); - maxRandomBotChangeStrategyTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotChangeStrategyTime", 2 * HOUR); - minRandomBotReviveTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotReviveTime", MINUTE); - maxRandomBotReviveTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE); - randomBotTeleportDistance = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotTeleportDistance", 100); - randomBotsPerInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotsPerInterval", MINUTE); - minRandomBotsPriceChangeInterval = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotsPriceChangeInterval", 2 * HOUR); - maxRandomBotsPriceChangeInterval = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotsPriceChangeInterval", 48 * HOUR); + minRandomBots = sConfigMgr->GetOption("AiPlayerbot.MinRandomBots", 50); + maxRandomBots = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBots", 200); + randomBotUpdateInterval = sConfigMgr->GetOption("AiPlayerbot.RandomBotUpdateInterval", MINUTE); + randomBotCountChangeMinInterval = sConfigMgr->GetOption("AiPlayerbot.RandomBotCountChangeMinInterval", 30 * MINUTE); + randomBotCountChangeMaxInterval = sConfigMgr->GetOption("AiPlayerbot.RandomBotCountChangeMaxInterval", 2 * HOUR); + minRandomBotInWorldTime = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotInWorldTime", 2 * HOUR); + maxRandomBotInWorldTime = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotInWorldTime", 12 * HOUR); + minRandomBotRandomizeTime = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotRandomizeTime", 2 * HOUR); + maxRandomBotRandomizeTime = sConfigMgr->GetOption("AiPlayerbot.MaxRandomRandomizeTime", 14 * 24 * HOUR); + minRandomBotChangeStrategyTime = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotChangeStrategyTime", 30 * MINUTE); + maxRandomBotChangeStrategyTime = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotChangeStrategyTime", 2 * HOUR); + minRandomBotReviveTime = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotReviveTime", MINUTE); + maxRandomBotReviveTime = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE); + randomBotTeleportDistance = sConfigMgr->GetOption("AiPlayerbot.RandomBotTeleportDistance", 100); + randomBotsPerInterval = sConfigMgr->GetOption("AiPlayerbot.RandomBotsPerInterval", MINUTE); + minRandomBotsPriceChangeInterval = sConfigMgr->GetOption("AiPlayerbot.MinRandomBotsPriceChangeInterval", 2 * HOUR); + maxRandomBotsPriceChangeInterval = sConfigMgr->GetOption("AiPlayerbot.MaxRandomBotsPriceChangeInterval", 48 * HOUR); randomBotJoinLfg = sConfigMgr->GetOption("AiPlayerbot.RandomBotJoinLfg", true); randomBotSuggestDungeons = sConfigMgr->GetOption("AiPlayerbot.RandomBotSuggestDungeons", true); suggestDungeonsInLowerCaseRandomly = sConfigMgr->GetOption("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false); @@ -132,23 +132,23 @@ bool PlayerbotAIConfig::Initialize() logValuesPerTick = sConfigMgr->GetOption("AiPlayerbot.LogValuesPerTick", false); fleeingEnabled = sConfigMgr->GetOption("AiPlayerbot.FleeingEnabled", true); summonAtInnkeepersEnabled = sConfigMgr->GetOption("AiPlayerbot.SummonAtInnkeepersEnabled", true); - randomBotMinLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotMinLevel", 1); - randomBotMaxLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotMaxLevel", 80); + randomBotMinLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotMinLevel", 1); + randomBotMaxLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotMaxLevel", 80); randomBotLoginAtStartup = sConfigMgr->GetOption("AiPlayerbot.RandomBotLoginAtStartup", true); - randomBotTeleLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotTeleLevel", 5); - openGoSpell = sConfigMgr->GetIntDefault("AiPlayerbot.OpenGoSpell", 6477); + randomBotTeleLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotTeleLevel", 5); + openGoSpell = sConfigMgr->GetOption("AiPlayerbot.OpenGoSpell", 6477); randomChangeMultiplier = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomChangeMultiplier", 1.0); - randomBotCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotCombatStrategies", "-threat"); - randomBotNonCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotNonCombatStrategies", ""); - combatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.CombatStrategies", "+custom::say"); - nonCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.NonCombatStrategies", "+custom::say,+return"); + randomBotCombatStrategies = sConfigMgr->GetOption("AiPlayerbot.RandomBotCombatStrategies", "-threat"); + randomBotNonCombatStrategies = sConfigMgr->GetOption("AiPlayerbot.RandomBotNonCombatStrategies", ""); + combatStrategies = sConfigMgr->GetOption("AiPlayerbot.CombatStrategies", "+custom::say"); + nonCombatStrategies = sConfigMgr->GetOption("AiPlayerbot.NonCombatStrategies", "+custom::say,+return"); - commandPrefix = sConfigMgr->GetStringDefault("AiPlayerbot.CommandPrefix", ""); - commandSeparator = sConfigMgr->GetStringDefault("AiPlayerbot.CommandSeparator", "\\\\"); + commandPrefix = sConfigMgr->GetOption("AiPlayerbot.CommandPrefix", ""); + commandSeparator = sConfigMgr->GetOption("AiPlayerbot.CommandSeparator", "\\\\"); - commandServerPort = sConfigMgr->GetIntDefault("AiPlayerbot.CommandServerPort", 8888); + commandServerPort = sConfigMgr->GetOption("AiPlayerbot.CommandServerPort", 8888); perfMonEnabled = sConfigMgr->GetOption("AiPlayerbot.PerfMonEnabled", false); LOG_INFO("server.loading", "---------------------------------------"); @@ -164,12 +164,12 @@ bool PlayerbotAIConfig::Initialize() std::ostringstream os; os << "AiPlayerbot.PremadeSpecName." << cls << "." << spec; - std::string const specName = sConfigMgr->GetStringDefault(os.str().c_str(), "", false); + std::string const specName = sConfigMgr->GetOption(os.str().c_str(), "", false); if (!specName.empty()) { std::ostringstream os; os << "AiPlayerbot.PremadeSpecProb." << cls << "." << spec; - uint32 probability = sConfigMgr->GetIntDefault(os.str().c_str(), 100, false); + uint32 probability = sConfigMgr->GetOption(os.str().c_str(), 100, false); TalentPath talentPath(spec, specName, probability); @@ -178,7 +178,7 @@ bool PlayerbotAIConfig::Initialize() std::ostringstream os; os << "AiPlayerbot.PremadeSpecLink." << cls << "." << spec << "." << level; - std::string specLink = sConfigMgr->GetStringDefault(os.str().c_str(), "", false); + std::string specLink = sConfigMgr->GetOption(os.str().c_str(), "", false); specLink = specLink.substr(0, specLink.find("#", 0));; specLink = specLink.substr(0, specLink.find(" ", 0));; @@ -216,7 +216,7 @@ bool PlayerbotAIConfig::Initialize() } botCheats.clear(); - LoadListString>(sConfigMgr->GetStringDefault("AiPlayerbot.BotCheats", "taxi"), botCheats); + LoadListString>(sConfigMgr->GetOption("AiPlayerbot.BotCheats", "taxi"), botCheats); botCheatMask = 0; @@ -231,7 +231,7 @@ bool PlayerbotAIConfig::Initialize() if (std::find(botCheats.begin(), botCheats.end(), "power") != botCheats.end()) botCheatMask |= (uint32)BotCheatMask::power; - LoadListString>(sConfigMgr->GetStringDefault("AiPlayerbot.AllowedLogFiles", ""), allowedLogFiles); + LoadListString>(sConfigMgr->GetOption("AiPlayerbot.AllowedLogFiles", ""), allowedLogFiles); worldBuffs.clear(); @@ -249,21 +249,21 @@ bool PlayerbotAIConfig::Initialize() } } - randomBotAccountPrefix = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotAccountPrefix", "rndbot"); - randomBotAccountCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotAccountCount", 200); + randomBotAccountPrefix = sConfigMgr->GetOption("AiPlayerbot.RandomBotAccountPrefix", "rndbot"); + randomBotAccountCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAccountCount", 200); deleteRandomBotAccounts = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotAccounts", false); - randomBotGuildCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotGuildCount", 20); + randomBotGuildCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotGuildCount", 20); deleteRandomBotGuilds = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotGuilds", false); guildTaskEnabled = sConfigMgr->GetOption("AiPlayerbot.EnableGuildTasks", true); - minGuildTaskChangeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskChangeTime", 3 * 24 * 3600); - maxGuildTaskChangeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskChangeTime", 4 * 24 * 3600); - minGuildTaskAdvertisementTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskAdvertisementTime", 300); - maxGuildTaskAdvertisementTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskAdvertisementTime", 12 * 3600); - minGuildTaskRewardTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskRewardTime", 300); - maxGuildTaskRewardTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskRewardTime", 3600); - guildTaskAdvertCleanupTime = sConfigMgr->GetIntDefault("AiPlayerbot.GuildTaskAdvertCleanupTime", 300); - guildTaskKillTaskDistance = sConfigMgr->GetIntDefault("AiPlayerbot.GuildTaskKillTaskDistance", 2000); + minGuildTaskChangeTime = sConfigMgr->GetOption("AiPlayerbot.MinGuildTaskChangeTime", 3 * 24 * 3600); + maxGuildTaskChangeTime = sConfigMgr->GetOption("AiPlayerbot.MaxGuildTaskChangeTime", 4 * 24 * 3600); + minGuildTaskAdvertisementTime = sConfigMgr->GetOption("AiPlayerbot.MinGuildTaskAdvertisementTime", 300); + maxGuildTaskAdvertisementTime = sConfigMgr->GetOption("AiPlayerbot.MaxGuildTaskAdvertisementTime", 12 * 3600); + minGuildTaskRewardTime = sConfigMgr->GetOption("AiPlayerbot.MinGuildTaskRewardTime", 300); + maxGuildTaskRewardTime = sConfigMgr->GetOption("AiPlayerbot.MaxGuildTaskRewardTime", 3600); + guildTaskAdvertCleanupTime = sConfigMgr->GetOption("AiPlayerbot.GuildTaskAdvertCleanupTime", 300); + guildTaskKillTaskDistance = sConfigMgr->GetOption("AiPlayerbot.GuildTaskKillTaskDistance", 2000); targetPosRecalcDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.TargetPosRecalcDistance", 0.1f); // cosmetics (by lidocain) @@ -274,22 +274,22 @@ bool PlayerbotAIConfig::Initialize() enableGreet = sConfigMgr->GetOption("AiPlayerbot.EnableGreet", true); disableRandomLevels = sConfigMgr->GetOption("AiPlayerbot.DisableRandomLevels", false); randomBotRandomPassword = sConfigMgr->GetOption("AiPlayerbot.RandomBotRandomPassword", true); - playerbotsXPrate = sConfigMgr->GetIntDefault("AiPlayerbot.KillXPRate", 1); - botActiveAlone = sConfigMgr->GetIntDefault("AiPlayerbot.BotActiveAlone", 10); + playerbotsXPrate = sConfigMgr->GetOption("AiPlayerbot.KillXPRate", 1); + botActiveAlone = sConfigMgr->GetOption("AiPlayerbot.BotActiveAlone", 10); randombotsWalkingRPG = sConfigMgr->GetOption("AiPlayerbot.RandombotsWalkingRPG", false); randombotsWalkingRPGInDoors = sConfigMgr->GetOption("AiPlayerbot.RandombotsWalkingRPG.InDoors", false); - minEnchantingBotLevel = sConfigMgr->GetIntDefault("AiPlayerbot.MinEnchantingBotLevel", 60); - randombotStartingLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandombotStartingLevel", 5); + minEnchantingBotLevel = sConfigMgr->GetOption("AiPlayerbot.MinEnchantingBotLevel", 60); + randombotStartingLevel = sConfigMgr->GetOption("AiPlayerbot.RandombotStartingLevel", 5); gearscorecheck = sConfigMgr->GetOption("AiPlayerbot.GearScoreCheck", false); randomBotPreQuests = sConfigMgr->GetOption("AiPlayerbot.PreQuests", true); // SPP automation - autoPickReward = sConfigMgr->GetStringDefault("AiPlayerbot.AutoPickReward", "yes"); + autoPickReward = sConfigMgr->GetOption("AiPlayerbot.AutoPickReward", "yes"); autoEquipUpgradeLoot = sConfigMgr->GetOption("AiPlayerbot.AutoEquipUpgradeLoot", true); syncQuestWithPlayer = sConfigMgr->GetOption("AiPlayerbot.SyncQuestWithPlayer", false); syncQuestForPlayer = sConfigMgr->GetOption("AiPlayerbot.SyncQuestForPlayer", false); - autoTrainSpells = sConfigMgr->GetStringDefault("AiPlayerbot.AutoTrainSpells", "yes"); - autoPickTalents = sConfigMgr->GetStringDefault("AiPlayerbot.AutoPickTalents", "full"); + autoTrainSpells = sConfigMgr->GetOption("AiPlayerbot.AutoTrainSpells", "yes"); + autoPickTalents = sConfigMgr->GetOption("AiPlayerbot.AutoPickTalents", "full"); autoLearnTrainerSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnTrainerSpells", false); autoLearnQuestSpells = sConfigMgr->GetOption("AiPlayerbot.AutoLearnQuestSpells", false); autoDoQuests = sConfigMgr->GetOption("AiPlayerbot.AutoDoQuests", false); @@ -299,10 +299,10 @@ bool PlayerbotAIConfig::Initialize() randomBotGroupNearby = sConfigMgr->GetOption("AiPlayerbot.RandomBotGroupNearby", true); // arena - randomBotArenaTeamCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotArenaTeamCount", 20); + randomBotArenaTeamCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotArenaTeamCount", 20); deleteRandomBotArenaTeams = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotArenaTeams", false); - selfBotLevel = sConfigMgr->GetIntDefault("AiPlayerbot.SelfBotLevel", 1); + selfBotLevel = sConfigMgr->GetOption("AiPlayerbot.SelfBotLevel", 1); RandomPlayerbotFactory::CreateRandomBots(); PlayerbotFactory::Init(); @@ -424,7 +424,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 std::ostringstream os; os << "AiPlayerbot.WorldBuff." << factionId1 << "." << classId1 << "." << minLevel1 << "." << maxLevel1; - LoadList>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs); + LoadList>(sConfigMgr->GetOption(os.str().c_str(), "", false), buffs); for (auto buff : buffs) { @@ -437,7 +437,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 std::ostringstream os; os << "AiPlayerbot.WorldBuff." << factionId1 << "." << classId1 << "." << minLevel1; - LoadList>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs); + LoadList>(sConfigMgr->GetOption(os.str().c_str(), "", false), buffs); for (auto buff : buffs) { @@ -451,7 +451,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 std::ostringstream os; os << "AiPlayerbot.WorldBuff." << factionId1 << "." << factionId1 << "." << classId1; - LoadList>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs); + LoadList>(sConfigMgr->GetOption(os.str().c_str(), "", false), buffs); for (auto buff : buffs) { @@ -465,7 +465,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 std::ostringstream os; os << "AiPlayerbot.WorldBuff." << factionId1; - LoadList>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs); + LoadList>(sConfigMgr->GetOption(os.str().c_str(), "", false), buffs); for (auto buff : buffs) { @@ -479,7 +479,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32 std::ostringstream os; os << "AiPlayerbot.WorldBuff"; - LoadList>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs); + LoadList>(sConfigMgr->GetOption(os.str().c_str(), "", false), buffs); for (auto buff : buffs) {