Revert "feat: ignore arena team for downgrade"

This commit is contained in:
Dustin Hendrickson
2025-10-11 22:21:15 -05:00
committed by GitHub
parent 827ae6ac12
commit af1ee91c17
2 changed files with 38 additions and 73 deletions

View File

@@ -120,14 +120,6 @@ BotLevelBrackets.Dynamic.RealPlayerWeight = 1.0
#
BotLevelBrackets.Dynamic.SyncFactions = 0
#
# BotLevelBrackets.IgnoreArenaTeamBots
# Description: Ignore bots that are members of any arena team (prevents downgrades)
# Default: 1 (enabled)
# Valid values: 0 (off) / 1 (on)
#
BotLevelBrackets.IgnoreArenaTeamBots = 1
##############################################
# Alliance Level Brackets Configuration
##############################################

View File

@@ -61,7 +61,6 @@ static bool g_BotDistLiteDebugMode = false;
static bool g_UseDynamicDistribution = false;
static bool g_IgnoreFriendListed = true;
static uint32 g_FlaggedProcessLimit = 5; // 0 = unlimited
static bool g_IgnoreArenaTeamBots = true;
// Real player weight to boost bracket contributions.
static float g_RealPlayerWeight = 1.0f;
@@ -109,7 +108,7 @@ static void LoadBotLevelBracketsConfig()
{
g_BotLevelBracketsEnabled = sConfigMgr->GetOption<bool>("BotLevelBrackets.Enabled", true);
g_IgnoreGuildBotsWithRealPlayers = sConfigMgr->GetOption<bool>("BotLevelBrackets.IgnoreGuildBotsWithRealPlayers", true);
g_IgnoreArenaTeamBots = sConfigMgr->GetOption<bool>("BotLevelBrackets.IgnoreArenaTeamBots", true);
g_BotDistFullDebugMode = sConfigMgr->GetOption<bool>("BotLevelBrackets.FullDebugMode", false);
g_BotDistLiteDebugMode = sConfigMgr->GetOption<bool>("BotLevelBrackets.LiteDebugMode", false);
g_BotDistCheckFrequency = sConfigMgr->GetOption<uint32>("BotLevelBrackets.CheckFrequency", 300);
@@ -202,29 +201,6 @@ static bool IsPlayerBot(Player* player)
return botAI && botAI->IsBotAI();
}
/**
* @brief Checks if player is in arena team.
*
* Checks if player is in arena team
*
* @param p Pointer to the Player object to check.
* @return true if the player is in a team.
*/
static bool BotInArenaTeam(Player* p)
{
if (!p || !p->IsInWorld() || !p->GetSession() || p->GetSession()->isLogingOut() || p->IsDuringRemoveFromWorld())
return false;
// Check if player is in an arena team
for (uint32 arena_slot = 0; arena_slot < MAX_ARENA_SLOT; ++arena_slot)
{
uint32 arenaTeamId = p->GetArenaTeamId(arena_slot);
if (arenaTeamId)
return true;
}
return false;
}
/**
* @brief Checks if the given player is a random bot.
@@ -1052,8 +1028,6 @@ static void ProcessPendingLevelResets()
continue;
}
if (g_IgnoreArenaTeamBots && BotInArenaTeam(bot)) { it = g_PendingLevelResets.erase(it); continue; }
if (bot && bot->IsInWorld() && IsBotSafeForLevelReset(bot))
{
AdjustBotToRange(bot, targetRange, it->factionRanges);
@@ -1305,7 +1279,6 @@ public:
continue;
if (IsPlayerBot(player))
continue; // Only count real players.
if (g_IgnoreArenaTeamBots && BotInArenaTeam(player)) continue;
int rangeIndex = GetOrFlagPlayerBracket(player);
if (rangeIndex < 0)
continue;