[Expeditions] Decouple dz updates from expeditions (#1303)

Use internal dz messages to process duration and location changes

Add world DynamicZone class (later this will inherit from a base)

Add FindDynamicZoneByID to get dz from zone and world system caches
This commit is contained in:
hg
2021-03-28 19:14:36 -04:00
committed by GitHub
parent dbb9c1d4f4
commit d9e23a0303
21 changed files with 350 additions and 286 deletions
+1 -10
View File
@@ -161,13 +161,6 @@ public:
void DzQuit(Client* requester);
void DzKickPlayers(Client* requester);
void SetDzCompass(uint32_t zone_id, float x, float y, float z, bool update_db = false);
void SetDzCompass(const std::string& zone_name, float x, float y, float z, bool update_db = false);
void SetDzSafeReturn(uint32_t zone_id, float x, float y, float z, float heading, bool update_db = false);
void SetDzSafeReturn(const std::string& zone_name, float x, float y, float z, float heading, bool update_db = false);
void SetDzSecondsRemaining(uint32_t seconds_remaining);
void SetDzZoneInLocation(float x, float y, float z, float heading, bool update_db = false);
static const int32_t REPLAY_TIMER_ID;
static const int32_t EVENT_TIMER_ID;
@@ -197,7 +190,7 @@ private:
void SendMembersExpireWarning(uint32_t minutes);
void SendNewMemberAddedToZoneMembers(const std::string& added_name);
void SendUpdatesToZoneMembers(bool clear = false, bool message_on_clear = true);
void SendWorldDzLocationUpdate(uint16_t server_opcode, const DynamicZoneLocation& location);
void SendCompassUpdateToZoneMembers();
void SendWorldExpeditionUpdate(uint16_t server_opcode);
void SendWorldAddPlayerInvite(const std::string& inviter_name, const std::string& swap_remove_name,
const std::string& add_name, bool pending = false);
@@ -209,12 +202,10 @@ private:
void SendWorldMemberStatus(uint32_t character_id, ExpeditionMemberStatus status);
void SendWorldMemberSwapped(const std::string& remove_char_name, uint32_t remove_char_id,
const std::string& add_char_name, uint32_t add_char_id);
void SendWorldSetSecondsRemaining(uint32_t seconds_remaining);
void SendWorldSettingChanged(uint16_t server_opcode, bool setting_value);
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 UpdateDzDuration(uint32_t new_duration) { m_dynamiczone.SetUpdatedDuration(new_duration); }
void UpdateMemberStatus(uint32_t update_character_id, ExpeditionMemberStatus status);
ExpeditionMember GetMemberData(uint32_t character_id);