Performance: Refactored a bunch of functions in Playerbot ai (#865)

* Update PlayerbotAI.h

* Refactored a number of functions in PlayerbotAI.cpp

* Update PlayerbotAI.cpp

* Update PlayerbotAI.cpp - update for commit done

Take
568592f188
into account.

* Missing check for aurEff

* Update PlayerbotAI.cpp

nvm...

* Update PlayerbotAI.cpp

GetAura

* Update PlayerbotAI.cpp

Simplified/Optimized sPlayerbotAIConfig->dynamicReactDelay logic for in-combat.

* Update PlayerbotAI.cpp

Dubass fix

* Update PlayerbotAI.cpp

Fix bots leaving dungeon group,. again.

* Update PlayerbotAI.cpp

* Update PlayerbotAI.cpp - order correction

...Required for proper pet behavior.

* Update PlayerbotAI.cpp - UpdateAIGroupMembership()

Final refactor of helper function as all now works as required.

* Update PlayerbotAI.cpp

FindItemInInventory

* Update PlayerbotAI.h

Added helper functions, correct public -> private
This commit is contained in:
SaW
2025-01-15 22:49:41 +01:00
committed by GitHub
parent a24a4c0865
commit 89590860fb
2 changed files with 263 additions and 438 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -579,7 +579,8 @@ private:
static void _fillGearScoreData(Player* player, Item* item, std::vector<uint32>* gearScore, uint32& twoHandScore,
bool mixed = false);
bool IsTellAllowed(PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);
void UpdateAIGroupMembership();
Item* FindItemInInventory(std::function<bool(ItemTemplate const*)> checkItem) const;
void HandleCommands();
void HandleCommand(uint32 type, const std::string& text, Player& fromPlayer, const uint32 lang = LANG_UNIVERSAL);
bool _isBotInitializing = false;