[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
+1 -1
View File
@@ -89,6 +89,7 @@ public:
bool SaveItems(Bot* bot_inst);
bool DeleteItems(const uint32 bot_id);
bool LoadItemSlots(const uint32 bot_id, std::map<uint16, uint32>& m);
bool LoadItemBySlot(Bot* bot_inst);
bool LoadItemBySlot(const uint32 bot_id, const uint32 slot_id, uint32& item_id);
bool SaveItemBySlot(Bot* bot_inst, const uint32 slot_id, const EQ::ItemInstance* item_inst);
@@ -219,7 +220,6 @@ public:
static const char* LoadItems();
static const char* SaveItems();
static const char* DeleteItems();
static const char* LoadItemBySlot();
static const char* SaveItemBySlot();
static const char* DeleteItemBySlot();
static const char* LoadEquipmentColor();