private void VitalTick(CreatureVital vital) { double tickTime = vital.NextTickTime; if (double.IsNegativeInfinity(tickTime)) { tickTime = vital.RegenRate; } else { tickTime -= WorldManager.PortalYearTicks; } // Set up our next tick ActionChain tickChain = new ActionChain(); tickChain.AddDelayTicks(tickTime); tickChain.AddAction(this, () => VitalTickInternal(vital)); tickChain.EnqueueChain(); }