mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-12 22:22:25 +00:00
Only send member updates after caching dz data
This fixes characters not receiving a compass if they're already in the compass zone when an expedition is created from another zone
This commit is contained in:
parent
18dd9e6637
commit
cd98b8bc6f
@ -163,7 +163,6 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
|||||||
|
|
||||||
using col = LoadExpeditionColumns::eLoadExpeditionColumns;
|
using col = LoadExpeditionColumns::eLoadExpeditionColumns;
|
||||||
|
|
||||||
Expedition* current_expedition = nullptr;
|
|
||||||
uint32_t last_expedition_id = 0;
|
uint32_t last_expedition_id = 0;
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row)
|
for (auto row = results.begin(); row != results.end(); ++row)
|
||||||
@ -172,12 +171,6 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
|||||||
|
|
||||||
if (expedition_id != last_expedition_id)
|
if (expedition_id != last_expedition_id)
|
||||||
{
|
{
|
||||||
// finished parsing previous expedition members, send member updates
|
|
||||||
if (current_expedition)
|
|
||||||
{
|
|
||||||
current_expedition->SendUpdatesToZoneMembers();
|
|
||||||
}
|
|
||||||
|
|
||||||
expedition_ids.emplace_back(expedition_id);
|
expedition_ids.emplace_back(expedition_id);
|
||||||
|
|
||||||
uint32_t leader_id = strtoul(row[col::leader_id], nullptr, 10);
|
uint32_t leader_id = strtoul(row[col::leader_id], nullptr, 10);
|
||||||
@ -209,7 +202,7 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
|||||||
last_expedition_id = expedition_id;
|
last_expedition_id = expedition_id;
|
||||||
|
|
||||||
// looping expedition members
|
// looping expedition members
|
||||||
current_expedition = Expedition::FindCachedExpeditionByID(last_expedition_id);
|
auto current_expedition = Expedition::FindCachedExpeditionByID(last_expedition_id);
|
||||||
if (current_expedition)
|
if (current_expedition)
|
||||||
{
|
{
|
||||||
auto member_id = strtoul(row[col::member_id], nullptr, 10);
|
auto member_id = strtoul(row[col::member_id], nullptr, 10);
|
||||||
@ -219,12 +212,6 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// update for the last cached expedition
|
|
||||||
if (current_expedition)
|
|
||||||
{
|
|
||||||
current_expedition->SendUpdatesToZoneMembers();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ask world for online members from all cached expeditions at once
|
// ask world for online members from all cached expeditions at once
|
||||||
Expedition::SendWorldGetOnlineMembers(expedition_character_ids);
|
Expedition::SendWorldGetOnlineMembers(expedition_character_ids);
|
||||||
|
|
||||||
@ -248,6 +235,9 @@ void Expedition::CacheExpeditions(MySQLRequestResult& results)
|
|||||||
{
|
{
|
||||||
expedition->m_lockouts = lockout_iter->second;
|
expedition->m_lockouts = lockout_iter->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// send member updates now that all data is loaded for the cached expedition(s)
|
||||||
|
expedition->SendUpdatesToZoneMembers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user