Aura.Channel.World.CreatureSpawner.OnDisappears C# (CSharp) Method

OnDisappears() private method

Called when an NPC created by this spawner disappears, after it was killed.
private OnDisappears ( Entity entity ) : void
entity Entity
return void
		private void OnDisappears(Entity entity)
		{
			var npc = entity as NPC;
			if (npc == null)
				return;

			lock (_creatures)
				_creatures.Remove(npc);

			var delay = (this.DelayMin >= 0 && this.DelayMax > 0 ? RandomProvider.Get().Next(this.DelayMin, this.DelayMax + 1) : 0);
			if (delay == 0)
				this.SpawnOne();
			else
				Task.Delay(delay).ContinueWith(_ => this.SpawnOne());
		}
	}