mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
Move bot_list from std::list to std::unordered_map like other entities
This commit is contained in:
@@ -382,12 +382,13 @@ Lua_Bot Lua_EntityList::GetBotByName(std::string bot_name) {
|
||||
Lua_Bot_List Lua_EntityList::GetBotList() {
|
||||
Lua_Safe_Call_Class(Lua_Bot_List);
|
||||
Lua_Bot_List ret;
|
||||
auto &bot_list = self->GetBotList();
|
||||
|
||||
if (bot_list.size()) {
|
||||
for (auto bot : bot_list) {
|
||||
ret.entries.emplace_back(Lua_Bot(bot));
|
||||
}
|
||||
auto ¤t_bot_list = self->GetBotList();
|
||||
auto it = current_bot_list.begin();
|
||||
|
||||
while (it != current_bot_list.end()) {
|
||||
ret.entries.emplace_back(it->second);
|
||||
++it;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user