diff --git a/zone/entity.cpp b/zone/entity.cpp index a909fed0c..daa61ef20 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -491,42 +491,33 @@ void EntityList::MobProcess() old_client_count > 0 && zone->GetSecondsBeforeIdle() > 0 ) { - if (!zone->IsIdle()) { - LogInfo( - "Zone will go into an idle state after [{}] second{}.", - zone->GetSecondsBeforeIdle(), - zone->GetSecondsBeforeIdle() != 1 ? "s" : "" - ); - } - + LogInfo( + "Zone will go into an idle state after [{}] second{}.", + zone->GetSecondsBeforeIdle(), + zone->GetSecondsBeforeIdle() != 1 ? "s" : "" + ); mob_settle_timer->Start(zone->GetSecondsBeforeIdle() * 1000); } - old_client_count = numclients; - if (numclients == 0 && mob_settle_timer->Check()) { - if (!zone->IsIdle()) { - LogInfo( - "Zone has gone idle after [{}] second{}.", - zone->GetSecondsBeforeIdle(), - zone->GetSecondsBeforeIdle() != 1 ? "s" : "" - ); - - zone->SetIsIdle(true); - } + LogInfo( + "Zone has gone idle after [{}] second{}.", + zone->GetSecondsBeforeIdle(), + zone->GetSecondsBeforeIdle() != 1 ? "s" : "" + ); + mob_settle_timer->Disable(); } // Disable settle timer if someone zones into empty zone if (numclients > 0 || mob_settle_timer->Check()) { - if (zone->IsIdle()) { - LogInfo("Zone is no longer idle."); - - zone->SetIsIdle(false); + if (mob_settle_timer->Enabled()) { + LogInfo("Zone is no longer scheduled to go idle."); + mob_settle_timer->Disable(); } - - mob_settle_timer->Disable(); } + old_client_count = numclients; + Spawn2* s2 = mob->CastToNPC()->respawn2; // Perform normal mob processing if any of these are true: diff --git a/zone/zone.cpp b/zone/zone.cpp index 561f90311..de3ca2f9a 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -3259,13 +3259,3 @@ void Zone::SetSecondsBeforeIdle(uint32 seconds_before_idle) { Zone::m_seconds_before_idle = seconds_before_idle; } - -bool Zone::IsIdle() const -{ - return m_is_idle; -} - -void Zone::SetIsIdle(bool m_is_idle) -{ - Zone::m_is_idle = m_is_idle; -} diff --git a/zone/zone.h b/zone/zone.h index c5e4755c0..ecd14f7a2 100755 --- a/zone/zone.h +++ b/zone/zone.h @@ -105,8 +105,6 @@ public: AA::Ability *GetAlternateAdvancementAbilityByRank(int rank_id); AA::Rank *GetAlternateAdvancementRank(int rank_id); bool is_zone_time_localized; - bool IsIdle() const; - void SetIsIdle(bool m_is_idle); bool IsIdleWhenEmpty() const; void SetIdleWhenEmpty(bool idle_when_empty); uint32 GetSecondsBeforeIdle() const; @@ -443,7 +441,6 @@ private: uint32 m_last_ucss_update; bool m_idle_when_empty; uint32 m_seconds_before_idle; - bool m_is_idle; GlobalLootManager m_global_loot; LinkedList client_auth_list;