using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using DarkTonic.MasterAudio;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

// Token: 0x0200009F RID: 159
public class Creation : MonoBehaviour
{
	// Token: 0x06000EAF RID: 3759 RVA: 0x00117A55 File Offset: 0x00115C55
	private void Awake()
	{
	}

	// Token: 0x06000EB0 RID: 3760 RVA: 0x00117A57 File Offset: 0x00115C57
	private void OnDisable()
	{
		this.RecycleCreature();
		this.RecycleModel();
	}

	// Token: 0x06000EB1 RID: 3761 RVA: 0x00117A65 File Offset: 0x00115C65
	private void OnDestroy()
	{
		this.RecycleCreature();
		this.RecycleModel();
	}

	// Token: 0x06000EB2 RID: 3762 RVA: 0x00117A74 File Offset: 0x00115C74
	private void Start()
	{
		Links.x.renderPortraits.ToggleCrossFades(true);
		this.targetAlpha = -1f;
		this.FlipToDomeRT();
		Links.x.hudControl.ChangeHudVisibility(false, true);
		this.canvas.worldCamera = Links.x.menuCamera;
		this.tooltipText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		this.noticeController.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		this.archetypeDescriptionText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		TextMeshProUGUI component = this.nextCharacterButtonController.transform.GetChild(1).gameObject.GetComponent<TextMeshProUGUI>();
		component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		this.controllerSwitchL.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		this.controllerSwitchR.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
		component.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName).ToString() + ">";
		this.tooltip.SetActive(false);
		this.controllerSwitchL.enabled = false;
		this.controllerSwitchR.enabled = false;
		this.animator.Play("CreationStart");
		this.currentScreen = 0;
		this.currentModelIndex = 0;
		this.currentHairModelIndex = 0;
		this.nameInputField.SetActive(true);
		this.tokenConfirm.SetActive(false);
		this.paganPopup.SetActive(false);
		this.portraits[0].gameObject.SetActive(true);
		this.portraits[1].gameObject.SetActive(false);
		this.portraits[2].gameObject.SetActive(false);
		this.portraits[3].gameObject.SetActive(false);
		Links.x.characterSheet.characterCamera.SetActive(true);
		Links.x.characterSheet.characterSpawn.gameObject.SetActive(false);
		Links.x.characterSheet.characterCreationSpawn.gameObject.SetActive(true);
		Links.x.characterSheet.characterCreationDefault.SetActive(true);
		GameObject gameObject = new GameObject("Look At");
		this.lookAt = gameObject.transform;
		this.lookAt.SetParent(Links.x.camera3D.gameObject.transform, true);
		if (this.fromBeginning)
		{
			this.party = Links.x.party;
			this.characterCount = 0;
			this.finishButton.SetActive(false);
		}
		else if (this.justRespec)
		{
			this.party = Links.x.party;
			this.nextCharacterButton.SetActive(false);
			this.nextCharacterButtonController.SetActive(false);
			this.finishButton.SetActive(true);
			this.characterCount = 0;
			this.currentCharacterIndex = this.party.IndexOf(this.respecCharacter);
			Links.x.hudControl.ChangeHudVisibility(false, true);
		}
		else
		{
			this.party = new List<Character>();
			this.party.Add(Links.x.portraitOrder[Links.x.GetPartyCount() - 1]);
			this.nextCharacterButton.SetActive(false);
			this.nextCharacterButtonController.SetActive(false);
			this.finishButton.SetActive(true);
			this.characterCount = 0;
			this.currentCharacterIndex = 0;
			Links.x.hudControl.ChangeHudVisibility(false, true);
		}
		this.ChangeCharacter();
		this.timeSinceCharacterChange = Time.realtimeSinceStartup;
		this.testing = false;
		if (!this.fromBeginning)
		{
			this.testing = false;
		}
		if (!Records.x.editor)
		{
			this.testing = false;
		}
		if (this.testing)
		{
			this.currentArchetype = "Tank";
			this.character.stats.SetMajorsMinors("Strength", "Dexterity", "Aura", "", "", "", false);
			this.majorStat1 = this.character.stats.GetMajorsMinors(0);
			this.majorStat2 = this.character.stats.GetMajorsMinors(1);
			this.minorStat3 = this.character.stats.GetMajorsMinors(2);
			this.character.stats.displayName = "Quez";
			this.input.text = this.character.stats.displayName;
			this.selectedRace = this.character.stats.race;
			this.SetRace(false);
			this.SetCharacterInfo();
			this.currentCharacterIndex = 1;
			this.ChangeCharacter();
			this.currentArchetype = "Archer";
			this.character.stats.SetMajorsMinors("Dexterity", "Agility", "Strength", "", "", "", false);
			this.majorStat1 = this.character.stats.GetMajorsMinors(0);
			this.majorStat2 = this.character.stats.GetMajorsMinors(1);
			this.minorStat3 = this.character.stats.GetMajorsMinors(2);
			this.character.stats.displayName = "Relia";
			this.character.stats.race = "Ameythevian";
			this.selectedRace = this.character.stats.race;
			this.input.text = this.character.stats.displayName;
			this.SetRace(false);
			this.SetCharacterInfo();
			this.currentCharacterIndex = 2;
			this.ChangeCharacter();
			this.currentArchetype = "Summoner";
			this.character.stats.SetMajorsMinors("Sensory", "Dexterity", "Agility", "", "", "", false);
			this.majorStat1 = this.character.stats.GetMajorsMinors(0);
			this.majorStat2 = this.character.stats.GetMajorsMinors(1);
			this.minorStat3 = this.character.stats.GetMajorsMinors(2);
			this.character.stats.displayName = "Isla";
			this.character.stats.race = "Varuchov";
			this.selectedRace = this.character.stats.race;
			this.input.text = this.character.stats.displayName;
			this.SetRace(false);
			this.SetCharacterInfo();
			this.currentCharacterIndex = 3;
			this.ChangeCharacter();
			this.currentArchetype = "Pagan 1";
			this.character.stats.SetMajorsMinors("Pagan", "Strength", "Sensory", "", "", "", false);
			this.majorStat1 = this.character.stats.GetMajorsMinors(0);
			this.majorStat2 = this.character.stats.GetMajorsMinors(1);
			this.minorStat3 = this.character.stats.GetMajorsMinors(2);
			this.character.stats.displayName = "Hannah";
			this.character.stats.race = "Taratorith";
			this.selectedRace = this.character.stats.race;
			this.input.text = this.character.stats.displayName;
			this.skin.value = 1.1f;
			this.SetRace(false);
			this.SetCharacterInfo();
			this.characterCount = 4;
			this.nextCharacterButton.SetActive(false);
			this.finishButton.SetActive(true);
			this.nextCharacterButtonController.SetActive(false);
		}
		Links.x.creation = this;
		Links.x.camera3D.enabled = true;
		if (QualitySettings.antiAliasing == 0)
		{
			Links.x.camera3D.targetTexture = this.domeRT;
		}
		else if (QualitySettings.antiAliasing == 2)
		{
			Links.x.camera3D.targetTexture = this.domeRT2;
		}
		else if (QualitySettings.antiAliasing == 4)
		{
			Links.x.camera3D.targetTexture = this.domeRT4;
		}
		else if (QualitySettings.antiAliasing == 8)
		{
			Links.x.camera3D.targetTexture = this.domeRT8;
		}
		else
		{
			Links.x.camera3D.targetTexture = this.domeRT;
		}
		this.domeCharacterImage.texture = Links.x.camera3D.targetTexture;
		this.domeCharacterImage.enabled = true;
		this.open = true;
		Records.x.SetTypingState(true);
		this.openIndex = 0;
		if (this.fromBeginning)
		{
			Links.x.gaia.SetEnvironmentPlaylist(false, false, false);
		}
		if (Records.x.paused)
		{
			Links.x.gameplay.TogglePause(false);
		}
		this.SetBorder(0);
		Links.x.cameraEffects.ToggleObscurance();
		this.Controllers(Links.x.joy);
	}

	// Token: 0x06000EB3 RID: 3763 RVA: 0x001183C8 File Offset: 0x001165C8
	public void Controllers(bool joystick)
	{
		if (joystick)
		{
			this.SetBorder(1);
			Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.input.gameObject);
			this.tokenMajorStat1.gameObject.GetComponent<Button>().enabled = false;
			this.tokenMajorStat2.gameObject.GetComponent<Button>().enabled = false;
			this.tokenMinorStat3.gameObject.GetComponent<Button>().enabled = false;
			this.tokenMajorSkill4.gameObject.GetComponent<Button>().enabled = false;
			this.tokenMajorSkill5.gameObject.GetComponent<Button>().enabled = false;
			this.tokenMinorSkill6.gameObject.GetComponent<Button>().enabled = false;
			if (this.currentCharacterIndex > 0 && this.fromBeginning)
			{
				this.controllerSwitchL.enabled = true;
				this.controllerSwitchR.enabled = true;
			}
			else
			{
				this.controllerSwitchL.enabled = false;
				this.controllerSwitchR.enabled = false;
			}
			this.controllerSwitchL.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Synergy", Links.x.gameplay.controllerName).ToString() + ">";
			this.controllerSwitchR.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Dodge", Links.x.gameplay.controllerName).ToString() + ">";
			TextMeshProUGUI component = this.nextCharacterButtonController.transform.GetChild(1).gameObject.GetComponent<TextMeshProUGUI>();
			component.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
			component.text = "<sprite=" + Links.x.gameplay.GetControllerSprite("Interact", Links.x.gameplay.controllerName).ToString() + ">";
			if (this.nextCharacterButton.activeSelf)
			{
				this.nextCharacterButton.SetActive(false);
				this.nextCharacterButtonController.SetActive(true);
			}
			this.str.Clear();
			this.str.Append("<voffset=.4em><size=40><sprite=");
			int controllerSprite = Links.x.gameplay.GetControllerSprite("Joystick", Links.x.gameplay.controllerName);
			this.str.Append(controllerSprite);
			this.str.Append("></size></voffset>");
			this.str.Append("Navigate      ");
			this.str.Append("<voffset=.4em><size=40><sprite=");
			int controllerSprite2 = Links.x.gameplay.GetControllerSprite("Right Joystick", Links.x.gameplay.controllerName);
			this.str.Append(controllerSprite2);
			this.str.Append("></size></voffset>");
			this.str.Append("Spin");
			this.tooltipText.text = this.str.ToString();
			this.tooltipText.spriteAsset = Links.x.GetSpriteSheetAsset(Links.x.gameplay.currentSpriteSheetAsset);
			if (this.tooltipCorout != null)
			{
				base.StopCoroutine(this.tooltipCorout);
				this.tooltipCorout = null;
			}
			this.tooltip.SetActive(true);
			Debug.Log("Updating creation controller text " + Links.x.gameplay.controllerName + " " + Links.x.gameplay.currentSpriteSheetAsset.ToString());
			return;
		}
		this.tokenMajorStat1.gameObject.GetComponent<Button>().enabled = true;
		this.tokenMajorStat2.gameObject.GetComponent<Button>().enabled = true;
		this.tokenMinorStat3.gameObject.GetComponent<Button>().enabled = true;
		this.tokenMajorSkill4.gameObject.GetComponent<Button>().enabled = true;
		this.tokenMajorSkill5.gameObject.GetComponent<Button>().enabled = true;
		this.tokenMinorSkill6.gameObject.GetComponent<Button>().enabled = true;
		this.controllerSwitchL.enabled = false;
		this.controllerSwitchR.enabled = false;
		this.nextCharacterButtonController.SetActive(false);
	}

	// Token: 0x06000EB4 RID: 3764 RVA: 0x00118808 File Offset: 0x00116A08
	public void ChangeCharacterFromPortrait(int index)
	{
		if (index == this.currentCharacterIndex)
		{
			return;
		}
		this.timeSinceCharacterChange = Time.realtimeSinceStartup;
		this.dontUpdatePortrait = true;
		if (this.character)
		{
			this.characterName = this.character.stats.GetName();
		}
		this.canUpdateSliders = false;
		this.currentCharacterIndex = index;
		this.character = this.party[this.currentCharacterIndex];
		if (this.character.stats.displayName != "Empty")
		{
			this.characterName = this.character.stats.displayName;
		}
		this.selectedModel = this.character.stats.model;
		this.hairModel = this.character.stats.headModel;
		string text = this.hairModel;
		for (int i = 0; i < this.portraitHovers.Length; i++)
		{
			ColorBlock colors = this.portraitHovers[i].colors;
			Color normalColor = colors.normalColor;
			if (i == this.currentCharacterIndex)
			{
				normalColor.a = 1f;
			}
			else
			{
				normalColor.a = 0.35f;
			}
			colors.normalColor = normalColor;
			this.portraitHovers[i].colors = colors;
		}
		this.selectedRace = this.character.stats.race;
		if (this.character.stats.displayName != "Empty")
		{
			this.input.text = this.character.stats.displayName;
		}
		else
		{
			this.input.text = "";
		}
		this.sex.value = this.character.stats.sex;
		this.hair.value = this.character.stats.hair;
		this.hairColor.value = this.character.stats.hairColor;
		this.currentModelIndex = 0;
		if (this.character.stats.skinTexture == "s1")
		{
			this.skin.value = 0f;
		}
		if (this.character.stats.skinTexture == "s2")
		{
			this.skin.value = 1f;
		}
		if (this.character.stats.skinTexture == "s3")
		{
			this.skin.value = 2f;
		}
		if (this.character.stats.skinTexture == "s4")
		{
			this.skin.value = 3f;
		}
		if (this.character.stats.skinTexture == "s5")
		{
			this.skin.value = 4f;
		}
		if (this.character.stats.hairTexture == "0" || this.character.stats.hairTexture == "")
		{
			this.hairColor.value = 0f;
		}
		if (this.character.stats.hairTexture == "1")
		{
			this.hairColor.value = 1f;
		}
		if (this.character.stats.hairTexture == "2")
		{
			this.hairColor.value = 2f;
		}
		if (this.character.stats.hairTexture == "3")
		{
			this.hairColor.value = 3f;
		}
		if (this.character.stats.hairTexture == "4")
		{
			this.hairColor.value = 4f;
		}
		this.ResetTokenPosition();
		this.majorStat1 = this.character.stats.GetMajorsMinors(0);
		this.majorStat2 = this.character.stats.GetMajorsMinors(1);
		this.minorStat3 = this.character.stats.GetMajorsMinors(2);
		this.majorSkill1 = this.character.stats.GetMajorsMinors(3);
		this.majorSkill2 = this.character.stats.GetMajorsMinors(4);
		this.minorSkill3 = this.character.stats.GetMajorsMinors(5);
		if (this.character.stats.GetChangeArchetype())
		{
			for (int j = 0; j < 8; j++)
			{
				this.archetypeStatus[j] = true;
			}
		}
		else
		{
			for (int k = 0; k < 8; k++)
			{
				this.archetypeStatus[k] = false;
			}
		}
		this.currentArchetype = this.character.stats.archetype;
		for (int l = 0; l < this.archetypes.Length; l++)
		{
			if (this.archetypes[l].gameObject.name == this.currentArchetype)
			{
				this.archetypes[l].color = this.selectedArchetypeColor;
			}
			else
			{
				this.archetypes[l].color = this.normalArchetypeColor;
			}
		}
		this.SetRace(false);
		if (this.justRespec)
		{
			Debug.Log(text);
			int num = this.hairModels.IndexOf(text);
			if (num == -1)
			{
				num = this.hairModelsF.IndexOf(text);
			}
			Debug.Log(num);
			this.hair.value = (float)num;
			this.currentHairModelIndex = Mathf.RoundToInt(this.hair.value);
			this.hairModel = text;
		}
		this.canUpdateSliders = true;
		if (this.respecCharacter)
		{
			this.SetCharacterInfo();
			this.ChangeModel(this.selectedRace, false, false);
		}
		if (Links.x.mk)
		{
			EventSystem.current.SetSelectedGameObject(null);
			return;
		}
		if (Links.x.gameplay.currentEventObject)
		{
			Links.x.hudControl.SetJoyBox(Links.x.gameplay.currentEventObject.GetComponent<UITriggerButton>());
			return;
		}
		EventSystem.current.SetSelectedGameObject(this.raceTogglesToggle[1].gameObject);
	}

	// Token: 0x06000EB5 RID: 3765 RVA: 0x00118E1C File Offset: 0x0011701C
	public void ChangeCharacter()
	{
		this.canUpdateSliders = false;
		if (this.respecCharacter)
		{
			this.character = this.party[this.currentCharacterIndex];
			this.characterName = this.character.stats.GetName();
			if (Links.x.mk)
			{
				EventSystem.current.SetSelectedGameObject(null);
			}
			for (int i = 0; i < this.portraitHovers.Length; i++)
			{
				ColorBlock colors = this.portraitHovers[i].colors;
				Color normalColor = colors.normalColor;
				if (i == this.currentCharacterIndex)
				{
					normalColor.a = 1f;
				}
				else
				{
					normalColor.a = 0.35f;
				}
				colors.normalColor = normalColor;
				this.portraitHovers[i].colors = colors;
			}
			this.portraits[0].gameObject.SetActive(false);
			this.portraits[1].gameObject.SetActive(false);
			this.portraits[2].gameObject.SetActive(false);
			this.portraits[3].gameObject.SetActive(false);
			if (this.currentCharacterIndex == 0)
			{
				this.portraits[0].gameObject.SetActive(true);
			}
			if (this.currentCharacterIndex == 1)
			{
				this.portraits[1].gameObject.SetActive(true);
			}
			if (this.currentCharacterIndex == 2)
			{
				this.portraits[2].gameObject.SetActive(true);
			}
			if (this.currentCharacterIndex == 3)
			{
				this.portraits[3].gameObject.SetActive(true);
			}
			this.currentArchetype = "Create";
			int num = this.currentCharacterIndex;
			this.currentCharacterIndex = -1;
			this.ChangeCharacterFromPortrait(num);
		}
		else
		{
			this.character = this.party[this.currentCharacterIndex];
			this.characterName = "";
			this.selectedModel = this.ameythevianModelsF[0];
			this.hairModel = this.ameythevianHeadsF[0];
			this.currentHairModelIndex = 0;
			this.selectedSkin = this.ameythevianSkinsF[0];
			this.selectedHair = "0";
			int num2 = Random.Range(0, 5);
			if (num2 == 0)
			{
				this.selectedRace = "Pasaaren";
				this.raceTogglesToggle[1].isOn = true;
			}
			else if (num2 == 1)
			{
				this.selectedRace = "Ameythevian";
				this.raceTogglesToggle[0].isOn = true;
			}
			else if (num2 == 2)
			{
				this.selectedRace = "Taratorith";
				this.raceTogglesToggle[2].isOn = true;
			}
			else if (num2 == 3)
			{
				this.selectedRace = "Varuchov";
				this.raceTogglesToggle[3].isOn = true;
			}
			else if (num2 == 4)
			{
				this.selectedRace = "Yeti";
				this.raceTogglesToggle[4].isOn = true;
			}
			this.sexLabel.text = "Sex";
			this.selectedTrait = this.ameythevianRaceTraits[0];
			this.raceTraitTogglesToggle[0].isOn = true;
			this.input.text = "";
			this.majorStat1 = "";
			this.majorStat2 = "";
			this.minorStat3 = "";
			this.majorSkill1 = "";
			this.majorSkill2 = "";
			this.minorSkill3 = "";
			if (Links.x.mk)
			{
				EventSystem.current.SetSelectedGameObject(null);
			}
			for (int j = 0; j < this.portraitHovers.Length; j++)
			{
				ColorBlock colors2 = this.portraitHovers[j].colors;
				Color normalColor2 = colors2.normalColor;
				if (j == this.currentCharacterIndex)
				{
					normalColor2.a = 1f;
				}
				else
				{
					normalColor2.a = 0.35f;
				}
				colors2.normalColor = normalColor2;
				this.portraitHovers[j].colors = colors2;
			}
			if (this.currentCharacterIndex == 1)
			{
				this.portraits[1].gameObject.SetActive(true);
			}
			if (this.currentCharacterIndex == 2)
			{
				this.portraits[2].gameObject.SetActive(true);
			}
			if (this.currentCharacterIndex == 3)
			{
				this.portraits[3].gameObject.SetActive(true);
			}
			this.currentArchetype = "Create";
			for (int k = 0; k < this.archetypes.Length; k++)
			{
				if (this.archetypes[k].gameObject.name == this.currentArchetype)
				{
					this.archetypes[k].color = this.selectedArchetypeColor;
				}
				else
				{
					this.archetypes[k].color = this.normalArchetypeColor;
				}
			}
			this.SkillsFromArchetypes(false, 0);
			this.SetRace(true);
			this.sex.value = Random.Range(0f, 1f);
			this.currentSex = this.sex.value;
			this.hair.value = (float)Random.Range(0, 5);
			this.currentHairModelIndex = Mathf.RoundToInt(this.hair.value);
			this.skin.value = (float)Random.Range(0, 5);
			this.currentSkinIndex = Mathf.RoundToInt(this.skin.value);
			this.hairColor.value = (float)Random.Range(0, 5);
			this.currentHairColorIndex = Mathf.RoundToInt(this.hairColor.value);
			this.canUpdateSliders = true;
			this.HairUpdated();
			this.SkinUpdated();
			this.HairColorUpdated();
			this.SexUpdated();
		}
		if (Links.x.mk)
		{
			EventSystem.current.SetSelectedGameObject(null);
			return;
		}
		if (Links.x.gameplay.currentEventObject)
		{
			Links.x.hudControl.SetJoyBox(Links.x.gameplay.currentEventObject.GetComponent<UITriggerButton>());
			return;
		}
		EventSystem.current.SetSelectedGameObject(this.raceTogglesToggle[1].gameObject);
	}

	// Token: 0x06000EB6 RID: 3766 RVA: 0x001193F8 File Offset: 0x001175F8
	public void SetRace(bool fromToggles)
	{
		if (!fromToggles)
		{
			this.selectedRace = this.character.stats.race;
			if (this.selectedRace == "Ameythevian")
			{
				this.raceTogglesToggle[0].isOn = true;
			}
			if (this.selectedRace == "Taratorith")
			{
				this.raceTogglesToggle[2].isOn = true;
			}
			if (this.selectedRace == "Varuchov")
			{
				this.raceTogglesToggle[3].isOn = true;
			}
			if (this.selectedRace == "Pasaaren")
			{
				this.raceTogglesToggle[1].isOn = true;
			}
			if (this.selectedRace == "Yeti")
			{
				this.raceTogglesToggle[4].isOn = true;
			}
		}
		else
		{
			this.currentModelIndex = 0;
			this.currentHairModelIndex = 0;
			this.hair.value = 0f;
			this.skin.value = 0f;
			this.hairColor.value = 0f;
		}
		if (this.selectedRace == "Ameythevian")
		{
			this.raceTraitText[0].text = this.ameythevianRaceTraits[0];
			this.raceTraitText[1].text = this.ameythevianRaceTraits[1];
			this.raceTraitText[2].text = this.ameythevianRaceTraits[2];
			this.raceTraitText[3].text = this.ameythevianRaceTraits[3];
			this.raceTraitText[4].text = this.ameythevianRaceTraits[4];
			this.raceTraitText[5].text = this.ameythevianRaceTraits[5];
			this.raceTraitText[6].text = this.ameythevianRaceTraits[6];
			this.raceTraitToggles[5].SetActive(true);
			this.raceTraitToggles[6].SetActive(true);
			if (fromToggles)
			{
				this.selectedTrait = this.ameythevianRaceTraits[0];
			}
			this.currentRaceTraitList = this.ameythevianRaceTraits;
			this.models = this.ameythevianModels;
			this.modelsF = this.ameythevianModelsF;
			this.hairModels = this.ameythevianHeads;
			this.hairModelsF = this.ameythevianHeadsF;
			this.skins = this.ameythevianSkins;
			this.skinsF = this.ameythevianSkinsF;
		}
		if (this.selectedRace == "Varuchov")
		{
			this.raceTraitText[0].text = this.varuchovRaceTraits[0];
			this.raceTraitText[1].text = this.varuchovRaceTraits[1];
			this.raceTraitText[2].text = this.varuchovRaceTraits[2];
			this.raceTraitText[3].text = this.varuchovRaceTraits[3];
			this.raceTraitText[4].text = this.varuchovRaceTraits[4];
			this.raceTraitText[5].text = this.varuchovRaceTraits[5];
			this.raceTraitToggles[5].SetActive(true);
			this.raceTraitToggles[6].SetActive(false);
			if (fromToggles)
			{
				this.selectedTrait = this.varuchovRaceTraits[0];
			}
			this.currentRaceTraitList = this.varuchovRaceTraits;
			this.models = this.varuchovModels;
			this.modelsF = this.varuchovModelsF;
			this.hairModels = this.varuchovHeads;
			this.hairModelsF = this.varuchovHeadsF;
			this.skins = this.varuchovSkins;
			this.skinsF = this.varuchovSkinsF;
		}
		if (this.selectedRace == "Pasaaren")
		{
			this.raceTraitText[0].text = this.pasaarenRaceTraits[0];
			this.raceTraitText[1].text = this.pasaarenRaceTraits[1];
			this.raceTraitText[2].text = this.pasaarenRaceTraits[2];
			this.raceTraitText[3].text = this.pasaarenRaceTraits[3];
			this.raceTraitText[4].text = this.pasaarenRaceTraits[4];
			this.raceTraitText[5].text = this.pasaarenRaceTraits[5];
			this.raceTraitText[6].text = this.pasaarenRaceTraits[6];
			this.raceTraitToggles[5].SetActive(true);
			this.raceTraitToggles[6].SetActive(true);
			if (fromToggles)
			{
				this.selectedTrait = this.pasaarenRaceTraits[0];
			}
			this.currentRaceTraitList = this.pasaarenRaceTraits;
			this.models = this.pasaarenModels;
			this.modelsF = this.pasaarenModelsF;
			this.hairModels = this.pasaarenHeads;
			this.hairModelsF = this.pasaarenHeadsF;
			this.skins = this.pasaarenSkins;
			this.skinsF = this.pasaarenSkinsF;
		}
		if (this.selectedRace == "Taratorith")
		{
			this.raceTraitText[0].text = this.taratorithRaceTraits[0];
			this.raceTraitText[1].text = this.taratorithRaceTraits[1];
			this.raceTraitText[2].text = this.taratorithRaceTraits[2];
			this.raceTraitText[3].text = this.taratorithRaceTraits[3];
			this.raceTraitText[4].text = this.taratorithRaceTraits[4];
			this.raceTraitText[5].text = this.taratorithRaceTraits[5];
			this.raceTraitToggles[5].SetActive(true);
			this.raceTraitToggles[6].SetActive(false);
			if (fromToggles)
			{
				this.selectedTrait = this.taratorithRaceTraits[0];
			}
			this.currentRaceTraitList = this.taratorithRaceTraits;
			this.models = this.taratorithModels;
			this.modelsF = this.taratorithModelsF;
			this.hairModels = this.taratorithHeads;
			this.hairModelsF = this.taratorithHeadsF;
			this.skins = this.taratorithSkins;
			this.skinsF = this.taratorithSkinsF;
		}
		if (this.selectedRace == "Yeti")
		{
			this.raceTraitText[0].text = this.yetiRaceTraits[0];
			this.raceTraitText[1].text = this.yetiRaceTraits[1];
			this.raceTraitText[2].text = this.yetiRaceTraits[2];
			this.raceTraitText[3].text = this.yetiRaceTraits[3];
			this.raceTraitText[4].text = this.yetiRaceTraits[4];
			this.raceTraitToggles[5].SetActive(true);
			this.raceTraitToggles[6].SetActive(true);
			if (fromToggles)
			{
				this.selectedTrait = this.yetiRaceTraits[0];
			}
			this.currentRaceTraitList = this.yetiRaceTraits;
			this.models = this.yetiModels;
			this.modelsF = this.yetiModels;
			this.hairModels = this.yetiHeads;
			this.hairModelsF = this.yetiHeads;
			this.skins = this.yetiSkins;
			this.skinsF = this.yetiSkins;
		}
		if (this.selectedRace == "Yeti")
		{
			this.sexLabel.text = "Body";
		}
		else
		{
			this.sexLabel.text = "Sex";
		}
		if (fromToggles)
		{
			this.raceTraitTogglesToggle[0].isOn = true;
		}
		else
		{
			bool flag = false;
			for (int i = 0; i < this.currentRaceTraitList.Length; i++)
			{
				if (this.character.stats.familyBackground == this.currentRaceTraitList[i])
				{
					this.raceTraitTogglesToggle[i].isOn = true;
					this.selectedTrait = this.currentRaceTraitList[i];
				}
			}
			if (!flag)
			{
				this.raceTraitTogglesToggle[0].isOn = true;
				this.selectedTrait = this.currentRaceTraitList[0];
			}
			if (this.sex.value < 0.5f)
			{
				for (int j = 0; j < this.skinsF.Count; j++)
				{
					if (this.character.stats.skinTexture == this.skinsF[j])
					{
						this.selectedSkin = this.skinsF[j];
					}
				}
			}
			else
			{
				for (int k = 0; k < this.skins.Count; k++)
				{
					if (this.character.stats.skinTexture == this.skins[k])
					{
						this.selectedSkin = this.skinsF[k];
					}
				}
			}
			if (this.character.stats.hairTexture == "" || this.character.stats.hairTexture == "0")
			{
				this.selectedHair = "0";
			}
			if (this.character.stats.hairTexture == "1")
			{
				this.selectedHair = "1";
			}
			if (this.character.stats.hairTexture == "2")
			{
				this.selectedHair = "2";
			}
			if (this.character.stats.hairTexture == "3")
			{
				this.selectedHair = "3";
			}
			if (this.character.stats.hairTexture == "4")
			{
				this.selectedHair = "4";
			}
		}
		for (int l = 0; l < this.currentRaceTraitList.Length; l++)
		{
			this.raceTraitToggles[l].name = this.selectedRace + "_" + this.raceTraitText[l].text;
		}
		this.SetMaximums();
		if (!fromToggles)
		{
			float num = (float)this.hairModels.Count;
			if (this.sex.value < 0.5f)
			{
				num = (float)this.hairModelsF.Count;
			}
			float num2 = 1f / num;
			for (int m = 0; m < (int)num; m++)
			{
				if (this.hair.value >= (float)m * num2 && (this.hair.value < (float)(m + 1) * num2 || (m == (int)(num - 1f) && this.hair.value <= (float)(m + 1) * num2)))
				{
					this.currentHairModelIndex = m;
				}
			}
			this.currentHairModelIndex = Mathf.RoundToInt(this.hair.value);
		}
		this.ChangeModel(this.selectedRace, false, false);
		this.SetCharacterInfo();
	}

	// Token: 0x06000EB7 RID: 3767 RVA: 0x00119EA0 File Offset: 0x001180A0
	private void SetMaximums()
	{
		if (this.sex.value < 0.5f)
		{
			this.hair.maxValue = (float)(this.hairModelsF.Count - 1);
			return;
		}
		this.hair.maxValue = (float)(this.hairModels.Count - 1);
	}

	// Token: 0x06000EB8 RID: 3768 RVA: 0x00119EF4 File Offset: 0x001180F4
	public void SexUpdated()
	{
		if (!this.canUpdateSliders || !this.body)
		{
			return;
		}
		if (this.sex.value < 0.5f && this.models.Contains(this.body.model))
		{
			this.ChangeModel(this.selectedRace, false, true);
		}
		if (this.sex.value >= 0.5f && this.modelsF.Contains(this.body.model))
		{
			this.ChangeModel(this.selectedRace, false, true);
		}
		this.currentSex = this.sex.value;
		this.SetCharacterInfo();
		if (this.character)
		{
			this.character.stats.sex = this.sex.value;
			this.character.body.SetSexScale(this.sex.value);
			if (this.body)
			{
				this.body.SetSexScale(this.sex.value);
			}
		}
	}

	// Token: 0x06000EB9 RID: 3769 RVA: 0x0011A004 File Offset: 0x00118204
	public void HairUpdated()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.hairModels != null)
		{
			int num = this.currentHairModelIndex;
			float num2 = (float)this.hairModels.Count;
			if (this.sex.value < 0.5f)
			{
				num2 = (float)this.hairModelsF.Count;
			}
			float num3 = 1f / num2;
			for (int i = 0; i < (int)num2; i++)
			{
				if (this.hair.value >= (float)i * num3 && (this.hair.value < (float)(i + 1) * num3 || (i == (int)(num2 - 1f) && this.hair.value <= (float)(i + 1) * num3)))
				{
					this.currentHairModelIndex = i;
				}
			}
			this.currentHairModelIndex = Mathf.RoundToInt(this.hair.value);
			if (this.currentHairModelIndex < num)
			{
				this.PreviousModel();
			}
			else if (this.currentHairModelIndex > num)
			{
				this.NextModel();
			}
		}
		if (this.character)
		{
			this.character.stats.hair = this.hair.value;
		}
	}

	// Token: 0x06000EBA RID: 3770 RVA: 0x0011A114 File Offset: 0x00118314
	public void SkinUpdated()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.skins != null)
		{
			int num = this.currentSkinIndex;
			this.currentSkinIndex = Mathf.RoundToInt(this.skin.value);
			this.currentSkin = this.skin.value;
			if (this.currentSkinIndex < num)
			{
				this.PreviousSkin();
			}
			else if (this.currentSkinIndex > num)
			{
				this.NextSkin();
			}
		}
		if (this.character)
		{
			this.character.stats.skin = this.skin.value;
			if (this.currentSkinIndex == 0)
			{
				this.character.stats.skinTexture = "s1";
			}
			if (this.currentSkinIndex == 1)
			{
				this.character.stats.skinTexture = "s2";
			}
			if (this.currentSkinIndex == 2)
			{
				this.character.stats.skinTexture = "s3";
			}
			if (this.currentSkinIndex == 3)
			{
				this.character.stats.skinTexture = "s4";
			}
			if (this.currentSkinIndex == 4)
			{
				this.character.stats.skinTexture = "s5";
			}
		}
	}

	// Token: 0x06000EBB RID: 3771 RVA: 0x0011A240 File Offset: 0x00118440
	public void HairColorUpdated()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		string text = this.selectedHair;
		this.currentHairColorIndex = Mathf.RoundToInt(this.hairColor.value);
		if (this.currentHairColorIndex == 0)
		{
			this.selectedHair = "0";
		}
		if (this.currentHairColorIndex == 1)
		{
			this.selectedHair = "1";
		}
		if (this.currentHairColorIndex == 2)
		{
			this.selectedHair = "2";
		}
		if (this.currentHairColorIndex == 3)
		{
			this.selectedHair = "3";
		}
		if (this.currentHairColorIndex == 4)
		{
			this.selectedHair = "4";
		}
		if (this.character)
		{
			this.character.stats.hairColor = (float)this.currentHairColorIndex;
			if (this.currentHairColorIndex == 0)
			{
				this.character.stats.hairTexture = "0";
			}
			if (this.currentHairColorIndex == 1)
			{
				this.character.stats.hairTexture = "1";
			}
			if (this.currentHairColorIndex == 2)
			{
				this.character.stats.hairTexture = "2";
			}
			if (this.currentHairColorIndex == 3)
			{
				this.character.stats.hairTexture = "3";
			}
			if (this.currentHairColorIndex == 4)
			{
				this.character.stats.hairTexture = "4";
			}
		}
		if (text != this.selectedHair)
		{
			this.SetCharacterInfo();
			this.ChangeModel(this.selectedRace, false, false);
		}
	}

	// Token: 0x06000EBC RID: 3772 RVA: 0x0011A3B4 File Offset: 0x001185B4
	public void InputChanged()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		this.characterName = this.input.text;
		if (this.character)
		{
			this.character.stats.displayName = this.characterName;
		}
		this.SetCharacterInfo();
	}

	// Token: 0x06000EBD RID: 3773 RVA: 0x0011A404 File Offset: 0x00118604
	public void NextModel()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.sex.value < 0.5f)
		{
			if (this.currentModelIndex >= this.modelsF.Count)
			{
				this.currentModelIndex = 0;
			}
		}
		else if (this.currentModelIndex >= this.models.Count)
		{
			this.currentModelIndex = 0;
		}
		this.SetCharacterInfo();
		this.ChangeModel(this.selectedRace, false, false);
	}

	// Token: 0x06000EBE RID: 3774 RVA: 0x0011A478 File Offset: 0x00118678
	public void PreviousModel()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.sex.value < 0.5f)
		{
			if (this.currentModelIndex < 0)
			{
				this.currentModelIndex = this.modelsF.Count - 1;
			}
		}
		else if (this.currentModelIndex < 0)
		{
			this.currentModelIndex = this.models.Count - 1;
		}
		this.SetCharacterInfo();
		this.ChangeModel(this.selectedRace, false, false);
	}

	// Token: 0x06000EBF RID: 3775 RVA: 0x0011A4F0 File Offset: 0x001186F0
	public void NextSkin()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.sex.value < 0.5f)
		{
			if (this.currentSkinIndex >= this.skinsF.Count)
			{
				this.currentSkinIndex = 0;
			}
		}
		else if (this.currentSkinIndex >= this.skins.Count)
		{
			this.currentSkinIndex = 0;
		}
		this.SetCharacterInfo();
		this.ChangeSkin();
	}

	// Token: 0x06000EC0 RID: 3776 RVA: 0x0011A564 File Offset: 0x00118764
	public void PreviousSkin()
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		if (this.sex.value < 0.5f)
		{
			if (this.currentSkinIndex < 0)
			{
				this.currentSkinIndex = this.skinsF.Count - 1;
			}
		}
		else if (this.currentSkinIndex < 0)
		{
			this.currentSkinIndex = this.skins.Count - 1;
		}
		this.SetCharacterInfo();
		this.ChangeSkin();
	}

	// Token: 0x06000EC1 RID: 3777 RVA: 0x0011A5D4 File Offset: 0x001187D4
	public void ChangeSkin()
	{
		if (this.sex.value < 0.5f)
		{
			this.selectedSkin = this.skinsF[this.currentSkinIndex];
		}
		else
		{
			this.selectedSkin = this.skins[this.currentSkinIndex];
		}
		this.character.stats.skinTexture = this.selectedSkin;
		if (this.canUpdateSliders)
		{
			this.ChangeModel(this.selectedRace, false, false);
		}
	}

	// Token: 0x06000EC2 RID: 3778 RVA: 0x0011A650 File Offset: 0x00118850
	public void ChangeModel(string race, bool fromHover, bool always)
	{
		Quaternion quaternion = Quaternion.Euler(new Vector3(0f, 200f, 0f));
		float num = 0f;
		string text = this.selectedModel;
		if (fromHover && this.currentHover == null)
		{
			return;
		}
		bool flag = false;
		bool flag2 = false;
		if (fromHover)
		{
			string name = this.currentHover.name;
			bool flag3 = false;
			if (name == "Crimscale" || name == "Robes" || name == "Pearl" || name == "Stonewood")
			{
				flag3 = true;
			}
			if (race != "Yeti" && flag3)
			{
				if (name == "Crimscale")
				{
					if (this.sex.value < 0.5f)
					{
						text = this.armorsF[1];
					}
					else
					{
						text = this.armors[1];
					}
				}
				if (name == "Robes")
				{
					if (this.sex.value < 0.5f)
					{
						text = this.armorsF[0];
					}
					else
					{
						text = this.armors[0];
					}
				}
				if (name == "Pearl")
				{
					if (this.sex.value < 0.5f)
					{
						text = this.armorsF[2];
					}
					else
					{
						text = this.armors[2];
					}
				}
				if (name == "Stonewood")
				{
					if (this.sex.value < 0.5f)
					{
						text = this.armorsF[3];
					}
					else
					{
						text = this.armors[3];
					}
				}
			}
			if (race == "Yeti")
			{
				text = this.yetiModels[this.currentModelIndex];
				if (flag3)
				{
					if (name == "Crimscale")
					{
						text = this.yetiArmors[1];
					}
					if (name == "Robes")
					{
						text = this.yetiArmors[0];
					}
					if (name == "Pearl")
					{
						text = this.yetiArmors[2];
					}
					if (name == "Stonewood")
					{
						text = this.yetiArmors[3];
					}
				}
			}
		}
		else
		{
			if (this.sex.value < 0.5f)
			{
				this.selectedModel = this.modelsF[this.currentModelIndex];
				this.hairModel = this.hairModelsF[this.currentHairModelIndex];
			}
			else
			{
				this.selectedModel = this.models[this.currentModelIndex];
				this.hairModel = this.hairModels[this.currentHairModelIndex];
			}
			text = this.selectedModel;
		}
		if (!this.currentModel || !this.body || always)
		{
			flag = true;
		}
		else if (this.body.model != text)
		{
			flag = true;
		}
		if (this.currentHairColorIndex == 0 && this.selectedHair != "0")
		{
			flag = true;
		}
		if (this.currentHairColorIndex == 1 && this.selectedHair != "1")
		{
			flag = true;
		}
		if (this.currentHairColorIndex == 2 && this.selectedHair != "2")
		{
			flag = true;
		}
		if (this.currentHairColorIndex == 3 && this.selectedHair != "3")
		{
			flag = true;
		}
		if (this.currentHairColorIndex == 4 && this.selectedHair != "4")
		{
			flag = true;
		}
		string text2 = this.yetiHeads[0];
		if (fromHover)
		{
			if (race == "Pasaaren")
			{
				if (this.sex.value < 0.5f)
				{
					text2 = this.pasaarenHeadsF[0];
				}
				else
				{
					text2 = this.pasaarenHeads[0];
				}
			}
			else if (race == "Varuchov")
			{
				if (this.sex.value < 0.5f)
				{
					text2 = this.varuchovHeadsF[0];
				}
				else
				{
					text2 = this.varuchovHeads[0];
				}
			}
			else if (race == "Taratorith")
			{
				if (this.sex.value < 0.5f)
				{
					text2 = this.taratorithHeadsF[0];
				}
				else
				{
					text2 = this.taratorithHeads[0];
				}
			}
			else if (race == "Ameythevian")
			{
				if (this.sex.value < 0.5f)
				{
					text2 = this.ameythevianHeadsF[0];
				}
				else
				{
					text2 = this.ameythevianHeads[0];
				}
			}
		}
		if (this.body && !flag)
		{
			if ((fromHover && text2 != this.body.headModel) || (!fromHover && this.hairModel != this.body.headModel))
			{
				flag2 = true;
			}
		}
		else
		{
			flag2 = true;
		}
		string text3 = "_Volling_Unarmed";
		if (race == "Pasaaren")
		{
			text3 = "_Volling_Unarmed";
		}
		else if (race == "Varuchov")
		{
			text3 = "_Volling_Unarmed";
		}
		else if (race == "Taratorith")
		{
			text3 = "_Volling_Unarmed";
		}
		else if (race == "Ameythevian")
		{
			text3 = "_Volling_Unarmed";
		}
		else if (race == "Yeti")
		{
			text3 = "_VollingYeti_Unarmed";
		}
		if (!fromHover)
		{
			this.character.stats.headModel = this.hairModel;
			this.character.stats.model = text;
		}
		if (flag)
		{
			if (this.currentModel != null)
			{
				num = this.body.anim.GetCurrentAnimatorStateInfo(0).normalizedTime;
				quaternion = this.body.gameObject.transform.rotation;
				Links.x.archives.RecycleBody(this.currentModel, this.body.model, base.gameObject.name);
				this.currentModel = null;
			}
			Links.x.cameraCrossfade.StartCrossFade();
			this.currentModel = Links.x.archives.InstantiateBody(text, Links.x.characterSheet.characterCreationSpawn.GetChild(0));
			this.body = this.currentModel.GetComponent<Body>();
			this.body.Reset();
			this.currentModel.transform.localPosition = Vector3.zero;
			this.currentModel.transform.rotation = quaternion;
			this.body.model = text;
			this.body.name = text;
			this.body.inMenu = true;
			AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(text3);
			if (!this.body.anim)
			{
				this.body.anim = this.body.gameObject.GetComponent<Animator>();
			}
			this.body.anim.runtimeAnimatorController = overrideController;
			if (this.body)
			{
				this.body.anim.Rebind();
				this.body.anim.Update(0f);
			}
		}
		if (flag2 || flag)
		{
			Links.x.cameraCrossfade.StartCrossFade();
			if (fromHover)
			{
				this.body.SetupHead(this.hairModel);
			}
			else
			{
				this.body.SetupHead(this.hairModel);
			}
			this.bodyTime = Time.realtimeSinceStartup;
		}
		this.body.GatherRenderers(true);
		this.body.specID = 1;
		this.body.SetupTextures(race, this.sex.value, null, this.selectedSkin, this.selectedHair, false);
		if (this.body && this.body.headAnim)
		{
			this.body.headAnim.emotion = "";
			this.body.headAnim.PlayAnimation(FaceAnimations.AnimationNames.Blink);
		}
		if (flag)
		{
			this.body.anim.Play("Idle", -1, num + 0.01f);
		}
		if (fromHover)
		{
			string name2 = this.currentHover.name;
			if (this.CanAddWeapon(name2))
			{
				if (name2 == "Short Sword")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("SwordPas"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Long Sword")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("GreatSwordTara"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Scepter")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("Scepter1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Whip")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("Whip1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Ax")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("AxTara"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Pole")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("SpearPas"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Slings")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("Blowgun1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Bow")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("Bow1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Hand-To-Hand")
				{
					this.body.CreateMenuItems(1, 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (name2 == "Multi-Hand")
				{
					if (race == "Yeti")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("Scepter1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("Scepter1"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 1, null);
					}
					else
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("DaggerTara"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("DaggerTara"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 1, null);
					}
				}
				else if (name2 == "Elixirs")
				{
					this.body.CreateMenuItems(Links.x.library.GetInvRowID("Elixirs"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 0, null);
				}
				else if (!(name2 == "Bindings") && !(name2 == "Fauna") && !(name2 == "Vines") && !(name2 == "Spores"))
				{
					if (name2 == "Small Shield")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("ShieldAmey"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 1, null);
					}
					else if (name2 == "Large Shield")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("ShieldLargeAmey"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f), 1, null);
					}
					else if (name2 == "Flute")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("BasicFlute"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 7, null);
					}
					else if (name2 == "Horn")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("BasicHorn"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 7, null);
					}
					else if (name2 == "Drum")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("BasicFlute"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 7, null);
					}
					else if (name2 == "Shepard Pipe")
					{
						this.body.CreateMenuItems(Links.x.library.GetInvRowID("BasicPipe"), 1, Vector3.zero, Vector3.zero, new Vector4(100f, 100f, 0f, 0f), 7, null);
					}
				}
				if (race == "Yeti")
				{
					if (name2 == "Long Sword")
					{
						text3 = "_VollingYeti_SingleHandWield";
					}
					else if (name2 == "Pole")
					{
						text3 = "_VollingYeti_Spear";
					}
					else if (name2 == "Scepter" || name2 == "Sceptor" || name2 == "Ax")
					{
						text3 = "_VollingYeti_SingleHandWield";
					}
					else if (name2 == "Multi-Hand")
					{
						text3 = "_VollingYeti_SpearDualWield";
					}
					else if (name2.Contains("Shield"))
					{
						text3 = "_VollingYeti_Shield_SwordScepter";
					}
					else
					{
						text3 = "_VollingYeti_Unarmed";
					}
				}
				else if (name2 == "Whip")
				{
					text3 = "_Volling_FlailWhip";
				}
				else if (name2 == "Short Sword")
				{
					text3 = "_Volling_Shortsword";
				}
				else if (name2 == "Long Sword")
				{
					text3 = "_Volling_GreatSword";
				}
				else if (name2 == "Elixirs")
				{
					text3 = "_Volling_ElyxerBag";
				}
				else if (name2 == "Bow")
				{
					text3 = "_Volling_Bow";
				}
				else if (name2.Contains("Slings"))
				{
					text3 = "_Volling_Sling";
				}
				else if (name2 == "Pole")
				{
					text3 = "_Volling_PoleSpear";
				}
				else if (name2 == "Ax")
				{
					text3 = "_Volling_Shortsword";
				}
				else if (name2 == "Scepter" || name2 == "Scepter")
				{
					text3 = "_Volling_Scepter";
				}
				else if (name2 == "Multi-Hand")
				{
					text3 = "_Volling_Multihand";
				}
				else if (name2.Contains("Shield"))
				{
					text3 = "_Volling_Shield_Blades";
				}
				else
				{
					text3 = "_Volling_Unarmed";
				}
				AnimatorOverrideController overrideController2 = Links.x.archives.GetOverrideController(text3);
				if (!this.body.anim)
				{
					this.body.anim = this.body.gameObject.GetComponent<Animator>();
				}
				this.body.anim.runtimeAnimatorController = overrideController2;
				this.body.anim.enabled = false;
				this.body.anim.enabled = true;
				if (this.body)
				{
					this.body.anim.Rebind();
					this.body.anim.Update(0f);
				}
				Links.x.cameraCrossfade.StartCrossFade();
			}
			else
			{
				if (race == "Yeti")
				{
					text3 = "_VollingYeti_Unarmed";
				}
				else
				{
					text3 = "_Volling_Unarmed";
				}
				AnimatorOverrideController overrideController3 = Links.x.archives.GetOverrideController(text3);
				if (!this.body.anim)
				{
					this.body.anim = this.body.gameObject.GetComponent<Animator>();
				}
				this.body.anim.runtimeAnimatorController = overrideController3;
				this.body.anim.enabled = false;
				this.body.anim.enabled = true;
				if (this.body)
				{
					this.body.anim.Rebind();
					this.body.anim.Update(0f);
				}
			}
		}
		if (!fromHover && !this.dontUpdatePortrait)
		{
			Links.x.fellowship.AddPortraitChange(this.character);
			Links.x.fellowship.AddHudPortraitChange(this.character);
		}
		this.dontUpdatePortrait = false;
	}

	// Token: 0x06000EC3 RID: 3779 RVA: 0x0011B8E8 File Offset: 0x00119AE8
	public void PlayFaceAnimation(FaceAnimations.AnimationNames faceAnimName)
	{
		if (!this.body)
		{
			return;
		}
		if (this.body.headAnim)
		{
			this.body.headAnim.PlayAnimation(faceAnimName);
		}
	}

	// Token: 0x06000EC4 RID: 3780 RVA: 0x0011B91C File Offset: 0x00119B1C
	private void RecycleCreature()
	{
		if (this.currentCreatureModel && this.body)
		{
			Links.x.archives.RecycleBody(this.currentCreatureModel, this.currentCreatureModel.GetComponent<Body>().model, base.gameObject.name);
			this.currentCreatureModel = null;
		}
	}

	// Token: 0x06000EC5 RID: 3781 RVA: 0x0011B97C File Offset: 0x00119B7C
	private void RecycleModel()
	{
		if (this.body)
		{
			Links.x.archives.RecycleBody(this.body.gameObject, this.body.model, base.gameObject.name);
			this.body = null;
		}
	}

	// Token: 0x06000EC6 RID: 3782 RVA: 0x0011B9D0 File Offset: 0x00119BD0
	public void InstantiateCreature(string type)
	{
		this.RecycleCreature();
		string text = "Bakka";
		if (type == "Fish")
		{
			text = "Insectoo";
		}
		if (type == "Shroom")
		{
			text = "Shroomer";
		}
		this.currentCreatureModel = Links.x.archives.InstantiateBody(text, Links.x.characterSheet.characterCreationAnimalSpawn);
		this.creatureBody = this.currentCreatureModel.GetComponent<Body>();
		this.creatureBody.Reset();
		this.currentCreatureModel.transform.localPosition = Vector3.zero;
		this.currentCreatureModel.transform.localRotation = Quaternion.Euler(new Vector3(0f, 0f, 0f));
		this.creatureBody.model = text;
		this.creatureBody.name = text;
		string text2 = "_Bakka_Unarmed";
		if (type == "Fish")
		{
			text2 = "_Insectoo_Unarmed";
		}
		if (type == "Shroom")
		{
			text2 = "_Shroomer_Unarmed";
		}
		AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(text2);
		if (!this.creatureBody.anim)
		{
			this.creatureBody.anim = this.creatureBody.gameObject.GetComponent<Animator>();
		}
		this.creatureBody.anim.runtimeAnimatorController = overrideController;
		this.creatureBody.inMenu = true;
		this.creatureBody.isPortrait = false;
		this.creatureBody.gameObject.layer = 5;
		this.creatureBody.GatherRenderers(true);
	}

	// Token: 0x06000EC7 RID: 3783 RVA: 0x0011BB58 File Offset: 0x00119D58
	private void Update()
	{
		if (this.currentScreen == 0 && !Links.x.characterSheet.characterCamera.activeSelf)
		{
			Links.x.characterSheet.characterCamera.SetActive(true);
			Links.x.characterSheet.characterSpawn.gameObject.SetActive(false);
			Links.x.characterSheet.characterCreationSpawn.gameObject.SetActive(true);
		}
		if (this.openIndex != 1 && this.body && !Links.x.joy && this.spinning)
		{
			float num = this.mouseStart.x - Input.mousePosition.x;
			float num2 = 20f;
			if (Records.x.windows)
			{
				num2 *= 2f;
			}
			this.body.transform.Rotate(new Vector3(0f, num * num2 * Time.unscaledDeltaTime, 0f));
			this.mouseStart = Input.mousePosition;
		}
		if (!this.spinning)
		{
			this.body;
		}
		if (Links.x.joy)
		{
			if (this.noticeOpen)
			{
				if (Links.x.gameplay.cancelStart)
				{
					this.CloseNotice();
					return;
				}
			}
			else if (this.openIndex == 1)
			{
				if (Links.x.gameplay.cancelStart)
				{
					this.OpenAllFromArchetypes(false);
					return;
				}
			}
			else
			{
				GameObject currentEventObject = Links.x.gameplay.currentEventObject;
				bool flag = false;
				if (currentEventObject)
				{
					float x = Links.x.fellowship.direction.x;
					if (Links.x.fellowship.direction.magnitude > 0.25f)
					{
						Slider slider = null;
						if (currentEventObject == this.hair.gameObject)
						{
							slider = this.hair;
						}
						if (currentEventObject == this.sex.gameObject)
						{
							slider = this.sex;
						}
						if (currentEventObject == this.hairColor.gameObject)
						{
							slider = this.hairColor;
						}
						if (currentEventObject == this.skin.gameObject)
						{
							slider = this.skin;
						}
						float num3 = 0.4f;
						if (slider)
						{
							flag = true;
							if (slider == this.sex)
							{
								num3 = 0.1f;
							}
							if (Time.realtimeSinceStartup > this.lastSliderTime + 0.3f || this.lastSliderTime == 0f)
							{
								if (x > 0f)
								{
									slider.value += num3;
								}
								else if (x < 0f)
								{
									slider.value -= num3;
								}
								this.lastSliderTime = Time.realtimeSinceStartup;
							}
						}
					}
					if (currentEventObject.transform.position.x > this.rightSide.position.x)
					{
						this.SetBorder(2);
					}
					else if (currentEventObject.transform.position.x < this.leftSide.position.x)
					{
						this.SetBorder(1);
					}
					else
					{
						this.SetBorder(0);
					}
					if (currentEventObject == this.nameInputField.gameObject && !Links.x.keyboardScript.gameObject.activeSelf)
					{
						if (Links.x.gameplay.actionStart)
						{
							this.OpenKeyboard(false);
						}
						if (((double)Links.x.fellowship.move.y < -0.25 || Links.x.gameplay.party2Down || Links.x.gameplay.partyItems3Down || Links.x.gameplay.partyItems4Down) && this.controllerMoveOutOfInputField == null)
						{
							string text = "Down";
							this.controllerMoveOutOfInputField = this.FieldWait(text);
							base.StartCoroutine(this.controllerMoveOutOfInputField);
						}
					}
				}
				else
				{
					this.SetBorder(0);
				}
				float num4 = Links.x.fellowship.direction.x;
				if (Mathf.Abs(num4) > 0.2f && !flag)
				{
					float num5 = 150f;
					num4 *= -4f;
					num5 *= num4;
					this.body.transform.Rotate(new Vector3(0f, num5 * Time.unscaledDeltaTime, 0f));
				}
				if (Links.x.gameplay.interactStart && this.fromBeginning && this.nextCharacterButtonController.activeSelf)
				{
					this.StartNewCharacter();
				}
				if (this.fromBeginning)
				{
					if (Links.x.gameplay.targetDodgeStart)
					{
						int num6;
						if (this.characterCount >= 3)
						{
							if (this.currentCharacterIndex == 3)
							{
								num6 = 0;
							}
							else
							{
								num6 = this.currentCharacterIndex + 1;
							}
						}
						else if (this.currentCharacterIndex == this.characterCount)
						{
							num6 = 0;
						}
						else
						{
							num6 = this.currentCharacterIndex + 1;
						}
						this.ChangeCharacterFromPortrait(num6);
					}
					if (Links.x.gameplay.aimStart)
					{
						int num7;
						if (this.characterCount >= 3)
						{
							if (this.currentCharacterIndex == 0)
							{
								num7 = 3;
							}
							else
							{
								num7 = this.currentCharacterIndex - 1;
							}
						}
						else if (this.currentCharacterIndex == 0)
						{
							num7 = this.characterCount;
						}
						else
						{
							num7 = this.currentCharacterIndex - 1;
						}
						this.ChangeCharacterFromPortrait(num7);
					}
				}
			}
		}
	}

	// Token: 0x06000EC8 RID: 3784 RVA: 0x0011C08C File Offset: 0x0011A28C
	private IEnumerator FieldWait(string dir)
	{
		yield return new WaitForSecondsRealtime(0.15f);
		if (dir == "Down")
		{
			EventSystem.current.SetSelectedGameObject(this.raceTogglesToggle[1].gameObject);
		}
		else
		{
			EventSystem.current.SetSelectedGameObject(this.statTransforms[0].gameObject);
		}
		this.controllerMoveOutOfInputField = null;
		yield break;
	}

	// Token: 0x06000EC9 RID: 3785 RVA: 0x0011C0A4 File Offset: 0x0011A2A4
	public void ToggleRace(string newRace)
	{
		this.currIndex = 0;
		this.updateTime = 0f;
		this.selectedRace = newRace;
		if (this.canUpdateSliders)
		{
			bool flag = true;
			for (int i = 3; i < 8; i++)
			{
				if (this.archetypeStatus[i])
				{
					flag = false;
				}
			}
			if (!this.archetypeStatus[3])
			{
				string text = "";
				if (this.SubTokenForArmorRequirements(this.majorSkill1, out text))
				{
					if (flag)
					{
						this.majorSkill1 = text;
					}
				}
				else if (this.majorSkill1 != this.SkillsFromArchetypes(true, 3) && flag)
				{
					this.majorSkill1 = this.SkillsFromArchetypes(true, 3);
				}
			}
			if (!this.archetypeStatus[4])
			{
				string text2 = "";
				if (this.SubTokenForArmorRequirements(this.majorSkill2, out text2))
				{
					if (flag)
					{
						this.majorSkill2 = text2;
					}
				}
				else if (this.majorSkill2 != this.SkillsFromArchetypes(true, 4) && flag)
				{
					this.majorSkill2 = this.SkillsFromArchetypes(true, 4);
				}
			}
			if (!this.archetypeStatus[5])
			{
				string text3 = "";
				if (this.SubTokenForArmorRequirements(this.minorSkill3, out text3))
				{
					if (flag)
					{
						this.minorSkill3 = text3;
					}
				}
				else if (this.minorSkill3 != this.SkillsFromArchetypes(true, 5) && flag)
				{
					this.minorSkill3 = this.SkillsFromArchetypes(true, 5);
				}
			}
		}
		if (this.canUpdateSliders)
		{
			this.SetRace(true);
		}
	}

	// Token: 0x06000ECA RID: 3786 RVA: 0x0011C1F6 File Offset: 0x0011A3F6
	public void ToggleRaceTrait(int newRaceTrait)
	{
		if (!this.canUpdateSliders)
		{
			return;
		}
		this.selectedTrait = this.currentRaceTraitList[newRaceTrait];
	}

	// Token: 0x06000ECB RID: 3787 RVA: 0x0011C210 File Offset: 0x0011A410
	public void SetArchetype(GameObject archetype)
	{
		this.currentArchetype = archetype.name;
		for (int i = 0; i < this.archetypes.Length; i++)
		{
			if (this.archetypes[i].gameObject == archetype)
			{
				this.archetypes[i].color = this.selectedArchetypeColor;
			}
			else
			{
				this.archetypes[i].color = this.normalArchetypeColor;
			}
		}
		this.FinishSetArchetype();
	}

	// Token: 0x06000ECC RID: 3788 RVA: 0x0011C27F File Offset: 0x0011A47F
	private void FinishSetArchetype()
	{
		this.SkillsFromArchetypes(false, 0);
		if (this.canUpdateSliders)
		{
			this.SetCharacterInfo();
		}
	}

	// Token: 0x06000ECD RID: 3789 RVA: 0x0011C298 File Offset: 0x0011A498
	public void OpenArchetypesFromBackground()
	{
		bool flag = false;
		if (this.characterName == "" && Records.x.editor && flag)
		{
			if (this.sex.value < 0.5f)
			{
				this.characterName = "Relia";
				if (this.characterCount == 1)
				{
					this.characterName = "Ana";
				}
				if (this.characterCount == 2)
				{
					this.characterName = "Sorina";
				}
				if (this.characterCount == 3)
				{
					this.characterName = "Seraphine";
				}
			}
			else
			{
				this.characterName = "Emil";
				if (this.characterCount == 1)
				{
					this.characterName = "Danu";
				}
				if (this.characterCount == 2)
				{
					this.characterName = "Sorin";
				}
				if (this.characterCount == 3)
				{
					this.characterName = "Ioan";
				}
			}
			this.input.text = this.characterName;
		}
		this.CloseDesc();
		this.openIndex = 1;
		this.currentArchetype = "Tank";
		for (int i = 0; i < this.archetypes.Length; i++)
		{
			if (this.archetypes[i].gameObject.name == this.currentArchetype)
			{
				this.archetypes[i].color = this.selectedArchetypeColor;
			}
			else
			{
				this.archetypes[i].color = this.normalArchetypeColor;
			}
		}
		this.SetCharacterInfo();
		this.animator.Play("CreationPanelB");
		if (Links.x.joy)
		{
			this.archetypeClose.SetActive(false);
			this.archetypeDescriptionText.enabled = true;
		}
		else
		{
			this.archetypeClose.SetActive(true);
			this.archetypeDescriptionText.enabled = false;
		}
		this.archetypeDescriptionText.text = Links.x.gameplay.exitText;
	}

	// Token: 0x06000ECE RID: 3790 RVA: 0x0011C460 File Offset: 0x0011A660
	public void OpenStatsFromArchetypes()
	{
		this.SkillsFromArchetypes(false, 0);
		this.CloseDesc();
		if (this.currentArchetype == "Create")
		{
			this.openIndex = 2;
			this.animator.Play("CreationPanelC");
		}
		else
		{
			this.openIndex = -1;
			this.animator.Play("CreationPanelBToAll");
		}
		this.SetCharacterInfo();
	}

	// Token: 0x06000ECF RID: 3791 RVA: 0x0011C4C4 File Offset: 0x0011A6C4
	public void OpenAllFromStats()
	{
		this.CloseDesc();
		this.openIndex = -1;
		this.animator.Play("CreationPanelAll");
		this.SetCharacterInfo();
	}

	// Token: 0x06000ED0 RID: 3792 RVA: 0x0011C4EC File Offset: 0x0011A6EC
	public void OpenBackgroundFromArchetypes()
	{
		this.CloseDesc();
		this.openIndex = 0;
		this.currentArchetype = "Create";
		for (int i = 0; i < this.archetypes.Length; i++)
		{
			if (this.archetypes[i].gameObject.name == this.currentArchetype)
			{
				this.archetypes[i].color = this.selectedArchetypeColor;
			}
			else
			{
				this.archetypes[i].color = this.normalArchetypeColor;
			}
		}
		this.SetCharacterInfo();
		this.animator.Play("CreationBackToPanelA");
	}

	// Token: 0x06000ED1 RID: 3793 RVA: 0x0011C581 File Offset: 0x0011A781
	public void OpenArchetypesFromStats()
	{
		this.CloseDesc();
		this.openIndex = 1;
		this.animator.Play("CreationBackToPanelB");
	}

	// Token: 0x06000ED2 RID: 3794 RVA: 0x0011C5A0 File Offset: 0x0011A7A0
	public void OpenArchetypesFromAll()
	{
		if (Links.x.joy)
		{
			this.archetypeClose.SetActive(false);
			this.archetypeDescriptionText.enabled = true;
		}
		else
		{
			this.archetypeClose.SetActive(true);
			this.archetypeDescriptionText.enabled = false;
		}
		this.archetypeDescriptionText.text = Links.x.gameplay.exitText;
		this.CloseDesc();
		this.openIndex = 1;
		this.animator.Play("CreationPanelAllToB");
	}

	// Token: 0x06000ED3 RID: 3795 RVA: 0x0011C624 File Offset: 0x0011A824
	public void OpenAllFromArchetypes(bool reset)
	{
		this.CloseDesc();
		this.openIndex = -1;
		this.animator.Play("CreationPanelBToAll");
		this.SetCharacterInfo();
		if (Links.x.joy)
		{
			EventSystem.current.SetSelectedGameObject(this.skillTransforms[0].gameObject);
		}
	}

	// Token: 0x06000ED4 RID: 3796 RVA: 0x0011C677 File Offset: 0x0011A877
	public void FlipToSlideRT()
	{
	}

	// Token: 0x06000ED5 RID: 3797 RVA: 0x0011C679 File Offset: 0x0011A879
	public void FlipToDomeRT()
	{
		this.domeCharacterImage.enabled = true;
	}

	// Token: 0x06000ED6 RID: 3798 RVA: 0x0011C688 File Offset: 0x0011A888
	public void StartNewCharacter()
	{
		if (this.isHovering)
		{
			this.EndHover();
		}
		this.CloseDesc();
		this.openIndex = 0;
		if (this.characterCount < 4)
		{
			this.characterCount++;
		}
		this.currentCharacterIndex = this.characterCount;
		if (this.currentCharacterIndex > 0 && Links.x.joy && this.fromBeginning)
		{
			this.controllerSwitchL.enabled = true;
			this.controllerSwitchR.enabled = true;
		}
		else
		{
			this.controllerSwitchL.enabled = false;
			this.controllerSwitchR.enabled = false;
		}
		if (this.characterCount == 3)
		{
			this.nextCharacterButton.SetActive(false);
			this.nextCharacterButtonController.SetActive(false);
			this.finishButton.SetActive(true);
			this.ChangeCharacter();
		}
		else
		{
			if (this.nextCharacterCorout != null)
			{
				base.StopCoroutine(this.nextCharacterCorout);
				this.nextCharacterCorout = null;
			}
			this.nextCharacterCorout = this.NextCharacterBtn(this.currentCharacterIndex + 1);
			base.StartCoroutine(this.nextCharacterCorout);
			this.finishButton.SetActive(false);
			this.ChangeCharacter();
		}
		if (Links.x.mk)
		{
			EventSystem.current.SetSelectedGameObject(null);
			return;
		}
		Links.x.gameplay.SetInteractableSelected(EventSystem.current, this.raceTogglesToggle[1].gameObject);
	}

	// Token: 0x06000ED7 RID: 3799 RVA: 0x0011C7E2 File Offset: 0x0011A9E2
	private IEnumerator NextCharacterBtn(int x)
	{
		this.nextCharacterButton.SetActive(false);
		this.nextCharacterButtonController.SetActive(false);
		this.nextCharacterButton.transform.position = this.portraits[x].gameObject.transform.position;
		this.nextCharacterButtonController.transform.position = this.portraits[x].gameObject.transform.position;
		yield return new WaitForSecondsRealtime(0.25f);
		Image img = this.nextCharacterButton.GetComponent<Image>();
		Image img2 = this.nextCharacterButton.transform.GetChild(0).gameObject.GetComponent<Image>();
		Color col = img.color;
		Color col2 = img2.color;
		col.a = 0f;
		col2.a = 0f;
		img.color = col;
		img2.color = col2;
		if (Links.x.joy)
		{
			this.nextCharacterButtonController.SetActive(true);
		}
		else
		{
			this.nextCharacterButton.SetActive(true);
			this.nextCharacterButtonController.SetActive(false);
		}
		float startValue = 0f;
		float endValue = 1f;
		float timeToLerp = 0.5f;
		float percentage = 0f;
		float startTime = Time.realtimeSinceStartup;
		while (percentage < 1f)
		{
			percentage = (Time.realtimeSinceStartup - startTime) / timeToLerp;
			float num = Mathf.Lerp(startValue, endValue, percentage);
			col.a = num / 2f;
			col2.a = num;
			img.color = col;
			img2.color = col2;
			yield return null;
		}
		this.nextCharacterCorout = null;
		yield break;
	}

	// Token: 0x06000ED8 RID: 3800 RVA: 0x0011C7F8 File Offset: 0x0011A9F8
	public void ShowMissingTransform()
	{
		if (this.missingTransform)
		{
			MasterAudio.PlaySoundAndForget("Feedback", 0.3f, new float?(1f), 0f, "Box Close", null);
			this.addFX.gameObject.SetActive(true);
			this.addFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
			this.addFX.position = this.missingTransform.gameObject.transform.position;
			this.missingTransform = null;
		}
	}

	// Token: 0x06000ED9 RID: 3801 RVA: 0x0011C894 File Offset: 0x0011AA94
	public bool CheckCharacterComplete(Character c, bool showNotice)
	{
		int num = this.party.IndexOf(c);
		if (showNotice)
		{
			this.ChangeCharacterFromPortrait(num);
		}
		bool flag = true;
		string text = "";
		string text2 = "";
		if ((c.stats.displayName == "" || c.stats.displayName == "Empty") && flag)
		{
			flag = false;
			if (showNotice)
			{
				this.str.Clear();
				this.str.Append("Missing name");
				text = this.str.ToString();
				this.str.Clear();
				this.str.Append("One of your companions does not have a name yet.");
				text2 = this.str.ToString();
				this.missingTransform = this.nameInputField.transform.GetChild(0);
			}
		}
		if (c.stats.displayName != "" && flag)
		{
			for (int i = 0; i < this.party.Count; i++)
			{
				if (this.party[i] && c != this.party[i] && this.party[i].stats.displayName == c.stats.displayName)
				{
					flag = false;
					if (showNotice)
					{
						this.str.Clear();
						this.str.Append("Duplicate name");
						text = this.str.ToString();
						this.str.Clear();
						this.str.Append("Two of your companions have the same name. Give them unique names to proceed.");
						text2 = this.str.ToString();
						this.missingTransform = this.nameInputField.transform.GetChild(0);
					}
				}
			}
		}
		if (flag)
		{
			int num2 = 0;
			bool flag2 = false;
			if (c.stats.majorStat1 == "")
			{
				num2++;
				flag2 = true;
				this.missingTransform = this.tokenMajorStat1.gameObject.transform;
			}
			if (c.stats.majorStat2 == "")
			{
				num2++;
				flag2 = true;
				this.missingTransform = this.tokenMajorStat2.gameObject.transform;
			}
			if (c.stats.minorStat3 == "")
			{
				num2++;
				flag2 = true;
				this.missingTransform = this.tokenMinorStat3.gameObject.transform;
			}
			if (c.stats.majorSkill1 == "" && !flag2)
			{
				num2++;
				flag2 = false;
				this.missingTransform = this.tokenMajorSkill4.gameObject.transform;
			}
			if (c.stats.majorSkill2 == "" && !flag2)
			{
				num2++;
				flag2 = false;
				this.missingTransform = this.tokenMajorSkill5.gameObject.transform;
			}
			if (c.stats.minorSkill3 == "" && !flag2)
			{
				num2++;
				flag2 = false;
				this.missingTransform = this.tokenMinorSkill6.gameObject.transform;
			}
			if (num2 > 0)
			{
				if (showNotice)
				{
					if (flag2)
					{
						this.str.Clear();
						this.str.Append("Stat tokens remaining");
						text = this.str.ToString();
						this.str.Clear();
						this.str.Append(c.stats.GetName());
						this.str.Append(" can still select stats.");
						text2 = this.str.ToString();
					}
					if (!flag2)
					{
						this.str.Clear();
						this.str.Append("Skill tokens remaining");
						text = this.str.ToString();
						this.str.Clear();
						this.str.Append(c.stats.GetName());
						this.str.Append(" can still select skills.");
						text2 = this.str.ToString();
					}
				}
				flag = false;
			}
		}
		if (flag)
		{
			string text3 = "";
			int num3 = -1;
			bool flag3 = false;
			string text4 = "";
			if (this.SubTokenForArmorRequirements(this.majorSkill1, out text3))
			{
				num3 = this.GetTransformIndex(this.majorSkill1, false);
				text4 = this.majorSkill1;
				if (num3 == -1)
				{
					Debug.LogError("Index is -1 for " + this.majorSkill1);
				}
				flag3 = true;
			}
			if (this.SubTokenForArmorRequirements(this.majorSkill2, out text3))
			{
				num3 = this.GetTransformIndex(this.majorSkill2, false);
				text4 = this.majorSkill2;
				if (num3 == -1)
				{
					Debug.LogError("Index is -1 for " + this.majorSkill2);
				}
				flag3 = true;
			}
			if (this.SubTokenForArmorRequirements(this.minorSkill3, out text3))
			{
				num3 = this.GetTransformIndex(this.minorSkill3, false);
				text4 = this.minorSkill3;
				if (num3 == -1)
				{
					Debug.LogError("Index is -1 for " + this.minorSkill3);
				}
				flag3 = true;
			}
			if (flag3)
			{
				if (showNotice)
				{
					string text5 = Links.x.manual.DisplayName(text4);
					this.missingTransform = this.skillTransforms[num3].gameObject.transform;
					this.str.Clear();
					this.str.Append(text5);
					this.str.Append(" cannot be used");
					text = this.str.ToString();
					this.str.Clear();
					this.str.Append(c.stats.GetName());
					this.str.Append(" has a skill selected that they cannot utilize.");
					text2 = this.str.ToString();
				}
				flag = false;
			}
		}
		if (showNotice && !flag)
		{
			MasterAudio.PlaySoundAndForget("Paper Open 2", 0.4f, new float?(1f), 0f, "", null);
			this.OpenNotice(text, text2, c);
		}
		bool enabled = this.checkMarks[num].enabled;
		this.checkMarks[num].enabled = flag;
		if (!enabled && flag)
		{
			MasterAudio.PlaySoundAndForget("Feedback", 0.3f, new float?(1f), 0f, "HealProc", null);
			this.addFX.gameObject.SetActive(true);
			this.addFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
			this.addFX.position = this.checkMarks[num].gameObject.transform.position;
			if (this.body && this.body.headAnim)
			{
				this.body.headAnim.emotion = "Happy";
				this.body.headAnim.PlayAnimation(FaceAnimations.AnimationNames.LookUp);
			}
		}
		if (enabled && !flag)
		{
			MasterAudio.PlaySoundAndForget("Feedback", 0.1f, new float?(1f), 0f, "Remove Badge", null);
			this.removeFX.gameObject.SetActive(true);
			this.removeFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
			this.removeFX.position = this.checkMarks[num].gameObject.transform.position;
			if (this.body && this.body.headAnim)
			{
				this.body.headAnim.emotion = "";
			}
		}
		return flag;
	}

	// Token: 0x06000EDA RID: 3802 RVA: 0x0011D025 File Offset: 0x0011B225
	public void TurnOffMainCamera()
	{
		Links.x.worldCamera.cullingMask = 1;
	}

	// Token: 0x06000EDB RID: 3803 RVA: 0x0011D037 File Offset: 0x0011B237
	public void TurnOnMainCamera()
	{
		Links.x.worldCamera.cullingMask = Links.x.mainCameraMask;
	}

	// Token: 0x06000EDC RID: 3804 RVA: 0x0011D058 File Offset: 0x0011B258
	public void Finish()
	{
		bool flag = true;
		Character character = this.character;
		if (this.fromBeginning)
		{
			for (int i = 0; i < this.party.Count; i++)
			{
				if (flag && this.party[i] != character && !this.CheckCharacterComplete(this.party[i], true))
				{
					flag = false;
				}
			}
		}
		else if (!this.CheckCharacterComplete(character, true))
		{
			flag = false;
		}
		if (flag && !this.CheckCharacterComplete(character, true))
		{
			flag = false;
		}
		if (flag)
		{
			this.CloseDesc();
			base.StartCoroutine(this.FinishFinish());
		}
	}

	// Token: 0x06000EDD RID: 3805 RVA: 0x0011D0ED File Offset: 0x0011B2ED
	private IEnumerator FinishFinish()
	{
		this.animator.Play("CreationEnd");
		Links.x.gaia.PlayFade("Out", "Scaled");
		EventSystem.current.SetSelectedGameObject(null);
		Links.x.hudControl.JoyBox(false);
		yield return new WaitForSecondsRealtime(0.25f);
		if (!this.fromBeginning)
		{
			Character character = this.character;
			character.SetupBody();
			if (!this.justRespec)
			{
				Links.x.fellowship.AddHudPortraitChange(character);
				Links.x.fellowship.CompanionDied();
			}
			character.portrait.UpdatePortrait();
			int num = 0;
			int num2 = 0;
			if (!this.justRespec)
			{
				character.portrait.skillBag.NewCharacter();
			}
			character.portrait.skillBag.trinketWindow.ResetGridLayout();
			this.SaveAbilities(character);
			if (!this.justRespec)
			{
				character.stats.partyID = Records.x.partyTotal;
				Records.x.partyTotal++;
				bool flag = false;
				bool flag2 = false;
				List<Character> portraitOrder = Links.x.portraitOrder;
				for (int j = 0; j < portraitOrder.Count; j++)
				{
					if (portraitOrder[j] && !portraitOrder[j].isBoro && !portraitOrder[j].summoned && portraitOrder[j] != character)
					{
						if (portraitOrder[j].stats.formationGroup == num)
						{
							flag = true;
						}
						if (portraitOrder[j].stats.formationGroup == num2)
						{
							flag2 = true;
						}
					}
				}
				if (!flag)
				{
					character.stats.formationGroup = num;
				}
				else if (flag2)
				{
					character.stats.formationGroup = num;
				}
				else
				{
					character.stats.formationGroup = num2;
				}
			}
			character.fowRevealer.enabled = true;
			character.fowRevealerInterior.enabled = true;
			character.stats.SetHealth(character.stats.HealthMax(), false);
			character.stats.level = 1;
			character.portrait.skillBag.SetTrinketGrid(true);
			character.portrait.skillBag.SetSongGrid();
			character.portrait.skillBag.SetSpellbookGrid();
			if (!this.justRespec)
			{
				character.stats.autoCastAI = true;
				character.stats.autoCritsAI = 25;
				character.stats.autoBuffsAI = 2;
				character.stats.useItemsAI = 45;
			}
			character.portrait.skillBag.trinketWindow.GridLayout(true, false);
			character.portrait.UpdateName();
			if (!this.justRespec)
			{
				this.SetFormations();
			}
			character.stats.SetVoiceID(false);
			if (this.justRespec)
			{
				int num3 = this.character.stats.CorrectLevelForXP(this.previousXP, this.previousLevel);
				character.stats.level = 1;
				character.stats.XP = 0;
				int num4 = num3 - 1;
				Debug.Log(string.Concat(new string[]
				{
					"Correct level is ",
					num3.ToString(),
					" was ",
					this.previousLevel.ToString(),
					" xp is ",
					this.previousXP.ToString(),
					" ",
					num4.ToString()
				}));
				if (num4 > 0)
				{
					for (int k = 0; k < num4; k++)
					{
						int num5 = character.stats.XPToNextLevel();
						Debug.Log(string.Concat(new string[]
						{
							num5.ToString(),
							" xp to next level ",
							k.ToString(),
							" ",
							character.stats.level.ToString()
						}));
						character.stats.AddXP(num5, null, false);
					}
				}
				character.stats.level = num3;
				character.stats.XP = this.previousXP;
			}
			character.stats.UpdateAbilityTriggers();
		}
		else
		{
			Character c = null;
			List<Character> tempParty = new List<Character>();
			for (int l = 0; l < this.party.Count; l++)
			{
				tempParty.Add(this.party[l]);
			}
			int num8;
			for (int i = 0; i < tempParty.Count; i = num8 + 1)
			{
				c = tempParty[i];
				c.SetupBody();
				this.SaveAbilities(c);
				yield return new WaitForSeconds(0.01f);
				c.stats.SetStartingWeapons();
				c.portrait.UpdatePortrait();
				c.portrait.skillBag.NewCharacter();
				c.portrait.skillBag.trinketWindow.ResetGridLayout();
				int num6 = 0;
				int num7 = 0;
				c.stats.formationGroup = 0;
				bool flag3 = false;
				bool flag4 = false;
				List<Character> portraitOrder2 = Links.x.portraitOrder;
				for (int m = 0; m < portraitOrder2.Count; m++)
				{
					if (portraitOrder2[m] && !portraitOrder2[m].isBoro && !portraitOrder2[m].summoned && portraitOrder2[m] != c)
					{
						if (portraitOrder2[m].stats.formationGroup == num6)
						{
							flag3 = true;
						}
						if (portraitOrder2[m].stats.formationGroup == num7)
						{
							flag4 = true;
						}
					}
				}
				if (!flag3)
				{
					c.stats.formationGroup = num6;
				}
				else if (flag4)
				{
					c.stats.formationGroup = num6;
				}
				else
				{
					c.stats.formationGroup = num7;
				}
				c.fowRevealer.enabled = true;
				c.fowRevealerInterior.enabled = true;
				c.AddToSelected(true, false);
				c.stats.SetHealth(c.stats.HealthMax(), false);
				c.portrait.skillBag.SetTrinketGrid(true);
				c.portrait.skillBag.SetSongGrid();
				c.portrait.skillBag.SetSpellbookGrid();
				c.stats.level = 1;
				c.portrait.skillBag.trinketWindow.GridLayout(true, false);
				c.stats.autoCastAI = true;
				c.stats.autoCritsAI = 25;
				c.stats.autoBuffsAI = 2;
				c.stats.useItemsAI = 45;
				c.portrait.UpdateName();
				c.stats.SetVoiceID(false);
				num8 = i;
			}
			this.SetFormations();
			Links.x.GetCreationID(3).SetAsLeader();
			c = null;
			tempParty = null;
		}
		yield return new WaitForSecondsRealtime(0.25f);
		this.FinishFinishFinish();
		yield break;
	}

	// Token: 0x06000EDE RID: 3806 RVA: 0x0011D0FC File Offset: 0x0011B2FC
	public void SetFormations()
	{
		List<int> list = new List<int> { 2, 3, 1, 5, 4, 6, 8, 9, 7 };
		for (int i = 0; i < this.party.Count; i++)
		{
			if (!this.fromBeginning && list.Contains(this.party[i].stats.formationGroup))
			{
				list.Remove(this.party[i].stats.formationGroup);
			}
		}
		for (int j = 0; j < 4; j++)
		{
			for (int k = 0; k < this.party.Count; k++)
			{
				Character character = this.party[k];
				if (character && character.stats.formationGroup <= 0)
				{
					bool flag = false;
					bool flag2 = false;
					bool flag3 = false;
					bool flag4 = false;
					if (character.stats.HasTokenInSkill("ShortSword", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("LongSword", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Scepter", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Ax", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Pole", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Bow", true, false))
					{
						flag = true;
					}
					if (character.stats.HasTokenInSkill("Multi-Hand", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Sling", true, false))
					{
						flag = true;
					}
					if (character.stats.HasTokenInSkill("Elixir", true, false))
					{
						flag = true;
					}
					if (character.stats.HasTokenInSkill("Hand-to-Hand", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("Whip", true, false))
					{
						flag2 = true;
					}
					if (character.stats.HasTokenInSkill("ShortSword", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("LongSword", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Scepter", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Ax", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Pole", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Bow", false, true))
					{
						flag4 = true;
					}
					if (character.stats.HasTokenInSkill("Multi-Hand", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Sling", false, true))
					{
						flag4 = true;
					}
					if (character.stats.HasTokenInSkill("Elixir", false, true))
					{
						flag4 = true;
					}
					if (character.stats.HasTokenInSkill("Hand-to-Hand", false, true))
					{
						flag3 = true;
					}
					if (character.stats.HasTokenInSkill("Whip", false, true))
					{
						flag3 = true;
					}
					int num = -1;
					for (int l = 0; l < list.Count; l++)
					{
						if (num == -1)
						{
							if (flag || (!flag && !flag2 && !flag3 && !flag4) || (flag4 && !flag2))
							{
								if (list[l] >= 7 && list[l] <= 9)
								{
									num = list[l];
								}
							}
							else if (list[l] >= 1 && list[l] <= 3)
							{
								num = list[l];
							}
						}
					}
					if (num > -1)
					{
						character.stats.formationGroup = num;
						list.Remove(num);
					}
				}
			}
		}
		for (int m = 0; m < this.party.Count; m++)
		{
			Character character2 = this.party[m];
			if (character2 && character2.stats.formationGroup == 0)
			{
				character2.stats.formationGroup = 5;
			}
		}
	}

	// Token: 0x06000EDF RID: 3807 RVA: 0x0011D504 File Offset: 0x0011B704
	public void OpenSpellCasting()
	{
		Character character = null;
		for (int i = 0; i < this.party.Count; i++)
		{
			if (this.party[i] && !character && !this.party[i].isBoro && !this.party[i].summoned)
			{
				if (this.party[i].stats.HasTokenInSkill("Fauna", false, false))
				{
					character = this.party[i];
				}
				if (this.party[i].stats.HasTokenInSkill("Vines", false, false))
				{
					character = this.party[i];
				}
				if (this.party[i].stats.HasTokenInSkill("Spores", false, false))
				{
					character = this.party[i];
				}
			}
		}
		Links.x.spellcrafting.StartMenu(true, character);
		this.animator.Play("CreationEnd");
	}

	// Token: 0x06000EE0 RID: 3808 RVA: 0x0011D624 File Offset: 0x0011B824
	public void FinishFinishFinish()
	{
		this.TurnOnMainCamera();
		Links.x.renderPortraits.ToggleCrossFades(false);
		Links.x.fellowship.CompanionDied();
		Links.x.pocketWheel.NewScene();
		this.paganPopup.SetActive(false);
		Records.x.SetTypingState(false);
		Links.x.characterSheet.characterCamera.SetActive(false);
		if (!this.fromBeginning)
		{
			Links.x.hudControl.ChangeHudVisibility(true, true);
		}
		this.open = false;
		Links.x.gaia.FinishCharacterCreation(base.gameObject, this.fromBeginning);
		Links.x.camera3D.enabled = false;
	}

	// Token: 0x06000EE1 RID: 3809 RVA: 0x0011D6DC File Offset: 0x0011B8DC
	private void SaveAbilities(Character c)
	{
		if (!this.justRespec)
		{
			c.stats.ClearAllAbilities();
		}
		c.stats.songPoints = c.stats.SongPointsMax();
		foreach (string text in this.skillsWithAbilities)
		{
			bool flag = false;
			if (c.stats.HasTokenInSkill(text, true, false))
			{
				flag = true;
			}
			if (c.stats.HasTokenInSkill(text, false, true))
			{
				flag = true;
			}
			if (flag)
			{
				for (int j = 0; j < 2; j++)
				{
					bool flag2 = false;
					bool flag3 = false;
					bool flag4 = false;
					string text2 = "";
					Sprite sprite = null;
					if (text.Contains("Vines"))
					{
						if (j == 0)
						{
							sprite = this.vinesSprite1;
							text2 = this.vinesAbilityName1;
							flag2 = true;
						}
						else
						{
							sprite = this.vinesSprite2;
							text2 = this.vinesAbilityName2;
							flag2 = true;
						}
					}
					if (text.Contains("Spores"))
					{
						if (j == 0)
						{
							sprite = this.sporeSprite1;
							text2 = this.sporeAbilityName1;
							flag2 = true;
						}
						else
						{
							sprite = this.sporeSprite2;
							text2 = this.sporeAbilityName2;
							flag2 = true;
						}
					}
					if (text.Contains("Fauna"))
					{
						if (j == 0)
						{
							sprite = this.faunaSprite1;
							text2 = this.faunaAbilityName1;
							flag2 = true;
						}
						else
						{
							sprite = this.faunaSprite2;
							text2 = this.faunaAbilityName2;
							flag2 = true;
						}
					}
					if (text.Contains("Flute"))
					{
						if (j == 0)
						{
							text2 = this.fluteAbilityName1;
							flag3 = true;
						}
						else
						{
							text2 = this.fluteAbilityName2;
							flag3 = true;
						}
					}
					if (text.Contains("Horn"))
					{
						if (j == 0)
						{
							text2 = this.hornAbilityName1;
							flag3 = true;
						}
						else
						{
							text2 = this.hornAbilityName2;
							flag3 = true;
						}
					}
					if (text.Contains("Pipe"))
					{
						if (j == 0)
						{
							text2 = this.pipeAbilityName1;
							flag3 = true;
						}
						else
						{
							text2 = this.pipeAbilityName2;
							flag3 = true;
						}
					}
					string text3 = text2;
					if (flag2)
					{
						string displayName = Links.x.library.GetAbilityRow(text3)._DisplayName;
						string text4 = string.Concat(new string[]
						{
							Application.persistentDataPath,
							"/AutoSave/",
							displayName,
							"_",
							c.stats.partyID.ToString(),
							".png"
						});
						byte[] array2 = sprite.texture.EncodeToPNG();
						File.WriteAllBytes(text4, array2);
						Library.Pagan paganRow = Links.x.library.GetPaganRow(text3);
						Links.x.spellcrafting.selectedPagan = paganRow;
						Links.x.spellcrafting.SelectLearningButton(-1);
						c.stats.AddPaganKnowledge(paganRow._ID);
						float minValue = Links.x.spellcrafting.slider1.minValue;
						float maxValue = Links.x.spellcrafting.slider1.maxValue;
						float minValue2 = Links.x.spellcrafting.slider2.minValue;
						float maxValue2 = Links.x.spellcrafting.slider2.maxValue;
						float minValue3 = Links.x.spellcrafting.slider3.minValue;
						float maxValue3 = Links.x.spellcrafting.slider3.maxValue;
						float num = minValue;
						float num2 = minValue2;
						float num3 = minValue3;
						if (text3 == "VinePrison")
						{
							num = 8f;
							num2 = 8f;
						}
						if (text3 == "Entangle")
						{
							num2 = 3f;
						}
						if (text3 == "PukeSpores")
						{
							num = 3f;
							num3 = 3f;
						}
						if (text3 == "SlipSlime")
						{
							num = 4f;
							num3 = 3f;
						}
						if (text3 == "FrogTrap")
						{
							num3 = 2f;
						}
						if (text3 == "CorpseNest")
						{
							num = 6f;
						}
						c.stats.SaveSpell(paganRow._ID, displayName, (int)num, (int)num2, (int)num3, (int)Links.x.spellcrafting.tetherSlider.value, new Vector2(1f, 0f));
					}
					if (flag3)
					{
						c.stats.AddSong(text3, text3, new Vector3(1f, 1f, 1f));
					}
					if (flag4)
					{
						c.stats.AddWord(text3, text3, new Vector3(1f, 1f, 1f));
					}
				}
			}
		}
	}

	// Token: 0x06000EE2 RID: 3810 RVA: 0x0011DB18 File Offset: 0x0011BD18
	public void SetCharacterInfo()
	{
		string text = this.selectedRace;
		this.updateTime = 0f;
		this.character.gameObject.name = this.input.text;
		this.character.stats.sightRadiusBase = this.GetRacialBase("Sight", text) + Mathf.Round(this.GetSexBase(this.sex.value, text, "Sight"));
		this.character.stats.hearingRadiusBase = this.GetRacialBase("Hearing", text) + Mathf.Round(this.GetSexBase(this.sex.value, text, "Hearing"));
		this.character.stats.maxStaminaAdd = this.GetRacialBase("Stamina", text) + Mathf.Round(this.GetSexBase(this.sex.value, text, "Hearing"));
		this.character.stats.lifeBase = (int)this.GetRacialBase("Health", text) + (int)Mathf.Round(this.GetSexBase(this.sex.value, text, "Health"));
		this.character.stats.naturalArmorBase = this.character.stats.R2(this.GetRacialBase("Armor", text) + this.GetSexBase(this.sex.value, text, "Armor"));
		this.character.stats.magicPointsBase = 1;
		this.character.stats.rallyBase = this.character.stats.R2(this.GetRacialBase("Rally", text)) + this.character.stats.R2(this.GetSexBase(this.sex.value, text, "Rally"));
		this.character.stats.weightBase = (int)this.GetRacialBase("Weight", text) + (int)Mathf.Round(this.GetSexBase(this.sex.value, text, "Weight"));
		this.character.stats.race = this.selectedRace;
		this.character.stats.SetFamilyBackground(this.selectedTrait, this.selectedRace);
		this.character.stats.SetStat("Strength", this.GetRacialStatBases("Strength", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Strength", text)) + this.AddMajorsMinors("Strength"));
		this.character.stats.SetStat("Agility", this.GetRacialStatBases("Agility", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Agility", text)) + this.AddMajorsMinors("Agility"));
		this.character.stats.SetStat("Aura", this.GetRacialStatBases("Aura", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Aura", text)) + this.AddMajorsMinors("Aura"));
		this.character.stats.SetStat("Pagan", this.GetRacialStatBases("Pagan", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Pagan", text)) + this.AddMajorsMinors("Pagan"));
		this.character.stats.SetStat("Dexterity", this.GetRacialStatBases("Dexterity", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Dexterity", text)) + this.AddMajorsMinors("Dexterity"));
		this.character.stats.SetStat("Sensory", this.GetRacialStatBases("Sensory", text) + Mathf.Round(this.GetSexStatBases(this.sex.value, "Sensory", text)) + this.AddMajorsMinors("Sensory"));
		this.character.stats.SetSkill(0, this.GetRacialSkillBases("Robes", this.selectedRace) + this.AddMajorsMinors("Robes"));
		this.character.stats.SetSkill(1, this.GetRacialSkillBases("Pearl", this.selectedRace) + this.AddMajorsMinors("Pearl"));
		this.character.stats.SetSkill(2, this.GetRacialSkillBases("Crimscale", this.selectedRace) + this.AddMajorsMinors("Crimscale"));
		this.character.stats.SetSkill(3, this.GetRacialSkillBases("Stonewood", this.selectedRace) + this.AddMajorsMinors("Stonewood"));
		this.character.stats.SetSkill(4, this.GetRacialSkillBases("ShortSword", this.selectedRace) + this.AddMajorsMinors("ShortSword"));
		this.character.stats.SetSkill(5, this.GetRacialSkillBases("LongSword", this.selectedRace) + this.AddMajorsMinors("LongSword"));
		this.character.stats.SetSkill(6, this.GetRacialSkillBases("Scepter", this.selectedRace) + this.AddMajorsMinors("Scepter"));
		this.character.stats.SetSkill(7, this.GetRacialSkillBases("Ax", this.selectedRace) + this.AddMajorsMinors("Ax"));
		this.character.stats.SetSkill(8, this.GetRacialSkillBases("Pole", this.selectedRace) + this.AddMajorsMinors("Pole"));
		this.character.stats.SetSkill(9, this.GetRacialSkillBases("Multi-Hand", this.selectedRace) + this.AddMajorsMinors("Multi-Hand"));
		this.character.stats.SetSkill(10, this.GetRacialSkillBases("Bow", this.selectedRace) + this.AddMajorsMinors("Bow"));
		this.character.stats.SetSkill(11, this.GetRacialSkillBases("Sling", this.selectedRace) + this.AddMajorsMinors("Sling"));
		this.character.stats.SetSkill(12, this.GetRacialSkillBases("Elixir", this.selectedRace) + this.AddMajorsMinors("Elixir"));
		this.character.stats.SetSkill(13, this.GetRacialSkillBases("Hand-to-Hand", this.selectedRace) + this.AddMajorsMinors("Hand-to-Hand"));
		this.character.stats.SetSkill(14, this.GetRacialSkillBases("LargeShield", this.selectedRace) + this.AddMajorsMinors("LargeShield"));
		this.character.stats.SetSkill(15, this.GetRacialSkillBases("SmallShield", this.selectedRace) + this.AddMajorsMinors("SmallShield"));
		this.character.stats.SetSkill(16, this.GetRacialSkillBases("Bindings", this.selectedRace) + this.AddMajorsMinors("Bindings"));
		this.character.stats.SetSkill(17, this.GetRacialSkillBases("Fauna", this.selectedRace) + this.AddMajorsMinors("Fauna"));
		this.character.stats.SetSkill(18, this.GetRacialSkillBases("Vines", this.selectedRace) + this.AddMajorsMinors("Vines"));
		this.character.stats.SetSkill(19, this.GetRacialSkillBases("Spores", this.selectedRace) + this.AddMajorsMinors("Spores"));
		this.character.stats.SetSkill(20, this.GetRacialSkillBases("Lockpick", this.selectedRace) + this.AddMajorsMinors("Lockpick"));
		this.character.stats.SetSkill(21, this.GetRacialSkillBases("Sneaking", this.selectedRace) + this.AddMajorsMinors("Sneaking"));
		this.character.stats.SetSkill(22, this.GetRacialSkillBases("Bartering", this.selectedRace) + this.AddMajorsMinors("Bartering"));
		this.character.stats.SetSkill(23, this.GetRacialSkillBases("Fish", this.selectedRace) + this.AddMajorsMinors("Fish"));
		this.character.stats.SetSkill(24, this.GetRacialSkillBases("Forest", this.selectedRace) + this.AddMajorsMinors("Forest"));
		this.character.stats.SetSkill(25, this.GetRacialSkillBases("Shroom", this.selectedRace) + this.AddMajorsMinors("Shroom"));
		this.character.stats.SetSkill(26, this.GetRacialSkillBases("Flute", this.selectedRace) + this.AddMajorsMinors("Flute"));
		this.character.stats.SetSkill(27, this.GetRacialSkillBases("Horn", this.selectedRace) + this.AddMajorsMinors("Horn"));
		this.character.stats.SetSkill(28, this.GetRacialSkillBases("Drum", this.selectedRace) + this.AddMajorsMinors("Drum"));
		this.character.stats.SetSkill(29, this.GetRacialSkillBases("Pipe", this.selectedRace) + this.AddMajorsMinors("Pipe"));
		this.character.stats.SetSkill(30, this.GetRacialSkillBases("Melee", this.selectedRace) + this.AddMajorsMinors("Melee"));
		this.character.stats.SetSkill(31, this.GetRacialSkillBases("Range", this.selectedRace) + this.AddMajorsMinors("Range"));
		this.character.stats.SetSkill(32, this.GetRacialSkillBases("Defense", this.selectedRace) + this.AddMajorsMinors("Defense"));
		this.character.stats.SetSkill(35, this.GetRacialSkillBases("Whip", this.selectedRace) + this.AddMajorsMinors("Whip"));
		this.character.stats.sex = this.sex.value;
		this.character.stats.hair = this.hair.value;
		this.character.stats.hairColor = this.hairColor.value;
		this.character.stats.skin = this.skin.value;
		this.character.stats.model = this.selectedModel;
		this.character.stats.headModel = this.hairModel;
		this.character.stats.hairTexture = this.selectedHair;
		this.character.stats.skinTexture = this.selectedSkin;
		this.character.stats.archetype = this.currentArchetype;
		if (this.characterCount == 0 && this.fromBeginning)
		{
			this.character.protagonist = true;
		}
		bool flag = false;
		for (int i = 0; i < this.archetypeStatus.Length; i++)
		{
			if (this.archetypeStatus[i])
			{
				flag = true;
			}
		}
		this.character.stats.SetMajorsMinors(this.majorStat1, this.majorStat2, this.minorStat3, this.majorSkill1, this.majorSkill2, this.minorSkill3, flag);
		this.str.Clear();
		int num = 0;
		this.strengthText.text = Mathf.Round(this.character.stats.Stat("Strength", false, out num)).ToString();
		this.agilityText.text = Mathf.Round(this.character.stats.Stat("Agility", false, out num)).ToString();
		this.auraText.text = Mathf.Round(this.character.stats.Stat("Aura", false, out num)).ToString();
		this.paganText.text = Mathf.Round(this.character.stats.Stat("Pagan", false, out num)).ToString();
		this.sensoryText.text = Mathf.Round(this.character.stats.Stat("Sensory", false, out num)).ToString();
		this.dexterityText.text = Mathf.Round(this.character.stats.Stat("Dexterity", false, out num)).ToString();
		this.str.Clear();
		this.str.Append("<size=0%>.</size>");
		this.str.Append("\n");
		this.LinkSkills("Short Sword", 4);
		this.LinkSkills("Long Sword", 5);
		this.LinkSkills("Scepter", 6);
		this.LinkSkills("Whip", 35);
		this.LinkSkills("Ax", 7);
		this.LinkSkills("Pole", 8);
		this.LinkSkills("Slings", 11);
		this.LinkSkills("Bow", 10);
		this.LinkSkills("Unarmed", 13);
		this.LinkSkills("Elyxirs", 12);
		this.LinkSkills("Multi-Hand", 9);
		this.str.Append("\n\n");
		this.LinkSkills("Small Shield", 15);
		this.LinkSkills("Large Shield", 14);
		this.str.Append("\n\n");
		this.LinkSkills("Robes", 0);
		this.LinkSkills("Crimscale", 2);
		this.LinkSkills("Pearl", 1);
		this.LinkSkills("Stonewood", 3);
		this.skillText.text = this.str.ToString();
		this.str.Clear();
		this.str.Append("\n");
		this.LinkSkills("Fauna", 17);
		this.LinkSkills("Vines", 18);
		this.LinkSkills("Spores", 19);
		this.str.Append("\n\n");
		this.LinkSkills("Intercessions", 16);
		this.str.Append("\n\n");
		this.LinkSkills("Fish", 23);
		this.LinkSkills("Forest", 24);
		this.LinkSkills("Shrooms", 25);
		this.str.Append("\n\n");
		this.LinkSkills("Flute", 26);
		this.LinkSkills("Horn", 27);
		this.LinkSkills("Shepard Pipes", 29);
		this.str.Append("\n\n");
		this.LinkSkills("Lockpicking", 20);
		this.LinkSkills("Sneaking", 21);
		this.LinkSkills("Bartering", 22);
		this.skillText2.text = this.str.ToString();
		this.str.Clear();
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(4));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(5));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(6));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(35));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(7));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(8));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(11));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(10));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(13));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(12));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(9));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(15));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(14));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(0));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(2));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(1));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(3));
		this.skillNumbersText.text = this.str.ToString();
		this.str.Clear();
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(17));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(18));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(19));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(16));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(23));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(24));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(25));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(26));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(27));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(29));
		this.str.Append("\n\n");
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(20));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(21));
		this.str.Append("\n");
		this.str.Append(this.character.stats.GetSkill(22));
		this.skillNumbersText2.text = this.str.ToString();
		this.str.Clear();
		this.Link("Health");
		this.str.Append(this.character.stats.HealthMax());
		this.str.Append("\n");
		this.Link("Rally");
		this.str.Append(this.character.stats.R2(this.character.stats.rallyBase));
		this.str.Append("x\n");
		this.Link("Vision");
		this.str.Append(this.character.stats.SightRadius(true, true, false));
		if (this.character.stats.HearingRadius(true, false) == 1f)
		{
			this.str.Append(" pole");
		}
		else
		{
			this.str.Append(" poles");
		}
		this.str.Append("\n");
		this.Link("Stamina");
		this.str.Append(this.character.stats.MaxStamina());
		this.str.Append("\n");
		this.Link("Weight");
		this.str.Append(this.character.stats.CharacterWeight());
		if (this.character.stats.CharacterWeight() == 1f)
		{
			this.str.Append(" stone");
		}
		else
		{
			this.str.Append(" stones");
		}
		this.str.Append("\n");
		this.Link("Armor");
		this.str.Append(Mathf.Round(this.character.stats.naturalArmorBase * 10f));
		this.str.Append("%");
		this.outputText.text = this.str.ToString();
		this.GetAbilityLists();
		this.CheckCharacterComplete(this.character, false);
	}

	// Token: 0x06000EE3 RID: 3811 RVA: 0x0011F258 File Offset: 0x0011D458
	public float GetRacialBase(string baseType, string race)
	{
		if (race == "Ameythevian")
		{
			if (baseType == "Sight")
			{
				return 19f;
			}
			if (baseType == "Hearing")
			{
				return 28f;
			}
			if (baseType == "Health")
			{
				return 44f;
			}
			if (baseType == "Armor")
			{
				return 1.9f;
			}
			if (baseType == "Rally")
			{
				return 1.5f;
			}
			if (baseType == "Weight")
			{
				return 130f;
			}
			if (baseType == "Stamina")
			{
				return 1f;
			}
		}
		if (race == "Varuchov")
		{
			if (baseType == "Sight")
			{
				return 20f;
			}
			if (baseType == "Hearing")
			{
				return 28f;
			}
			if (baseType == "Health")
			{
				return 45f;
			}
			if (baseType == "Armor")
			{
				return 1.8f;
			}
			if (baseType == "Rally")
			{
				return 1.3f;
			}
			if (baseType == "Weight")
			{
				return 120f;
			}
			if (baseType == "Stamina")
			{
				return 1f;
			}
		}
		if (race == "Pasaaren")
		{
			if (baseType == "Sight")
			{
				return 23f;
			}
			if (baseType == "Hearing")
			{
				return 28f;
			}
			if (baseType == "Health")
			{
				return 46f;
			}
			if (baseType == "Armor")
			{
				return 2f;
			}
			if (baseType == "Rally")
			{
				return 1.4f;
			}
			if (baseType == "Weight")
			{
				return 120f;
			}
			if (baseType == "Stamina")
			{
				return 0f;
			}
		}
		if (race == "Taratorith")
		{
			if (baseType == "Sight")
			{
				return 21f;
			}
			if (baseType == "Hearing")
			{
				return 28f;
			}
			if (baseType == "Health")
			{
				return 47f;
			}
			if (baseType == "Armor")
			{
				return 2.1f;
			}
			if (baseType == "Rally")
			{
				return 1.5f;
			}
			if (baseType == "Weight")
			{
				return 140f;
			}
			if (baseType == "Stamina")
			{
				return -1f;
			}
		}
		if (race == "Yeti")
		{
			if (baseType == "Sight")
			{
				return 19f;
			}
			if (baseType == "Hearing")
			{
				return 28f;
			}
			if (baseType == "Health")
			{
				return 50f;
			}
			if (baseType == "Armor")
			{
				return 2.2f;
			}
			if (baseType == "Rally")
			{
				return 1.3f;
			}
			if (baseType == "Weight")
			{
				return 170f;
			}
			if (baseType == "Stamina")
			{
				return 1f;
			}
		}
		return 0f;
	}

	// Token: 0x06000EE4 RID: 3812 RVA: 0x0011F554 File Offset: 0x0011D754
	public float GetRacialStatBases(string stat, string race)
	{
		if (race == "Ameythevian")
		{
			if (stat == "Strength")
			{
				return 12f;
			}
			if (stat == "Agility")
			{
				return 9f;
			}
			if (stat == "Aura")
			{
				return 11f;
			}
			if (stat == "Pagan")
			{
				return 10f;
			}
			if (stat == "Dexterity")
			{
				return 11f;
			}
			if (stat == "Sensory")
			{
				return 13f;
			}
		}
		if (race == "Varuchov")
		{
			if (stat == "Strength")
			{
				return 8f;
			}
			if (stat == "Agility")
			{
				return 14f;
			}
			if (stat == "Aura")
			{
				return 10f;
			}
			if (stat == "Pagan")
			{
				return 11f;
			}
			if (stat == "Dexterity")
			{
				return 13f;
			}
			if (stat == "Sensory")
			{
				return 10f;
			}
		}
		if (race == "Pasaaren")
		{
			if (stat == "Strength")
			{
				return 10f;
			}
			if (stat == "Agility")
			{
				return 12f;
			}
			if (stat == "Aura")
			{
				return 11f;
			}
			if (stat == "Pagan")
			{
				return 10f;
			}
			if (stat == "Dexterity")
			{
				return 11f;
			}
			if (stat == "Sensory")
			{
				return 12f;
			}
		}
		if (race == "Taratorith")
		{
			if (stat == "Strength")
			{
				return 13f;
			}
			if (stat == "Agility")
			{
				return 9f;
			}
			if (stat == "Aura")
			{
				return 11f;
			}
			if (stat == "Pagan")
			{
				return 10f;
			}
			if (stat == "Dexterity")
			{
				return 10f;
			}
			if (stat == "Sensory")
			{
				return 13f;
			}
		}
		if (race == "Yeti")
		{
			if (stat == "Strength")
			{
				return 15f;
			}
			if (stat == "Agility")
			{
				return 7f;
			}
			if (stat == "Aura")
			{
				return 14f;
			}
			if (stat == "Pagan")
			{
				return 13f;
			}
			if (stat == "Dexterity")
			{
				return 8f;
			}
			if (stat == "Sensory")
			{
				return 9f;
			}
		}
		return 0f;
	}

	// Token: 0x06000EE5 RID: 3813 RVA: 0x0011F7E4 File Offset: 0x0011D9E4
	public float GetSexBase(float sex, string race, string baseType)
	{
		bool flag = false;
		float num;
		if (sex < 0.5f)
		{
			num = 0.5f - sex;
			flag = true;
		}
		else
		{
			num = sex - 0.5f;
		}
		num *= 2f;
		if (race == "Ameythevian")
		{
			if (baseType == "Sight")
			{
				return num;
			}
			if (baseType == "Stamina")
			{
				return 0f;
			}
			if (baseType == "Health")
			{
				if (flag)
				{
					return num;
				}
				return 0f;
			}
			else if (baseType == "Armor")
			{
				if (flag)
				{
					return num;
				}
				return 0f;
			}
			else if (baseType == "Rally")
			{
				if (flag)
				{
					return 0f;
				}
				return num * 0.25f;
			}
			else if (baseType == "Weight")
			{
				if (flag)
				{
					return num * -5f;
				}
				return num * 3f;
			}
		}
		if (race == "Varuchov")
		{
			if (baseType == "Sight")
			{
				if (flag)
				{
					return num * 1f;
				}
				return 0f;
			}
			else
			{
				if (baseType == "Stamina")
				{
					return 0f;
				}
				if (baseType == "Health")
				{
					if (flag)
					{
						return num;
					}
					return num * 1f;
				}
				else
				{
					if (baseType == "Armor")
					{
						return 0f;
					}
					if (baseType == "Rally")
					{
						if (flag)
						{
							return num * 0.25f;
						}
						return num * -0.25f;
					}
					else if (baseType == "Weight")
					{
						if (flag)
						{
							return num * -3f;
						}
						return num * 4f;
					}
				}
			}
		}
		if (race == "Ameythevian")
		{
			if (baseType == "Sight")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 1f;
			}
			else if (baseType == "Stamina")
			{
				if (flag)
				{
					return 0f;
				}
				return num * 2f;
			}
			else if (baseType == "Health")
			{
				if (flag)
				{
					return num * 1f;
				}
				return num;
			}
			else
			{
				if (baseType == "Armor")
				{
					return 0f;
				}
				if (baseType == "Rally")
				{
					return num * -0.25f;
				}
				if (baseType == "Weight")
				{
					if (flag)
					{
						return num * -3f;
					}
					return num * 3f;
				}
			}
		}
		if (race == "Taratorith")
		{
			if (baseType == "Sight")
			{
				if (flag)
				{
					return num * 1f;
				}
				return num * 0f;
			}
			else if (baseType == "Stamina")
			{
				if (flag)
				{
					return 0f;
				}
				return num * 3f;
			}
			else if (baseType == "Health")
			{
				if (flag)
				{
					return num * 1f;
				}
				return 0f;
			}
			else
			{
				if (baseType == "Armor")
				{
					return 0f;
				}
				if (baseType == "Rally")
				{
					if (flag)
					{
						return num * 0f;
					}
					return num * 0.25f;
				}
				else if (baseType == "Weight")
				{
					if (flag)
					{
						return num * -4f;
					}
					return num * 4f;
				}
			}
		}
		if (race == "Yeti")
		{
			if (baseType == "Sight")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 1f;
			}
			else
			{
				if (baseType == "Stamina")
				{
					return 0f;
				}
				if (baseType == "Health")
				{
					if (flag)
					{
						return num * 1f;
					}
					return num * 0f;
				}
				else
				{
					if (baseType == "Armor")
					{
						return 0f;
					}
					if (baseType == "Rally")
					{
						if (flag)
						{
							return 0f;
						}
						return num * 0f;
					}
					else if (baseType == "Weight")
					{
						if (flag)
						{
							return num * -5f;
						}
						return num * 5f;
					}
				}
			}
		}
		return 0f;
	}

	// Token: 0x06000EE6 RID: 3814 RVA: 0x0011FBA8 File Offset: 0x0011DDA8
	public float GetSexStatBases(float sex, string stat, string race)
	{
		bool flag = false;
		float num;
		if (sex < 0.5f)
		{
			num = 0.5f - sex;
			flag = true;
		}
		else
		{
			num = sex - 0.5f;
		}
		num *= 2f;
		if (race == "Ameythevian")
		{
			if (stat == "Strength")
			{
				return num;
			}
			if (stat == "Agility")
			{
				return 0f;
			}
			if (stat == "Aura")
			{
				if (flag)
				{
					return num;
				}
				return num * -2f;
			}
			else if (stat == "Pagan")
			{
				if (flag)
				{
					return num * -1f;
				}
				return num;
			}
			else
			{
				if (stat == "Dexterity")
				{
					return 0f;
				}
				if (stat == "Sensory")
				{
					if (flag)
					{
						return num * -1f;
					}
					return 0f;
				}
			}
		}
		if (race == "Varuchov")
		{
			if (stat == "Strength")
			{
				if (flag)
				{
					return 0f;
				}
				return num * 2f;
			}
			else if (stat == "Agility")
			{
				if (flag)
				{
					return num * 2f;
				}
				return num * -1f;
			}
			else if (stat == "Aura")
			{
				if (flag)
				{
					return 0f;
				}
				return num * 1f;
			}
			else if (stat == "Pagan")
			{
				if (flag)
				{
					return num * -1f;
				}
				return 0f;
			}
			else
			{
				if (stat == "Dexterity")
				{
					return num * -1f;
				}
				if (stat == "Sensory")
				{
					if (flag)
					{
						return 0f;
					}
					return num * -1f;
				}
			}
		}
		if (race == "Pasaaren")
		{
			if (stat == "Strength")
			{
				if (flag)
				{
					return num * 2f;
				}
				return num * -1f;
			}
			else
			{
				if (stat == "Agility")
				{
					return num * 0f;
				}
				if (stat == "Aura")
				{
					if (flag)
					{
						return num * -1f;
					}
					return num * 2f;
				}
				else
				{
					if (stat == "Pagan")
					{
						return num * 0f;
					}
					if (stat == "Dexterity")
					{
						if (flag)
						{
							return num * -1f;
						}
						return num * 0f;
					}
					else if (stat == "Sensory")
					{
						if (flag)
						{
							return num * 0f;
						}
						return num * -1f;
					}
				}
			}
		}
		if (race == "Taratorith")
		{
			if (stat == "Strength")
			{
				return num * -1f;
			}
			if (stat == "Agility")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 3f;
			}
			else
			{
				if (stat == "Aura")
				{
					return num * -1f;
				}
				if (stat == "Pagan")
				{
					return num * 1f;
				}
				if (stat == "Dexterity")
				{
					if (flag)
					{
						return num * 2f;
					}
					return num * -2f;
				}
				else if (stat == "Sensory")
				{
					if (flag)
					{
						return num * -1f;
					}
					return num * 0f;
				}
			}
		}
		if (race == "Yeti")
		{
			if (stat == "Strength")
			{
				if (flag)
				{
					return num * -2f;
				}
				return num * 1f;
			}
			else if (stat == "Agility")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 1f;
			}
			else if (stat == "Aura")
			{
				if (flag)
				{
					return num * 1f;
				}
				return num * -2f;
			}
			else if (stat == "Pagan")
			{
				if (flag)
				{
					return num * 1f;
				}
				return num * -3f;
			}
			else if (stat == "Dexterity")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 1f;
			}
			else if (stat == "Sensory")
			{
				if (flag)
				{
					return num * 0f;
				}
				return num * 2f;
			}
		}
		return 0f;
	}

	// Token: 0x06000EE7 RID: 3815 RVA: 0x0011FF88 File Offset: 0x0011E188
	public float GetRacialSkillBases(string skill, string race)
	{
		if (race == "Ameythevian")
		{
			if (skill == "Robes")
			{
				return 12f;
			}
			if (skill == "Pearl")
			{
				return 16f;
			}
			if (skill == "Crimscale")
			{
				return 13f;
			}
			if (skill == "Stonewood")
			{
				return 9f;
			}
			if (skill == "ShortSword")
			{
				return 10f;
			}
			if (skill == "LongSword")
			{
				return 15f;
			}
			if (skill == "Scepter")
			{
				return 9f;
			}
			if (skill == "Ax")
			{
				return 10f;
			}
			if (skill == "Pole")
			{
				return 15f;
			}
			if (skill == "Multi-Hand")
			{
				return 10f;
			}
			if (skill == "Bow")
			{
				return 10f;
			}
			if (skill == "Sling")
			{
				return 10f;
			}
			if (skill == "Elixir")
			{
				return 15f;
			}
			if (skill == "Hand-to-Hand")
			{
				return 15f;
			}
			if (skill == "LargeShield")
			{
				return 11f;
			}
			if (skill == "SmallShield")
			{
				return 10f;
			}
			if (skill == "Bindings")
			{
				return 9f;
			}
			if (skill == "Fauna")
			{
				return 14f;
			}
			if (skill == "Vines")
			{
				return 10f;
			}
			if (skill == "Spores")
			{
				return 14f;
			}
			if (skill == "Lockpick")
			{
				return 10f;
			}
			if (skill == "Sneaking")
			{
				return 10f;
			}
			if (skill == "Bartering")
			{
				return 10f;
			}
			if (skill == "Fish")
			{
				return 15f;
			}
			if (skill == "Forest")
			{
				return 10f;
			}
			if (skill == "Shroom")
			{
				return 10f;
			}
			if (skill == "Flute")
			{
				return 15f;
			}
			if (skill == "Horn")
			{
				return 13f;
			}
			if (skill == "Drum")
			{
				return 10f;
			}
			if (skill == "Pipe")
			{
				return 13f;
			}
			if (skill == "Melee")
			{
				return 10f;
			}
			if (skill == "Range")
			{
				return 10f;
			}
			if (skill == "Defense")
			{
				return 10f;
			}
			if (skill == "Night")
			{
				return 10f;
			}
			if (skill == "DenseForest")
			{
				return 10f;
			}
			if (skill == "Whip")
			{
				return 10f;
			}
		}
		if (race == "Varuchov")
		{
			if (skill == "Robes")
			{
				return 13f;
			}
			if (skill == "Pearl")
			{
				return 13f;
			}
			if (skill == "Crimscale")
			{
				return 10f;
			}
			if (skill == "Stonewood")
			{
				return 9f;
			}
			if (skill == "ShortSword")
			{
				return 17f;
			}
			if (skill == "LongSword")
			{
				return 10f;
			}
			if (skill == "Scepter")
			{
				return 15f;
			}
			if (skill == "Ax")
			{
				return 10f;
			}
			if (skill == "Pole")
			{
				return 10f;
			}
			if (skill == "Multi-Hand")
			{
				return 14f;
			}
			if (skill == "Bow")
			{
				return 10f;
			}
			if (skill == "Sling")
			{
				return 15f;
			}
			if (skill == "Elixir")
			{
				return 9f;
			}
			if (skill == "Hand-to-Hand")
			{
				return 9f;
			}
			if (skill == "LargeShield")
			{
				return 9f;
			}
			if (skill == "SmallShield")
			{
				return 15f;
			}
			if (skill == "Bindings")
			{
				return 10f;
			}
			if (skill == "Fauna")
			{
				return 11f;
			}
			if (skill == "Vines")
			{
				return 12f;
			}
			if (skill == "Spores")
			{
				return 15f;
			}
			if (skill == "Lockpick")
			{
				return 14f;
			}
			if (skill == "Sneaking")
			{
				return 13f;
			}
			if (skill == "Bartering")
			{
				return 12f;
			}
			if (skill == "Fish")
			{
				return 11f;
			}
			if (skill == "Forest")
			{
				return 9f;
			}
			if (skill == "Shroom")
			{
				return 15f;
			}
			if (skill == "Flute")
			{
				return 11f;
			}
			if (skill == "Horn")
			{
				return 13f;
			}
			if (skill == "Drum")
			{
				return 10f;
			}
			if (skill == "Pipe")
			{
				return 9f;
			}
			if (skill == "Melee")
			{
				return 10f;
			}
			if (skill == "Range")
			{
				return 10f;
			}
			if (skill == "Defense")
			{
				return 10f;
			}
			if (skill == "Night")
			{
				return 10f;
			}
			if (skill == "DenseForest")
			{
				return 10f;
			}
			if (skill == "Whip")
			{
				return 9f;
			}
		}
		if (race == "Pasaaren")
		{
			if (skill == "Robes")
			{
				return 10f;
			}
			if (skill == "Pearl")
			{
				return 12f;
			}
			if (skill == "Crimscale")
			{
				return 14f;
			}
			if (skill == "Stonewood")
			{
				return 10f;
			}
			if (skill == "ShortSword")
			{
				return 13f;
			}
			if (skill == "LongSword")
			{
				return 9f;
			}
			if (skill == "Scepter")
			{
				return 13f;
			}
			if (skill == "Ax")
			{
				return 11f;
			}
			if (skill == "Pole")
			{
				return 10f;
			}
			if (skill == "Multi-Hand")
			{
				return 13f;
			}
			if (skill == "Bow")
			{
				return 15f;
			}
			if (skill == "Sling")
			{
				return 11f;
			}
			if (skill == "Elixir")
			{
				return 10f;
			}
			if (skill == "Hand-to-Hand")
			{
				return 10f;
			}
			if (skill == "LargeShield")
			{
				return 9f;
			}
			if (skill == "SmallShield")
			{
				return 13f;
			}
			if (skill == "Bindings")
			{
				return 16f;
			}
			if (skill == "Fauna")
			{
				return 15f;
			}
			if (skill == "Vines")
			{
				return 13f;
			}
			if (skill == "Spores")
			{
				return 10f;
			}
			if (skill == "Lockpick")
			{
				return 12f;
			}
			if (skill == "Sneaking")
			{
				return 9f;
			}
			if (skill == "Bartering")
			{
				return 10f;
			}
			if (skill == "Fish")
			{
				return 9f;
			}
			if (skill == "Forest")
			{
				return 14f;
			}
			if (skill == "Shroom")
			{
				return 10f;
			}
			if (skill == "Flute")
			{
				return 12f;
			}
			if (skill == "Horn")
			{
				return 12f;
			}
			if (skill == "Drum")
			{
				return 10f;
			}
			if (skill == "Pipe")
			{
				return 13f;
			}
			if (skill == "Melee")
			{
				return 10f;
			}
			if (skill == "Range")
			{
				return 10f;
			}
			if (skill == "Defense")
			{
				return 10f;
			}
			if (skill == "Night")
			{
				return 10f;
			}
			if (skill == "DenseForest")
			{
				return 10f;
			}
			if (skill == "Whip")
			{
				return 14f;
			}
		}
		if (race == "Taratorith")
		{
			if (skill == "Robes")
			{
				return 11f;
			}
			if (skill == "Pearl")
			{
				return 12f;
			}
			if (skill == "Crimscale")
			{
				return 13f;
			}
			if (skill == "Stonewood")
			{
				return 14f;
			}
			if (skill == "ShortSword")
			{
				return 13f;
			}
			if (skill == "LongSword")
			{
				return 15f;
			}
			if (skill == "Scepter")
			{
				return 10f;
			}
			if (skill == "Ax")
			{
				return 13f;
			}
			if (skill == "Pole")
			{
				return 10f;
			}
			if (skill == "Multi-Hand")
			{
				return 9f;
			}
			if (skill == "Bow")
			{
				return 10f;
			}
			if (skill == "Sling")
			{
				return 9f;
			}
			if (skill == "Elixir")
			{
				return 10f;
			}
			if (skill == "Hand-to-Hand")
			{
				return 10f;
			}
			if (skill == "LargeShield")
			{
				return 15f;
			}
			if (skill == "SmallShield")
			{
				return 14f;
			}
			if (skill == "Bindings")
			{
				return 13f;
			}
			if (skill == "Fauna")
			{
				return 13f;
			}
			if (skill == "Vines")
			{
				return 14f;
			}
			if (skill == "Spores")
			{
				return 10f;
			}
			if (skill == "Lockpick")
			{
				return 10f;
			}
			if (skill == "Sneaking")
			{
				return 12f;
			}
			if (skill == "Bartering")
			{
				return 14f;
			}
			if (skill == "Fish")
			{
				return 12f;
			}
			if (skill == "Forest")
			{
				return 12f;
			}
			if (skill == "Shroom")
			{
				return 11f;
			}
			if (skill == "Flute")
			{
				return 9f;
			}
			if (skill == "Horn")
			{
				return 15f;
			}
			if (skill == "Drum")
			{
				return 10f;
			}
			if (skill == "Pipe")
			{
				return 12f;
			}
			if (skill == "Melee")
			{
				return 10f;
			}
			if (skill == "Range")
			{
				return 10f;
			}
			if (skill == "Defense")
			{
				return 10f;
			}
			if (skill == "Night")
			{
				return 10f;
			}
			if (skill == "DenseForest")
			{
				return 10f;
			}
			if (skill == "Whip")
			{
				return 9f;
			}
		}
		if (race == "Yeti")
		{
			if (skill == "Robes")
			{
				return 14f;
			}
			if (skill == "Pearl")
			{
				return 11f;
			}
			if (skill == "Crimscale")
			{
				return 13f;
			}
			if (skill == "Stonewood")
			{
				return 9f;
			}
			if (skill == "ShortSword")
			{
				return 9f;
			}
			if (skill == "LongSword")
			{
				return 15f;
			}
			if (skill == "Scepter")
			{
				return 15f;
			}
			if (skill == "Ax")
			{
				return 9f;
			}
			if (skill == "Pole")
			{
				return 13f;
			}
			if (skill == "Multi-Hand")
			{
				return 14f;
			}
			if (skill == "Bow")
			{
				return 10f;
			}
			if (skill == "Sling")
			{
				return 4f;
			}
			if (skill == "Elixir")
			{
				return 3f;
			}
			if (skill == "Hand-to-Hand")
			{
				return 16f;
			}
			if (skill == "LargeShield")
			{
				return 13f;
			}
			if (skill == "SmallShield")
			{
				return 7f;
			}
			if (skill == "Bindings")
			{
				return 2f;
			}
			if (skill == "Fauna")
			{
				return 16f;
			}
			if (skill == "Vines")
			{
				return 15f;
			}
			if (skill == "Spores")
			{
				return 16f;
			}
			if (skill == "Lockpick")
			{
				return 9f;
			}
			if (skill == "Sneaking")
			{
				return 11f;
			}
			if (skill == "Bartering")
			{
				return 10f;
			}
			if (skill == "Fish")
			{
				return 11f;
			}
			if (skill == "Forest")
			{
				return 12f;
			}
			if (skill == "Shroom")
			{
				return 13f;
			}
			if (skill == "Flute")
			{
				return 9f;
			}
			if (skill == "Horn")
			{
				return 14f;
			}
			if (skill == "Drum")
			{
				return 10f;
			}
			if (skill == "Pipe")
			{
				return 12f;
			}
			if (skill == "Melee")
			{
				return 10f;
			}
			if (skill == "Range")
			{
				return 10f;
			}
			if (skill == "Defense")
			{
				return 10f;
			}
			if (skill == "Night")
			{
				return 10f;
			}
			if (skill == "DenseForest")
			{
				return 10f;
			}
			if (skill == "Whip")
			{
				return 10f;
			}
		}
		return 0f;
	}

	// Token: 0x06000EE8 RID: 3816 RVA: 0x00120D48 File Offset: 0x0011EF48
	public float AddMajorsMinors(string s)
	{
		bool flag = false;
		if (s == "Aura" || s == "Agility" || s == "Dexterity" || s == "Strength" || s == "Pagan" || s == "Sensory")
		{
			flag = true;
		}
		int transformIndex = this.GetTransformIndex(s, flag);
		if (transformIndex == -1)
		{
			Debug.Log("no index " + s);
			return 0f;
		}
		if (flag)
		{
			if (this.majorStat1 == s)
			{
				this.SetTokenPosition(transformIndex, 1, flag);
				return 25f;
			}
			if (this.majorStat2 == s)
			{
				this.SetTokenPosition(transformIndex, 2, flag);
				return 25f;
			}
			if (this.minorStat3 == s)
			{
				this.SetTokenPosition(transformIndex, 3, flag);
				return 15f;
			}
		}
		else
		{
			if (this.majorSkill1 == s)
			{
				this.SetTokenPosition(transformIndex, 4, flag);
				return 100f;
			}
			if (this.majorSkill2 == s)
			{
				this.SetTokenPosition(transformIndex, 5, flag);
				return 100f;
			}
			if (this.minorSkill3 == s)
			{
				this.SetTokenPosition(transformIndex, 6, flag);
				return 50f;
			}
		}
		return 0f;
	}

	// Token: 0x06000EE9 RID: 3817 RVA: 0x00120E80 File Offset: 0x0011F080
	public string SkillsFromArchetypes(bool returnIt, int returnIndex)
	{
		this.ResetTokenPosition();
		string text = "";
		if (!returnIt)
		{
			for (int i = 0; i < 8; i++)
			{
				this.archetypeStatus[i] = false;
			}
		}
		if (this.currentArchetype == "Create")
		{
			text = "";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "";
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Tank")
		{
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Aura";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Scepter";
			this.SubTokenForArmorRequirements("Scepter", out text);
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Bindings";
			this.SubTokenForArmorRequirements("Bindings", out text);
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "LargeShield";
			this.SubTokenForArmorRequirements("LargeShield", out text);
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Glass Cannon")
		{
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Agility";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "ShortSword";
			this.SubTokenForArmorRequirements("ShortSword", out text);
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Multi-Hand";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Bartering";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Archer")
		{
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Aura";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Bow";
			this.SubTokenForArmorRequirements("Bow", out text);
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Pearl";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Bindings";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Rogue")
		{
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Agility";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Sling";
			this.SubTokenForArmorRequirements("Sling", out text);
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Lockpick";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Sneaking";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Buffer")
		{
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Aura";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Flute";
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Elixir";
			this.SubTokenForArmorRequirements("Elixir", out text);
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Pearl";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Summoner")
		{
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Forest";
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Whip";
			this.SubTokenForArmorRequirements("Whip", out text);
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Crimscale";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Berserker")
		{
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Pole";
			this.SubTokenForArmorRequirements("Pole", out text);
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Horn";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Bow";
			this.SubTokenForArmorRequirements("Bow", out text);
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Pagan 1")
		{
			text = "Pagan";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Sensory";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Aura";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Vines";
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Spores";
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Sling";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		if (this.currentArchetype == "Pagan 2")
		{
			text = "Pagan";
			if (returnIt)
			{
				if (returnIndex == 0)
				{
					return text;
				}
			}
			else
			{
				this.majorStat1 = text;
			}
			text = "Dexterity";
			if (returnIt)
			{
				if (returnIndex == 1)
				{
					return text;
				}
			}
			else
			{
				this.majorStat2 = text;
			}
			text = "Strength";
			if (returnIt)
			{
				if (returnIndex == 2)
				{
					return text;
				}
			}
			else
			{
				this.minorStat3 = text;
			}
			text = "Fauna";
			if (returnIt)
			{
				if (returnIndex == 3)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill1 = text;
			}
			text = "Ax";
			this.SubTokenForArmorRequirements("Ax", out text);
			if (returnIt)
			{
				if (returnIndex == 4)
				{
					return text;
				}
			}
			else
			{
				this.majorSkill2 = text;
			}
			text = "Crimscale";
			if (returnIt)
			{
				if (returnIndex == 5)
				{
					return text;
				}
			}
			else
			{
				this.minorSkill3 = text;
			}
		}
		return "";
	}

	// Token: 0x06000EEA RID: 3818 RVA: 0x00121540 File Offset: 0x0011F740
	public bool SubTokenForArmorRequirements(string skill, out string substitute)
	{
		substitute = "";
		if (this.selectedRace == "Yeti")
		{
			if (skill == "ShortSword" || skill == "Short Sword")
			{
				substitute = "LongSword";
				return true;
			}
			if (skill == "Ax")
			{
				substitute = "LongSword";
				return true;
			}
			if (skill == "Bow")
			{
				substitute = "LongSword";
				return true;
			}
			if (skill == "Sling" || skill == "Slings")
			{
				substitute = "Pole";
				return true;
			}
			if (skill == "SmallShield" || skill == "Small Shield")
			{
				substitute = "LargeShield";
				return true;
			}
			if (skill == "Whip")
			{
				substitute = "Hand-to-Hand";
				return true;
			}
			if (skill == "Elixir" || skill == "Elixirs" || skill == "Elyxirs")
			{
				substitute = "Pole";
				return true;
			}
		}
		substitute = skill;
		return false;
	}

	// Token: 0x06000EEB RID: 3819 RVA: 0x00121648 File Offset: 0x0011F848
	public void ResetTokenPosition()
	{
		this.tokenMajorStat1.anchoredPosition3D = this.backTokenMajorStat1.anchoredPosition3D;
		this.tokenImgMajorStat1.raycastTarget = true;
		this.tokenMajorStat2.anchoredPosition3D = this.backTokenMajorStat2.anchoredPosition3D;
		this.tokenImgMajorStat2.raycastTarget = true;
		this.tokenMinorStat3.anchoredPosition3D = this.backTokenMinorStat3.anchoredPosition3D;
		this.tokenImgMinorStat3.raycastTarget = true;
		this.tokenMajorSkill4.anchoredPosition3D = this.backTokenMajorSkill4.anchoredPosition3D;
		this.tokenImgMajorSkill4.raycastTarget = true;
		this.tokenMajorSkill5.anchoredPosition3D = this.backTokenMajorSkill5.anchoredPosition3D;
		this.tokenImgMajorSkill5.raycastTarget = true;
		this.tokenMinorSkill6.anchoredPosition3D = this.backTokenMinorSkill6.anchoredPosition3D;
		this.tokenImgMinorSkill6.raycastTarget = true;
	}

	// Token: 0x06000EEC RID: 3820 RVA: 0x00121724 File Offset: 0x0011F924
	public void SetTokenPosition(int s, int x, bool isStat)
	{
		if (isStat)
		{
			if (x == 1)
			{
				this.tokenMajorStat1.anchoredPosition3D = this.statTransforms[s].anchoredPosition3D - new Vector3(75f, -1f, 0f);
				this.tokenImgMajorStat1.raycastTarget = false;
			}
			if (x == 2)
			{
				this.tokenMajorStat2.anchoredPosition3D = this.statTransforms[s].anchoredPosition3D - new Vector3(75f, -1f, 0f);
				this.tokenImgMajorStat2.raycastTarget = false;
			}
			if (x == 3)
			{
				this.tokenMinorStat3.anchoredPosition3D = this.statTransforms[s].anchoredPosition3D - new Vector3(75f, -1f, 0f);
				this.tokenImgMinorStat3.raycastTarget = false;
				return;
			}
		}
		else
		{
			if (x == 4)
			{
				this.tokenMajorSkill4.anchoredPosition3D = this.skillTransforms[s].anchoredPosition3D - new Vector3(88f, -1.25f, 0f);
				this.tokenImgMajorSkill4.raycastTarget = false;
			}
			if (x == 5)
			{
				this.tokenMajorSkill5.anchoredPosition3D = this.skillTransforms[s].anchoredPosition3D - new Vector3(88f, -1.25f, 0f);
				this.tokenImgMajorSkill5.raycastTarget = false;
			}
			if (x == 6)
			{
				this.tokenMinorSkill6.anchoredPosition3D = this.skillTransforms[s].anchoredPosition3D - new Vector3(88f, -1.25f, 0f);
				this.tokenImgMinorSkill6.raycastTarget = false;
			}
		}
	}

	// Token: 0x06000EED RID: 3821 RVA: 0x001218C4 File Offset: 0x0011FAC4
	private void LateUpdate()
	{
		if (this.open)
		{
			this.updateTime = Time.realtimeSinceStartup;
			this.currIndex++;
			if (this.currIndex > 4)
			{
				this.currIndex = 0;
			}
			if (this.fromBeginning)
			{
				for (int i = 0; i < 4; i++)
				{
					if (i < this.portraits.Length && this.portraits[i] && i < this.party.Count && this.party[i] && this.party[i].characterSheetPortrait)
					{
						this.portraits[i].texture = this.party[i].characterSheetPortrait.GetTextureIdle(0);
					}
				}
			}
			else
			{
				for (int j = 0; j < this.party.Count; j++)
				{
					if (j < this.portraits.Length && this.portraits[j] && this.party[j] && this.party[j].characterSheetPortrait)
					{
						this.portraits[j].texture = this.party[j].characterSheetPortrait.GetTextureIdle(0);
					}
				}
			}
			if (Links.x.hudControl.canvasGroup.interactable && Records.x.typing)
			{
				Links.x.hudControl.ChangeHudVisibility(false, true);
			}
			if (this.animator.GetCurrentAnimatorStateInfo(0).normalizedTime >= 0.95f && !this.tokenConfirm.activeSelf && !this.spinning)
			{
				if (Links.x.mk || Links.x.joy)
				{
					if (Links.x.mk)
					{
						this.currentHover = null;
						this.pointer = new PointerEventData(EventSystem.current);
						this.pointer.position = Input.mousePosition;
						this.raycastResults.Clear();
						EventSystem.current.RaycastAll(this.pointer, this.raycastResults);
						if (this.raycastResults.Count <= 0)
						{
							goto IL_0294;
						}
						int num = 0;
						using (List<RaycastResult>.Enumerator enumerator = this.raycastResults.GetEnumerator())
						{
							while (enumerator.MoveNext())
							{
								RaycastResult raycastResult = enumerator.Current;
								if (num == 0)
								{
									this.currentHover = raycastResult.gameObject;
								}
								num++;
							}
							goto IL_0294;
						}
					}
					this.currentHover = Links.x.gameplay.currentEventObject;
					IL_0294:
					bool flag = false;
					if (true)
					{
						if (this.currentHover && this.currentHover != this.prevHover)
						{
							flag = this.GetDescriptionController(this.currentHover);
							string name = this.currentHover.name;
							if (!flag)
							{
							}
						}
					}
					else if (this.currentHover && Links.x.mk && Input.GetMouseButtonDown(1))
					{
						flag = this.GetDescriptionController(this.currentHover);
					}
					if (this.currentHover && this.currentHover != this.prevHover)
					{
						string name2 = this.currentHover.name;
						string text = "";
						bool flag2 = false;
						float num2 = 0f;
						bool flag3 = false;
						this.hoveringOnStat = false;
						this.hoveringOnSkill = false;
						Links.x.manual.GetDescription(false, name2, this.character, out text, out flag2, out flag3, out num2);
						if (flag3)
						{
							this.hoveringOnStat = true;
						}
						if (flag2)
						{
							this.hoveringOnSkill = true;
						}
						bool flag4 = false;
						if (text != "")
						{
							this.isHovering = true;
							flag4 = true;
							if (!Records.x.filming)
							{
								this.targetAlpha = 1f;
							}
							this.str.Clear();
							if ((flag3 || flag2) && this.draggingToken)
							{
								bool flag5 = true;
								if (this.dragToken == this.tokenMajorStat1 || this.dragToken == this.tokenMajorStat2 || this.dragToken == this.tokenMinorStat3)
								{
									flag5 = false;
								}
								if (this.hoveringTokenBack)
								{
									this.hoveringTokenBack.color = new Color(this.hoveringTokenBack.color.r, this.hoveringTokenBack.color.g, this.hoveringTokenBack.color.b, 0.247f);
									this.hoveringTokenBack = null;
								}
								if ((flag2 && flag5) || (flag3 && !flag5))
								{
									int transformIndex = this.GetTransformIndex(name2, flag3);
									if (flag3 && transformIndex > -1)
									{
										this.hoveringTokenBack = this.statTokenBacks[transformIndex];
									}
									string text2;
									if (flag2 && transformIndex > -1 && !this.SubTokenForArmorRequirements(name2, out text2))
									{
										this.hoveringTokenBack = this.skillTokenBacks[transformIndex];
									}
									if (this.hoveringTokenBack)
									{
										this.hoveringTokenBack.color = new Color(this.hoveringTokenBack.color.r, this.hoveringTokenBack.color.g, this.hoveringTokenBack.color.b, 0.7f);
									}
								}
							}
							if (Links.x.mk)
							{
								if (this.draggingToken)
								{
									this.str.Append("<voffset=.4em><size=40><sprite=");
									int keyIconIndex = Links.x.keyControl.GetKeyIconIndex("LMB");
									this.str.Append(keyIconIndex);
									this.str.Append("></size></voffset>");
									if (flag2)
									{
										this.str.Append("Choose Skill     ");
									}
									else
									{
										this.str.Append("Choose Stat     ");
									}
								}
							}
							else
							{
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int controllerSprite = Links.x.gameplay.GetControllerSprite("Joystick", Links.x.gameplay.controllerName);
								this.str.Append(controllerSprite);
								this.str.Append("></size></voffset>");
								this.str.Append("Navigate      ");
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int controllerSprite2 = Links.x.gameplay.GetControllerSprite("Show Items", Links.x.gameplay.controllerName);
								int controllerSprite3 = Links.x.gameplay.GetControllerSprite("Dock", Links.x.gameplay.controllerName);
								this.str.Append(controllerSprite2);
								this.str.Append("><sprite=");
								this.str.Append(controllerSprite3);
								this.str.Append("></size></voffset>");
								this.str.Append("Spin");
							}
						}
						if (name2.Contains("Token") && (name2.Contains("Gold") || name2.Contains("Silver")))
						{
							this.isHovering = true;
							flag4 = true;
							this.str.Clear();
							if (Links.x.mk)
							{
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int keyIconIndex2 = Links.x.keyControl.GetKeyIconIndex("LMB");
								this.str.Append(keyIconIndex2);
								this.str.Append("></size></voffset>");
								if (name2.Contains("Skill"))
								{
									this.str.Append("Place on skill");
								}
								else
								{
									this.str.Append("Place on skill");
								}
							}
							else
							{
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int controllerSprite4 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
								this.str.Append(controllerSprite4);
								this.str.Append("></size></voffset>");
								if (name2.Contains("Skill"))
								{
									this.str.Append("Place on skill");
								}
								else
								{
									this.str.Append("Place on skill");
								}
							}
						}
						if (name2.Contains("Abilities"))
						{
							this.isHovering = true;
							flag4 = true;
							string text3 = "";
							if (name2.Contains("Vines"))
							{
								text3 = "Vines";
							}
							if (name2.Contains("Fauna"))
							{
								text3 = "Fauna";
							}
							if (name2.Contains("Spores"))
							{
								text3 = "Spores";
							}
							if (name2.Contains("Pipe"))
							{
								text3 = "Pipe";
							}
							if (name2.Contains("Flute"))
							{
								text3 = "Flute";
							}
							if (name2.Contains("Horn"))
							{
								text3 = "Horn";
							}
							this.str.Clear();
							if (Links.x.mk)
							{
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int keyIconIndex3 = Links.x.keyControl.GetKeyIconIndex("LMB");
								this.str.Append(keyIconIndex3);
								this.str.Append("></size></voffset>");
								this.str.Append("Select ");
								this.str.Append(Links.x.manual.DisplayName(text3));
							}
							else
							{
								this.str.Append("<voffset=.4em><size=40><sprite=");
								int controllerSprite5 = Links.x.gameplay.GetControllerSprite("Action", Links.x.gameplay.controllerName);
								this.str.Append(controllerSprite5);
								this.str.Append("></size></voffset>");
								this.str.Append("Select ");
								this.str.Append(Links.x.manual.DisplayName(text3));
							}
						}
						if (this.isHovering && flag4)
						{
							if (Links.x.mk)
							{
								this.tooltipText.text = this.str.ToString();
								if (this.tooltipCorout != null)
								{
									base.StopCoroutine(this.tooltipCorout);
									this.tooltipCorout = null;
								}
								this.tooltip.SetActive(true);
							}
							flag = true;
						}
					}
					bool flag6 = false;
					if (this.isHovering)
					{
						if (this.currentHover != null)
						{
							if (this.hoveringOnStat || this.hoveringOnSkill)
							{
								Links.x.gameplay.uiCanClick = true;
								if ((Input.GetMouseButtonDown(0) && Links.x.mk) || (Links.x.joy && Links.x.gameplay.actionStart))
								{
									bool flag7 = true;
									string name3 = this.currentHover.name;
									if (name3 == "Dexterity" || name3 == "Strength" || name3 == "Agility" || name3 == "Sensory" || name3 == "Aura" || name3 == "Pagan")
									{
										flag7 = false;
									}
									bool flag8;
									if (flag7)
									{
										flag8 = this.HasTokenSkill(name3);
									}
									else
									{
										flag8 = this.HasTokenStat(name3);
									}
									string text4;
									if (flag8)
									{
										if (flag7)
										{
											this.RemoveTokenSkill(name3);
										}
										else
										{
											this.RemoveTokenStat(name3);
										}
									}
									else if (!this.SubTokenForArmorRequirements(this.currentHover.name, out text4) || !flag7)
									{
										this.PlaceToken();
									}
								}
							}
							else if (this.currentHover.name.Contains("Token") && (this.currentHover.name.Contains("Gold") || this.currentHover.name.Contains("Silver")) && ((Input.GetMouseButtonDown(0) && Links.x.mk) || (Links.x.joy && Links.x.gameplay.actionStart)))
							{
								this.ReturnTokenDrag();
								this.StartTokenDrag();
								flag6 = true;
							}
						}
						if (Input.GetMouseButtonUp(0) && Links.x.mk)
						{
							EventSystem.current.SetSelectedGameObject(null);
						}
					}
					if (this.draggingToken && !flag6 && ((Input.GetMouseButtonDown(0) && Links.x.mk) || (Links.x.joy && Links.x.gameplay.cancelStart)))
					{
						this.ReturnTokenDrag();
					}
					if (this.prevHover && this.currentHover != this.prevHover && !flag && this.prevHover && this.isHovering)
					{
						this.EndHover();
					}
					this.prevHover = this.currentHover;
				}
				if (!this.isHovering && this.openIndex == 1)
				{
					string text5 = "";
					bool flag9;
					bool flag10;
					float num3;
					Links.x.manual.GetDescription(true, this.currentArchetype, this.character, out text5, out flag9, out flag10, out num3);
				}
			}
			else
			{
				Links.x.gameplay.uiCanClick = false;
			}
			this.body;
			if (this.targetAlpha == 1f)
			{
				this.currentAlpha = Mathf.Lerp(this.currentAlpha, this.targetAlpha, Time.unscaledDeltaTime * 5f);
				if (this.currentAlpha >= 0f)
				{
					this.canvasGroup.alpha = this.currentAlpha;
				}
				else
				{
					this.canvasGroup.alpha = 0f;
				}
				if (this.currentAlpha > 0.01f && !this.itemTooltip.activeSelf)
				{
					this.itemTooltip.SetActive(true);
					return;
				}
			}
			else
			{
				this.currentAlpha = Mathf.Lerp(this.currentAlpha, this.targetAlpha, Time.unscaledDeltaTime * 5f);
				if (this.currentAlpha >= 0f)
				{
					this.canvasGroup.alpha = this.currentAlpha;
				}
				else
				{
					this.canvasGroup.alpha = 0f;
				}
				if (this.currentAlpha < 0.01f && this.itemTooltip.activeSelf)
				{
					this.CloseDesc();
				}
			}
		}
	}

	// Token: 0x06000EEE RID: 3822 RVA: 0x001226E0 File Offset: 0x001208E0
	private void EndHover()
	{
		if (this.hoverCorout != null)
		{
			base.StopCoroutine(this.hoverCorout);
			this.hoverCorout = null;
		}
		if (this.showStatHovers)
		{
			this.auraLabel.color = this.statNormalColor;
			this.agilityLabel.color = this.statNormalColor;
			this.strengthLabel.color = this.statNormalColor;
			this.dexterityLabel.color = this.statNormalColor;
			this.paganLabel.color = this.statNormalColor;
			this.sensoryLabel.color = this.statNormalColor;
		}
		string name = this.prevHover.name;
		if (this.changedModelForHover)
		{
			this.ChangeModel(this.selectedRace, false, false);
			string text = "_Volling_Unarmed";
			if (this.character.stats.race == "Yeti")
			{
				text = "_VollingYeti_Unarmed";
			}
			AnimatorOverrideController overrideController = Links.x.archives.GetOverrideController(text);
			if (!this.body.anim)
			{
				this.body.anim = this.body.gameObject.GetComponent<Animator>();
			}
			this.body.anim.runtimeAnimatorController = overrideController;
			this.body.anim.enabled = false;
			this.body.anim.enabled = true;
			if (this.body)
			{
				this.body.anim.Rebind();
				this.body.anim.Update(0f);
			}
			Links.x.cameraCrossfade.StartCrossFade();
			this.changedModelForHover = false;
		}
		this.RecycleCreature();
		this.body.anim.Play("Idle");
		Links.x.gameplay.uiCanClick = false;
		this.isHovering = false;
		this.targetAlpha = -2f;
		if (this.hoveringTokenBack)
		{
			this.hoveringTokenBack.color = new Color(this.hoveringTokenBack.color.r, this.hoveringTokenBack.color.g, this.hoveringTokenBack.color.b, 0.247f);
			this.hoveringTokenBack = null;
		}
		if (this.tooltipCorout != null)
		{
			base.StopCoroutine(this.tooltipCorout);
			this.tooltipCorout = null;
		}
		this.tooltipCorout = this.CloseHoverTip();
		base.StartCoroutine(this.tooltipCorout);
		this.currentHover = null;
	}

	// Token: 0x06000EEF RID: 3823 RVA: 0x0012294D File Offset: 0x00120B4D
	private IEnumerator CloseHoverTip()
	{
		yield return new WaitForSecondsRealtime(0.15f);
		if (!this.isHovering && Links.x.mk)
		{
			this.tooltip.SetActive(false);
		}
		this.tooltipCorout = null;
		yield break;
	}

	// Token: 0x06000EF0 RID: 3824 RVA: 0x0012295C File Offset: 0x00120B5C
	public bool GetDescriptionController(GameObject obj)
	{
		this.hoverText = obj.name;
		if (this.hoverText == null)
		{
			return false;
		}
		string text = "";
		bool flag = false;
		float num = 0f;
		bool flag2 = false;
		this.hoveringOnStat = false;
		this.hoveringOnSkill = false;
		Links.x.manual.GetDescription(true, this.hoverText, this.character, out text, out flag, out flag2, out num);
		if (this.hoverCorout != null)
		{
			base.StopCoroutine(this.hoverCorout);
			this.hoverCorout = null;
		}
		this.hoverCorout = this.HoverCoroutine(this.hoverText, text, flag, flag2);
		base.StartCoroutine(this.hoverCorout);
		this.RecycleCreature();
		if (text != "")
		{
			this.targetAlpha = 1f;
			return true;
		}
		return false;
	}

	// Token: 0x06000EF1 RID: 3825 RVA: 0x00122A22 File Offset: 0x00120C22
	private IEnumerator HoverCoroutine(string hoverText, string text, bool isSkill, bool isStat)
	{
		bool flag = false;
		if (text != "")
		{
			if (isStat)
			{
				this.hoveringOnStat = true;
			}
			if (this.openIndex == 1)
			{
				this.isHovering = true;
				flag = true;
			}
			if (!flag)
			{
				this.auraLabel.color = this.statNormalColor;
				this.agilityLabel.color = this.statNormalColor;
				this.strengthLabel.color = this.statNormalColor;
				this.dexterityLabel.color = this.statNormalColor;
				this.paganLabel.color = this.statNormalColor;
				this.sensoryLabel.color = this.statNormalColor;
				if (!Records.x.filming)
				{
					if (!this.itemTooltip.activeSelf)
					{
						this.itemTooltip.SetActive(true);
					}
					this.descriptionText.text = text;
					if (isSkill || isStat)
					{
						string text2;
						if (isSkill && this.SubTokenForArmorRequirements(hoverText, out text2))
						{
							TextMeshProUGUI textMeshProUGUI = this.descriptionText;
							textMeshProUGUI.text = textMeshProUGUI.text + "\n\n<color=#B28D50>" + this.selectedRace + "s cannot use this.</color>";
						}
						else
						{
							TextMeshProUGUI textMeshProUGUI2 = this.descriptionText;
							textMeshProUGUI2.text = textMeshProUGUI2.text ?? "";
							if (isSkill)
							{
								this.showStatHovers = true;
								if (hoverText == "Long Sword")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Whip")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.agilityLabel.color = this.statBrightDmgColor;
									this.strengthLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Pole")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightDmgColor;
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Short Sword")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightColor;
									this.agilityLabel.color = this.statBrightDmgColor;
									this.strengthLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Scepter")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Ax")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Slings")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightColor;
								}
								if (hoverText == "Bow")
								{
									this.sensoryLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightColor;
								}
								if (hoverText == "Elixirs")
								{
									this.sensoryLabel.color = this.statBrightColor;
									this.dexterityLabel.color = this.statBrightColor;
								}
								if (hoverText == "Unarmed" || hoverText == "Hand-To-Hand")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightColor;
									this.agilityLabel.color = this.statBrightColor;
									this.strengthLabel.color = this.statBrightDmgColor;
									this.auraLabel.color = this.statBrightDmgColor;
								}
								hoverText == "Small Shield";
								hoverText == "Large Shield";
								hoverText == "Crimscale";
								hoverText == "Robes";
								hoverText == "Pearl";
								hoverText == "Stonewood";
								if (hoverText == "Flute")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Horn")
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Pipe"))
								{
									this.dexterityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Charm"))
								{
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText == "Fauna" || hoverText == "Vines" || hoverText == "Spores")
								{
									this.auraLabel.color = this.statBrightColor;
									this.paganLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Lock"))
								{
									this.dexterityLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Barter"))
								{
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Sneak"))
								{
									this.agilityLabel.color = this.statBrightColor;
									this.sensoryLabel.color = this.statBrightDmgColor;
								}
								if (hoverText.Contains("Intercession") || hoverText == "Bindings")
								{
									this.auraLabel.color = this.statBrightDmgColor;
								}
							}
						}
					}
					this.isHovering = true;
					this.tooltipRT.sizeDelta = new Vector2(this.tooltipRT.sizeDelta.x, this.descriptionText.preferredHeight);
				}
			}
		}
		if (!(hoverText == "Ameythevian") && !(hoverText == "Taratorith") && !(hoverText == "Pasaaren") && !(hoverText == "Yeti") && !(hoverText == "Varuchov") && isSkill)
		{
			this.RecycleCreature();
			this.hoveringOnSkill = true;
			if (!(hoverText == "Charm Fish") && !(hoverText == "Charm Forest") && !(hoverText == "Charm Shrooms") && (hoverText == "Long Sword" || hoverText == "Whip" || hoverText == "Pole" || hoverText == "Large Shield" || hoverText == "Short Sword" || hoverText == "Scepter" || hoverText == "Whip" || hoverText == "Ax" || hoverText == "Slings" || hoverText == "Bow" || hoverText == "Small Shield" || hoverText == "Elixirs" || hoverText == "Multi-Hand" || hoverText == "Unarmed" || hoverText == "Hand-To-Hand" || hoverText == "Robes" || hoverText == "Crimscale" || hoverText.Contains("Shield") || hoverText == "Stonewood" || hoverText == "Pearl"))
			{
				this.changedModelForHover = true;
				this.ChangeModel(this.selectedRace, true, false);
			}
		}
		yield return new WaitForSecondsRealtime(0.002f);
		yield break;
	}

	// Token: 0x06000EF2 RID: 3826 RVA: 0x00122A50 File Offset: 0x00120C50
	private bool CanAddWeapon(string hov)
	{
		return !(this.selectedRace == "Yeti") || (!(hov == "Short Sword") && !(hov == "Whip") && !(hov == "Ax") && !(hov == "Slings") && !(hov == "Bow") && !(hov == "Small Shield") && !(hov == "Elixirs"));
	}

	// Token: 0x06000EF3 RID: 3827 RVA: 0x00122AD0 File Offset: 0x00120CD0
	public void CloseDesc()
	{
		if (this.itemTooltip.activeSelf)
		{
			this.itemTooltip.SetActive(false);
			this.descriptionText.text = "";
		}
		if (this.hoverCorout != null)
		{
			base.StopCoroutine(this.hoverCorout);
			this.hoverCorout = null;
		}
	}

	// Token: 0x06000EF4 RID: 3828 RVA: 0x00122B21 File Offset: 0x00120D21
	public void CloseNotice()
	{
		this.animator.Play("CreationNoticeClose");
		this.noticeOpen = false;
		if (Links.x.joy)
		{
			EventSystem.current.SetSelectedGameObject(this.finishBtn.gameObject);
		}
	}

	// Token: 0x06000EF5 RID: 3829 RVA: 0x00122B5C File Offset: 0x00120D5C
	public void OpenNotice(string title, string desc, Character c)
	{
		this.noticePortrait.texture = c.characterSheetPortrait.GetTextureIdle(0);
		this.noticeTitle.text = title;
		this.noticeMessage.text = desc;
		if (Links.x.joy)
		{
			this.noticeController.text = Links.x.gameplay.exitText;
			this.noticeController.enabled = true;
			this.noticeClose.SetActive(false);
		}
		else
		{
			this.noticeController.enabled = false;
			this.noticeClose.SetActive(true);
		}
		this.animator.Play("CreationNoticeOpen");
		EventSystem.current.SetSelectedGameObject(null);
		Links.x.hudControl.JoyBox(false);
		this.noticeOpen = true;
	}

	// Token: 0x06000EF6 RID: 3830 RVA: 0x00122C22 File Offset: 0x00120E22
	public void CancelConfirmMenu()
	{
		this.tokenConfirm.SetActive(false);
	}

	// Token: 0x06000EF7 RID: 3831 RVA: 0x00122C30 File Offset: 0x00120E30
	public void OpenConfirmScreen()
	{
		this.tokenConfirm.SetActive(true);
		this.CloseDesc();
		this.confirmNameText.text = Links.x.manual.DisplayName(this.currentHover.name);
		if (this.hoveringOnStat)
		{
			this.tokenConfirmTransform.position = this.currentHover.transform.position + new Vector3(0.7f, -0.02f, 0f);
		}
		else
		{
			this.tokenConfirmTransform.position = this.currentHover.transform.position + new Vector3(1f, 0.02f, 0f);
		}
		this.majorMinorBtns.SetActive(true);
		this.majorButton.gameObject.SetActive(true);
		this.minorButton.gameObject.SetActive(true);
		this.majorButton.gameObject.transform.position = this.majorPosition.position;
		this.minorButton.gameObject.transform.position = this.minorPosition.position;
		if (this.hoveringOnStat)
		{
			if (this.IsMatch(this.currentHover.name, this.majorStat1, true) || this.IsMatch(this.currentHover.name, this.majorStat2, true))
			{
				this.majorButton.gameObject.SetActive(false);
				this.minorButton.gameObject.transform.position = this.singlePosition.position;
			}
			if (this.IsMatch(this.currentHover.name, this.minorStat3, true))
			{
				this.minorButton.gameObject.SetActive(false);
				this.majorButton.gameObject.transform.position = this.singlePosition.position;
			}
		}
		else
		{
			if (this.IsMatch(this.currentHover.name, this.majorSkill1, false) || this.IsMatch(this.currentHover.name, this.majorSkill2, false))
			{
				this.majorButton.gameObject.SetActive(false);
				this.minorButton.gameObject.transform.position = this.singlePosition.position;
			}
			if (this.IsMatch(this.currentHover.name, this.minorSkill3, false))
			{
				this.minorButton.gameObject.SetActive(false);
				this.majorButton.gameObject.transform.position = this.singlePosition.position;
			}
		}
		this.removeStatMajorBtns.SetActive(false);
		this.removeStatMinorBtns.SetActive(false);
		this.removeSkillMajorBtns.SetActive(false);
		this.removeSkillMinorBtns.SetActive(false);
	}

	// Token: 0x06000EF8 RID: 3832 RVA: 0x00122EF8 File Offset: 0x001210F8
	private void OpenRemoveButtons(string type, bool isMajor)
	{
		this.removeStatMajorBtns.SetActive(false);
		this.removeStatMinorBtns.SetActive(false);
		this.removeSkillMajorBtns.SetActive(false);
		this.removeSkillMinorBtns.SetActive(false);
		this.majorMinorBtns.SetActive(false);
		if (isMajor)
		{
			if (type == "Stat")
			{
				this.removeStatMajor1.text = "Swap with " + Links.x.manual.DisplayName(this.majorStat1);
				this.removeStatMajor2.text = "Swap with " + Links.x.manual.DisplayName(this.majorStat2);
				this.removeStatMajorBtns.SetActive(true);
				return;
			}
			this.removeSkillMajor1.text = "Swap with " + Links.x.manual.DisplayName(this.majorSkill1);
			this.removeSkillMajor2.text = "Swap with " + Links.x.manual.DisplayName(this.majorSkill2);
			this.removeSkillMajorBtns.SetActive(true);
			return;
		}
		else
		{
			if (type == "Stat")
			{
				this.removeStatMinor1.text = "Swap with " + Links.x.manual.DisplayName(this.minorStat3);
				this.removeStatMinorBtns.SetActive(true);
				return;
			}
			this.removeSkillMinor1.text = "Swap with " + Links.x.manual.DisplayName(this.minorSkill3);
			this.removeSkillMinorBtns.SetActive(true);
			return;
		}
	}

	// Token: 0x06000EF9 RID: 3833 RVA: 0x00123090 File Offset: 0x00121290
	private void FindEmptyStat(string stat, bool isMajor)
	{
		bool flag = false;
		if (isMajor)
		{
			if (this.majorStat1 == "")
			{
				this.majorStat1 = stat;
				this.archetypeStatus[0] = true;
				flag = true;
			}
			if (!flag && this.majorStat2 == "")
			{
				this.majorStat2 = stat;
				this.archetypeStatus[1] = true;
				flag = true;
			}
			if (!flag)
			{
				this.OpenRemoveButtons("Stat", isMajor);
			}
		}
		else
		{
			if (this.minorStat3 == "")
			{
				this.minorStat3 = stat;
				this.archetypeStatus[2] = true;
				flag = true;
			}
			if (!flag)
			{
				this.OpenRemoveButtons("Stat", isMajor);
			}
		}
		if (flag)
		{
			if (!isMajor)
			{
				if (this.IsMatch(stat, this.majorStat1, true))
				{
					this.majorStat1 = "";
				}
				this.tokenMajorStat1.position = this.backTokenMajorStat1.position;
				this.tokenImgMajorStat1.raycastTarget = true;
			}
			if (!isMajor)
			{
				if (this.IsMatch(stat, this.majorStat2, true))
				{
					this.majorStat2 = "";
				}
				this.tokenMajorStat2.position = this.backTokenMajorStat2.position;
				this.tokenImgMajorStat2.raycastTarget = true;
			}
			if (isMajor)
			{
				if (this.IsMatch(stat, this.minorStat3, true))
				{
					this.minorStat3 = "";
				}
				this.tokenMinorStat3.position = this.backTokenMinorStat3.position;
				this.tokenImgMinorStat3.raycastTarget = true;
			}
			this.CancelConfirmMenu();
		}
	}

	// Token: 0x06000EFA RID: 3834 RVA: 0x00123200 File Offset: 0x00121400
	private void FindEmptySkill(string skill, bool isMajor)
	{
		bool flag = false;
		if (isMajor)
		{
			if (this.majorSkill1 == "")
			{
				this.majorSkill1 = skill;
				this.archetypeStatus[3] = true;
				flag = true;
			}
			if (!flag && this.majorSkill2 == "")
			{
				this.majorSkill2 = skill;
				this.archetypeStatus[4] = true;
				flag = true;
			}
			if (!flag)
			{
				this.OpenRemoveButtons("Skill", isMajor);
			}
		}
		else
		{
			if (this.minorSkill3 == "")
			{
				this.minorSkill3 = skill;
				this.archetypeStatus[5] = true;
				flag = true;
			}
			if (!flag)
			{
				this.OpenRemoveButtons("Skill", isMajor);
			}
		}
		if (flag)
		{
			if (!isMajor)
			{
				if (this.IsMatch(skill, this.majorSkill1, true))
				{
					this.majorSkill1 = "";
				}
				this.tokenMajorSkill4.position = this.backTokenMajorSkill4.position;
				this.tokenImgMajorSkill4.raycastTarget = true;
			}
			if (!isMajor)
			{
				if (this.IsMatch(skill, this.majorSkill2, true))
				{
					this.majorSkill2 = "";
				}
				this.tokenMajorSkill5.position = this.backTokenMajorSkill5.position;
				this.tokenImgMajorSkill5.raycastTarget = true;
			}
			if (isMajor)
			{
				if (this.IsMatch(skill, this.minorSkill3, true))
				{
					this.minorSkill3 = "";
				}
				this.tokenMinorSkill6.position = this.backTokenMinorSkill6.position;
				this.tokenImgMinorSkill6.raycastTarget = true;
			}
			this.CancelConfirmMenu();
		}
	}

	// Token: 0x06000EFB RID: 3835 RVA: 0x0012336D File Offset: 0x0012156D
	public bool HasTokenSkill(string skill)
	{
		return this.IsMatch(skill, this.majorSkill1, false) || this.IsMatch(skill, this.majorSkill2, false) || this.IsMatch(skill, this.minorSkill3, false);
	}

	// Token: 0x06000EFC RID: 3836 RVA: 0x001233A8 File Offset: 0x001215A8
	public void RemoveTokenSkill(string skill)
	{
		if (this.IsMatch(skill, this.majorSkill1, false))
		{
			this.majorSkill1 = "";
			this.tokenMajorSkill4.position = this.backTokenMajorSkill4.position;
			this.tokenImgMajorSkill4.raycastTarget = true;
		}
		if (this.IsMatch(skill, this.majorSkill2, false))
		{
			this.majorSkill2 = "";
			this.tokenMajorSkill5.position = this.backTokenMajorSkill5.position;
			this.tokenImgMajorSkill5.raycastTarget = true;
		}
		if (this.IsMatch(skill, this.minorSkill3, false))
		{
			this.minorSkill3 = "";
			this.tokenMinorSkill6.position = this.backTokenMinorSkill6.position;
			this.tokenImgMinorSkill6.raycastTarget = true;
		}
		this.currentArchetype = "Create";
		this.SetCharacterInfo();
	}

	// Token: 0x06000EFD RID: 3837 RVA: 0x0012347D File Offset: 0x0012167D
	public bool HasTokenStat(string stat)
	{
		return this.IsMatch(stat, this.majorStat1, true) || this.IsMatch(stat, this.majorStat2, true) || this.IsMatch(stat, this.minorStat3, true);
	}

	// Token: 0x06000EFE RID: 3838 RVA: 0x001234B8 File Offset: 0x001216B8
	public void RemoveTokenStat(string stat)
	{
		if (this.IsMatch(stat, this.majorStat1, true))
		{
			this.majorStat1 = "";
			this.tokenMajorStat1.position = this.backTokenMajorStat1.position;
			this.tokenImgMajorStat1.raycastTarget = true;
		}
		if (this.IsMatch(stat, this.majorStat2, true))
		{
			this.majorStat2 = "";
			this.tokenMajorStat2.position = this.backTokenMajorStat2.position;
			this.tokenImgMajorStat2.raycastTarget = true;
		}
		if (this.IsMatch(stat, this.minorStat3, true))
		{
			this.minorStat3 = "";
			this.tokenMinorStat3.position = this.backTokenMinorStat3.position;
			this.tokenImgMinorStat3.raycastTarget = true;
		}
		this.currentArchetype = "Create";
		this.SetCharacterInfo();
	}

	// Token: 0x06000EFF RID: 3839 RVA: 0x00123590 File Offset: 0x00121790
	private void StartTokenDrag()
	{
		if (this.currentHover)
		{
			string name = this.currentHover.name;
			if (name == "Gold Stat Token 1")
			{
				this.dragToken = this.tokenMajorStat1;
				this.tokenImgMajorStat1.raycastTarget = false;
			}
			if (name == "Gold Stat Token 2")
			{
				this.dragToken = this.tokenMajorStat2;
				this.tokenImgMajorStat2.raycastTarget = false;
			}
			if (name == "Silver Stat Token 3")
			{
				this.dragToken = this.tokenMinorStat3;
				this.tokenImgMinorStat3.raycastTarget = false;
			}
			if (name == "Gold Skill Token 4")
			{
				this.dragToken = this.tokenMajorSkill4;
				this.tokenImgMajorSkill4.raycastTarget = false;
			}
			if (name == "Gold Skill Token 5")
			{
				this.dragToken = this.tokenMajorSkill5;
				this.tokenImgMajorSkill5.raycastTarget = false;
			}
			if (name == "Silver Skill Token 6")
			{
				this.dragToken = this.tokenMinorSkill6;
				this.tokenImgMinorSkill6.raycastTarget = false;
			}
			this.dragIndicator.SetActive(true);
			this.dragIndicator.transform.position = this.dragToken.gameObject.transform.position;
			this.draggingToken = true;
		}
	}

	// Token: 0x06000F00 RID: 3840 RVA: 0x001236D0 File Offset: 0x001218D0
	private void PlaceToken()
	{
		bool flag = false;
		string text = "";
		string text2 = "";
		string name = this.currentHover.name;
		bool flag2 = true;
		if (name == "Strength")
		{
			text2 = "Strength";
			flag2 = false;
		}
		if (name == "Aura")
		{
			text2 = "Aura";
			flag2 = false;
		}
		if (name == "Dexterity")
		{
			text2 = "Dexterity";
			flag2 = false;
		}
		if (name == "Agility")
		{
			text2 = "Agility";
			flag2 = false;
		}
		if (name == "Pagan")
		{
			text2 = "Pagan";
			flag2 = false;
		}
		if (name == "Sensory")
		{
			text2 = "Sensory";
			flag2 = false;
		}
		if (!this.dragToken)
		{
			if (!flag2)
			{
				if (this.character.stats.majorStat1 == "")
				{
					this.dragToken = this.tokenMajorStat1;
					this.tokenImgMajorStat1.raycastTarget = false;
				}
				if (this.character.stats.majorStat2 == "" && !this.dragToken)
				{
					this.dragToken = this.tokenMajorStat2;
					this.tokenImgMajorStat2.raycastTarget = false;
				}
				if (this.character.stats.minorStat3 == "" && !this.dragToken)
				{
					this.dragToken = this.tokenMinorStat3;
					this.tokenImgMinorStat3.raycastTarget = false;
				}
			}
			else
			{
				if (this.character.stats.majorSkill1 == "")
				{
					this.dragToken = this.tokenMajorSkill4;
					this.tokenImgMajorSkill4.raycastTarget = false;
				}
				if (this.character.stats.majorSkill2 == "" && !this.dragToken)
				{
					this.dragToken = this.tokenMajorSkill5;
					this.tokenImgMajorSkill5.raycastTarget = false;
				}
				if (this.character.stats.minorSkill3 == "" && !this.dragToken)
				{
					this.dragToken = this.tokenMinorSkill6;
					this.tokenImgMinorSkill6.raycastTarget = false;
				}
			}
		}
		if (name == "Robes")
		{
			text2 = "Robes";
		}
		if (name == "Pearl")
		{
			text2 = "Pearl";
		}
		if (name == "Crimscale")
		{
			text2 = "Crimscale";
		}
		if (name == "Stonewood")
		{
			text2 = "Stonewood";
		}
		if (name == "Short Sword")
		{
			text2 = "ShortSword";
		}
		if (name == "Long Sword")
		{
			text2 = "LongSword";
		}
		if (name == "Scepter")
		{
			text2 = "Scepter";
		}
		if (name == "Ax")
		{
			text2 = "Ax";
		}
		if (name == "Pole")
		{
			text2 = "Pole";
		}
		if (name == "Multi-Hand")
		{
			text2 = "Multi-Hand";
		}
		if (name == "Bow")
		{
			text2 = "Bow";
		}
		if (name == "Slings")
		{
			text2 = "Sling";
		}
		if (name == "Elixirs")
		{
			text2 = "Elixir";
		}
		if (name == "Hand-To-Hand")
		{
			text2 = "Hand-to-Hand";
		}
		if (name == "Large Shield")
		{
			text2 = "LargeShield";
		}
		if (name == "Small Shield")
		{
			text2 = "SmallShield";
		}
		if (name == "Bindings")
		{
			text2 = "Bindings";
		}
		if (name == "Fauna")
		{
			text2 = "Fauna";
		}
		if (name == "Vines")
		{
			text2 = "Vines";
		}
		if (name == "Spores")
		{
			text2 = "Spores";
		}
		if (name == "Lockpicking")
		{
			text2 = "Lockpick";
		}
		if (name == "Sneaking")
		{
			text2 = "Sneaking";
		}
		if (name == "Bartering")
		{
			text2 = "Bartering";
		}
		if (name == "Charm Fish")
		{
			text2 = "Fish";
		}
		if (name == "Charm Forest")
		{
			text2 = "Forest";
		}
		if (name == "Charm Shrooms")
		{
			text2 = "Shroom";
		}
		if (name == "Flute")
		{
			text2 = "Flute";
		}
		if (name == "Horn")
		{
			text2 = "Horn";
		}
		if (name == "Drum")
		{
			text2 = "Drum";
		}
		if (name == "Shepard Pipes")
		{
			text2 = "Pipe";
		}
		if (name == "Melee")
		{
			text2 = "Melee";
		}
		if (name == "Range")
		{
			text2 = "Range";
		}
		if (name == "Defense")
		{
			text2 = "Defense";
		}
		if (name == "Whip")
		{
			text2 = "Whip";
		}
		if (this.dragToken == this.tokenMajorStat1 && !flag2 && this.majorStat1 == "")
		{
			this.majorStat1 = text2;
			this.archetypeStatus[0] = true;
			flag = true;
		}
		if (this.dragToken == this.tokenMajorStat2 && !flag2 && this.majorStat2 == "")
		{
			this.majorStat2 = text2;
			this.archetypeStatus[1] = true;
			flag = true;
		}
		if (this.dragToken == this.tokenMinorStat3 && !flag2 && this.minorStat3 == "")
		{
			this.minorStat3 = text2;
			this.archetypeStatus[2] = true;
			flag = true;
		}
		if (!flag && flag2 && !this.SubTokenForArmorRequirements(text2, out text))
		{
			if (this.dragToken == this.tokenMajorSkill4 && this.majorSkill1 == "")
			{
				this.majorSkill1 = text2;
				this.archetypeStatus[3] = true;
				flag = true;
			}
			if (this.dragToken == this.tokenMajorSkill5 && this.majorSkill2 == "")
			{
				this.majorSkill2 = text2;
				this.archetypeStatus[4] = true;
				flag = true;
			}
			if (this.dragToken == this.tokenMinorSkill6 && this.minorSkill3 == "")
			{
				this.minorSkill3 = text2;
				this.archetypeStatus[5] = true;
				flag = true;
			}
		}
		if (!flag)
		{
			this.draggingToken = false;
			this.dragToken = null;
			return;
		}
		if (this.hoveringTokenBack)
		{
			this.hoveringTokenBack.color = new Color(this.hoveringTokenBack.color.r, this.hoveringTokenBack.color.g, this.hoveringTokenBack.color.b, 0.247f);
			this.hoveringTokenBack = null;
		}
		this.currentArchetype = "Create";
		this.SetCharacterInfo();
		this.dragIndicator.SetActive(false);
		this.draggingToken = false;
		this.dragToken = null;
	}

	// Token: 0x06000F01 RID: 3841 RVA: 0x00123D8C File Offset: 0x00121F8C
	private void ReturnTokenDrag()
	{
		if (this.draggingToken)
		{
			this.dragIndicator.SetActive(false);
			if (this.dragToken == this.tokenMajorStat1)
			{
				this.tokenMajorStat1.position = this.backTokenMajorStat1.position;
				this.tokenImgMajorStat1.raycastTarget = true;
			}
			if (this.dragToken == this.tokenMajorStat2)
			{
				this.tokenMajorStat2.position = this.backTokenMajorStat2.position;
				this.tokenImgMajorStat2.raycastTarget = true;
			}
			if (this.dragToken == this.tokenMinorStat3)
			{
				this.tokenMinorStat3.position = this.backTokenMinorStat3.position;
				this.tokenImgMinorStat3.raycastTarget = true;
			}
			if (this.dragToken == this.tokenMajorSkill4)
			{
				this.tokenMajorSkill4.position = this.backTokenMajorSkill4.position;
				this.tokenImgMajorSkill4.raycastTarget = true;
			}
			if (this.dragToken == this.tokenMajorSkill5)
			{
				this.tokenMajorSkill5.position = this.backTokenMajorSkill5.position;
				this.tokenImgMajorSkill5.raycastTarget = true;
			}
			if (this.dragToken == this.tokenMinorSkill6)
			{
				this.tokenMinorSkill6.position = this.backTokenMinorSkill6.position;
				this.tokenImgMinorSkill6.raycastTarget = true;
			}
			this.dragToken = null;
			this.draggingToken = false;
		}
	}

	// Token: 0x06000F02 RID: 3842 RVA: 0x00123EFC File Offset: 0x001220FC
	public void RemoveFocus(int index)
	{
		if (this.removeStatMajorBtns.activeSelf)
		{
			if (index == 0)
			{
				this.majorStat1 = "";
				this.SetMajorMinor(true);
			}
			if (index == 1)
			{
				this.majorStat2 = "";
				this.SetMajorMinor(true);
			}
		}
		if (this.removeStatMinorBtns.activeSelf && index == 0)
		{
			this.minorStat3 = "";
			this.SetMajorMinor(false);
		}
		if (this.removeSkillMajorBtns.activeSelf)
		{
			if (index == 0)
			{
				this.majorSkill1 = "";
				this.SetMajorMinor(true);
			}
			if (index == 1)
			{
				this.majorSkill2 = "";
				this.SetMajorMinor(true);
			}
		}
		if (this.removeSkillMinorBtns.activeSelf && index == 0)
		{
			this.minorSkill3 = "";
			this.SetMajorMinor(false);
		}
		this.CancelConfirmMenu();
	}

	// Token: 0x06000F03 RID: 3843 RVA: 0x00123FC4 File Offset: 0x001221C4
	public void SetMajorMinor(bool isMajor)
	{
		string name = this.currentHover.name;
		if (name == "Strength")
		{
			this.FindEmptyStat("Strength", isMajor);
		}
		if (name == "Aura")
		{
			this.FindEmptyStat("Aura", isMajor);
		}
		if (name == "Dexterity")
		{
			this.FindEmptyStat("Dexterity", isMajor);
		}
		if (name == "Agility")
		{
			this.FindEmptyStat("Agility", isMajor);
		}
		if (name == "Pagan")
		{
			this.FindEmptyStat("Pagan", isMajor);
		}
		if (name == "Sensory")
		{
			this.FindEmptyStat("Sensory", isMajor);
		}
		if (name == "Robes")
		{
			this.FindEmptySkill("Robes", isMajor);
		}
		if (name == "Pearl")
		{
			this.FindEmptySkill("Pearl", isMajor);
		}
		if (name == "Crimscale")
		{
			this.FindEmptySkill("Crimscale", isMajor);
		}
		if (name == "Stonewood")
		{
			this.FindEmptySkill("Stonewood", isMajor);
		}
		if (name == "Short Sword")
		{
			this.FindEmptySkill("ShortSword", isMajor);
		}
		if (name == "Long Sword")
		{
			this.FindEmptySkill("LongSword", isMajor);
		}
		if (name == "Scepter")
		{
			this.FindEmptySkill("Scepter", isMajor);
		}
		if (name == "Ax")
		{
			this.FindEmptySkill("Ax", isMajor);
		}
		if (name == "Pole")
		{
			this.FindEmptySkill("Pole", isMajor);
		}
		if (name == "Multi-Hand")
		{
			this.FindEmptySkill("Multi-Hand", isMajor);
		}
		if (name == "Bow")
		{
			this.FindEmptySkill("Bow", isMajor);
		}
		if (name == "Slings")
		{
			this.FindEmptySkill("Sling", isMajor);
		}
		if (name == "Elixirs")
		{
			this.FindEmptySkill("Elixir", isMajor);
		}
		if (name == "Hand-To-Hand")
		{
			this.FindEmptySkill("Hand-to-Hand", isMajor);
		}
		if (name == "Large Shield")
		{
			this.FindEmptySkill("LargeShield", isMajor);
		}
		if (name == "Small Shield")
		{
			this.FindEmptySkill("SmallShield", isMajor);
		}
		if (name == "Bindings")
		{
			this.FindEmptySkill("Bindings", isMajor);
		}
		if (name == "Fauna")
		{
			this.FindEmptySkill("Fauna", isMajor);
		}
		if (name == "Vines")
		{
			this.FindEmptySkill("Vines", isMajor);
		}
		if (name == "Spores")
		{
			this.FindEmptySkill("Spores", isMajor);
		}
		if (name == "Lockpicking")
		{
			this.FindEmptySkill("Lockpick", isMajor);
		}
		if (name == "Sneaking")
		{
			this.FindEmptySkill("Sneaking", isMajor);
		}
		if (name == "Bartering")
		{
			this.FindEmptySkill("Bartering", isMajor);
		}
		if (name == "Charm Fish")
		{
			this.FindEmptySkill("Fish", isMajor);
		}
		if (name == "Charm Forest")
		{
			this.FindEmptySkill("Forest", isMajor);
		}
		if (name == "Charm Shrooms")
		{
			this.FindEmptySkill("Shroom", isMajor);
		}
		if (name == "Flute")
		{
			this.FindEmptySkill("Flute", isMajor);
		}
		if (name == "Horn")
		{
			this.FindEmptySkill("Horn", isMajor);
		}
		if (name == "Drum")
		{
			this.FindEmptySkill("Drum", isMajor);
		}
		if (name == "Shepard Pipes")
		{
			this.FindEmptySkill("Pipe", isMajor);
		}
		if (name == "Melee")
		{
			this.FindEmptySkill("Melee", isMajor);
		}
		if (name == "Range")
		{
			this.FindEmptySkill("Range", isMajor);
		}
		if (name == "Defense")
		{
			this.FindEmptySkill("Defense", isMajor);
		}
		if (name == "Whip")
		{
			this.FindEmptySkill("Whip", isMajor);
		}
		this.SetCharacterInfo();
	}

	// Token: 0x06000F04 RID: 3844 RVA: 0x001243CC File Offset: 0x001225CC
	public bool IsMatch(string s, string focus, bool isStat)
	{
		if (isStat)
		{
			if (s == focus)
			{
				return true;
			}
		}
		else
		{
			if (focus == "Robes" && s == "Robes")
			{
				return true;
			}
			if (focus == "Pearl" && s == "Pearl")
			{
				return true;
			}
			if (focus == "Crimscale" && s == "Crimscale")
			{
				return true;
			}
			if (focus == "Stonewood" && s == "Stonewood")
			{
				return true;
			}
			if (focus == "ShortSword" && (s == "ShortSword" || s == "Short Sword"))
			{
				return true;
			}
			if (focus == "LongSword" && (s == "LongSword" || s == "Long Sword"))
			{
				return true;
			}
			if (focus == "Scepter" && s == "Scepter")
			{
				return true;
			}
			if (focus == "Ax" && s == "Ax")
			{
				return true;
			}
			if (focus == "Pole" && s == "Pole")
			{
				return true;
			}
			if (focus == "Multi-Hand" && s == "Multi-Hand")
			{
				return true;
			}
			if (focus == "Bow" && s == "Bow")
			{
				return true;
			}
			if (focus == "Sling" && (s == "Sling" || s == "Slings"))
			{
				return true;
			}
			if (focus == "Elixir" && (s == "Elixir" || s == "Elixirs"))
			{
				return true;
			}
			if (focus == "Hand-to-Hand" && (s == "Hand-to-Hand" || s == "Hand-To-Hand"))
			{
				return true;
			}
			if (focus == "LargeShield" && (s == "LargeShield" || s == "Large Shield"))
			{
				return true;
			}
			if (focus == "SmallShield" && (s == "SmallShield" || s == "Small Shield"))
			{
				return true;
			}
			if (focus == "Bindings" && s == "Bindings")
			{
				return true;
			}
			if (focus == "Vines" && s == "Vines")
			{
				return true;
			}
			if (focus == "Fauna" && s == "Fauna")
			{
				return true;
			}
			if (focus == "Spores" && s == "Spores")
			{
				return true;
			}
			if (focus == "Lockpick" && (s == "Lockpick" || s == "Lockpicking"))
			{
				return true;
			}
			if (focus == "Sneaking" && s == "Sneaking")
			{
				return true;
			}
			if (focus == "Bartering" && s == "Bartering")
			{
				return true;
			}
			if (focus == "Fish" && (s == "Fish" || s == "Charm Fish"))
			{
				return true;
			}
			if (focus == "Forest" && (s == "Forest" || s == "Charm Forest"))
			{
				return true;
			}
			if (focus == "Shroom" && (s == "Shroom" || s == "Charm Shrooms"))
			{
				return true;
			}
			if (focus == "Flute" && s == "Flute")
			{
				return true;
			}
			if (focus == "Horn" && s == "Horn")
			{
				return true;
			}
			if (focus == "Drum" && s == "Drum")
			{
				return true;
			}
			if (focus == "Pipe" && (s == "Pipe" || s == "Shepard Pipes"))
			{
				return true;
			}
			if (focus == "Melee" && s == "Melee")
			{
				return true;
			}
			if (focus == "Range" && (s == "Range" || s == "Stone"))
			{
				return true;
			}
			if (focus == "Defense" && s == "Defense")
			{
				return true;
			}
			if (focus == "Whip" && s == "Whip")
			{
				return true;
			}
		}
		return false;
	}

	// Token: 0x06000F05 RID: 3845 RVA: 0x00124850 File Offset: 0x00122A50
	public int GetTransformIndex(string s, bool isStat)
	{
		if (isStat)
		{
			if (s == "Strength")
			{
				return 1;
			}
			if (s == "Agility")
			{
				return 3;
			}
			if (s == "Aura")
			{
				return 0;
			}
			if (s == "Pagan")
			{
				return 2;
			}
			if (s == "Dexterity")
			{
				return 4;
			}
			if (s == "Sensory")
			{
				return 5;
			}
		}
		else
		{
			if (s == "Robes")
			{
				return 11;
			}
			if (s == "Pearl")
			{
				return 13;
			}
			if (s == "Crimscale")
			{
				return 12;
			}
			if (s == "Stonewood")
			{
				return 14;
			}
			if (s == "ShortSword" || s == "Short Sword")
			{
				return 0;
			}
			if (s == "LongSword" || s == "Long Sword")
			{
				return 1;
			}
			if (s == "Scepter")
			{
				return 2;
			}
			if (s == "Ax")
			{
				return 4;
			}
			if (s == "Pole")
			{
				return 5;
			}
			if (s == "Multi-Hand")
			{
				return 9;
			}
			if (s == "Bow")
			{
				return 7;
			}
			if (s == "Sling" || s == "Slings")
			{
				return 6;
			}
			if (s == "Elixir" || s == "Elixirs")
			{
				return 10;
			}
			if (s == "Hand-to-Hand" || s == "Hand-To-Hand")
			{
				return 8;
			}
			if (s == "LargeShield" || s == "Large Shield")
			{
				return 25;
			}
			if (s == "SmallShield" || s == "Small Shield")
			{
				return 24;
			}
			if (s == "Bindings")
			{
				return 15;
			}
			if (s == "Fauna")
			{
				return 16;
			}
			if (s == "Vines")
			{
				return 17;
			}
			if (s == "Spores")
			{
				return 18;
			}
			if (s == "Lockpick" || s == "Lockpicking")
			{
				return 33;
			}
			if (s == "Sneaking")
			{
				return 34;
			}
			if (s == "Bartering")
			{
				return 35;
			}
			if (s == "Fish" || s == "Charm Fish")
			{
				return 26;
			}
			if (s == "Forest" || s == "Charm Forest")
			{
				return 27;
			}
			if (s == "Shroom" || s == "Charm Shrooms")
			{
				return 28;
			}
			if (s == "Flute")
			{
				return 29;
			}
			if (s == "Horn")
			{
				return 30;
			}
			if (s == "Drum")
			{
				return 31;
			}
			if (s == "Pipe" || s == "Shepard Pipes")
			{
				return 32;
			}
			if (s == "Melee")
			{
				return 20;
			}
			if (s == "Range")
			{
				return 21;
			}
			if (s == "Defense")
			{
				return 22;
			}
			if (s == "Whip")
			{
				return 3;
			}
		}
		return -1;
	}

	// Token: 0x06000F06 RID: 3846 RVA: 0x00124B78 File Offset: 0x00122D78
	public void AnimateButton(string type)
	{
		if (type == "Background")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(true);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(false);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
		}
		if (type == "Stats")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(true);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(false);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
		}
		if (type == "ArchetypesFromAll")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(true);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
		}
		if (type == "ArchetypesFromBG")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(true);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(false);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
		}
		if (type == "All")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(false);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
			if (this.characterCount == 3)
			{
				this.finishBtn.ToggleMouseKeyboardOscillate(true);
			}
			else
			{
				this.nextCharacterBtn.ToggleMouseKeyboardOscillate(true);
			}
		}
		if (type == "None")
		{
			this.backgroundContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.statsContinueBtn.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn1.ToggleMouseKeyboardOscillate(false);
			this.archetypesContinueBtn2.ToggleMouseKeyboardOscillate(false);
			this.nextCharacterBtn.ToggleMouseKeyboardOscillate(false);
			this.finishBtn.ToggleMouseKeyboardOscillate(false);
		}
	}

	// Token: 0x06000F07 RID: 3847 RVA: 0x00124DA8 File Offset: 0x00122FA8
	public void SetSimplifiedAbilities()
	{
		this.autoAbility1.sprite = this.emptyAbilitySprite;
		this.autoAbility2.sprite = this.emptyAbilitySprite;
		this.autoAbility3.sprite = this.emptyAbilitySprite;
		this.autoAbility4.sprite = this.emptyAbilitySprite;
		this.autoAbility5.sprite = this.emptyAbilitySprite;
		this.autoAbility6.sprite = this.emptyAbilitySprite;
		this.autoAbility7.sprite = this.emptyAbilitySprite;
		this.autoAbility8.sprite = this.emptyAbilitySprite;
		this.autoAbility9.sprite = this.emptyAbilitySprite;
		this.autoAbility10.sprite = this.emptyAbilitySprite;
		this.autoAbility1Back.enabled = false;
		this.autoAbility2Back.enabled = false;
		this.autoAbility3Back.enabled = false;
		this.autoAbility4Back.enabled = false;
		this.autoAbility5Back.enabled = false;
		this.autoAbility6Back.enabled = false;
		this.autoAbility7Back.enabled = false;
		this.autoAbility8Back.enabled = false;
		this.autoAbility9Back.enabled = false;
		this.autoAbility10Back.enabled = false;
		this.autoAbility1.raycastTarget = false;
		this.autoAbilityBtn1.interactable = false;
		this.autoAbility2.raycastTarget = false;
		this.autoAbilityBtn2.interactable = false;
		this.autoAbility3.raycastTarget = false;
		this.autoAbilityBtn3.interactable = false;
		this.autoAbility4.raycastTarget = false;
		this.autoAbilityBtn4.interactable = false;
		this.autoAbility5.raycastTarget = false;
		this.autoAbilityBtn5.interactable = false;
		this.autoAbility6.raycastTarget = false;
		this.autoAbilityBtn6.interactable = false;
		this.autoAbility7.raycastTarget = false;
		this.autoAbilityBtn7.interactable = false;
		this.autoAbility8.raycastTarget = false;
		this.autoAbilityBtn8.interactable = false;
		this.autoAbility9.raycastTarget = false;
		this.autoAbilityBtn9.interactable = false;
		this.autoAbility10.raycastTarget = false;
		this.autoAbilityBtn10.interactable = false;
		int num = 1;
		foreach (string text in this.skillsWithAbilities)
		{
			bool flag = false;
			if (this.character.stats.HasTokenInSkill(text, true, false))
			{
				flag = true;
			}
			if (this.character.stats.HasTokenInSkill(text, false, true))
			{
				flag = true;
			}
			if (flag)
			{
				for (int j = 0; j < 2; j++)
				{
					Sprite sprite = null;
					string text2 = "";
					bool flag2 = false;
					if (text.Contains("Vines"))
					{
						flag2 = true;
						if (j == 0)
						{
							sprite = this.vinesSprite1;
							text2 = this.vinesAbilityName1;
						}
						else
						{
							sprite = this.vinesSprite2;
							text2 = this.vinesAbilityName2;
						}
					}
					if (text.Contains("Spores"))
					{
						flag2 = true;
						if (j == 0)
						{
							sprite = this.sporeSprite1;
							text2 = this.sporeAbilityName1;
						}
						else
						{
							sprite = this.sporeSprite2;
							text2 = this.sporeAbilityName2;
						}
					}
					if (text.Contains("Fauna"))
					{
						flag2 = true;
						if (j == 0)
						{
							sprite = this.faunaSprite1;
							text2 = this.faunaAbilityName1;
						}
						else
						{
							sprite = this.faunaSprite2;
							text2 = this.faunaAbilityName2;
						}
					}
					if (text.Contains("Flute"))
					{
						if (j == 0)
						{
							sprite = this.fluteSprite1;
							text2 = this.fluteAbilityName1;
						}
						else
						{
							sprite = this.fluteSprite2;
							text2 = this.fluteAbilityName2;
						}
					}
					if (text.Contains("Pipe"))
					{
						if (j == 0)
						{
							sprite = this.pipeSprite1;
							text2 = this.pipeAbilityName1;
						}
						else
						{
							sprite = this.pipeSprite2;
							text2 = this.pipeAbilityName2;
						}
					}
					if (text.Contains("Horn"))
					{
						if (j == 0)
						{
							sprite = this.hornSprite1;
							text2 = this.hornAbilityName1;
						}
						else
						{
							sprite = this.hornSprite2;
							text2 = this.hornAbilityName2;
						}
					}
					Image image = this.autoAbility1;
					Button button = this.autoAbilityBtn1;
					Image image2 = this.autoAbility1Back;
					if (num == 2)
					{
						image = this.autoAbility2;
						button = this.autoAbilityBtn2;
						image2 = this.autoAbility2Back;
					}
					if (num == 3)
					{
						image = this.autoAbility3;
						button = this.autoAbilityBtn3;
						image2 = this.autoAbility3Back;
					}
					if (num == 4)
					{
						image = this.autoAbility4;
						button = this.autoAbilityBtn4;
						image2 = this.autoAbility4Back;
					}
					if (num == 5)
					{
						image = this.autoAbility5;
						button = this.autoAbilityBtn5;
						image2 = this.autoAbility5Back;
					}
					if (num == 6)
					{
						image = this.autoAbility6;
						button = this.autoAbilityBtn6;
						image2 = this.autoAbility6Back;
					}
					if (num == 7)
					{
						image = this.autoAbility7;
						button = this.autoAbilityBtn7;
						image2 = this.autoAbility7Back;
					}
					if (num == 8)
					{
						image = this.autoAbility8;
						button = this.autoAbilityBtn8;
						image2 = this.autoAbility8Back;
					}
					if (num == 9)
					{
						image = this.autoAbility9;
						button = this.autoAbilityBtn9;
						image2 = this.autoAbility9Back;
					}
					if (num == 10)
					{
						image = this.autoAbility10;
						button = this.autoAbilityBtn10;
						image2 = this.autoAbility10Back;
					}
					image.sprite = sprite;
					image.raycastTarget = true;
					button.interactable = true;
					if (flag2)
					{
						image.material = image2.material;
					}
					else
					{
						image.material = this.songMat;
					}
					image.gameObject.name = text2;
					image2.enabled = true;
					num++;
				}
			}
		}
	}

	// Token: 0x06000F08 RID: 3848 RVA: 0x001252EA File Offset: 0x001234EA
	public void OpenAbilityMenu(GameObject clicked)
	{
	}

	// Token: 0x06000F09 RID: 3849 RVA: 0x001252EC File Offset: 0x001234EC
	public void SetAbilityButtons(bool all, bool startMissingAbility)
	{
	}

	// Token: 0x06000F0A RID: 3850 RVA: 0x001252EE File Offset: 0x001234EE
	private void GetAbilityLists()
	{
		if (true)
		{
			this.SetSimplifiedAbilities();
		}
	}

	// Token: 0x06000F0B RID: 3851 RVA: 0x001252FC File Offset: 0x001234FC
	private void AddFX(string s)
	{
		Image image = null;
		bool flag = false;
		if (s == "Vines" && this.vinesAbilities.sprite == this.vinesAbilitiesBlank)
		{
			flag = true;
			image = this.vinesAbilities;
		}
		if (s == "Fauna" && this.faunaAbilities.sprite == this.faunaAbilitiesBlank)
		{
			flag = true;
			image = this.faunaAbilities;
		}
		if (s == "Spores" && this.sporesAbilities.sprite == this.sporesAbilitiesBlank)
		{
			flag = true;
			image = this.sporesAbilities;
		}
		if (s == "Drum" && this.drumAbilities.sprite == this.drumAbilitiesBlank)
		{
			flag = true;
			image = this.drumAbilities;
		}
		if (s == "Flute" && this.fluteAbilities.sprite == this.fluteAbilitiesBlank)
		{
			flag = true;
			image = this.fluteAbilities;
		}
		if (s == "Horn" && this.hornAbilities.sprite == this.hornAbilitiesBlank)
		{
			flag = true;
			image = this.hornAbilities;
		}
		if (s == "Melee" && this.meleeAbilities.sprite == this.meleeAbilitiesBlank)
		{
			flag = true;
			image = this.meleeAbilities;
		}
		if (s == "Range" && this.rangeAbilities.sprite == this.rangeAbilitiesBlank)
		{
			flag = true;
			image = this.rangeAbilities;
		}
		if (s == "Defense" && this.defenseAbilities.sprite == this.defenseAbilitiesBlank)
		{
			flag = true;
			image = this.defenseAbilities;
		}
		if (flag)
		{
			MasterAudio.PlaySoundAndForget("Paper Open", 0.5f, new float?(1f), 0f, "", null);
			this.addFX.gameObject.SetActive(true);
			this.addFX.gameObject.GetComponent<HannahAnimator>().Play("Idle");
			this.addFX.position = image.gameObject.transform.position;
		}
	}

	// Token: 0x06000F0C RID: 3852 RVA: 0x00125524 File Offset: 0x00123724
	private void Link(string n)
	{
		this.str.Append("<color ");
		this.str.Append(this.hoverColor);
		this.str.Append(">");
		this.str.Append(n);
		this.str.Append(":");
		this.str.Append("</color> ");
	}

	// Token: 0x06000F0D RID: 3853 RVA: 0x00125594 File Offset: 0x00123794
	private void LinkSkills(string n, int index)
	{
		string text = n;
		if (n == "Blunt")
		{
			n = "Scepter";
		}
		string text2;
		if (this.SubTokenForArmorRequirements(n, out text2))
		{
			this.str.Append("\n<color ");
			this.str.Append(this.disabledColor);
			this.str.Append(">");
			this.str.Append(text);
			this.str.Append("</color> ");
			return;
		}
		this.str.Append("\n<color ");
		this.str.Append(this.hoverColor);
		this.str.Append(">");
		this.str.Append(text);
		this.str.Append("</color> ");
	}

	// Token: 0x06000F0E RID: 3854 RVA: 0x00125667 File Offset: 0x00123867
	public void CreationSkillNew()
	{
	}

	// Token: 0x06000F0F RID: 3855 RVA: 0x00125669 File Offset: 0x00123869
	public bool HasFreeSkillToken()
	{
		return this.majorSkill1 == "" || this.majorSkill2 == "" || this.minorSkill3 == "";
	}

	// Token: 0x06000F10 RID: 3856 RVA: 0x001256A4 File Offset: 0x001238A4
	public bool HasFreeStatToken()
	{
		return this.majorStat1 == "" || this.majorStat2 == "" || this.minorStat3 == "";
	}

	// Token: 0x06000F11 RID: 3857 RVA: 0x001256DF File Offset: 0x001238DF
	public void OpenKeyboard(bool first)
	{
		if (Links.x.joy)
		{
			base.StartCoroutine(this.Keyboard(first));
		}
	}

	// Token: 0x06000F12 RID: 3858 RVA: 0x001256FB File Offset: 0x001238FB
	private IEnumerator Keyboard(bool first)
	{
		yield return new WaitForSecondsRealtime(0.01f);
		if (first)
		{
			yield return new WaitForSecondsRealtime(1f);
		}
		if (!Links.x.keyboardScript.gameObject.activeSelf)
		{
			Links.x.hudControl.ChangeHudVisibility(false, false);
			Links.x.keyboardScript.StartMenu(this.input, null, base.gameObject, "Creation");
			this.canvasGroup.interactable = false;
			this.canvasGroupAll.interactable = false;
		}
		yield break;
	}

	// Token: 0x06000F13 RID: 3859 RVA: 0x00125711 File Offset: 0x00123911
	public void CloseKeyboard()
	{
		this.canvasGroup.interactable = true;
		EventSystem.current.SetSelectedGameObject(this.raceTogglesToggle[1].gameObject);
		this.SetBorder(0);
		this.canvasGroupAll.interactable = true;
	}

	// Token: 0x06000F14 RID: 3860 RVA: 0x0012574D File Offset: 0x0012394D
	public void ToggleInteractable(bool state)
	{
		if (Links.x.keyboardScript.canvasGroup.alpha > 0.5f)
		{
			state = false;
		}
		this.canvasGroup.interactable = state;
		this.canvasGroupAll.interactable = state;
	}

	// Token: 0x06000F15 RID: 3861 RVA: 0x00125788 File Offset: 0x00123988
	public void SetBorder(int n)
	{
		if (Links.x.mk)
		{
			n = 0;
		}
		n = 0;
		if (n == 0)
		{
			this.bgBorder.enabled = false;
			this.skillBorder.enabled = false;
			return;
		}
		if (n == 1)
		{
			this.bgBorder.enabled = true;
			this.skillBorder.enabled = false;
			return;
		}
		this.bgBorder.enabled = false;
		this.skillBorder.enabled = true;
	}

	// Token: 0x04001740 RID: 5952
	public bool open;

	// Token: 0x04001741 RID: 5953
	public int currentScreen;

	// Token: 0x04001742 RID: 5954
	public Animator animator;

	// Token: 0x04001743 RID: 5955
	public bool fromBeginning;

	// Token: 0x04001744 RID: 5956
	public bool justRespec;

	// Token: 0x04001745 RID: 5957
	public bool canUpdateSliders;

	// Token: 0x04001746 RID: 5958
	public bool testing;

	// Token: 0x04001747 RID: 5959
	public Character respecCharacter;

	// Token: 0x04001748 RID: 5960
	public int previousXP;

	// Token: 0x04001749 RID: 5961
	public int previousLevel;

	// Token: 0x0400174A RID: 5962
	[Header("LINKS")]
	public Canvas canvas;

	// Token: 0x0400174B RID: 5963
	public ToggleGroup traitsToggles;

	// Token: 0x0400174C RID: 5964
	public List<Toggle> raceTogglesToggle = new List<Toggle>();

	// Token: 0x0400174D RID: 5965
	public List<GameObject> raceTraitToggles = new List<GameObject>();

	// Token: 0x0400174E RID: 5966
	public List<Toggle> raceTraitTogglesToggle = new List<Toggle>();

	// Token: 0x0400174F RID: 5967
	public List<TextMeshProUGUI> raceTraitText = new List<TextMeshProUGUI>();

	// Token: 0x04001750 RID: 5968
	public TextMeshProUGUI outputText;

	// Token: 0x04001751 RID: 5969
	public TextMeshProUGUI skillText;

	// Token: 0x04001752 RID: 5970
	public TextMeshProUGUI skillText2;

	// Token: 0x04001753 RID: 5971
	public TextMeshProUGUI skillNumbersText;

	// Token: 0x04001754 RID: 5972
	public TextMeshProUGUI skillNumbersText2;

	// Token: 0x04001755 RID: 5973
	public TextMeshProUGUI skillHeadersText;

	// Token: 0x04001756 RID: 5974
	public TextMeshProUGUI skillHeadersText2;

	// Token: 0x04001757 RID: 5975
	public TextMeshProUGUI strengthText;

	// Token: 0x04001758 RID: 5976
	public TextMeshProUGUI agilityText;

	// Token: 0x04001759 RID: 5977
	public TextMeshProUGUI auraText;

	// Token: 0x0400175A RID: 5978
	public TextMeshProUGUI sensoryText;

	// Token: 0x0400175B RID: 5979
	public TextMeshProUGUI dexterityText;

	// Token: 0x0400175C RID: 5980
	public TextMeshProUGUI paganText;

	// Token: 0x0400175D RID: 5981
	public TextMeshProUGUI archetypeDescriptionText;

	// Token: 0x0400175E RID: 5982
	public TextMeshProUGUI sexLabel;

	// Token: 0x0400175F RID: 5983
	public TextMeshProUGUI auraLabel;

	// Token: 0x04001760 RID: 5984
	public TextMeshProUGUI agilityLabel;

	// Token: 0x04001761 RID: 5985
	public TextMeshProUGUI strengthLabel;

	// Token: 0x04001762 RID: 5986
	public TextMeshProUGUI dexterityLabel;

	// Token: 0x04001763 RID: 5987
	public TextMeshProUGUI paganLabel;

	// Token: 0x04001764 RID: 5988
	public TextMeshProUGUI sensoryLabel;

	// Token: 0x04001765 RID: 5989
	public Toggle firstToggle;

	// Token: 0x04001766 RID: 5990
	public TMP_InputField input;

	// Token: 0x04001767 RID: 5991
	public GameObject alertStats;

	// Token: 0x04001768 RID: 5992
	public GameObject alertTokens;

	// Token: 0x04001769 RID: 5993
	public GameObject alertTokensInvalid;

	// Token: 0x0400176A RID: 5994
	public GameObject nameInputField;

	// Token: 0x0400176B RID: 5995
	public GameObject nextCharacterButton;

	// Token: 0x0400176C RID: 5996
	public GameObject nextCharacterButtonController;

	// Token: 0x0400176D RID: 5997
	public GameObject finishButton;

	// Token: 0x0400176E RID: 5998
	public RenderTexture domeRT;

	// Token: 0x0400176F RID: 5999
	public RenderTexture domeRT2;

	// Token: 0x04001770 RID: 6000
	public RenderTexture domeRT4;

	// Token: 0x04001771 RID: 6001
	public RenderTexture domeRT8;

	// Token: 0x04001772 RID: 6002
	public RawImage domeCharacterImage;

	// Token: 0x04001773 RID: 6003
	public Slider sex;

	// Token: 0x04001774 RID: 6004
	public Slider hair;

	// Token: 0x04001775 RID: 6005
	public Slider skin;

	// Token: 0x04001776 RID: 6006
	public Slider hairColor;

	// Token: 0x04001777 RID: 6007
	private float currentSex;

	// Token: 0x04001778 RID: 6008
	private float currentSkin;

	// Token: 0x04001779 RID: 6009
	public string majorStat1;

	// Token: 0x0400177A RID: 6010
	public string majorStat2;

	// Token: 0x0400177B RID: 6011
	public string minorStat3;

	// Token: 0x0400177C RID: 6012
	public string majorSkill1;

	// Token: 0x0400177D RID: 6013
	public string majorSkill2;

	// Token: 0x0400177E RID: 6014
	public string minorSkill3;

	// Token: 0x0400177F RID: 6015
	public RawImage[] portraits = new RawImage[4];

	// Token: 0x04001780 RID: 6016
	public Button[] portraitHovers = new Button[4];

	// Token: 0x04001781 RID: 6017
	public Image[] archetypes = new Image[0];

	// Token: 0x04001782 RID: 6018
	public Image[] statTokenBacks = new Image[0];

	// Token: 0x04001783 RID: 6019
	public RectTransform[] statTransforms = new RectTransform[0];

	// Token: 0x04001784 RID: 6020
	public RectTransform[] skillTransforms = new RectTransform[0];

	// Token: 0x04001785 RID: 6021
	public Image[] skillTokenBacks = new Image[0];

	// Token: 0x04001786 RID: 6022
	public RectTransform tokenMajorStat1;

	// Token: 0x04001787 RID: 6023
	public RectTransform tokenMajorStat2;

	// Token: 0x04001788 RID: 6024
	public RectTransform tokenMinorStat3;

	// Token: 0x04001789 RID: 6025
	public RectTransform tokenMajorSkill4;

	// Token: 0x0400178A RID: 6026
	public RectTransform tokenMajorSkill5;

	// Token: 0x0400178B RID: 6027
	public RectTransform tokenMinorSkill6;

	// Token: 0x0400178C RID: 6028
	public RectTransform tokenMinorSkill7;

	// Token: 0x0400178D RID: 6029
	public RectTransform tokenMinorSkill8;

	// Token: 0x0400178E RID: 6030
	public RectTransform backTokenMajorStat1;

	// Token: 0x0400178F RID: 6031
	public RectTransform backTokenMajorStat2;

	// Token: 0x04001790 RID: 6032
	public RectTransform backTokenMinorStat3;

	// Token: 0x04001791 RID: 6033
	public RectTransform backTokenMajorSkill4;

	// Token: 0x04001792 RID: 6034
	public RectTransform backTokenMajorSkill5;

	// Token: 0x04001793 RID: 6035
	public RectTransform backTokenMinorSkill6;

	// Token: 0x04001794 RID: 6036
	public RectTransform backTokenMinorSkill7;

	// Token: 0x04001795 RID: 6037
	public RectTransform backTokenMinorSkill8;

	// Token: 0x04001796 RID: 6038
	public Image tokenImgMajorStat1;

	// Token: 0x04001797 RID: 6039
	public Image tokenImgMajorStat2;

	// Token: 0x04001798 RID: 6040
	public Image tokenImgMinorStat3;

	// Token: 0x04001799 RID: 6041
	public Image tokenImgMajorSkill4;

	// Token: 0x0400179A RID: 6042
	public Image tokenImgMajorSkill5;

	// Token: 0x0400179B RID: 6043
	public Image tokenImgMinorSkill6;

	// Token: 0x0400179C RID: 6044
	public Image tokenImgMinorSkill7;

	// Token: 0x0400179D RID: 6045
	public Image tokenImgMinorSkill8;

	// Token: 0x0400179E RID: 6046
	public Transform alertTokenStats;

	// Token: 0x0400179F RID: 6047
	public Transform alertTokenSkills;

	// Token: 0x040017A0 RID: 6048
	public UITriggerButton backgroundContinueBtn;

	// Token: 0x040017A1 RID: 6049
	public UITriggerButton statsContinueBtn;

	// Token: 0x040017A2 RID: 6050
	public UITriggerButton archetypesContinueBtn1;

	// Token: 0x040017A3 RID: 6051
	public UITriggerButton archetypesContinueBtn2;

	// Token: 0x040017A4 RID: 6052
	public UITriggerButton nextCharacterBtn;

	// Token: 0x040017A5 RID: 6053
	public UITriggerButton finishBtn;

	// Token: 0x040017A6 RID: 6054
	public GameObject paganPopup;

	// Token: 0x040017A7 RID: 6055
	public GameObject archetypeClose;

	// Token: 0x040017A8 RID: 6056
	public TextMeshProUGUI paganPopupText;

	// Token: 0x040017A9 RID: 6057
	public Image fluteAbilities;

	// Token: 0x040017AA RID: 6058
	public Image hornAbilities;

	// Token: 0x040017AB RID: 6059
	public Image drumAbilities;

	// Token: 0x040017AC RID: 6060
	public Image vinesAbilities;

	// Token: 0x040017AD RID: 6061
	public Image faunaAbilities;

	// Token: 0x040017AE RID: 6062
	public Image sporesAbilities;

	// Token: 0x040017AF RID: 6063
	public Image meleeAbilities;

	// Token: 0x040017B0 RID: 6064
	public Image rangeAbilities;

	// Token: 0x040017B1 RID: 6065
	public Image defenseAbilities;

	// Token: 0x040017B2 RID: 6066
	public HannahAnimatorSimple fluteAbilitiesAnim;

	// Token: 0x040017B3 RID: 6067
	public HannahAnimatorSimple hornAbilitiesAnim;

	// Token: 0x040017B4 RID: 6068
	public HannahAnimatorSimple drumAbilitiesAnim;

	// Token: 0x040017B5 RID: 6069
	public HannahAnimatorSimple vinesAbilitiesAnim;

	// Token: 0x040017B6 RID: 6070
	public HannahAnimatorSimple faunaAbilitiesAnim;

	// Token: 0x040017B7 RID: 6071
	public HannahAnimatorSimple sporesAbilitiesAnim;

	// Token: 0x040017B8 RID: 6072
	public HannahAnimatorSimple meleeAbilitiesAnim;

	// Token: 0x040017B9 RID: 6073
	public HannahAnimatorSimple rangeAbilitiesAnim;

	// Token: 0x040017BA RID: 6074
	public HannahAnimatorSimple defenseAbilitiesAnim;

	// Token: 0x040017BB RID: 6075
	public Sprite fluteAbilitiesBlank;

	// Token: 0x040017BC RID: 6076
	public Sprite hornAbilitiesBlank;

	// Token: 0x040017BD RID: 6077
	public Sprite drumAbilitiesBlank;

	// Token: 0x040017BE RID: 6078
	public Sprite vinesAbilitiesBlank;

	// Token: 0x040017BF RID: 6079
	public Sprite faunaAbilitiesBlank;

	// Token: 0x040017C0 RID: 6080
	public Sprite sporesAbilitiesBlank;

	// Token: 0x040017C1 RID: 6081
	public Sprite meleeAbilitiesBlank;

	// Token: 0x040017C2 RID: 6082
	public Sprite rangeAbilitiesBlank;

	// Token: 0x040017C3 RID: 6083
	public Sprite defenseAbilitiesBlank;

	// Token: 0x040017C4 RID: 6084
	public Sprite fluteAbilitiesComplete;

	// Token: 0x040017C5 RID: 6085
	public Sprite hornAbilitiesComplete;

	// Token: 0x040017C6 RID: 6086
	public Sprite drumAbilitiesComplete;

	// Token: 0x040017C7 RID: 6087
	public Sprite vinesAbilitiesComplete;

	// Token: 0x040017C8 RID: 6088
	public Sprite faunaAbilitiesComplete;

	// Token: 0x040017C9 RID: 6089
	public Sprite sporesAbilitiesComplete;

	// Token: 0x040017CA RID: 6090
	public Sprite meleeAbilitiesComplete;

	// Token: 0x040017CB RID: 6091
	public Sprite rangeAbilitiesComplete;

	// Token: 0x040017CC RID: 6092
	public Sprite defenseAbilitiesComplete;

	// Token: 0x040017CD RID: 6093
	public Transform portraitAbilities1;

	// Token: 0x040017CE RID: 6094
	public Transform portraitAbilities2;

	// Token: 0x040017CF RID: 6095
	public Transform portraitAbilities3;

	// Token: 0x040017D0 RID: 6096
	public Transform portraitAbilities4;

	// Token: 0x040017D1 RID: 6097
	public RectTransform addFX;

	// Token: 0x040017D2 RID: 6098
	public RectTransform removeFX;

	// Token: 0x040017D3 RID: 6099
	public TextMeshProUGUI tooltipText;

	// Token: 0x040017D4 RID: 6100
	public TextMeshProUGUI controllerSwitchL;

	// Token: 0x040017D5 RID: 6101
	public TextMeshProUGUI controllerSwitchR;

	// Token: 0x040017D6 RID: 6102
	public GameObject tooltip;

	// Token: 0x040017D7 RID: 6103
	public RawImage noticePortrait;

	// Token: 0x040017D8 RID: 6104
	public TextMeshProUGUI noticeTitle;

	// Token: 0x040017D9 RID: 6105
	public TextMeshProUGUI noticeMessage;

	// Token: 0x040017DA RID: 6106
	public TextMeshProUGUI noticeController;

	// Token: 0x040017DB RID: 6107
	public GameObject noticeClose;

	// Token: 0x040017DC RID: 6108
	public Image[] checkMarks = new Image[4];

	// Token: 0x040017DD RID: 6109
	public Image bgBorder;

	// Token: 0x040017DE RID: 6110
	public Image skillBorder;

	// Token: 0x040017DF RID: 6111
	public Transform rightSide;

	// Token: 0x040017E0 RID: 6112
	public Transform leftSide;

	// Token: 0x040017E1 RID: 6113
	public Material songMat;

	// Token: 0x040017E2 RID: 6114
	[Header("STATS")]
	public GameObject currentModel;

	// Token: 0x040017E3 RID: 6115
	public Character character;

	// Token: 0x040017E4 RID: 6116
	public string selectedRace;

	// Token: 0x040017E5 RID: 6117
	public string selectedTrait;

	// Token: 0x040017E6 RID: 6118
	public string playerName;

	// Token: 0x040017E7 RID: 6119
	public string selectedModel;

	// Token: 0x040017E8 RID: 6120
	public string hairModel;

	// Token: 0x040017E9 RID: 6121
	public string characterName;

	// Token: 0x040017EA RID: 6122
	public string currentArchetype;

	// Token: 0x040017EB RID: 6123
	[Header("MODELS")]
	public List<string> ameythevianModels = new List<string>();

	// Token: 0x040017EC RID: 6124
	public List<string> varuchovModels = new List<string>();

	// Token: 0x040017ED RID: 6125
	public List<string> pasaarenModels = new List<string>();

	// Token: 0x040017EE RID: 6126
	public List<string> taratorithModels = new List<string>();

	// Token: 0x040017EF RID: 6127
	public List<string> yetiModels = new List<string>();

	// Token: 0x040017F0 RID: 6128
	public List<string> ameythevianModelsF = new List<string>();

	// Token: 0x040017F1 RID: 6129
	public List<string> varuchovModelsF = new List<string>();

	// Token: 0x040017F2 RID: 6130
	public List<string> pasaarenModelsF = new List<string>();

	// Token: 0x040017F3 RID: 6131
	public List<string> taratorithModelsF = new List<string>();

	// Token: 0x040017F4 RID: 6132
	public List<string> armors = new List<string>();

	// Token: 0x040017F5 RID: 6133
	public List<string> armorsF = new List<string>();

	// Token: 0x040017F6 RID: 6134
	public List<string> yetiArmors = new List<string>();

	// Token: 0x040017F7 RID: 6135
	public List<string> ameythevianSkins = new List<string>();

	// Token: 0x040017F8 RID: 6136
	public List<string> varuchovSkins = new List<string>();

	// Token: 0x040017F9 RID: 6137
	public List<string> pasaarenSkins = new List<string>();

	// Token: 0x040017FA RID: 6138
	public List<string> taratorithSkins = new List<string>();

	// Token: 0x040017FB RID: 6139
	public List<string> yetiSkins = new List<string>();

	// Token: 0x040017FC RID: 6140
	public List<string> ameythevianSkinsF = new List<string>();

	// Token: 0x040017FD RID: 6141
	public List<string> varuchovSkinsF = new List<string>();

	// Token: 0x040017FE RID: 6142
	public List<string> pasaarenSkinsF = new List<string>();

	// Token: 0x040017FF RID: 6143
	public List<string> taratorithSkinsF = new List<string>();

	// Token: 0x04001800 RID: 6144
	public List<string> ameythevianHeads = new List<string>();

	// Token: 0x04001801 RID: 6145
	public List<string> ameythevianHeadsF = new List<string>();

	// Token: 0x04001802 RID: 6146
	public List<string> varuchovHeads = new List<string>();

	// Token: 0x04001803 RID: 6147
	public List<string> varuchovHeadsF = new List<string>();

	// Token: 0x04001804 RID: 6148
	public List<string> pasaarenHeads = new List<string>();

	// Token: 0x04001805 RID: 6149
	public List<string> pasaarenHeadsF = new List<string>();

	// Token: 0x04001806 RID: 6150
	public List<string> taratorithHeads = new List<string>();

	// Token: 0x04001807 RID: 6151
	public List<string> taratorithHeadsF = new List<string>();

	// Token: 0x04001808 RID: 6152
	public List<string> yetiHeads = new List<string>();

	// Token: 0x04001809 RID: 6153
	private List<string> models;

	// Token: 0x0400180A RID: 6154
	private List<string> modelsF;

	// Token: 0x0400180B RID: 6155
	private List<string> hairModels;

	// Token: 0x0400180C RID: 6156
	private List<string> hairModelsF;

	// Token: 0x0400180D RID: 6157
	private List<string> skins;

	// Token: 0x0400180E RID: 6158
	private List<string> skinsF;

	// Token: 0x0400180F RID: 6159
	private string selectedSkin;

	// Token: 0x04001810 RID: 6160
	private string selectedHair;

	// Token: 0x04001811 RID: 6161
	[Header("MISC")]
	private string[] ameythevianRaceTraits = new string[] { "Merchant", "Farmer", "Cleric", "Brewer", "Sailor", "Servant", "Entertainer" };

	// Token: 0x04001812 RID: 6162
	private string[] taratorithRaceTraits = new string[] { "Artisan", "Rider", "Herder", "Merchant", "Farmer", "Cleric" };

	// Token: 0x04001813 RID: 6163
	private string[] varuchovRaceTraits = new string[] { "Expeditioner", "Miner", "Hunter", "Farmer", "Weaver", "Merchant" };

	// Token: 0x04001814 RID: 6164
	private string[] pasaarenRaceTraits = new string[] { "Gardener", "Merchant", "Cleric", "Justice", "Hunter", "Politician", "Artisan" };

	// Token: 0x04001815 RID: 6165
	private string[] yetiRaceTraits = new string[] { "Pine", "Maple", "Willow", "Birch", "Date" };

	// Token: 0x04001816 RID: 6166
	private string[] currentRaceTraitList;

	// Token: 0x04001817 RID: 6167
	private StringFast str = new StringFast(64);

	// Token: 0x04001818 RID: 6168
	private StringFast str2 = new StringFast(64);

	// Token: 0x04001819 RID: 6169
	private int currentModelIndex;

	// Token: 0x0400181A RID: 6170
	private int currentHairModelIndex;

	// Token: 0x0400181B RID: 6171
	private int currentSkinIndex;

	// Token: 0x0400181C RID: 6172
	private int currentHairColorIndex;

	// Token: 0x0400181D RID: 6173
	public Body body;

	// Token: 0x0400181E RID: 6174
	public Body creatureBody;

	// Token: 0x0400181F RID: 6175
	public int characterCount;

	// Token: 0x04001820 RID: 6176
	public int currentCharacterIndex;

	// Token: 0x04001821 RID: 6177
	private List<Character> party;

	// Token: 0x04001822 RID: 6178
	private int currIndex;

	// Token: 0x04001823 RID: 6179
	private float updateTime;

	// Token: 0x04001824 RID: 6180
	public Color normalArchetypeColor;

	// Token: 0x04001825 RID: 6181
	public Color selectedArchetypeColor;

	// Token: 0x04001826 RID: 6182
	public GameObject tokenConfirm;

	// Token: 0x04001827 RID: 6183
	public TextMeshProUGUI confirmNameText;

	// Token: 0x04001828 RID: 6184
	public Transform tokenConfirmTransform;

	// Token: 0x04001829 RID: 6185
	public GameObject majorMinorBtns;

	// Token: 0x0400182A RID: 6186
	public GameObject removeStatMajorBtns;

	// Token: 0x0400182B RID: 6187
	public GameObject removeStatMinorBtns;

	// Token: 0x0400182C RID: 6188
	public GameObject removeSkillMajorBtns;

	// Token: 0x0400182D RID: 6189
	public GameObject removeSkillMinorBtns;

	// Token: 0x0400182E RID: 6190
	public TextMeshProUGUI removeStatMajor1;

	// Token: 0x0400182F RID: 6191
	public TextMeshProUGUI removeStatMajor2;

	// Token: 0x04001830 RID: 6192
	public TextMeshProUGUI removeStatMinor1;

	// Token: 0x04001831 RID: 6193
	public TextMeshProUGUI removeSkillMajor1;

	// Token: 0x04001832 RID: 6194
	public TextMeshProUGUI removeSkillMajor2;

	// Token: 0x04001833 RID: 6195
	public TextMeshProUGUI removeSkillMinor1;

	// Token: 0x04001834 RID: 6196
	public TextMeshProUGUI removeSkillMinor2;

	// Token: 0x04001835 RID: 6197
	public TextMeshProUGUI removeSkillMinor3;

	// Token: 0x04001836 RID: 6198
	public TextMeshProUGUI alertMessageFocusEmpty;

	// Token: 0x04001837 RID: 6199
	public TextMeshProUGUI alertMessageFocusInvalid;

	// Token: 0x04001838 RID: 6200
	public Button majorButton;

	// Token: 0x04001839 RID: 6201
	public Button minorButton;

	// Token: 0x0400183A RID: 6202
	public Transform majorPosition;

	// Token: 0x0400183B RID: 6203
	public Transform minorPosition;

	// Token: 0x0400183C RID: 6204
	public Transform singlePosition;

	// Token: 0x0400183D RID: 6205
	public bool[] archetypeStatus = new bool[8];

	// Token: 0x0400183E RID: 6206
	private float bodyTime;

	// Token: 0x0400183F RID: 6207
	private bool showStatHovers;

	// Token: 0x04001840 RID: 6208
	[Header("HOVERING")]
	public string hoverColor = "#908777";

	// Token: 0x04001841 RID: 6209
	public string disabledColor = "#333333";

	// Token: 0x04001842 RID: 6210
	public GameObject itemTooltip;

	// Token: 0x04001843 RID: 6211
	public TextMeshProUGUI descriptionText;

	// Token: 0x04001844 RID: 6212
	public Transform hoverPointBG;

	// Token: 0x04001845 RID: 6213
	public Transform hoverPointBGAll;

	// Token: 0x04001846 RID: 6214
	public Transform hoverPointArchetype;

	// Token: 0x04001847 RID: 6215
	public Transform hoverPointStats;

	// Token: 0x04001848 RID: 6216
	public Transform hoverPointStatsAll;

	// Token: 0x04001849 RID: 6217
	public RectTransform tooltipRT;

	// Token: 0x0400184A RID: 6218
	public bool isHovering;

	// Token: 0x0400184B RID: 6219
	private string hoverText;

	// Token: 0x0400184C RID: 6220
	public GameObject currentHover;

	// Token: 0x0400184D RID: 6221
	public GameObject prevHover;

	// Token: 0x0400184E RID: 6222
	private List<RaycastResult> raycastResults = new List<RaycastResult>();

	// Token: 0x0400184F RID: 6223
	private PointerEventData pointer;

	// Token: 0x04001850 RID: 6224
	private int openIndex;

	// Token: 0x04001851 RID: 6225
	private bool hoveringOnStat;

	// Token: 0x04001852 RID: 6226
	private bool hoveringOnSkill;

	// Token: 0x04001853 RID: 6227
	public Vector3 mouseStart;

	// Token: 0x04001854 RID: 6228
	public bool spinning;

	// Token: 0x04001855 RID: 6229
	public Color dayColor;

	// Token: 0x04001856 RID: 6230
	public Color nightColor;

	// Token: 0x04001857 RID: 6231
	private bool changedModelForHover;

	// Token: 0x04001858 RID: 6232
	public GameObject currentCreatureModel;

	// Token: 0x04001859 RID: 6233
	private IEnumerator hoverCorout;

	// Token: 0x0400185A RID: 6234
	private IEnumerator tooltipCorout;

	// Token: 0x0400185B RID: 6235
	private IEnumerator nextCharacterCorout;

	// Token: 0x0400185C RID: 6236
	private IEnumerator controllerMoveOutOfInputField;

	// Token: 0x0400185D RID: 6237
	private Transform lookAt;

	// Token: 0x0400185E RID: 6238
	private Image hoveringTokenBack;

	// Token: 0x0400185F RID: 6239
	private float timeSinceCharacterChange;

	// Token: 0x04001860 RID: 6240
	public float targetAlpha;

	// Token: 0x04001861 RID: 6241
	public float currentAlpha;

	// Token: 0x04001862 RID: 6242
	public CanvasGroup canvasGroup;

	// Token: 0x04001863 RID: 6243
	public CanvasGroup canvasGroupAll;

	// Token: 0x04001864 RID: 6244
	private float lastSliderTime;

	// Token: 0x04001865 RID: 6245
	public Color statBrightColor;

	// Token: 0x04001866 RID: 6246
	public Color statBrightDmgColor;

	// Token: 0x04001867 RID: 6247
	public Color statNormalColor;

	// Token: 0x04001868 RID: 6248
	[Header("TOKEN DRAGGING")]
	public bool draggingToken;

	// Token: 0x04001869 RID: 6249
	public RectTransform dragToken;

	// Token: 0x0400186A RID: 6250
	public GameObject dragIndicator;

	// Token: 0x0400186B RID: 6251
	[Header("ABILITIES")]
	public Image autoAbility1;

	// Token: 0x0400186C RID: 6252
	public Image autoAbility2;

	// Token: 0x0400186D RID: 6253
	public Image autoAbility3;

	// Token: 0x0400186E RID: 6254
	public Image autoAbility4;

	// Token: 0x0400186F RID: 6255
	public Image autoAbility5;

	// Token: 0x04001870 RID: 6256
	public Image autoAbility6;

	// Token: 0x04001871 RID: 6257
	public Image autoAbility7;

	// Token: 0x04001872 RID: 6258
	public Image autoAbility8;

	// Token: 0x04001873 RID: 6259
	public Image autoAbility9;

	// Token: 0x04001874 RID: 6260
	public Image autoAbility10;

	// Token: 0x04001875 RID: 6261
	public Image autoAbility1Back;

	// Token: 0x04001876 RID: 6262
	public Image autoAbility2Back;

	// Token: 0x04001877 RID: 6263
	public Image autoAbility3Back;

	// Token: 0x04001878 RID: 6264
	public Image autoAbility4Back;

	// Token: 0x04001879 RID: 6265
	public Image autoAbility5Back;

	// Token: 0x0400187A RID: 6266
	public Image autoAbility6Back;

	// Token: 0x0400187B RID: 6267
	public Image autoAbility7Back;

	// Token: 0x0400187C RID: 6268
	public Image autoAbility8Back;

	// Token: 0x0400187D RID: 6269
	public Image autoAbility9Back;

	// Token: 0x0400187E RID: 6270
	public Image autoAbility10Back;

	// Token: 0x0400187F RID: 6271
	public Button autoAbilityBtn1;

	// Token: 0x04001880 RID: 6272
	public Button autoAbilityBtn2;

	// Token: 0x04001881 RID: 6273
	public Button autoAbilityBtn3;

	// Token: 0x04001882 RID: 6274
	public Button autoAbilityBtn4;

	// Token: 0x04001883 RID: 6275
	public Button autoAbilityBtn5;

	// Token: 0x04001884 RID: 6276
	public Button autoAbilityBtn6;

	// Token: 0x04001885 RID: 6277
	public Button autoAbilityBtn7;

	// Token: 0x04001886 RID: 6278
	public Button autoAbilityBtn8;

	// Token: 0x04001887 RID: 6279
	public Button autoAbilityBtn9;

	// Token: 0x04001888 RID: 6280
	public Button autoAbilityBtn10;

	// Token: 0x04001889 RID: 6281
	public Sprite fluteSprite1;

	// Token: 0x0400188A RID: 6282
	public Sprite fluteSprite2;

	// Token: 0x0400188B RID: 6283
	public Sprite hornSprite1;

	// Token: 0x0400188C RID: 6284
	public Sprite hornSprite2;

	// Token: 0x0400188D RID: 6285
	public Sprite vinesSprite1;

	// Token: 0x0400188E RID: 6286
	public Sprite vinesSprite2;

	// Token: 0x0400188F RID: 6287
	public Sprite sporeSprite1;

	// Token: 0x04001890 RID: 6288
	public Sprite sporeSprite2;

	// Token: 0x04001891 RID: 6289
	public Sprite faunaSprite1;

	// Token: 0x04001892 RID: 6290
	public Sprite faunaSprite2;

	// Token: 0x04001893 RID: 6291
	public Sprite pipeSprite1;

	// Token: 0x04001894 RID: 6292
	public Sprite pipeSprite2;

	// Token: 0x04001895 RID: 6293
	public Sprite emptyAbilitySprite;

	// Token: 0x04001896 RID: 6294
	public string fluteAbilityName1;

	// Token: 0x04001897 RID: 6295
	public string fluteAbilityName2;

	// Token: 0x04001898 RID: 6296
	public string hornAbilityName1;

	// Token: 0x04001899 RID: 6297
	public string hornAbilityName2;

	// Token: 0x0400189A RID: 6298
	public string vinesAbilityName1;

	// Token: 0x0400189B RID: 6299
	public string vinesAbilityName2;

	// Token: 0x0400189C RID: 6300
	public string sporeAbilityName1;

	// Token: 0x0400189D RID: 6301
	public string sporeAbilityName2;

	// Token: 0x0400189E RID: 6302
	public string faunaAbilityName1;

	// Token: 0x0400189F RID: 6303
	public string faunaAbilityName2;

	// Token: 0x040018A0 RID: 6304
	public string pipeAbilityName1;

	// Token: 0x040018A1 RID: 6305
	public string pipeAbilityName2;

	// Token: 0x040018A2 RID: 6306
	public string[] skillsWithAbilities;

	// Token: 0x040018A3 RID: 6307
	[Header("MISC")]
	private List<Character> characterOrder;

	// Token: 0x040018A4 RID: 6308
	private List<string> skillOrder;

	// Token: 0x040018A5 RID: 6309
	private List<string> skillType;

	// Token: 0x040018A6 RID: 6310
	private List<int> characterLearned1;

	// Token: 0x040018A7 RID: 6311
	private List<int> characterLearned2;

	// Token: 0x040018A8 RID: 6312
	private List<int> characterLearned3;

	// Token: 0x040018A9 RID: 6313
	private List<Color32[]> runeColors1;

	// Token: 0x040018AA RID: 6314
	private List<Color32[]> runeColors2;

	// Token: 0x040018AB RID: 6315
	private List<Color32[]> runeColors3;

	// Token: 0x040018AC RID: 6316
	private Transform missingTransform;

	// Token: 0x040018AD RID: 6317
	private bool loaded;

	// Token: 0x040018AE RID: 6318
	private bool noticeOpen;

	// Token: 0x040018AF RID: 6319
	private bool dontUpdatePortrait;
}
