protected override bool OnProcess() { var curr = Common.Clock; if (curr >= _nextTrigger) { _nextTrigger += THREAD_SPEED; var offset = (curr - _nextTrigger) / Common.MS_PER_SECOND; if (Math.Abs(offset) > TIMER_OFFSET_LIMIT) { _nextTrigger = curr + THREAD_SPEED; } //Run managers foreach (var map in MapManager.ActiveMaps.Values) { if (!map.IsActive) { continue; } foreach (var spawn in map.Spawns) { spawn.SpawnManager_Timer(); } } PetManager.PetManager_Tick(); } return(true); }