[performance] Tweaked autoscale, too many rndbots were idle which defeats the purpose of having rndbots

This commit is contained in:
bash
2024-10-11 18:48:00 +00:00
parent adf065cfbf
commit c6f9f43a33

View File

@@ -4187,8 +4187,8 @@ ActivePiorityType PlayerbotAI::GetPriorityType(ActivityType activityType)
} }
// Returns the lower and upper bracket for bots to be active. // 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 // Ie. { 10, 20 } means all bots in this bracket will be inactive below 10% activityMod,
// active above 20% activityMod and scale between those values. // and will be active above 20% activityMod and scale between those values.
std::pair<uint32, uint32> PlayerbotAI::GetPriorityBracket(ActivePiorityType type) std::pair<uint32, uint32> PlayerbotAI::GetPriorityBracket(ActivePiorityType type)
{ {
switch (type) switch (type)
@@ -4203,26 +4203,24 @@ std::pair<uint32, uint32> PlayerbotAI::GetPriorityBracket(ActivePiorityType type
case ActivePiorityType::IN_COMBAT: case ActivePiorityType::IN_COMBAT:
return {0, 10}; return {0, 10};
case ActivePiorityType::IN_BG_QUEUE: case ActivePiorityType::IN_BG_QUEUE:
return {0, 20};
case ActivePiorityType::IN_LFG: case ActivePiorityType::IN_LFG:
return {0, 30}; return {0, 20};
case ActivePiorityType::NEARBY_PLAYER: case ActivePiorityType::NEARBY_PLAYER:
return {0, 40}; return {0, 30};
case ActivePiorityType::PLAYER_FRIEND: case ActivePiorityType::PLAYER_FRIEND:
return {0, 40};
case ActivePiorityType::IN_ACTIVE_AREA:
case ActivePiorityType::PLAYER_GUILD: case ActivePiorityType::PLAYER_GUILD:
return {0, 50}; return {0, 50};
case ActivePiorityType::IN_ACTIVE_AREA:
case ActivePiorityType::IN_EMPTY_SERVER:
return {50, 100};
case ActivePiorityType::IN_ACTIVE_MAP: case ActivePiorityType::IN_ACTIVE_MAP:
return {70, 100}; return {20, 100};
case ActivePiorityType::IN_INACTIVE_MAP: case ActivePiorityType::IN_INACTIVE_MAP:
return {80, 100}; return {50, 100};
default: case ActivePiorityType::IN_EMPTY_SERVER:
return {90, 100}; return {90, 100};
default:
return {50, 100};
} }
return {90, 100};
} }
bool PlayerbotAI::AllowActive(ActivityType activityType) bool PlayerbotAI::AllowActive(ActivityType activityType)