using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x02000078 RID: 120
public class AllSounds : MonoBehaviour
{
	// Token: 0x06000BAD RID: 2989 RVA: 0x000E10D4 File Offset: 0x000DF2D4
	public AudioClip PlaySound(string type, int id, int num, string extra)
	{
		if (type == "Human")
		{
			if (id < this.characters.Count && id > -1)
			{
				if (num == 0)
				{
					this.curr = this.characters[id].walk;
				}
				if (num == 1)
				{
					this.curr = this.characters[id].run;
				}
				if (num == 2)
				{
					this.curr = this.characters[id].hit;
				}
				if (num == 3)
				{
					this.curr = this.characters[id].death;
				}
				if (num == 4)
				{
					this.curr = this.characters[id].jump;
				}
				if (num == 6)
				{
					this.curr = this.characters[id].idle;
				}
				if (num == 7)
				{
					this.curr = this.characters[id].hit;
				}
				if (this.curr != null)
				{
					if (this.curr.Count <= 0)
					{
						return null;
					}
					if (num == 0 && id == 0)
					{
						int num2 = 0;
						int num3 = this.curr.Count;
						if (extra.Contains("Guts"))
						{
							num2 = 15;
							num3 = 20;
						}
						else if (extra.Contains("Fabric"))
						{
							num2 = 0;
							num3 = 5;
						}
						else if (extra.Contains("Snow"))
						{
							num2 = 20;
							num3 = 25;
						}
						else if (extra.Contains("Wood"))
						{
							num2 = 10;
							num3 = 15;
						}
						else if (extra.Contains("Grass"))
						{
							num2 = 5;
							num3 = 10;
						}
						else if (extra.Contains("Puddle"))
						{
							num2 = 25;
							num3 = 30;
						}
						else if (extra.Contains("Sand"))
						{
							num2 = 30;
							num3 = 35;
						}
						else if (extra.Contains("Rocks"))
						{
							num2 = 35;
							num3 = 40;
						}
						return this.curr[Random.Range(num2, num3)];
					}
					return this.curr[Random.Range(0, this.curr.Count)];
				}
			}
			this.curr = null;
			return null;
		}
		if (type == "Animal")
		{
			if (num == 0)
			{
				this.curr = this.animals[id].walk;
			}
			if (num == 1)
			{
				this.curr = this.animals[id].run;
			}
			if (num == 2)
			{
				this.curr = this.animals[id].hit;
			}
			if (num == 3)
			{
				this.curr = this.animals[id].death;
			}
			if (num == 4)
			{
				this.curr = this.animals[id].melee;
			}
			if (num == 5)
			{
				this.curr = this.animals[id].range;
			}
			if (num == 6)
			{
				this.curr = this.animals[id].idle;
			}
			if (num == 7)
			{
				this.curr = this.animals[id].heard;
			}
			if (this.curr == null)
			{
				this.curr = null;
				return null;
			}
			if (this.curr.Count > 0)
			{
				return this.curr[Random.Range(0, this.curr.Count)];
			}
			return null;
		}
		else if (type == "Talking")
		{
			if (num == 10)
			{
				this.curr = this.talking[id].happy;
			}
			if (num == 11)
			{
				this.curr = this.talking[id].neutral;
			}
			if (num == 12)
			{
				this.curr = this.talking[id].hostile;
			}
			if (num == 13)
			{
				this.curr = this.talking[id].question;
			}
			if (num == 14)
			{
				this.curr = this.talking[id].exclaim;
			}
			if (num == 15)
			{
				this.curr = this.talking[id].spooked;
			}
			if (this.curr == null)
			{
				this.curr = null;
				return null;
			}
			if (this.curr.Count > 0)
			{
				return this.curr[Random.Range(0, this.curr.Count)];
			}
			return null;
		}
		else
		{
			if (!(type == "Critter"))
			{
				return null;
			}
			if (num == 0)
			{
				this.curr = this.critters[id].idle;
			}
			if (num == 1)
			{
				this.curr = this.critters[id].move;
			}
			if (num == 2)
			{
				this.curr = this.critters[id].death;
			}
			if (this.curr == null)
			{
				this.curr = null;
				return null;
			}
			if (this.curr.Count > 0)
			{
				return this.curr[Random.Range(0, this.curr.Count)];
			}
			return null;
		}
	}

	// Token: 0x040011EB RID: 4587
	public List<SoundSet.CharacterSounds> characters = new List<SoundSet.CharacterSounds>();

	// Token: 0x040011EC RID: 4588
	public List<SoundSet.AnimalSounds> animals = new List<SoundSet.AnimalSounds>();

	// Token: 0x040011ED RID: 4589
	public List<SoundSet.HumanTalking> talking = new List<SoundSet.HumanTalking>();

	// Token: 0x040011EE RID: 4590
	public List<SoundSet.CritterSounds> critters = new List<SoundSet.CritterSounds>();

	// Token: 0x040011EF RID: 4591
	private List<AudioClip> curr;
}
