From 8c36d0988bc486b0f612a34d3d667ccac841511c Mon Sep 17 00:00:00 2001 From: SaW Date: Sat, 21 Dec 2024 13:48:07 +0100 Subject: [PATCH] 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. --- src/PlayerbotAI.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 2b2dfdb0..cb9facf2 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4135,6 +4135,12 @@ inline bool ZoneHasRealPlayers(Player* bot) 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. if (activityType != OUT_OF_PARTY_ACTIVITY && activityType != PACKET_ACTIVITY) { @@ -4163,12 +4169,6 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) return true; } - // when botActiveAlone is 100% and smartScale disabled - if (sPlayerbotAIConfig->botActiveAlone >= 100 && !sPlayerbotAIConfig->botActiveAloneSmartScale) - { - return true; - } - // bg, raid, dungeon if (!WorldPosition(bot).isOverworld()) {