5-8 percent performance increase when when botActiveAlone is 100% and smartScale disabled (#803)

Diff-wise. By moving the when botActiveAlone is 100% and smartScale disabled return to the very top.
This commit is contained in:
SaW
2024-12-21 13:48:07 +01:00
committed by GitHub
parent 99dd094a5b
commit 8c36d0988b

View File

@@ -4135,6 +4135,12 @@ inline bool ZoneHasRealPlayers(Player* bot)
bool PlayerbotAI::AllowActive(ActivityType activityType) bool PlayerbotAI::AllowActive(ActivityType activityType)
{ {
// when botActiveAlone is 100% and smartScale disabled
if (sPlayerbotAIConfig->botActiveAlone >= 100 && !sPlayerbotAIConfig->botActiveAloneSmartScale)
{
return true;
}
// Is in combat. Always defend yourself. // Is in combat. Always defend yourself.
if (activityType != OUT_OF_PARTY_ACTIVITY && activityType != PACKET_ACTIVITY) if (activityType != OUT_OF_PARTY_ACTIVITY && activityType != PACKET_ACTIVITY)
{ {
@@ -4163,12 +4169,6 @@ bool PlayerbotAI::AllowActive(ActivityType activityType)
return true; return true;
} }
// when botActiveAlone is 100% and smartScale disabled
if (sPlayerbotAIConfig->botActiveAlone >= 100 && !sPlayerbotAIConfig->botActiveAloneSmartScale)
{
return true;
}
// bg, raid, dungeon // bg, raid, dungeon
if (!WorldPosition(bot).isOverworld()) if (!WorldPosition(bot).isOverworld())
{ {