[Bots] Optimize inventory loading. (#2588)

* [Bots] Optimize inventory loading.

# Notes
- Bots previously were running 23 individual queries to load their inventory versus grabbing their inventory all at once and referencing it in memory.

* Typo.

* Update bot_database.cpp

* Update bot_database.cpp

* Update bot.cpp
This commit is contained in:
Alex King
2022-11-27 19:07:24 -05:00
committed by GitHub
parent d6db35b84e
commit 200c6cccaf
4 changed files with 57 additions and 11 deletions
+3 -2
View File
@@ -558,9 +558,9 @@ public:
inline InspectMessage_Struct& GetInspectMessage() { return _botInspectMessage; }
inline const InspectMessage_Struct& GetInspectMessage() const { return _botInspectMessage; }
// "Quest API" Methods
// "Quest API" Methods
bool HasBotSpellEntry(uint16 spellid);
// "SET" Class Methods
void SetBotSpellID(uint32 newSpellID);
virtual void SetSpawnStatus(bool spawnStatus) { _spawnStatus = spawnStatus; }
@@ -672,6 +672,7 @@ public:
uint32 augment_six = 0
);
uint32 CountBotItem(uint32 item_id);
std::map<uint16, uint32> GetBotItemSlots();
uint32 GetBotItemBySlot(uint16 slot_id);
bool HasBotItem(uint32 item_id);
void RemoveBotItem(uint32 item_id);