diff --git a/zone/client.cpp b/zone/client.cpp index 182fb1b60..6528bb57b 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -4725,6 +4725,12 @@ void Client::IncrementAggroCount(bool raid_target) uint32 newtimer = raid_target ? RuleI(Character, RestRegenRaidTimeToActivate) : RuleI(Character, RestRegenTimeToActivate); + // When our aggro count is 1 here, we are exiting rest state. We need to pause our current timer, if we have time remaining + // We should not actually have to do anything to the Timer object since the AggroCount counter blocks it from being checked + // and will have it's timer changed when we exit combat so let's not do any extra work + if (AggroCount == 1 && rest_timer.GetRemainingTime()) // the Client::rest_timer is never disabled, so don't need to check + m_pp.RestTimer = std::max(1u, rest_timer.GetRemainingTime() / 1000); // I guess round up? + // save the new timer if it's higher m_pp.RestTimer = std::max(m_pp.RestTimer, newtimer); @@ -4734,10 +4740,6 @@ void Client::IncrementAggroCount(bool raid_target) if(AggroCount > 1) return; - // Pause the rest timer, it's possible the new timer is a non-raid timer we're currently ticking down on a raid timer - if (AggroCount == 1) - m_pp.RestTimer = std::max(m_pp.RestTimer, rest_timer.GetRemainingTime() / 1000); - if (ClientVersion() >= EQ::versions::ClientVersion::SoF) { auto outapp = new EQApplicationPacket(OP_RestState, 1); char *Buffer = (char *)outapp->pBuffer;