Reduce packet updates when expedition member added

This fixes unnecessary packets and compass updates being sent for
invited members and better matches live's packet update pattern

This also fixes duplicate updates being sent to the added member

Live only sends a MemberListName update for members added through a
swap (player count doesn't change). For members added through an
invite it sends expedition info and a full member list update

A full member list update is sent for both cases in this patch. This
is because MemberListName currently always adds members with status
"unknown". This is either due to unknown packet fields or a change
in future clients
This commit is contained in:
hg
2020-10-23 20:49:30 -04:00
parent 074b7096df
commit f506ce9d58
2 changed files with 35 additions and 7 deletions
+2 -1
View File
@@ -181,7 +181,7 @@ private:
void ProcessLockoutDuration(const ExpeditionLockoutTimer& lockout, int seconds, bool members_only = false);
void ProcessLockoutUpdate(const ExpeditionLockoutTimer& lockout, bool remove, bool members_only = false);
void ProcessMakeLeader(Client* old_leader, Client* new_leader, const std::string& new_leader_name, bool is_online);
void ProcessMemberAdded(const std::string& added_char_name, uint32_t added_char_id);
void ProcessMemberAdded(const std::string& added_char_name, uint32_t added_char_id, bool was_swapped = false);
void ProcessMemberRemoved(const std::string& removed_char_name, uint32_t removed_char_id);
void SaveLockouts(ExpeditionRequest& request);
void SaveMembers(ExpeditionRequest& request);
@@ -190,6 +190,7 @@ private:
void SendLeaderMessage(Client* leader_client, uint16_t chat_type, uint32_t string_id,
const std::initializer_list<std::string>& args = {});
void SendMembersExpireWarning(uint32_t minutes);
void SendNewMemberAddedToZoneMembers(const std::string& added_name, bool was_swapped);
void SendUpdatesToZoneMembers(bool clear = false, bool message_on_clear = true);
void SendWorldDzLocationUpdate(uint16_t server_opcode, const DynamicZoneLocation& location);
void SendWorldExpeditionUpdate(uint16_t server_opcode);