Decompiled source of VikingSkills v0.1.1

VikingSkills.dll

Decompiled 3 days ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Jotunn.Managers;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Events;
using UnityEngine.UI;
using VikingLib.Combat;
using VikingLib.SkillSystem;
using VikingLib.Stats;
using VikingLib.StatusEffects;
using VikingLib.UI;
using VikingLib.UI.Tooltip;
using VikingSkills.Configuration;
using VikingSkills.Data;
using VikingSkills.Keystones;
using VikingSkills.Services;
using VikingSkills.StatusEffects;
using VikingSkills.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("DigitalVikings")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("0.1.1.0")]
[assembly: AssemblyInformationalVersion("0.1.1+2f54e0c362b3f9c65c0e596c07869c93a8f1934b")]
[assembly: AssemblyProduct("VikingSkills")]
[assembly: AssemblyTitle("VikingSkills")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableAttribute : Attribute
	{
		public readonly byte[] NullableFlags;

		public NullableAttribute(byte P_0)
		{
			NullableFlags = new byte[1] { P_0 };
		}

		public NullableAttribute(byte[] P_0)
		{
			NullableFlags = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
	internal sealed class NullableContextAttribute : Attribute
	{
		public readonly byte Flag;

		public NullableContextAttribute(byte P_0)
		{
			Flag = P_0;
		}
	}
	[CompilerGenerated]
	[Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace VikingSkills
{
	[BepInPlugin("com.digitalvikings.vikingskills", "VikingSkills", "0.1.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class VikingSkillsPlugin : BaseUnityPlugin
	{
		public const string ModGuid = "com.digitalvikings.vikingskills";

		public const string ModName = "VikingSkills";

		public const string ModVersion = "0.1.1";

		internal static ManualLogSource Log;

		private Harmony _harmony;

		private void Awake()
		{
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"VikingSkills v0.1.1 initializing...");
			ModConfig.Init(((BaseUnityPlugin)this).Config);
			if (!ModConfig.EnableVanillaSkillScaling.Value)
			{
				VanillaSkillIntegration.DisableAll();
				Log.LogInfo((object)"Vanilla skill scaling neutralized. Pure milestone & Keystone progression active.");
			}
			else
			{
				VanillaSkillIntegration.ResetToDefaults();
				Log.LogInfo((object)"Vanilla skill scaling active alongside Keystones.");
			}
			KeystoneStatAdapter.Init();
			_harmony = new Harmony("com.digitalvikings.vikingskills");
			_harmony.PatchAll();
			Log.LogInfo((object)"VikingSkills v0.1.1 loaded successfully.");
			if (Chainloader.PluginInfos.ContainsKey("com.jotunn.jotunn"))
			{
				HookJotunnSync();
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		private void HookJotunnSync()
		{
			SynchronizationManager.OnConfigurationSynchronized += delegate
			{
				Log.LogInfo((object)"Server configuration synchronized successfully.");
			};
		}

		private void OnDestroy()
		{
			Harmony harmony = _harmony;
			if (harmony != null)
			{
				harmony.UnpatchSelf();
			}
		}
	}
	[HarmonyPatch(typeof(Player), "OnSpawned")]
	public static class PlayerSpawnPatch
	{
		[HarmonyPostfix]
		private static void OnPlayerSpawned(Player __instance)
		{
			if ((Object)(object)__instance == (Object)(object)Player.m_localPlayer)
			{
				KeystoneStatAdapter.SyncPlayer(__instance);
			}
		}
	}
}
namespace VikingSkills.UI
{
	public class PanoramicSkillsDialog : MonoBehaviour
	{
		private ScrollRect? _scrollRect;

		private RectTransform? _contentTransform;

		private TMP_Text? _headerTitle;

		private SkillTreeDrawerUI? _drawer;

		private SkillCategoryType? _activeCategoryFilter;

		private readonly List<RuneColumnUI> _activeColumns = new List<RuneColumnUI>();

		private Player? _cachedPlayer;

		private GameObject? _hoverTooltip;

		private TMP_Text? _tooltipTitle;

		private TMP_Text? _tooltipContent;

		private readonly List<(GameObject btnObj, Image img, Image indicator, TMP_Text text, SkillCategoryType? cat)> _filterBtnList = new List<(GameObject, Image, Image, TMP_Text, SkillCategoryType?)>();

		public static PanoramicSkillsDialog? Instance { get; private set; }

		public static bool IsOpen
		{
			get
			{
				if ((Object)(object)Instance != (Object)null)
				{
					return ((Component)Instance).gameObject.activeSelf;
				}
				return false;
			}
		}

		public static void EnsureInitialized(Transform parentCanvas)
		{
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)Instance != (Object)null))
			{
				GameObject val = new GameObject("VikingSkills_PanoramicDialog", new Type[1] { typeof(RectTransform) });
				val.transform.SetParent(parentCanvas, false);
				RectTransform component = val.GetComponent<RectTransform>();
				component.anchorMin = Vector2.zero;
				component.anchorMax = Vector2.one;
				component.offsetMin = Vector2.zero;
				component.offsetMax = Vector2.zero;
				Instance = val.AddComponent<PanoramicSkillsDialog>();
				Instance.BuildInterface();
				val.SetActive(false);
				KeystoneManager.OnKeystonesChanged += Instance.OnKeystonesChangedHandler;
			}
		}

		private void OnDestroy()
		{
			KeystoneManager.OnKeystonesChanged -= OnKeystonesChangedHandler;
		}

		private void OnKeystonesChangedHandler()
		{
			if (IsOpen && (Object)(object)_cachedPlayer != (Object)null)
			{
				Populate(_cachedPlayer, preserveScroll: true);
			}
		}

		public static void OpenSkillTree(SkillType skillType)
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Instance != (Object)null && (Object)(object)Player.m_localPlayer != (Object)null && (Object)(object)Instance._drawer != (Object)null)
			{
				Instance.HideHoverTooltip();
				Instance._drawer.Open(Player.m_localPlayer, skillType);
			}
		}

		public static void OpenSkillTreeWithShelf(SkillType skillType, int milestone)
		{
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)Instance != (Object)null && (Object)(object)Player.m_localPlayer != (Object)null && (Object)(object)Instance._drawer != (Object)null)
			{
				Instance.HideHoverTooltip();
				Instance._drawer.Open(Player.m_localPlayer, skillType);
				Instance._drawer.OpenSelectionShelf(milestone);
			}
		}

		public static void Show(Player player)
		{
			if (ModConfig.ModEnabled.Value)
			{
				if ((Object)(object)Instance == (Object)null && (Object)(object)InventoryGui.instance != (Object)null)
				{
					EnsureInitialized(((Component)InventoryGui.instance).transform);
				}
				if ((Object)(object)Instance != (Object)null)
				{
					Instance._cachedPlayer = player;
					Instance.Populate(player);
					((Component)Instance).gameObject.SetActive(true);
					UIHelper.PlaySfx("sfx_gui_button");
				}
			}
		}

		public static void Hide()
		{
			if ((Object)(object)Instance != (Object)null && ((Component)Instance).gameObject.activeSelf)
			{
				Instance.HideHoverTooltip();
				if ((Object)(object)Instance._drawer != (Object)null && ((Component)Instance._drawer).gameObject.activeSelf)
				{
					Instance._drawer.Close();
					return;
				}
				((Component)Instance).gameObject.SetActive(false);
				UIHelper.PlaySfx("sfx_gui_button");
			}
		}

		private void BuildInterface()
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Expected O, but got Unknown
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Expected O, but got Unknown
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Unknown result type (might be due to invalid IL or missing references)
			//IL_044a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0451: Expected O, but got Unknown
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_048b: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_0540: Expected O, but got Unknown
			//IL_055f: Unknown result type (might be due to invalid IL or missing references)
			//IL_056b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0577: Unknown result type (might be due to invalid IL or missing references)
			//IL_0583: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c6: Expected O, but got Unknown
			//IL_05f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0611: Unknown result type (might be due to invalid IL or missing references)
			//IL_062b: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: Unknown result type (might be due to invalid IL or missing references)
			//IL_064b: Unknown result type (might be due to invalid IL or missing references)
			//IL_065b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0680: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Expected O, but got Unknown
			TMP_FontAsset valheimFont = UIHelper.GetValheimFont();
			Sprite whiteSprite = UIHelper.GetWhiteSprite();
			Image obj = ((Component)this).gameObject.AddComponent<Image>();
			obj.sprite = whiteSprite;
			((Graphic)obj).color = new Color(0.06f, 0.05f, 0.04f, 0.96f);
			GameObject val = new GameObject("HeaderBanner", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(((Component)this).transform, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(0f, 1f);
			component.anchorMax = new Vector2(1f, 1f);
			component.pivot = new Vector2(0.5f, 1f);
			component.anchoredPosition = Vector2.zero;
			component.sizeDelta = new Vector2(0f, 82f);
			Image component2 = val.GetComponent<Image>();
			component2.sprite = UIHelper.GetHeaderBanner();
			component2.type = (Type)1;
			((Graphic)component2).color = Color.white;
			UIHelper.CreateReturnButton(val.transform, new Vector2(-24f, -10f), new Vector2(136f, 36f), new Vector2(1f, 1f), new Vector2(1f, 1f), new Vector2(1f, 1f), "RETURN", Hide, valheimFont);
			GameObject val2 = new GameObject("TitleText", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0.5f, 1f);
			component3.anchorMax = new Vector2(0.5f, 1f);
			component3.pivot = new Vector2(0.5f, 1f);
			component3.anchoredPosition = new Vector2(0f, -12f);
			component3.sizeDelta = new Vector2(300f, 24f);
			_headerTitle = (TMP_Text?)(object)val2.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)valheimFont != (Object)null)
			{
				_headerTitle.font = valheimFont;
			}
			string text = ((Localization.instance != null) ? Localization.instance.Localize("$inventory_skills") : "SKILLS");
			_headerTitle.text = "<b><color=#E5A93C>—  " + text.ToUpper() + "  —</color></b>";
			_headerTitle.fontSize = 17f;
			_headerTitle.alignment = (TextAlignmentOptions)514;
			GameObject val3 = new GameObject("FilterRow", new Type[2]
			{
				typeof(RectTransform),
				typeof(HorizontalLayoutGroup)
			});
			val3.transform.SetParent(val.transform, false);
			RectTransform component4 = val3.GetComponent<RectTransform>();
			component4.anchorMin = new Vector2(0.5f, 0f);
			component4.anchorMax = new Vector2(0.5f, 0f);
			component4.pivot = new Vector2(0.5f, 0f);
			component4.anchoredPosition = new Vector2(0f, 0f);
			component4.sizeDelta = new Vector2(800f, 28f);
			HorizontalLayoutGroup component5 = val3.GetComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)component5).spacing = 16f;
			((LayoutGroup)component5).childAlignment = (TextAnchor)4;
			((HorizontalOrVerticalLayoutGroup)component5).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)component5).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)component5).childForceExpandWidth = false;
			((HorizontalOrVerticalLayoutGroup)component5).childForceExpandHeight = false;
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "ALL", null);
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "WEAPONS", SkillCategoryType.Weapons);
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "DEFENSE", SkillCategoryType.Defense);
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "MAGIC", SkillCategoryType.Magic);
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "MOBILITY", SkillCategoryType.Mobility);
			CreateFilterButton(val3.transform, valheimFont, whiteSprite, "RESOURCES", SkillCategoryType.Resources);
			GameObject val4 = new GameObject("ScrollView", new Type[2]
			{
				typeof(RectTransform),
				typeof(ScrollRect)
			});
			val4.transform.SetParent(((Component)this).transform, false);
			RectTransform component6 = val4.GetComponent<RectTransform>();
			component6.anchorMin = new Vector2(0f, 0f);
			component6.anchorMax = new Vector2(1f, 1f);
			component6.pivot = new Vector2(0.5f, 0.5f);
			component6.offsetMin = new Vector2(20f, 20f);
			component6.offsetMax = new Vector2(-20f, -88f);
			_scrollRect = val4.GetComponent<ScrollRect>();
			_scrollRect.horizontal = true;
			_scrollRect.vertical = false;
			_scrollRect.movementType = (MovementType)2;
			_scrollRect.scrollSensitivity = 25f;
			GameObject val5 = new GameObject("Viewport", new Type[2]
			{
				typeof(RectTransform),
				typeof(RectMask2D)
			});
			val5.transform.SetParent(val4.transform, false);
			RectTransform component7 = val5.GetComponent<RectTransform>();
			component7.anchorMin = Vector2.zero;
			component7.anchorMax = Vector2.one;
			component7.offsetMin = Vector2.zero;
			component7.offsetMax = Vector2.zero;
			_scrollRect.viewport = component7;
			GameObject val6 = new GameObject("Content", new Type[2]
			{
				typeof(RectTransform),
				typeof(HorizontalLayoutGroup)
			});
			val6.transform.SetParent(val5.transform, false);
			_contentTransform = val6.GetComponent<RectTransform>();
			_contentTransform.anchorMin = new Vector2(0f, 0f);
			_contentTransform.anchorMax = new Vector2(1f, 1f);
			_contentTransform.pivot = new Vector2(0.5f, 0.5f);
			_contentTransform.offsetMin = Vector2.zero;
			_contentTransform.offsetMax = Vector2.zero;
			_contentTransform.anchoredPosition = Vector2.zero;
			HorizontalLayoutGroup component8 = val6.GetComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)component8).spacing = 18f;
			((LayoutGroup)component8).padding = new RectOffset(20, 20, 10, 10);
			((HorizontalOrVerticalLayoutGroup)component8).childControlWidth = false;
			((HorizontalOrVerticalLayoutGroup)component8).childControlHeight = false;
			((HorizontalOrVerticalLayoutGroup)component8).childForceExpandWidth = false;
			((HorizontalOrVerticalLayoutGroup)component8).childForceExpandHeight = false;
			((LayoutGroup)component8).childAlignment = (TextAnchor)4;
			_scrollRect.content = _contentTransform;
			_drawer = SkillTreeDrawerUI.Create(((Component)this).transform, delegate
			{
				if ((Object)(object)_cachedPlayer != (Object)null)
				{
					Populate(_cachedPlayer, preserveScroll: true);
				}
			});
			BuildHoverTooltip(((Component)this).transform, valheimFont);
		}

		private void BuildHoverTooltip(Transform parent, TMP_FontAsset? font)
		{
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Expected O, but got Unknown
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Expected O, but got Unknown
			//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Expected O, but got Unknown
			_hoverTooltip = new GameObject("HoverTooltip", new Type[4]
			{
				typeof(RectTransform),
				typeof(Image),
				typeof(VerticalLayoutGroup),
				typeof(ContentSizeFitter)
			});
			_hoverTooltip.transform.SetParent(parent, false);
			RectTransform component = _hoverTooltip.GetComponent<RectTransform>();
			component.pivot = new Vector2(0.5f, 0f);
			component.sizeDelta = new Vector2(380f, 0f);
			Image component2 = _hoverTooltip.GetComponent<Image>();
			component2.sprite = UIHelper.GetGlassCard();
			component2.type = (Type)1;
			((Graphic)component2).color = new Color(0.04f, 0.06f, 0.09f, 0.98f);
			VerticalLayoutGroup component3 = _hoverTooltip.GetComponent<VerticalLayoutGroup>();
			((LayoutGroup)component3).padding = new RectOffset(16, 16, 12, 12);
			((HorizontalOrVerticalLayoutGroup)component3).spacing = 6f;
			((HorizontalOrVerticalLayoutGroup)component3).childControlWidth = true;
			((HorizontalOrVerticalLayoutGroup)component3).childControlHeight = true;
			((HorizontalOrVerticalLayoutGroup)component3).childForceExpandWidth = true;
			((HorizontalOrVerticalLayoutGroup)component3).childForceExpandHeight = false;
			ContentSizeFitter component4 = _hoverTooltip.GetComponent<ContentSizeFitter>();
			component4.horizontalFit = (FitMode)0;
			component4.verticalFit = (FitMode)2;
			GameObject val = new GameObject("Title", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val.transform.SetParent(_hoverTooltip.transform, false);
			_tooltipTitle = (TMP_Text?)(object)val.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_tooltipTitle.font = font;
			}
			_tooltipTitle.fontSize = 13f;
			_tooltipTitle.alignment = (TextAlignmentOptions)514;
			GameObject val2 = new GameObject("Content", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val2.transform.SetParent(_hoverTooltip.transform, false);
			_tooltipContent = (TMP_Text?)(object)val2.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_tooltipContent.font = font;
			}
			_tooltipContent.fontSize = 11f;
			_tooltipContent.lineSpacing = 1.15f;
			_tooltipContent.alignment = (TextAlignmentOptions)514;
			_hoverTooltip.AddComponent<CanvasGroup>().blocksRaycasts = false;
			_hoverTooltip.SetActive(false);
		}

		public void ShowKeystoneTooltip(KeystoneDefinition? keystone, int milestone, bool isUnlocked, Vector3 worldPos)
		{
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)_hoverTooltip == (Object)null) && !((Object)(object)_tooltipTitle == (Object)null) && !((Object)(object)_tooltipContent == (Object)null))
			{
				if (keystone != null)
				{
					string arg = (KeystoneIconManager.HasDedicatedIcon(keystone.Id) ? "" : " <color=#B8A99A><size=80%>(Artwork In Progress)</size></color>");
					_tooltipTitle.text = $"<color=#F59E0B><b>{keystone.Name}</b></color> <size=80%><color=#B8A99A>(Level {milestone} Talent)</color></size>{arg}";
					_tooltipContent.text = "<color=#F3EBE1>" + keystone.Description + "</color>\n<size=85%><color=#ECC267>Click socket to modify talent.</color></size>";
				}
				else if (isUnlocked)
				{
					_tooltipTitle.text = $"<color=#F59E0B><b>Level {milestone} Keystone Socket</b></color>";
					_tooltipContent.text = "<color=#F3EBE1>Talent slot available!</color>\n<size=85%><color=#ECC267>Click to choose a talent.</color></size>";
				}
				else
				{
					_tooltipTitle.text = $"<color=#B8A99A>Level {milestone} Keystone Socket</color>";
					_tooltipContent.text = $"<color=#8C7B6E>Unlocks at Skill Level {milestone}.</color>\n<size=85%><color=#ECC267>Click to preview talents.</color></size>";
				}
				PositionTooltip(worldPos, 20f);
				_hoverTooltip.transform.SetAsLastSibling();
				_hoverTooltip.SetActive(true);
			}
		}

		public void HideHoverTooltip()
		{
			if ((Object)(object)_hoverTooltip != (Object)null)
			{
				_hoverTooltip.SetActive(false);
			}
		}

		private void PositionTooltip(Vector3 worldPos, float yOffset)
		{
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)_hoverTooltip == (Object)null))
			{
				RectTransform component = _hoverTooltip.GetComponent<RectTransform>();
				((Transform)component).position = worldPos + new Vector3(0f, yOffset, 0f);
				LayoutRebuilder.ForceRebuildLayoutImmediate(component);
				Vector3[] array = (Vector3[])(object)new Vector3[4];
				component.GetWorldCorners(array);
				float num = (array[2].x - array[0].x) * 0.5f;
				float num2 = Screen.width;
				float x = ((Transform)component).position.x;
				float num3 = num + 14f;
				float num4 = num2 - num - 14f;
				float num5 = Mathf.Clamp(x, num3, num4);
				((Transform)component).position = new Vector3(num5, ((Transform)component).position.y, ((Transform)component).position.z);
			}
		}

		private void CreateFilterButton(Transform parent, TMP_FontAsset? font, Sprite whiteSprite, string label, SkillCategoryType? filterCategory)
		{
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Expected O, but got Unknown
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0170: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_020c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0283: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0328: Expected O, but got Unknown
			GameObject val = new GameObject("Filter_" + label, new Type[4]
			{
				typeof(RectTransform),
				typeof(Image),
				typeof(Button),
				typeof(LayoutElement)
			});
			val.transform.SetParent(parent, false);
			val.GetComponent<RectTransform>().sizeDelta = new Vector2(110f, 28f);
			LayoutElement component = val.GetComponent<LayoutElement>();
			component.preferredWidth = 110f;
			component.preferredHeight = 28f;
			Image component2 = val.GetComponent<Image>();
			component2.sprite = whiteSprite;
			((Graphic)component2).color = Color.clear;
			bool flag = _activeCategoryFilter == filterCategory;
			GameObject val2 = new GameObject("ActiveIndicator", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0.1f, 0f);
			component3.anchorMax = new Vector2(0.9f, 0f);
			component3.pivot = new Vector2(0.5f, 0f);
			component3.anchoredPosition = Vector2.zero;
			component3.sizeDelta = new Vector2(0f, 3f);
			Image component4 = val2.GetComponent<Image>();
			component4.sprite = whiteSprite;
			((Graphic)component4).color = (flag ? UIHelper.AmberGoldConduit : Color.clear);
			GameObject val3 = new GameObject("Label", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val3.transform.SetParent(val.transform, false);
			RectTransform component5 = val3.GetComponent<RectTransform>();
			component5.anchorMin = Vector2.zero;
			component5.anchorMax = Vector2.one;
			component5.offsetMin = Vector2.zero;
			component5.offsetMax = Vector2.zero;
			TextMeshProUGUI component6 = val3.GetComponent<TextMeshProUGUI>();
			TMP_FontAsset val4 = font ?? UIHelper.GetValheimFont();
			if ((Object)(object)val4 != (Object)null)
			{
				((TMP_Text)component6).font = val4;
			}
			((TMP_Text)component6).text = "<b>" + label + "</b>";
			((TMP_Text)component6).fontSize = 12f;
			((TMP_Text)component6).alignment = (TextAlignmentOptions)514;
			((TMP_Text)component6).textWrappingMode = (TextWrappingModes)0;
			((Graphic)component6).color = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
			Button component7 = val.GetComponent<Button>();
			((Selectable)component7).targetGraphic = (Graphic)(object)component6;
			ColorBlock colors = ((Selectable)component7).colors;
			((ColorBlock)(ref colors)).normalColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
			((ColorBlock)(ref colors)).highlightedColor = UIHelper.ParchmentText;
			((ColorBlock)(ref colors)).pressedColor = UIHelper.AmberGoldConduit;
			((ColorBlock)(ref colors)).selectedColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
			((Selectable)component7).colors = colors;
			_filterBtnList.Add((val, component2, component4, (TMP_Text)(object)component6, filterCategory));
			((UnityEvent)component7.onClick).AddListener((UnityAction)delegate
			{
				_activeCategoryFilter = filterCategory;
				UpdateFilterButtonVisuals();
				UIHelper.PlaySfx("sfx_gui_button");
				if ((Object)(object)_cachedPlayer != (Object)null)
				{
					Populate(_cachedPlayer);
				}
			});
		}

		private void UpdateFilterButtonVisuals()
		{
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			foreach (var filterBtn in _filterBtnList)
			{
				GameObject item = filterBtn.btnObj;
				Image item2 = filterBtn.img;
				Image item3 = filterBtn.indicator;
				TMP_Text item4 = filterBtn.text;
				SkillCategoryType? item5 = filterBtn.cat;
				bool flag = _activeCategoryFilter == item5;
				if ((Object)(object)item2 != (Object)null)
				{
					((Graphic)item2).color = Color.clear;
				}
				if ((Object)(object)item3 != (Object)null)
				{
					((Graphic)item3).color = (flag ? UIHelper.AmberGoldConduit : Color.clear);
				}
				((Graphic)item4).color = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
				Button component = item.GetComponent<Button>();
				if ((Object)(object)component != (Object)null)
				{
					ColorBlock colors = ((Selectable)component).colors;
					((ColorBlock)(ref colors)).normalColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
					((ColorBlock)(ref colors)).highlightedColor = UIHelper.ParchmentText;
					((ColorBlock)(ref colors)).pressedColor = UIHelper.AmberGoldConduit;
					((ColorBlock)(ref colors)).selectedColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
					((Selectable)component).colors = colors;
				}
			}
		}

		public void Populate(Player player, bool preserveScroll = false)
		{
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_0279: Unknown result type (might be due to invalid IL or missing references)
			_cachedPlayer = player;
			if ((Object)(object)_contentTransform == (Object)null)
			{
				return;
			}
			float num = ((preserveScroll && (Object)(object)_scrollRect != (Object)null) ? _scrollRect.horizontalNormalizedPosition : 0f);
			foreach (RuneColumnUI activeColumn in _activeColumns)
			{
				if ((Object)(object)activeColumn != (Object)null)
				{
					Object.Destroy((Object)(object)((Component)activeColumn).gameObject);
				}
			}
			_activeColumns.Clear();
			Skills skills = ((Character)player).GetSkills();
			if ((Object)(object)skills == (Object)null)
			{
				return;
			}
			TMP_FontAsset valheimFont = UIHelper.GetValheimFont();
			List<Skill> source = (from s in skills.GetSkillList()
				where s.m_level > 0f || s.m_accumulator > 0f
				select s).ToList();
			HashSet<SkillCategoryType> hashSet = new HashSet<SkillCategoryType>(source.Select((Skill s) => SkillCategory.GetCategory(s.m_info.m_skill)));
			if (_activeCategoryFilter.HasValue && !hashSet.Contains(_activeCategoryFilter.Value))
			{
				_activeCategoryFilter = null;
			}
			foreach (var (val, val2, val3, val4, skillCategoryType) in _filterBtnList)
			{
				if (!skillCategoryType.HasValue)
				{
					val.SetActive(true);
				}
				else
				{
					bool active = hashSet.Contains(skillCategoryType.Value);
					val.SetActive(active);
				}
				bool flag = _activeCategoryFilter == skillCategoryType;
				if ((Object)(object)val2 != (Object)null)
				{
					((Graphic)val2).color = Color.clear;
				}
				if ((Object)(object)val3 != (Object)null)
				{
					((Graphic)val3).color = (flag ? UIHelper.AmberGoldConduit : Color.clear);
				}
				((Graphic)val4).color = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
				Button component = val.GetComponent<Button>();
				if ((Object)(object)component != (Object)null)
				{
					ColorBlock colors = ((Selectable)component).colors;
					((ColorBlock)(ref colors)).normalColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
					((ColorBlock)(ref colors)).highlightedColor = UIHelper.ParchmentText;
					((ColorBlock)(ref colors)).pressedColor = UIHelper.AmberGoldConduit;
					((ColorBlock)(ref colors)).selectedColor = (flag ? UIHelper.NorseGoldText : UIHelper.MutedParchment);
					((Selectable)component).colors = colors;
				}
			}
			List<Skill> list = (from s in source
				where !_activeCategoryFilter.HasValue || SkillCategory.GetCategory(s.m_info.m_skill) == _activeCategoryFilter.Value
				orderby (int)SkillCategory.GetCategory(s.m_info.m_skill), SkillCategory.GetSkillOrder(s.m_info.m_skill), ((object)Unsafe.As<SkillType, SkillType>(ref s.m_info.m_skill)/*cast due to .constrained prefix*/).ToString()
				select s).ToList();
			foreach (Skill item2 in list)
			{
				RuneColumnUI item = RuneColumnUI.Create((Transform)(object)_contentTransform, player, item2, valheimFont);
				_activeColumns.Add(item);
			}
			UpdateContentLayout(list.Count, preserveScroll ? num : 0f);
		}

		private void UpdateContentLayout(int columnCount, float targetScrollPos = 0f)
		{
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_contentTransform == (Object)null || (Object)(object)_scrollRect == (Object)null)
			{
				return;
			}
			float num = 340f;
			float num2 = 18f;
			float num3 = 40f;
			float num4 = ((columnCount > 0) ? ((float)columnCount * num + (float)(columnCount - 1) * num2 + num3) : 0f);
			float num5;
			if ((Object)(object)_scrollRect.viewport != (Object)null)
			{
				Rect rect = _scrollRect.viewport.rect;
				if (((Rect)(ref rect)).width > 0f)
				{
					rect = _scrollRect.viewport.rect;
					num5 = ((Rect)(ref rect)).width;
					goto IL_00a2;
				}
			}
			num5 = (float)Screen.width - 40f;
			goto IL_00a2;
			IL_00a2:
			float num6 = num5;
			if (num4 <= num6)
			{
				_contentTransform.anchorMin = new Vector2(0f, 0f);
				_contentTransform.anchorMax = new Vector2(1f, 1f);
				_contentTransform.pivot = new Vector2(0.5f, 0.5f);
				_contentTransform.offsetMin = Vector2.zero;
				_contentTransform.offsetMax = Vector2.zero;
				_contentTransform.sizeDelta = Vector2.zero;
				_contentTransform.anchoredPosition = Vector2.zero;
				_scrollRect.horizontal = false;
			}
			else
			{
				_contentTransform.anchorMin = new Vector2(0f, 0f);
				_contentTransform.anchorMax = new Vector2(0f, 1f);
				_contentTransform.pivot = new Vector2(0f, 0.5f);
				_contentTransform.offsetMin = Vector2.zero;
				_contentTransform.offsetMax = Vector2.zero;
				_contentTransform.sizeDelta = new Vector2(num4, 0f);
				_contentTransform.anchoredPosition = Vector2.zero;
				_scrollRect.horizontal = true;
				Canvas.ForceUpdateCanvases();
				float horizontalNormalizedPosition = Mathf.Clamp01(targetScrollPos);
				_scrollRect.horizontalNormalizedPosition = horizontalNormalizedPosition;
			}
		}

		private void Update()
		{
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			if (!((Component)this).gameObject.activeSelf)
			{
				return;
			}
			if (ZInput.GetButtonDown("JoyButtonB") || Input.GetKeyDown((KeyCode)27) || Input.GetKeyDown((KeyCode)9))
			{
				if ((Object)(object)_drawer != (Object)null && ((Component)_drawer).gameObject.activeSelf)
				{
					_drawer.Close();
				}
				else
				{
					Hide();
				}
				return;
			}
			float y = Input.mouseScrollDelta.y;
			if (Mathf.Abs(y) > 0.01f && (Object)(object)_scrollRect != (Object)null)
			{
				_scrollRect.horizontalNormalizedPosition = Mathf.Clamp01(_scrollRect.horizontalNormalizedPosition - y * 0.08f);
			}
		}
	}
	public class RuneColumnUI : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler, IPointerClickHandler
	{
		public const float ColumnWidth = 340f;

		public const float ColumnHeight = 440f;

		private Player? _player;

		private Image? _cardBg;

		private Image? _fillImage;

		private Image? _subLevelFill;

		private Image? _ambientGlow;

		private TMP_Text? _levelText;

		private TMP_Text? _bonusesLabels;

		private TMP_Text? _bonusesValues;

		private Color _categoryColor;

		public SkillType SkillType { get; private set; }

		public float SkillLevel { get; private set; }

		public SkillCategoryType Category { get; private set; }

		public static RuneColumnUI Create(Transform parent, Player player, Skill skill, TMP_FontAsset? font)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject($"RuneColumn_{skill.m_info.m_skill}", new Type[1] { typeof(RectTransform) });
			val.transform.SetParent(parent, false);
			val.GetComponent<RectTransform>().sizeDelta = new Vector2(340f, 440f);
			RuneColumnUI runeColumnUI = val.AddComponent<RuneColumnUI>();
			runeColumnUI.Initialize(player, skill, font);
			return runeColumnUI;
		}

		private void Initialize(Player player, Skill skill, TMP_FontAsset? font)
		{
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Expected O, but got Unknown
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Expected O, but got Unknown
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0262: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Expected O, but got Unknown
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0321: Unknown result type (might be due to invalid IL or missing references)
			//IL_0336: Unknown result type (might be due to invalid IL or missing references)
			//IL_034b: Unknown result type (might be due to invalid IL or missing references)
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_038e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_040f: Unknown result type (might be due to invalid IL or missing references)
			//IL_041a: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0479: Unknown result type (might be due to invalid IL or missing references)
			//IL_047e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0490: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0544: Unknown result type (might be due to invalid IL or missing references)
			//IL_051e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0523: Unknown result type (might be due to invalid IL or missing references)
			//IL_05be: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f4: Expected O, but got Unknown
			//IL_0619: Unknown result type (might be due to invalid IL or missing references)
			//IL_062e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0643: Unknown result type (might be due to invalid IL or missing references)
			//IL_0658: Unknown result type (might be due to invalid IL or missing references)
			//IL_066c: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_070d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0714: Expected O, but got Unknown
			//IL_0739: Unknown result type (might be due to invalid IL or missing references)
			//IL_074e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0763: Unknown result type (might be due to invalid IL or missing references)
			//IL_0778: Unknown result type (might be due to invalid IL or missing references)
			//IL_078c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f9: Expected O, but got Unknown
			//IL_0815: Unknown result type (might be due to invalid IL or missing references)
			//IL_0820: Unknown result type (might be due to invalid IL or missing references)
			//IL_082b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0835: Unknown result type (might be due to invalid IL or missing references)
			//IL_089c: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d2: Expected O, but got Unknown
			//IL_08f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0921: Unknown result type (might be due to invalid IL or missing references)
			//IL_0936: Unknown result type (might be due to invalid IL or missing references)
			//IL_094a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0981: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09b7: Expected O, but got Unknown
			//IL_09d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_09de: Unknown result type (might be due to invalid IL or missing references)
			//IL_09e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a60: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a96: Expected O, but got Unknown
			//IL_0abb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ad0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ae5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0af9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b30: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b5f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b66: Expected O, but got Unknown
			//IL_0b8b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ba0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bb5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bca: Unknown result type (might be due to invalid IL or missing references)
			//IL_0bde: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c83: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c88: Unknown result type (might be due to invalid IL or missing references)
			//IL_0c9b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cd6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ceb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0cff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d6a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d71: Expected O, but got Unknown
			//IL_0d8d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d98: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dad: Unknown result type (might be due to invalid IL or missing references)
			//IL_0dc1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e4e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e55: Expected O, but got Unknown
			//IL_0e71: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e7c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e91: Unknown result type (might be due to invalid IL or missing references)
			//IL_0ea5: Unknown result type (might be due to invalid IL or missing references)
			_player = player;
			TMP_FontAsset val = font ?? UIHelper.GetValheimFont();
			SkillType = skill.m_info.m_skill;
			SkillLevel = skill.m_level;
			Category = SkillCategory.GetCategory(SkillType);
			_categoryColor = ModConfig.GetCategoryColor(Category);
			GameObject val2 = new GameObject("Shadow", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val2.transform.SetParent(((Component)this).transform, false);
			RectTransform component = val2.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.offsetMin = new Vector2(-12f, -12f);
			component.offsetMax = new Vector2(12f, 12f);
			Image component2 = val2.GetComponent<Image>();
			component2.sprite = UIHelper.GetSoftShadow();
			component2.type = (Type)1;
			((Graphic)component2).color = new Color(0f, 0f, 0f, 0.7f);
			GameObject val3 = new GameObject("GlassCard", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val3.transform.SetParent(((Component)this).transform, false);
			RectTransform component3 = val3.GetComponent<RectTransform>();
			component3.anchorMin = Vector2.zero;
			component3.anchorMax = Vector2.one;
			component3.offsetMin = Vector2.zero;
			component3.offsetMax = Vector2.zero;
			_cardBg = val3.GetComponent<Image>();
			_cardBg.sprite = UIHelper.GetGlassCard();
			_cardBg.type = (Type)1;
			((Graphic)_cardBg).color = new Color(1f, 1f, 1f, 1f);
			GameObject val4 = new GameObject("AmbientGlow", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val4.transform.SetParent(val3.transform, false);
			RectTransform component4 = val4.GetComponent<RectTransform>();
			component4.anchorMin = new Vector2(0.5f, 1f);
			component4.anchorMax = new Vector2(0.5f, 1f);
			component4.pivot = new Vector2(0.5f, 1f);
			component4.anchoredPosition = new Vector2(0f, 8f);
			component4.sizeDelta = new Vector2(190f, 85f);
			_ambientGlow = val4.GetComponent<Image>();
			_ambientGlow.sprite = UIHelper.GetRadialGlow();
			((Graphic)_ambientGlow).color = new Color(_categoryColor.r, _categoryColor.g, _categoryColor.b, 0.22f);
			GameObject val5 = new GameObject("IconBackdrop", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val5.transform.SetParent(((Component)this).transform, false);
			RectTransform component5 = val5.GetComponent<RectTransform>();
			component5.anchorMin = new Vector2(0.5f, 1f);
			component5.anchorMax = new Vector2(0.5f, 1f);
			component5.pivot = new Vector2(0.5f, 1f);
			component5.anchoredPosition = new Vector2(0f, -10f);
			component5.sizeDelta = new Vector2(60f, 60f);
			Image component6 = val5.GetComponent<Image>();
			component6.sprite = UIHelper.GetNodeCircle();
			((Graphic)component6).color = new Color(0.14f, 0.1f, 0.08f, 0.95f);
			GameObject val6 = new GameObject("SkillIcon", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val6.transform.SetParent(val5.transform, false);
			RectTransform component7 = val6.GetComponent<RectTransform>();
			component7.anchorMin = new Vector2(0.5f, 0.5f);
			component7.anchorMax = new Vector2(0.5f, 0.5f);
			component7.pivot = new Vector2(0.5f, 0.5f);
			component7.anchoredPosition = Vector2.zero;
			component7.sizeDelta = new Vector2(46f, 46f);
			Image component8 = val6.GetComponent<Image>();
			component8.sprite = skill.m_info.m_icon;
			component8.preserveAspect = true;
			GameObject val7 = new GameObject("SkillName", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val7.transform.SetParent(((Component)this).transform, false);
			RectTransform component9 = val7.GetComponent<RectTransform>();
			component9.anchorMin = new Vector2(0.5f, 1f);
			component9.anchorMax = new Vector2(0.5f, 1f);
			component9.pivot = new Vector2(0.5f, 1f);
			component9.anchoredPosition = new Vector2(0f, -74f);
			component9.sizeDelta = new Vector2(310f, 20f);
			TextMeshProUGUI component10 = val7.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)val != (Object)null)
			{
				((TMP_Text)component10).font = val;
			}
			string text = ((Localization.instance != null) ? Localization.instance.Localize("$skill_" + ((object)SkillType/*cast due to .constrained prefix*/).ToString().ToLower()) : ((object)SkillType/*cast due to .constrained prefix*/).ToString());
			((TMP_Text)component10).text = "<b>" + text + "</b>";
			((TMP_Text)component10).fontSize = 15f;
			((TMP_Text)component10).enableAutoSizing = true;
			((TMP_Text)component10).fontSizeMin = 12f;
			((TMP_Text)component10).fontSizeMax = 16f;
			((TMP_Text)component10).textWrappingMode = (TextWrappingModes)0;
			((TMP_Text)component10).alignment = (TextAlignmentOptions)514;
			((Graphic)component10).color = UIHelper.LightText;
			GameObject val8 = new GameObject("LevelText", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val8.transform.SetParent(((Component)this).transform, false);
			RectTransform component11 = val8.GetComponent<RectTransform>();
			component11.anchorMin = new Vector2(0.5f, 1f);
			component11.anchorMax = new Vector2(0.5f, 1f);
			component11.pivot = new Vector2(0.5f, 1f);
			component11.anchoredPosition = new Vector2(0f, -96f);
			component11.sizeDelta = new Vector2(300f, 18f);
			_levelText = (TMP_Text?)(object)val8.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)val != (Object)null)
			{
				_levelText.font = val;
			}
			_levelText.fontSize = 13.5f;
			_levelText.alignment = (TextAlignmentOptions)514;
			_levelText.text = $"<color=#{ColorUtility.ToHtmlStringRGB(_categoryColor)}><b>Lv. {Mathf.FloorToInt(SkillLevel)}</b></color>";
			GameObject val9 = new GameObject("SubLevelTrack", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val9.transform.SetParent(((Component)this).transform, false);
			RectTransform component12 = val9.GetComponent<RectTransform>();
			component12.anchorMin = new Vector2(0.5f, 1f);
			component12.anchorMax = new Vector2(0.5f, 1f);
			component12.pivot = new Vector2(0.5f, 1f);
			component12.anchoredPosition = new Vector2(0f, -118f);
			component12.sizeDelta = new Vector2(180f, 4f);
			Image component13 = val9.GetComponent<Image>();
			component13.sprite = UIHelper.GetConduitTrack();
			component13.type = (Type)1;
			((Graphic)component13).color = new Color(0.08f, 0.06f, 0.05f, 0.95f);
			GameObject val10 = new GameObject("SubLevelFill", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val10.transform.SetParent(val9.transform, false);
			RectTransform component14 = val10.GetComponent<RectTransform>();
			component14.anchorMin = Vector2.zero;
			component14.anchorMax = Vector2.one;
			component14.offsetMin = Vector2.zero;
			component14.offsetMax = Vector2.zero;
			_subLevelFill = val10.GetComponent<Image>();
			_subLevelFill.sprite = UIHelper.GetWhiteSprite();
			_subLevelFill.type = (Type)3;
			_subLevelFill.fillMethod = (FillMethod)0;
			_subLevelFill.fillOrigin = 0;
			_subLevelFill.fillAmount = Mathf.Clamp01(skill.GetLevelPercentage());
			((Graphic)_subLevelFill).color = UIHelper.BrightBlueConduit;
			GameObject val11 = new GameObject("ConduitTrack", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val11.transform.SetParent(((Component)this).transform, false);
			RectTransform component15 = val11.GetComponent<RectTransform>();
			component15.anchorMin = new Vector2(0.5f, 1f);
			component15.anchorMax = new Vector2(0.5f, 1f);
			component15.pivot = new Vector2(0.5f, 1f);
			component15.anchoredPosition = new Vector2(0f, -128f);
			component15.sizeDelta = new Vector2(14f, 66f);
			Image component16 = val11.GetComponent<Image>();
			component16.sprite = UIHelper.GetConduitTrack();
			component16.type = (Type)1;
			((Graphic)component16).color = new Color(0.08f, 0.06f, 0.05f, 0.95f);
			GameObject val12 = new GameObject("ConduitFill", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val12.transform.SetParent(val11.transform, false);
			RectTransform component17 = val12.GetComponent<RectTransform>();
			component17.anchorMin = Vector2.zero;
			component17.anchorMax = Vector2.one;
			component17.offsetMin = Vector2.zero;
			component17.offsetMax = Vector2.zero;
			_fillImage = val12.GetComponent<Image>();
			_fillImage.sprite = UIHelper.GetConduitFill();
			_fillImage.type = (Type)3;
			_fillImage.fillMethod = (FillMethod)1;
			_fillImage.fillOrigin = 0;
			_fillImage.fillAmount = Mathf.Clamp01(SkillLevel / 100f);
			((Graphic)_fillImage).color = UIHelper.BrightBlueConduit;
			GameObject val13 = new GameObject("BonusBox", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val13.transform.SetParent(((Component)this).transform, false);
			RectTransform component18 = val13.GetComponent<RectTransform>();
			component18.anchorMin = new Vector2(0f, 0f);
			component18.anchorMax = new Vector2(1f, 1f);
			component18.offsetMin = new Vector2(12f, 98f);
			component18.offsetMax = new Vector2(-12f, -202f);
			Image component19 = val13.GetComponent<Image>();
			component19.sprite = UIHelper.GetGlassCard();
			component19.type = (Type)1;
			((Graphic)component19).color = new Color(0.09f, 0.07f, 0.05f, 0.9f);
			GameObject val14 = new GameObject("KeystonesRow", new Type[2]
			{
				typeof(RectTransform),
				typeof(HorizontalLayoutGroup)
			});
			val14.transform.SetParent(((Component)this).transform, false);
			RectTransform component20 = val14.GetComponent<RectTransform>();
			component20.anchorMin = new Vector2(0.5f, 0f);
			component20.anchorMax = new Vector2(0.5f, 0f);
			component20.pivot = new Vector2(0.5f, 0f);
			component20.anchoredPosition = new Vector2(0f, 10f);
			component20.sizeDelta = new Vector2(320f, 66f);
			HorizontalLayoutGroup component21 = val14.GetComponent<HorizontalLayoutGroup>();
			((HorizontalOrVerticalLayoutGroup)component21).spacing = 6f;
			((LayoutGroup)component21).childAlignment = (TextAnchor)4;
			((HorizontalOrVerticalLayoutGroup)component21).childControlWidth = false;
			((HorizontalOrVerticalLayoutGroup)component21).childControlHeight = false;
			CreateBottomKeystoneSocket(val14.transform, val, 20);
			CreateBottomKeystoneSocket(val14.transform, val, 40);
			CreateBottomKeystoneSocket(val14.transform, val, 60);
			CreateBottomKeystoneSocket(val14.transform, val, 80);
			CreateBottomKeystoneSocket(val14.transform, val, 100);
			GameObject val15 = new GameObject("BonusTitle", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val15.transform.SetParent(val13.transform, false);
			RectTransform component22 = val15.GetComponent<RectTransform>();
			component22.anchorMin = new Vector2(0f, 1f);
			component22.anchorMax = new Vector2(1f, 1f);
			component22.pivot = new Vector2(0.5f, 1f);
			component22.anchoredPosition = new Vector2(0f, -6f);
			component22.sizeDelta = new Vector2(-16f, 14f);
			TextMeshProUGUI component23 = val15.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)val != (Object)null)
			{
				((TMP_Text)component23).font = val;
			}
			((TMP_Text)component23).text = "<color=#D5C7B5>ACTIVE PASSIVES</color>";
			((TMP_Text)component23).fontSize = 10f;
			((TMP_Text)component23).alignment = (TextAlignmentOptions)514;
			GameObject val16 = new GameObject("BonusesLabels", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val16.transform.SetParent(val13.transform, false);
			RectTransform component24 = val16.GetComponent<RectTransform>();
			component24.anchorMin = Vector2.zero;
			component24.anchorMax = Vector2.one;
			component24.offsetMin = new Vector2(8f, 4f);
			component24.offsetMax = new Vector2(-58f, -22f);
			_bonusesLabels = (TMP_Text?)(object)val16.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)val != (Object)null)
			{
				_bonusesLabels.font = val;
			}
			_bonusesLabels.fontSize = 9.5f;
			_bonusesLabels.lineSpacing = 1.1f;
			_bonusesLabels.textWrappingMode = (TextWrappingModes)0;
			_bonusesLabels.alignment = (TextAlignmentOptions)257;
			GameObject val17 = new GameObject("BonusesValues", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val17.transform.SetParent(val13.transform, false);
			RectTransform component25 = val17.GetComponent<RectTransform>();
			component25.anchorMin = Vector2.zero;
			component25.anchorMax = Vector2.one;
			component25.offsetMin = new Vector2(136f, 4f);
			component25.offsetMax = new Vector2(-8f, -22f);
			_bonusesValues = (TMP_Text?)(object)val17.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)val != (Object)null)
			{
				_bonusesValues.font = val;
			}
			_bonusesValues.fontSize = 9.5f;
			_bonusesValues.lineSpacing = 1.1f;
			_bonusesValues.textWrappingMode = (TextWrappingModes)0;
			_bonusesValues.alignment = (TextAlignmentOptions)260;
			PopulateBonuses();
		}

		private void CreateBottomKeystoneSocket(Transform parent, TMP_FontAsset? fontToUse, int milestone)
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Expected O, but got Unknown
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_014d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0200: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Expected O, but got Unknown
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0284: Unknown result type (might be due to invalid IL or missing references)
			//IL_0299: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_0390: Unknown result type (might be due to invalid IL or missing references)
			//IL_0373: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Expected O, but got Unknown
			bool flag = SkillLevel >= (float)milestone;
			KeystoneDefinition keystoneDefinition = (((Object)(object)_player != (Object)null) ? KeystoneManager.GetSelectedKeystone(_player, SkillType, milestone) : null);
			GameObject val = new GameObject($"KeystoneSocket_{milestone}", new Type[3]
			{
				typeof(RectTransform),
				typeof(Image),
				typeof(Button)
			});
			val.transform.SetParent(parent, false);
			val.GetComponent<RectTransform>().sizeDelta = new Vector2(58f, 58f);
			Image component = val.GetComponent<Image>();
			component.sprite = UIHelper.GetSocketRing();
			((Graphic)component).color = (Color)((!flag) ? new Color(0.45f, 0.35f, 0.25f, 0.6f) : ((keystoneDefinition != null) ? UIHelper.GoldAccent : new Color(0.95f, 0.8f, 0.45f, 1f)));
			GameObject val2 = new GameObject("Num", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component2 = val2.GetComponent<RectTransform>();
			component2.anchorMin = new Vector2(0.5f, 1f);
			component2.anchorMax = new Vector2(0.5f, 1f);
			component2.pivot = new Vector2(0.5f, 0f);
			component2.anchoredPosition = new Vector2(0f, 2f);
			component2.sizeDelta = new Vector2(58f, 14f);
			TextMeshProUGUI component3 = val2.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)fontToUse != (Object)null)
			{
				((TMP_Text)component3).font = fontToUse;
			}
			((TMP_Text)component3).text = $"{milestone}";
			((TMP_Text)component3).fontSize = 10.5f;
			((TMP_Text)component3).alignment = (TextAlignmentOptions)514;
			((Graphic)component3).color = ((!flag) ? UIHelper.MutedParchment : ((keystoneDefinition != null) ? UIHelper.GoldAccent : UIHelper.AmberGoldGlow));
			GameObject val3 = new GameObject("IconMask", new Type[3]
			{
				typeof(RectTransform),
				typeof(Image),
				typeof(Mask)
			});
			val3.transform.SetParent(val.transform, false);
			RectTransform component4 = val3.GetComponent<RectTransform>();
			component4.anchorMin = new Vector2(0.5f, 0.5f);
			component4.anchorMax = new Vector2(0.5f, 0.5f);
			component4.pivot = new Vector2(0.5f, 0.5f);
			component4.sizeDelta = new Vector2(48f, 48f);
			val3.GetComponent<Image>().sprite = UIHelper.GetCircleMask();
			val3.GetComponent<Mask>().showMaskGraphic = false;
			GameObject val4 = new GameObject("Icon", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val4.transform.SetParent(val3.transform, false);
			RectTransform component5 = val4.GetComponent<RectTransform>();
			component5.anchorMin = Vector2.zero;
			component5.anchorMax = Vector2.one;
			component5.offsetMin = Vector2.zero;
			component5.offsetMax = Vector2.zero;
			Image component6 = val4.GetComponent<Image>();
			component6.preserveAspect = true;
			if (keystoneDefinition != null)
			{
				component6.sprite = keystoneDefinition.GetIcon(_player) ?? UIHelper.GetWhiteSprite();
				((Graphic)component6).color = Color.white;
			}
			else if (flag)
			{
				component6.sprite = UIHelper.GetSocketEmpty();
				((Graphic)component6).color = UIHelper.AmberGoldGlow;
			}
			else
			{
				component6.sprite = UIHelper.GetSocketEmpty();
				((Graphic)component6).color = new Color(0.4f, 0.3f, 0.2f, 0.45f);
			}
			int mCaptured = milestone;
			((UnityEvent)val.GetComponent<Button>().onClick).AddListener((UnityAction)delegate
			{
				//IL_0006: Unknown result type (might be due to invalid IL or missing references)
				PanoramicSkillsDialog.OpenSkillTreeWithShelf(SkillType, mCaptured);
				UIHelper.PlaySfx("sfx_gui_button");
			});
			val.AddComponent<OverviewKeystoneHoverTrigger>().Init(keystoneDefinition, milestone, flag);
		}

		private void PopulateBonuses()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_bonusesLabels == (Object)null || (Object)(object)_bonusesValues == (Object)null)
			{
				return;
			}
			List<string> activeBonuses = SkillBonusCalculator.GetActiveBonuses(SkillType, SkillLevel);
			List<string> list = new List<string>();
			List<string> list2 = new List<string>();
			foreach (string item in activeBonuses)
			{
				int num = item.IndexOf(':');
				if (num >= 0)
				{
					string text = item.Substring(0, num).Trim();
					string text2 = item.Substring(num + 1).Trim();
					list.Add("<color=#F59E0B>•</color> <color=#EDE4D8>" + text + "</color>");
					list2.Add("<color=#FAF6F0><b>" + text2 + "</b></color>");
				}
				else
				{
					list.Add("<color=#F59E0B>•</color> <color=#EDE4D8>" + item + "</color>");
					list2.Add("");
				}
			}
			_bonusesLabels.text = string.Join("\n", list);
			_bonusesValues.text = string.Join("\n", list2);
		}

		public void OnPointerEnter(PointerEventData eventData)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_cardBg != (Object)null)
			{
				((Graphic)_cardBg).color = new Color(1.15f, 1.1f, 1.05f, 1f);
			}
			if ((Object)(object)_ambientGlow != (Object)null)
			{
				((Graphic)_ambientGlow).color = new Color(_categoryColor.r, _categoryColor.g, _categoryColor.b, 0.4f);
			}
			UIHelper.PlaySfx("sfx_gui_button");
		}

		public void OnPointerExit(PointerEventData eventData)
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)_cardBg != (Object)null)
			{
				((Graphic)_cardBg).color = Color.white;
			}
			if ((Object)(object)_ambientGlow != (Object)null)
			{
				((Graphic)_ambientGlow).color = new Color(_categoryColor.r, _categoryColor.g, _categoryColor.b, 0.22f);
			}
			PanoramicSkillsDialog.Instance?.HideHoverTooltip();
		}

		public void OnPointerClick(PointerEventData eventData)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			PanoramicSkillsDialog.OpenSkillTree(SkillType);
		}
	}
	public class OverviewKeystoneHoverTrigger : MonoBehaviour, IPointerEnterHandler, IEventSystemHandler, IPointerExitHandler
	{
		private KeystoneDefinition? _keystone;

		private int _milestone;

		private bool _isUnlocked;

		public void Init(KeystoneDefinition? keystone, int milestone, bool isUnlocked)
		{
			_keystone = keystone;
			_milestone = milestone;
			_isUnlocked = isUnlocked;
		}

		public void OnPointerEnter(PointerEventData eventData)
		{
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			PanoramicSkillsDialog.Instance?.ShowKeystoneTooltip(_keystone, _milestone, _isUnlocked, ((Component)this).transform.position);
		}

		public void OnPointerExit(PointerEventData eventData)
		{
			PanoramicSkillsDialog.Instance?.HideHoverTooltip();
		}
	}
	public class SkillTreeDrawerUI : MonoBehaviour
	{
		private SkillType _currentSkill;

		private Player? _player;

		private GameObject? _modalWindow;

		private TMP_Text? _headerTitle;

		private Image? _skillIcon;

		private Sprite? _skillSprite;

		private Action? _onCloseCallback;

		private TMP_Text? _leftLevelText;

		private Image? _leftXpFill;

		private TMP_Text? _leftPassivesLabels;

		private TMP_Text? _leftPassivesValues;

		private Transform? _leftSocketedRow;

		private ScrollRect? _timelineScrollRect;

		private RectTransform? _timelineContent;

		private Slider? _timelineSlider;

		private readonly List<GameObject> _timelineNodeObjects = new List<GameObject>();

		private GameObject? _selectionShelf;

		private TMP_Text? _shelfTitle;

		private Transform? _shelfOptionsContainer;

		private int _activeShelfMilestone;

		private GameObject? _hoverTooltip;

		private TMP_Text? _tooltipTitle;

		private TMP_Text? _tooltipContent;

		public const float TimelineWidth = 6600f;

		public const float LevelSpacing = 64f;

		public const float StartX = 60f;

		public static SkillTreeDrawerUI? Instance { get; private set; }

		public static SkillTreeDrawerUI Create(Transform parent, Action onClose)
		{
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Expected O, but got Unknown
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("SkillTreeDrawer", new Type[1] { typeof(RectTransform) });
			val.transform.SetParent(parent, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = Vector2.zero;
			component.anchorMax = Vector2.one;
			component.offsetMin = Vector2.zero;
			component.offsetMax = Vector2.zero;
			SkillTreeDrawerUI skillTreeDrawerUI = val.AddComponent<SkillTreeDrawerUI>();
			skillTreeDrawerUI._onCloseCallback = onClose;
			skillTreeDrawerUI.BuildUI();
			val.SetActive(false);
			Instance = skillTreeDrawerUI;
			return skillTreeDrawerUI;
		}

		private void BuildUI()
		{
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_0159: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Expected O, but got Unknown
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			TMP_FontAsset valheimFont = UIHelper.GetValheimFont();
			Image obj = ((Component)this).gameObject.AddComponent<Image>();
			obj.sprite = UIHelper.GetWhiteSprite();
			((Graphic)obj).color = new Color(0.04f, 0.03f, 0.02f, 0.88f);
			_modalWindow = new GameObject("ModalWindow", new Type[1] { typeof(RectTransform) });
			_modalWindow.transform.SetParent(((Component)this).transform, false);
			RectTransform component = _modalWindow.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(0.5f, 0.5f);
			component.anchorMax = new Vector2(0.5f, 0.5f);
			component.pivot = new Vector2(0.5f, 0.5f);
			component.anchoredPosition = Vector2.zero;
			component.sizeDelta = new Vector2(1280f, 620f);
			GameObject val = new GameObject("ModalShadow", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(_modalWindow.transform, false);
			RectTransform component2 = val.GetComponent<RectTransform>();
			component2.anchorMin = Vector2.zero;
			component2.anchorMax = Vector2.one;
			component2.offsetMin = new Vector2(-16f, -16f);
			component2.offsetMax = new Vector2(16f, 16f);
			Image component3 = val.GetComponent<Image>();
			component3.sprite = UIHelper.GetSoftShadow();
			component3.type = (Type)1;
			((Graphic)component3).color = new Color(0f, 0f, 0f, 0.75f);
			GameObject val2 = new GameObject("ModalGlass", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val2.transform.SetParent(_modalWindow.transform, false);
			RectTransform component4 = val2.GetComponent<RectTransform>();
			component4.anchorMin = Vector2.zero;
			component4.anchorMax = Vector2.one;
			component4.offsetMin = Vector2.zero;
			component4.offsetMax = Vector2.zero;
			Image component5 = val2.GetComponent<Image>();
			component5.sprite = UIHelper.GetGlassPanel();
			component5.type = (Type)1;
			((Graphic)component5).color = new Color(1f, 1f, 1f, 1f);
			BuildHeader(val2.transform, valheimFont);
			BuildLeftOverviewPanel(val2.transform, valheimFont);
			BuildTimelineViewport(val2.transform, valheimFont);
			BuildSelectionShelf(val2.transform, valheimFont);
			BuildHoverTooltip(val2.transform, valheimFont);
		}

		private void BuildHeader(Transform parent, TMP_FontAsset? font)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fd: Expected O, but got Unknown
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Expected O, but got Unknown
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_0238: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Expected O, but got Unknown
			//IL_02a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_034c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0375: Unknown result type (might be due to invalid IL or missing references)
			//IL_0384: Unknown result type (might be due to invalid IL or missing references)
			//IL_0393: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("HeaderBar", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(parent, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(0f, 1f);
			component.anchorMax = new Vector2(1f, 1f);
			component.pivot = new Vector2(0.5f, 1f);
			component.anchoredPosition = Vector2.zero;
			component.sizeDelta = new Vector2(0f, 56f);
			Image component2 = val.GetComponent<Image>();
			component2.sprite = UIHelper.GetGlassCard();
			component2.type = (Type)1;
			((Graphic)component2).color = new Color(0.12f, 0.09f, 0.07f, 0.98f);
			GameObject val2 = new GameObject("IconBackdrop", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0f, 0.5f);
			component3.anchorMax = new Vector2(0f, 0.5f);
			component3.pivot = new Vector2(0f, 0.5f);
			component3.anchoredPosition = new Vector2(20f, 0f);
			component3.sizeDelta = new Vector2(50f, 50f);
			Image component4 = val2.GetComponent<Image>();
			component4.sprite = UIHelper.GetNodeCircle();
			((Graphic)component4).color = new Color(0.16f, 0.12f, 0.09f, 0.95f);
			GameObject val3 = new GameObject("Icon", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val3.transform.SetParent(val2.transform, false);
			RectTransform component5 = val3.GetComponent<RectTransform>();
			component5.anchorMin = new Vector2(0.5f, 0.5f);
			component5.anchorMax = new Vector2(0.5f, 0.5f);
			component5.pivot = new Vector2(0.5f, 0.5f);
			component5.sizeDelta = new Vector2(38f, 38f);
			_skillIcon = val3.GetComponent<Image>();
			_skillIcon.preserveAspect = true;
			GameObject val4 = new GameObject("Title", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val4.transform.SetParent(val.transform, false);
			RectTransform component6 = val4.GetComponent<RectTransform>();
			component6.anchorMin = new Vector2(0f, 0.5f);
			component6.anchorMax = new Vector2(0f, 0.5f);
			component6.pivot = new Vector2(0f, 0.5f);
			component6.anchoredPosition = new Vector2(80f, 0f);
			component6.sizeDelta = new Vector2(400f, 28f);
			_headerTitle = (TMP_Text?)(object)val4.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_headerTitle.font = font;
			}
			_headerTitle.fontSize = 17f;
			_headerTitle.alignment = (TextAlignmentOptions)4097;
			((Graphic)_headerTitle).color = UIHelper.LightText;
			UIHelper.CreateReturnButton(val.transform, new Vector2(-20f, 0f), new Vector2(146f, 44f), new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), new Vector2(1f, 0.5f), "RETURN", Close, font);
		}

		private void BuildLeftOverviewPanel(Transform parent, TMP_FontAsset? font)
		{
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_017d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f3: Expected O, but got Unknown
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Expected O, but got Unknown
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_035d: Unknown result type (might be due to invalid IL or missing references)
			//IL_039d: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_0418: Unknown result type (might be due to invalid IL or missing references)
			//IL_0476: Unknown result type (might be due to invalid IL or missing references)
			//IL_047d: Expected O, but got Unknown
			//IL_04a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0524: Unknown result type (might be due to invalid IL or missing references)
			//IL_052b: Expected O, but got Unknown
			//IL_0547: Unknown result type (might be due to invalid IL or missing references)
			//IL_0552: Unknown result type (might be due to invalid IL or missing references)
			//IL_055d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0571: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f9: Expected O, but got Unknown
			//IL_0615: Unknown result type (might be due to invalid IL or missing references)
			//IL_0620: Unknown result type (might be due to invalid IL or missing references)
			//IL_0635: Unknown result type (might be due to invalid IL or missing references)
			//IL_063f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_070e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0723: Unknown result type (might be due to invalid IL or missing references)
			//IL_0738: Unknown result type (might be due to invalid IL or missing references)
			//IL_074c: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_07be: Expected O, but got Unknown
			//IL_07e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_080d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0822: Unknown result type (might be due to invalid IL or missing references)
			//IL_0836: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = new GameObject("LeftOverviewPanel", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val.transform.SetParent(parent, false);
			RectTransform component = val.GetComponent<RectTransform>();
			component.anchorMin = new Vector2(0f, 0f);
			component.anchorMax = new Vector2(0f, 1f);
			component.pivot = new Vector2(0f, 0.5f);
			component.anchoredPosition = new Vector2(14f, -28f);
			component.sizeDelta = new Vector2(340f, -70f);
			Image component2 = val.GetComponent<Image>();
			component2.sprite = UIHelper.GetGlassCard();
			component2.type = (Type)1;
			((Graphic)component2).color = new Color(0.09f, 0.07f, 0.05f, 0.96f);
			GameObject val2 = new GameObject("LevelText", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val2.transform.SetParent(val.transform, false);
			RectTransform component3 = val2.GetComponent<RectTransform>();
			component3.anchorMin = new Vector2(0.5f, 1f);
			component3.anchorMax = new Vector2(0.5f, 1f);
			component3.pivot = new Vector2(0.5f, 1f);
			component3.anchoredPosition = new Vector2(0f, -14f);
			component3.sizeDelta = new Vector2(300f, 32f);
			_leftLevelText = (TMP_Text?)(object)val2.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_leftLevelText.font = font;
			}
			_leftLevelText.fontSize = 20f;
			_leftLevelText.alignment = (TextAlignmentOptions)514;
			GameObject val3 = new GameObject("XpTrack", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val3.transform.SetParent(val.transform, false);
			RectTransform component4 = val3.GetComponent<RectTransform>();
			component4.anchorMin = new Vector2(0.5f, 1f);
			component4.anchorMax = new Vector2(0.5f, 1f);
			component4.pivot = new Vector2(0.5f, 1f);
			component4.anchoredPosition = new Vector2(0f, -50f);
			component4.sizeDelta = new Vector2(300f, 6f);
			Image component5 = val3.GetComponent<Image>();
			component5.sprite = UIHelper.GetConduitTrack();
			component5.type = (Type)1;
			((Graphic)component5).color = new Color(0.08f, 0.06f, 0.05f, 0.95f);
			GameObject val4 = new GameObject("XpFill", new Type[2]
			{
				typeof(RectTransform),
				typeof(Image)
			});
			val4.transform.SetParent(val3.transform, false);
			RectTransform component6 = val4.GetComponent<RectTransform>();
			component6.anchorMin = Vector2.zero;
			component6.anchorMax = Vector2.one;
			component6.offsetMin = Vector2.zero;
			component6.offsetMax = Vector2.zero;
			_leftXpFill = val4.GetComponent<Image>();
			_leftXpFill.sprite = UIHelper.GetWhiteSprite();
			_leftXpFill.type = (Type)3;
			_leftXpFill.fillMethod = (FillMethod)0;
			_leftXpFill.fillOrigin = 0;
			((Graphic)_leftXpFill).color = UIHelper.BrightBlueConduit;
			CreateHorizontalLine(val.transform, -68f);
			GameObject val5 = new GameObject("PassivesTitle", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val5.transform.SetParent(val.transform, false);
			RectTransform component7 = val5.GetComponent<RectTransform>();
			component7.anchorMin = new Vector2(0f, 1f);
			component7.anchorMax = new Vector2(1f, 1f);
			component7.pivot = new Vector2(0.5f, 1f);
			component7.anchoredPosition = new Vector2(0f, -76f);
			component7.sizeDelta = new Vector2(-28f, 16f);
			TextMeshProUGUI component8 = val5.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				((TMP_Text)component8).font = font;
			}
			((TMP_Text)component8).text = "<color=#E5A93C><b>CUMULATIVE PASSIVES</b></color>";
			((TMP_Text)component8).fontSize = 11f;
			((TMP_Text)component8).alignment = (TextAlignmentOptions)514;
			GameObject val6 = new GameObject("PassivesContainer", new Type[1] { typeof(RectTransform) });
			val6.transform.SetParent(val.transform, false);
			RectTransform component9 = val6.GetComponent<RectTransform>();
			component9.anchorMin = new Vector2(0f, 1f);
			component9.anchorMax = new Vector2(1f, 1f);
			component9.pivot = new Vector2(0.5f, 1f);
			component9.anchoredPosition = new Vector2(0f, -96f);
			component9.sizeDelta = new Vector2(-28f, 160f);
			GameObject val7 = new GameObject("PassivesLabels", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val7.transform.SetParent(val6.transform, false);
			RectTransform component10 = val7.GetComponent<RectTransform>();
			component10.anchorMin = Vector2.zero;
			component10.anchorMax = Vector2.one;
			component10.offsetMin = Vector2.zero;
			component10.offsetMax = new Vector2(-65f, 0f);
			_leftPassivesLabels = (TMP_Text?)(object)val7.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_leftPassivesLabels.font = font;
			}
			_leftPassivesLabels.fontSize = 10.5f;
			_leftPassivesLabels.lineSpacing = 1.15f;
			_leftPassivesLabels.alignment = (TextAlignmentOptions)257;
			GameObject val8 = new GameObject("PassivesValues", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val8.transform.SetParent(val6.transform, false);
			RectTransform component11 = val8.GetComponent<RectTransform>();
			component11.anchorMin = Vector2.zero;
			component11.anchorMax = Vector2.one;
			component11.offsetMin = new Vector2(170f, 0f);
			component11.offsetMax = Vector2.zero;
			_leftPassivesValues = (TMP_Text?)(object)val8.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				_leftPassivesValues.font = font;
			}
			_leftPassivesValues.fontSize = 10.5f;
			_leftPassivesValues.lineSpacing = 1.15f;
			_leftPassivesValues.alignment = (TextAlignmentOptions)260;
			CreateHorizontalLine(val.transform, -270f);
			GameObject val9 = new GameObject("SocketTitle", new Type[2]
			{
				typeof(RectTransform),
				typeof(TextMeshProUGUI)
			});
			val9.transform.SetParent(val.transform, false);
			RectTransform component12 = val9.GetComponent<RectTransform>();
			component12.anchorMin = new Vector2(0f, 1f);
			component12.anchorMax = new Vector2(1f, 1f);
			component12.pivot = new Vector2(0.5f, 1f);
			component12.anchoredPosition = new Vector2(0f, -280f);
			component12.sizeDelta = new Vector2(-28f, 16f);
			TextMeshProUGUI component13 = val9.GetComponent<TextMeshProUGUI>();
			if ((Object)(object)font != (Object)null)
			{
				((TMP_Text)component13).font = font;
			}
			((TMP_Text)component13).text = "<color=#E5A93C><b>KEYSTONE SOCKETS</b></color>";
			((TMP_Text)component13).fontSize = 11f;
			((TMP_Text)component13).alignment = (TextAlignmentOptions)514;
			GameObject val10 = new GameObject("SocketRow", new Type[2]
			{
				typeof(RectTransform),
				typeof(HorizontalLayoutGroup)