mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
Refactor expedition member online status requests
This optimizes character status requests by only sending a single bulk request to world for characters in all expeditions instead of sending a separate request for each expedition on zone startup
This commit is contained in:
@@ -510,15 +510,15 @@ void ExpeditionMessage::GetOnlineMembers(ServerPacket* pack)
|
||||
|
||||
for (uint32_t i = 0; i < buf->count; ++i)
|
||||
{
|
||||
for (const auto& cle : all_clients)
|
||||
auto it = std::find_if(all_clients.begin(), all_clients.end(), [&](const ClientListEntry* cle) {
|
||||
return (cle && cle->CharID() == buf->entries[i].character_id);
|
||||
});
|
||||
|
||||
if (it != all_clients.end())
|
||||
{
|
||||
if (cle && cle->CharID() == buf->entries[i].character_id)
|
||||
{
|
||||
buf->entries[i].character_zone_id = cle->zone();
|
||||
buf->entries[i].character_instance_id = cle->instance();
|
||||
buf->entries[i].character_online = true;
|
||||
break;
|
||||
}
|
||||
buf->entries[i].character_zone_id = (*it)->zone();
|
||||
buf->entries[i].character_instance_id = (*it)->instance();
|
||||
buf->entries[i].character_online = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user