public static function shadowTimer() { # 1 second over in the Shadowlamb world. self::$sr_timestamp = GWF_Counter::getAndCount('SR4_TIME', self::SECONDS_PER_TICK); # Execute Web Commands // self::shadowTimerWebcommands(); if (defined('SL4_REALS')) { self::shadowTimerRealNPCs(); } # All parties: $partyids = array_keys(self::$parties); shuffle($partyids); # Shuffle which party goes first to have evenly distributed winners in race conditions. foreach ($partyids as $id) { # still there? if (isset(self::$parties[$id])) { if (self::$parties[$id]->getTimestamp() < time() - self::KICK_IDLE_TIMEOUT) { self::removeParty(self::$parties[$id]); } else { self::$parties[$id] instanceof SR_Party; self::$parties[$id]->timer(self::$sr_timestamp); } } } # Next tick in one second pls. Dog_Timer::addTimer(array(__CLASS__, 'shadowTimer'), NULL, self::TICKLEN, false); }