From 75410e8886a76282ca0639d439068437bd0e5ec7 Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Mon, 15 Jun 2020 18:02:07 -0400 Subject: [PATCH] Don't allow expedition re-invite inside dz Live requires characters that quit an expedition to zone out before being re-added. This is probably to avoid exploiting max player requirements by constantly swapping players in and out --- zone/expedition.cpp | 8 +++++++- zone/string_ids.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/zone/expedition.cpp b/zone/expedition.cpp index 040292c82..d76737ad2 100644 --- a/zone/expedition.cpp +++ b/zone/expedition.cpp @@ -673,13 +673,19 @@ void Expedition::SendLeaderMessage( bool Expedition::ProcessAddConflicts(Client* leader_client, Client* add_client, bool swapping) { - if (!add_client) // a null leader_client handled by SendLeaderMessage fallback + if (!add_client) // a null leader_client is handled by SendLeaderMessage fallback { return true; } bool has_conflict = false; + if (m_dynamiczone.IsCurrentZoneDzInstance()) + { + SendLeaderMessage(leader_client, Chat::Red, DZADD_LEAVE_ZONE_FIRST, { add_client->GetName() }); + has_conflict = true; + } + auto expedition_id = add_client->GetExpeditionID(); if (expedition_id) { diff --git a/zone/string_ids.h b/zone/string_ids.h index 40aa13057..88a3f9f3e 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -327,6 +327,7 @@ #define DZADD_NOT_ONLINE 3586 //%1 is not currently online. A player needs to be online to be added to a Dynamic Zone #define DZADD_EXCEED_MAX 3587 //You can not add another player since you currently have the maximum number of players allowed (%1) in this zone. #define DZADD_ALREADY_PART 3588 //You can not add %1 since they are already part of this zone. +#define DZADD_LEAVE_ZONE_FIRST 3589 //You can not add %1 since they first need to leave the zone before being allowed back in. #define DZADD_ALREADY_ASSIGNED 3590 //%1 can not be added to this dynamic zone since they are already assigned to another dynamic zone. #define DZADD_REPLAY_TIMER 3591 //%1 can not be added to this dynamic zone for another %2D:%3H:%4M since they have recently played this zone. #define DZADD_EVENT_TIMER 3592 //%1 can not be added to this dynamic zone since they have recently experienced %2. They must wait for another %3D:%4H:%5M, or until event %2 has occurred.