[Expeditions] Track DZ member status in world (#1341)

World now caches and tracks member statuses so it can send them to zones
that request them on startup. Prior to this the cle would be searched in
world for every zone startup caching request, now it's only searched once
when a new expedition is created.

Bulk loading statuses removed since it would only be needed on world
startup now and likely have no clients in the client list anyway.

This also lets world choose non-linkdead members on expedition leader
changes and better detect when a leader change needs to occur
This commit is contained in:
hg
2021-05-10 02:07:19 -04:00
committed by GitHub
parent 26d374d52a
commit 0ce7c11d36
13 changed files with 157 additions and 157 deletions
+2 -3
View File
@@ -128,7 +128,6 @@ public:
private:
static void CacheExpeditions(std::vector<ExpeditionsRepository::ExpeditionWithLeader>&& expeditions);
static void SendWorldGetOnlineMembers(const std::vector<std::pair<uint32_t, uint32_t>>& expedition_character_ids);
static void SendWorldCharacterLockout(uint32_t character_id, const ExpeditionLockoutTimer& lockout, bool remove);
void AddLockout(const ExpeditionLockoutTimer& lockout, bool members_only = false);
@@ -148,8 +147,9 @@ private:
Client* client, const std::string& inviter_name, const std::string& swap_remove_name);
void SendLeaderMessage(Client* leader_client, uint16_t chat_type, uint32_t string_id,
const std::initializer_list<std::string>& args = {});
void SendMemberListToZoneMembers();
void SendMemberStatusToZoneMembers(uint32_t update_character_id, DynamicZoneMemberStatus status);
void SendMembersExpireWarning(uint32_t minutes);
void SendNewMemberAddedToZoneMembers(const std::string& added_name);
void SendUpdatesToZoneMembers(bool clear = false, bool message_on_clear = true);
void SendCompassUpdateToZoneMembers();
void SendWorldExpeditionUpdate(uint16_t server_opcode);
@@ -167,7 +167,6 @@ private:
void SetDynamicZone(DynamicZone&& dz);
void TryAddClient(Client* add_client, const std::string& inviter_name,
const std::string& swap_remove_name, Client* leader_client = nullptr);
void UpdateMemberStatus(uint32_t update_character_id, DynamicZoneMemberStatus status);
std::unique_ptr<EQApplicationPacket> CreateExpireWarningPacket(uint32_t minutes_remaining);
std::unique_ptr<EQApplicationPacket> CreateInfoPacket(bool clear = false);