Skip to content

Commit

Permalink
-Sync level improvement: AiPlayerbot.SyncLevelNoPlayer which what ref…
Browse files Browse the repository at this point in the history
…erence level should be used before players log in.
  • Loading branch information
mostlikely4r committed May 23, 2023
1 parent c4a7b2b commit 358b02b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions playerbot/PlayerbotAIConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ bool PlayerbotAIConfig::Initialize()
autoDoQuests = config.GetBoolDefault("AiPlayerbot.AutoDoQuests", false);
syncLevelWithPlayers = config.GetBoolDefault("AiPlayerbot.SyncLevelWithPlayers", false);
syncLevelMaxAbove = config.GetIntDefault("AiPlayerbot.SyncLevelMaxAbove", 5);
syncLevelNoPlayer = config.GetIntDefault("AiPlayerbot.SyncLevelNoPlayer", randombotStartingLevel);
tweakValue = config.GetIntDefault("AiPlayerbot.TweakValue", 0);
freeFood = config.GetBoolDefault("AiPlayerbot.FreeFood", true);
talentsInPublicNote = config.GetBoolDefault("AiPlayerbot.TalentsInPublicNote", false);
Expand Down
2 changes: 1 addition & 1 deletion playerbot/PlayerbotAIConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class PlayerbotAIConfig
bool autoLearnQuestSpells;
bool autoDoQuests;
bool syncLevelWithPlayers;
uint32 syncLevelMaxAbove;
uint32 syncLevelMaxAbove, syncLevelNoPlayer;
bool freeFood;
uint32 tweakValue; //Debugging config
float respawnModNeutral, respawnModHostile;
Expand Down
2 changes: 1 addition & 1 deletion playerbot/RandomPlayerbotMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ void RandomPlayerbotMgr::CheckPlayers()
sLog.outBasic("Checking Players...");

if (!playersLevel)
playersLevel = sPlayerbotAIConfig.randombotStartingLevel;
playersLevel = sPlayerbotAIConfig.syncLevelNoPlayer;


for (auto i : players)
Expand Down
3 changes: 2 additions & 1 deletion playerbot/aiplayerbot.conf.dist.in
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ AiPlayerbot.RandomBotAccountCount = 200
# Percentage of fully active bots. Default is 10, higher numbers may affect performance
# AiPlayerbot.botActiveAlone = 10

# Limit random bot max level to online players max level + 5
# Limit random bot max level to online players max level + 5 and uses reference level 1 without a player.
# AiPlayerbot.SyncLevelWithPlayers = 0
# AiPlayerbot.SyncLevelMaxAbove = 5
# AiPlayerbot.SyncLevelNoPlayer = 1

# Random bot guild count
AiPlayerbot.RandomBotGuildCount = 20
Expand Down
3 changes: 2 additions & 1 deletion playerbot/aiplayerbot.conf.dist.in.tbc
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ AiPlayerbot.RandomBotAccountCount = 200
# Percentage of fully active bots. Default is 10, higher numbers may affect performance
# AiPlayerbot.botActiveAlone = 10

# Limit random bot max level to online players max level + 5
# Limit random bot max level to online players max level + 5 and uses reference level 1 without a player.
# AiPlayerbot.SyncLevelWithPlayers = 0
# AiPlayerbot.SyncLevelMaxAbove = 5
# AiPlayerbot.SyncLevelNoPlayer = 1

# Random bot guild count
AiPlayerbot.RandomBotGuildCount = 20
Expand Down
3 changes: 2 additions & 1 deletion playerbot/aiplayerbot.conf.dist.in.wotlk
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ AiPlayerbot.RandomBotAccountCount = 200
# Percentage of fully active bots. Default is 10, higher numbers may affect performance
# AiPlayerbot.botActiveAlone = 10

# Limit random bot max level to online players max level + 5
# Limit random bot max level to online players max level + 5 and uses reference level 1 without a player.
# AiPlayerbot.SyncLevelWithPlayers = 0
# AiPlayerbot.SyncLevelMaxAbove = 5
# AiPlayerbot.SyncLevelNoPlayer = 1

# Random bot guild count
AiPlayerbot.RandomBotGuildCount = 20
Expand Down

0 comments on commit 358b02b

Please sign in to comment.