mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
Cache new expedition before sending client updates
Compass updates get data from the expedition cache so it needs to be cached first. Currently this doesn't affect anything because compass isn't sent to CreateExpedition and has to be set post-creation. In the future this will make the order of client messages more live accurate though
This commit is contained in:
parent
eccc79e4ce
commit
1819b7c23b
@ -128,8 +128,11 @@ Expedition* Expedition::TryCreate(
|
|||||||
|
|
||||||
expedition->SaveMembers(request);
|
expedition->SaveMembers(request);
|
||||||
expedition->SaveLockouts(request);
|
expedition->SaveLockouts(request);
|
||||||
expedition->SendUpdatesToZoneMembers();
|
|
||||||
expedition->SendWorldExpeditionUpdate(); // cache in other zones
|
auto inserted = zone->expedition_cache.emplace(expedition_id, std::move(expedition));
|
||||||
|
|
||||||
|
inserted.first->second->SendUpdatesToZoneMembers();
|
||||||
|
inserted.first->second->SendWorldExpeditionUpdate(); // cache in other zones
|
||||||
|
|
||||||
Client* leader_client = request.GetLeaderClient();
|
Client* leader_client = request.GetLeaderClient();
|
||||||
|
|
||||||
@ -137,7 +140,6 @@ Expedition* Expedition::TryCreate(
|
|||||||
leader_client, leader.name, Chat::Yellow, EXPEDITION_AVAILABLE, { request.GetExpeditionName() }
|
leader_client, leader.name, Chat::Yellow, EXPEDITION_AVAILABLE, { request.GetExpeditionName() }
|
||||||
);
|
);
|
||||||
|
|
||||||
auto inserted = zone->expedition_cache.emplace(expedition_id, std::move(expedition));
|
|
||||||
return inserted.first->second.get();
|
return inserted.first->second.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user