From c6f9f43a33d69395765ccd446d2ac570c8b2281d Mon Sep 17 00:00:00 2001 From: bash Date: Fri, 11 Oct 2024 18:48:00 +0000 Subject: [PATCH] [performance] Tweaked autoscale, too many rndbots were idle which defeats the purpose of having rndbots --- src/PlayerbotAI.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index bba3753a..c42ad985 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4187,8 +4187,8 @@ ActivePiorityType PlayerbotAI::GetPriorityType(ActivityType activityType) } // Returns the lower and upper bracket for bots to be active. -// Ie. 10,20 means all bots in this bracket will be inactive below 10% activityMod, all bots in this bracket will be -// active above 20% activityMod and scale between those values. +// Ie. { 10, 20 } means all bots in this bracket will be inactive below 10% activityMod, +// and will be active above 20% activityMod and scale between those values. std::pair PlayerbotAI::GetPriorityBracket(ActivePiorityType type) { switch (type) @@ -4203,26 +4203,24 @@ std::pair PlayerbotAI::GetPriorityBracket(ActivePiorityType type case ActivePiorityType::IN_COMBAT: return {0, 10}; case ActivePiorityType::IN_BG_QUEUE: - return {0, 20}; case ActivePiorityType::IN_LFG: - return {0, 30}; + return {0, 20}; case ActivePiorityType::NEARBY_PLAYER: - return {0, 40}; + return {0, 30}; case ActivePiorityType::PLAYER_FRIEND: + return {0, 40}; + case ActivePiorityType::IN_ACTIVE_AREA: case ActivePiorityType::PLAYER_GUILD: return {0, 50}; - case ActivePiorityType::IN_ACTIVE_AREA: - case ActivePiorityType::IN_EMPTY_SERVER: - return {50, 100}; case ActivePiorityType::IN_ACTIVE_MAP: - return {70, 100}; + return {20, 100}; case ActivePiorityType::IN_INACTIVE_MAP: - return {80, 100}; - default: + return {50, 100}; + case ActivePiorityType::IN_EMPTY_SERVER: return {90, 100}; + default: + return {50, 100}; } - - return {90, 100}; } bool PlayerbotAI::AllowActive(ActivityType activityType)