From 892556e26d301a7da7151e2547fda8352254b312 Mon Sep 17 00:00:00 2001 From: hg <4683435+hgtw@users.noreply.github.com> Date: Wed, 17 Jun 2020 18:28:49 -0400 Subject: [PATCH] Fix replay timer assignment to new members Ignore expired state of replay timers when assigning to new members This fixes a regression from a previous change that stopped assigning expired lockouts to new members. Only expired event timers should be ignored for new members. Replay Timers should always be added with a a fresh lockout --- zone/expedition.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/expedition.cpp b/zone/expedition.cpp index d76737ad2..66a015832 100644 --- a/zone/expedition.cpp +++ b/zone/expedition.cpp @@ -810,7 +810,7 @@ void Expedition::DzInviteResponse(Client* add_client, bool accepted, const std:: for (const auto& lockout_iter : m_lockouts) { const ExpeditionLockoutTimer& lockout = lockout_iter.second; - if (!lockout.IsInherited() && !lockout.IsExpired() && + if (!lockout.IsInherited() && !add_client->HasExpeditionLockout(m_expedition_name, lockout.GetEventName())) { // replay timers are optionally added to new members immediately on @@ -823,7 +823,7 @@ void Expedition::DzInviteResponse(Client* add_client, bool accepted, const std:: lockout.GetExpeditionName(), lockout.GetEventName(), lockout.GetDuration()); } } - else + else if (!lockout.IsExpired()) { pending_lockouts.emplace_back(lockout); }