Decompiled source of BlackMod Slime v1.0.0

BlackModú║Slime.dll

Decompiled 3 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DM;
using FhpSLib;
using HarmonyLib;
using InControl;
using Landfall.TABS;
using Landfall.TABS_Input;
using SLMA;
using UnityEngine;
using UnityEngine.UI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Hero Unit")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("FhpSlime")]
[assembly: AssemblyProduct("Hero Unit")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("7acfaef0-7669-4401-8bff-5a9a02e18c75")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace HeroUnit;

[BepInPlugin("FhpSlime.HeroUnit", "HeroUnit", "1.0.0")]
internal class Loader : BaseUnityPlugin
{
	public class FactionCreate
	{
		public void CFaction()
		{
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Expected O, but got Unknown
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Expected O, but got Unknown
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0198: Expected O, but got Unknown
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b9: Expected O, but got Unknown
			//IL_01d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Expected O, but got Unknown
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fb: Expected O, but got Unknown
			//IL_0216: Unknown result type (might be due to invalid IL or missing references)
			//IL_021c: Expected O, but got Unknown
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023d: Expected O, but got Unknown
			//IL_0258: Unknown result type (might be due to invalid IL or missing references)
			//IL_025e: Expected O, but got Unknown
			//IL_027a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0280: Expected O, but got Unknown
			//IL_029c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a2: Expected O, but got Unknown
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c4: Expected O, but got Unknown
			//IL_02e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e6: Expected O, but got Unknown
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Expected O, but got Unknown
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_032a: Expected O, but got Unknown
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_033f: Expected O, but got Unknown
			//IL_0370: 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_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039e: Expected O, but got Unknown
			//IL_03cf: 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_03e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fd: Expected O, but got Unknown
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_0435: 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_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0458: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Expected O, but got Unknown
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_0496: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bf: Expected O, but got Unknown
			//IL_04f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_050c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0511: Unknown result type (might be due to invalid IL or missing references)
			//IL_051a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0520: Expected O, but got Unknown
			//IL_054d: 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_0567: Unknown result type (might be due to invalid IL or missing references)
			//IL_056c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_057b: Expected O, but got Unknown
			//IL_05a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Expected O, but got Unknown
			//IL_0603: Unknown result type (might be due to invalid IL or missing references)
			//IL_0608: Unknown result type (might be due to invalid IL or missing references)
			//IL_061d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: 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_0631: Expected O, but got Unknown
			//IL_065e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0663: Unknown result type (might be due to invalid IL or missing references)
			//IL_0678: Unknown result type (might be due to invalid IL or missing references)
			//IL_067d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0687: Unknown result type (might be due to invalid IL or missing references)
			//IL_068d: Expected O, but got Unknown
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_06ec: Expected O, but got Unknown
			//IL_071e: 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_073d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0747: Unknown result type (might be due to invalid IL or missing references)
			//IL_074d: Expected O, but got Unknown
			//IL_077f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0784: Unknown result type (might be due to invalid IL or missing references)
			//IL_0799: Unknown result type (might be due to invalid IL or missing references)
			//IL_079e: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ae: Expected O, but got Unknown
			//IL_07db: Unknown result type (might be due to invalid IL or missing references)
			//IL_07e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_07fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0804: Unknown result type (might be due to invalid IL or missing references)
			//IL_080a: Expected O, but got Unknown
			//IL_083d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0842: Unknown result type (might be due to invalid IL or missing references)
			//IL_0857: Unknown result type (might be due to invalid IL or missing references)
			//IL_085c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0866: Unknown result type (might be due to invalid IL or missing references)
			//IL_086c: Expected O, but got Unknown
			//IL_089f: Unknown result type (might be due to invalid IL or missing references)
			//IL_08a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08be: Unknown result type (might be due to invalid IL or missing references)
			Faction val = SLMATool.CreateFaction("BlackMod:Slime", (UnitBlueprint[])null, Bundle.LoadAsset<Sprite>("slime"), 45432);
			s.SetField<Faction>(val, "m_isSecret", (object)true);
			s.SetField<Faction>(val, "m_lockSecrets", (object)true);
			UnitBlueprint val2 = SLMATool.CreateUnit("勇者史莱姆", (UnitBlueprint)null, val, Bundle.LoadAsset<Sprite>("slime"));
			val2.health = 800f;
			val2.movementSpeedMuiltiplier = 1.25f;
			val2.balanceMultiplier *= 4f;
			val2.stepMultiplier *= 2f;
			val2.animationMultiplier *= 1.2f;
			val2.turnSpeed *= 1.5f;
			val2.massMultiplier = 10f;
			GameObject unitBase = UPool.MyPool.AddObject("HeroUnit", val2.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val2.UnitBase = unitBase;
			val2.UnitBase.gameObject.AddComponent<CameraPossession>();
			val2.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["Bow"];
			val2.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[0];
			val2.m_props = (GameObject[])(object)new GameObject[15]
			{
				(GameObject)SLMALoader.SDic["clothes"]["Viking_Shirt002"],
				(GameObject)SLMALoader.SDic["clothes"]["Viking_Ullr_pants001"],
				(GameObject)SLMALoader.SDic["clothes"]["Evil_DarkKingTransformedPants001"],
				(GameObject)SLMALoader.SDic["clothes"]["evil_Firebat_shoes_001"],
				(GameObject)SLMALoader.SDic["clothes"]["Ancient_Dagger001"],
				(GameObject)SLMALoader.SDic["clothes"]["Viking_Hair003"],
				(GameObject)SLMALoader.SDic["clothes"]["halloween_archer_hood001"],
				(GameObject)SLMALoader.SDic["clothes"]["ottomanian_scarf001"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_KnightCape001"],
				(GameObject)SLMALoader.SDic["clothes"]["Pirate_Belt004"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_Shirt005"],
				(GameObject)SLMALoader.SDic["clothes"]["western_gloves003"],
				(GameObject)SLMALoader.SDic["clothes"]["Ancient_Hair001"],
				(GameObject)SLMALoader.SDic["clothes"]["Good_TimeNinjaTorso001"],
				(GameObject)SLMALoader.SDic["clothes"]["halloween_candle_neck001"]
			};
			PropItemData[] array = new PropItemData[15];
			PropItemData val3 = new PropItemData();
			val3.m_colors = new int[2] { -1, 46 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 46, -1 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[1] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[4] { 74, 75, 46, 52 };
			val3.m_isTeamColor = new bool[4];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[2] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[4] { -1, -1, 52, -1 };
			val3.m_isTeamColor = new bool[4];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[3] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { 75, -1, -1 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[4] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 25 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, -0.03f, 0.02f);
			val3.m_scale = new Vector3(1.1f, 1.4f, 1.2f);
			array[5] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 46 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0.02f, -0.01f);
			val3.m_scale = new Vector3(1.3f, 1.2f, 1.3f);
			array[6] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 46 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[7] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 46 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[8] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { -1, -1 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[9] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 56, 53 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[10] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 52, 67 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[11] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 25 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, -0.02f, 0.02f);
			val3.m_scale = new Vector3(0.9f, 1.2f, 1.2f);
			array[12] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { 50, 67, 67 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[13] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { 46, 46, 46 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0.1f, -0.03f);
			val3.m_scale = new Vector3(1.1f, 0.7f, -1f);
			array[14] = val3;
			val2.m_propData = (PropItemData[])(object)array;
			Unit1(val);
			Unit2(val);
			Unit3(val);
			Unit4(val);
			Unit5(val);
			DoTrans();
		}

		public void Unit1(Faction faction)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_010b: Expected O, but got Unknown
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0163: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Expected O, but got Unknown
			//IL_016e: 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_017f: 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_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Expected O, but got Unknown
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Expected O, but got Unknown
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_020d: Expected O, but got Unknown
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Expected O, but got Unknown
			//IL_0267: Unknown result type (might be due to invalid IL or missing references)
			//IL_026d: Expected O, but got Unknown
			//IL_0288: Unknown result type (might be due to invalid IL or missing references)
			//IL_028e: Expected O, but got Unknown
			//IL_02a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02af: Expected O, but got Unknown
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Expected O, but got Unknown
			//IL_02eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Expected O, but got Unknown
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0312: Expected O, but got Unknown
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0333: Expected O, but got Unknown
			//IL_0341: Unknown result type (might be due to invalid IL or missing references)
			//IL_0347: Expected O, but got Unknown
			//IL_0379: Unknown result type (might be due to invalid IL or missing references)
			//IL_037e: 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_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Expected O, but got Unknown
			//IL_03d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0402: Expected O, but got Unknown
			//IL_0435: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_045d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Expected O, but got Unknown
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ae: 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_04bd: Expected O, but got Unknown
			//IL_04ef: 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_0509: Unknown result type (might be due to invalid IL or missing references)
			//IL_050e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_051d: Expected O, but got Unknown
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0564: Unknown result type (might be due to invalid IL or missing references)
			//IL_0569: Unknown result type (might be due to invalid IL or missing references)
			//IL_0572: Unknown result type (might be due to invalid IL or missing references)
			//IL_0578: Expected O, but got Unknown
			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_05af: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05c9: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("暴走僵尸", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], faction, GetSprite("Zombie.png"));
			val.health = 3000f;
			val.forceCost = 1u;
			val.sizeMultiplier = 1.1f;
			val.damageMultiplier = 1.4f;
			val.massMultiplier = 10f;
			val.movementSpeedMuiltiplier = 1.1f;
			val.holdinigWithTwoHands = false;
			val.Validate();
			GameObject unitBase = UPool.MyPool.AddObject("Boss1", val.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val.UnitBase = unitBase;
			Boss boss = val.UnitBase.gameObject.AddComponent<Boss>();
			boss.sprite = GetSprite("Zombie.png");
			boss.unlock = "Boss2";
			boss.unlockD = "你很强,不过比起我哪位朋友还差了一点";
			GameObject val2 = UPool.MyPool.AddObject("隐形拳", (GameObject)SLMALoader.SDic["weapons"]["Leg_Boxer"], true, (HideFlags)52, (Sprite)null, 0, false);
			Object.Destroy((Object)(object)val2.GetComponentInChildren<TeamColor>());
			HelpLibrary.TryChangeColor(val2, new Color(0f, 0f, 0f, 0f));
			val2.GetComponentInChildren<CollisionWeapon>().hitFasterAfterDealDamage = true;
			val.LeftWeapon = val2;
			val.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["MinoTaurGrab"];
			val.RightWeaponData = new PropItemData
			{
				m_colors = new int[0],
				m_isTeamColor = new bool[0],
				m_positionOffset = new Vector3(0f, 0f, 0f),
				m_scale = new Vector3(1f, 1f, 1f)
			};
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				(GameObject)SLMALoader.SDic["moves"]["KnightCharge"],
				(GameObject)SLMALoader.SDic["moves"]["Dodge"],
				UPool.MyPool.GetObject("愤怒m")
			};
			val.m_props = (GameObject[])(object)new GameObject[7]
			{
				(GameObject)SLMALoader.SDic["clothes"]["SkeletonSuit001"],
				(GameObject)SLMALoader.SDic["clothes"]["Balaklava001"],
				(GameObject)SLMALoader.SDic["clothes"]["SpawnEyes_DarkPeasant"],
				(GameObject)SLMALoader.SDic["clothes"]["Farmer_Hat002"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_HandGuard001"],
				(GameObject)SLMALoader.SDic["clothes"]["Evil_DarkKingTransformedTorso001"],
				(GameObject)SLMALoader.SDic["clothes"]["misc_mask_001"]
			};
			PropItemData[] array = new PropItemData[7];
			PropItemData val3 = new PropItemData();
			val3.m_colors = new int[2] { 16, 16 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 16 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[1] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[4] { -1, -1, -1, -1 };
			val3.m_isTeamColor = new bool[4];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[2] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 6 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[3] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 75, 49 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[4] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 29 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[5] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 16, 16 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, -0.0136f);
			val3.m_scale = new Vector3(0.8900264f, 1f, 1f);
			array[6] = val3;
			val.m_propData = (PropItemData[])(object)array;
		}

		public void Unit2(Faction faction)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Expected O, but got Unknown
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Expected O, but got Unknown
			//IL_0151: 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_016b: 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_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Expected O, but got Unknown
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Expected O, but got Unknown
			//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Expected O, but got Unknown
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Expected O, but got Unknown
			//IL_0240: Unknown result type (might be due to invalid IL or missing references)
			//IL_0246: Expected O, but got Unknown
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0267: Expected O, but got Unknown
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0288: Expected O, but got Unknown
			//IL_02a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a9: Expected O, but got Unknown
			//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Expected O, but got Unknown
			//IL_02e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02eb: Expected O, but got Unknown
			//IL_0306: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Expected O, but got Unknown
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_032d: Expected O, but got Unknown
			//IL_0349: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Expected O, but got Unknown
			//IL_036b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0371: Expected O, but got Unknown
			//IL_0380: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Expected O, but got Unknown
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: 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_03e0: Expected O, but got Unknown
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0417: Unknown result type (might be due to invalid IL or missing references)
			//IL_042c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0440: Expected O, but got Unknown
			//IL_0472: Unknown result type (might be due to invalid IL or missing references)
			//IL_0477: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0491: Unknown result type (might be due to invalid IL or missing references)
			//IL_049a: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a0: Expected O, but got Unknown
			//IL_04cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04eb: 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_04fa: Expected O, but got Unknown
			//IL_0527: Unknown result type (might be due to invalid IL or missing references)
			//IL_052c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0541: Unknown result type (might be due to invalid IL or missing references)
			//IL_0546: Unknown result type (might be due to invalid IL or missing references)
			//IL_054f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0555: Expected O, but got Unknown
			//IL_0582: Unknown result type (might be due to invalid IL or missing references)
			//IL_0587: Unknown result type (might be due to invalid IL or missing references)
			//IL_059c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b0: Expected O, but got Unknown
			//IL_05e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_05fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0602: Unknown result type (might be due to invalid IL or missing references)
			//IL_060b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0611: Expected O, but got Unknown
			//IL_0642: Unknown result type (might be due to invalid IL or missing references)
			//IL_0647: Unknown result type (might be due to invalid IL or missing references)
			//IL_065c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0661: Unknown result type (might be due to invalid IL or missing references)
			//IL_066a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0670: Expected O, but got Unknown
			//IL_06a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_06cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d2: Expected O, but got Unknown
			//IL_0702: Unknown result type (might be due to invalid IL or missing references)
			//IL_0707: Unknown result type (might be due to invalid IL or missing references)
			//IL_071c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Unknown result type (might be due to invalid IL or missing references)
			//IL_072b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0731: Expected O, but got Unknown
			//IL_075e: 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_077d: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("迷失圣灵", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], faction, GetSprite("Holy.png"));
			val.health = 4000f;
			val.forceCost = 1u;
			val.sizeMultiplier = 1.2f;
			val.damageMultiplier = 1f;
			val.massMultiplier = 1.6f;
			val.movementSpeedMuiltiplier = 1.7f;
			val.attackSpeedMultiplier = 1.2f;
			val.holdinigWithTwoHands = true;
			val.Entity.SetUnlockKey("Boss2");
			GameObject unitBase = UPool.MyPool.AddObject("Boss2", val.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val.UnitBase = unitBase;
			Boss boss = val.UnitBase.gameObject.AddComponent<Boss>();
			boss.sprite = GetSprite("Holy.png");
			boss.unlock = "Boss3";
			boss.unlockD = "....吾即是...";
			val.LeftWeapon = null;
			val.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["shogunSword"];
			PropItemData val2 = new PropItemData();
			val2.m_colors = new int[4] { -1, -1, 6, -1 };
			val2.m_isTeamColor = new bool[4];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			val.RightWeaponData = val2;
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				(GameObject)SLMALoader.SDic["moves"]["Hover"],
				(GameObject)SLMALoader.SDic["moves"]["Shogun_Dodge"],
				UPool.MyPool.GetObject("愤怒m"),
				(GameObject)SLMALoader.SDic["moves"]["Move_Shout"]
			};
			val.m_props = (GameObject[])(object)new GameObject[11]
			{
				(GameObject)SLMALoader.SDic["clothes"]["Good_Timeninja_PTmask001"],
				(GameObject)SLMALoader.SDic["clothes"]["spooky_crown001"],
				(GameObject)SLMALoader.SDic["clothes"]["legacy_superboxer_hair001"],
				(GameObject)SLMALoader.SDic["clothes"]["spooky_banshee_chains001"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_Archer_Glove001"],
				(GameObject)SLMALoader.SDic["clothes"]["evil_slicey_torsowrap001"],
				(GameObject)SLMALoader.SDic["clothes"]["asia_redjade_torso002"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_ShoulderPad002"],
				(GameObject)SLMALoader.SDic["clothes"]["good_skirt001"],
				(GameObject)SLMALoader.SDic["clothes"]["good_glaive_shoes001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_LegWrap001"]
			};
			PropItemData[] array = new PropItemData[11];
			val2 = new PropItemData();
			val2.m_colors = new int[1] { -1 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, -0.05f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 64, 78 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0.04f, 0f);
			val2.m_scale = new Vector3(0.8f, 0.8f, 0.8f);
			array[1] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 42, 68 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[2] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { -1 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[3] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { 42 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[4] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { 71 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[5] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[3] { 81, 12, 40 };
			val2.m_isTeamColor = new bool[3];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[6] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 40, -1 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[7] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[3] { 65, 66, 66 };
			val2.m_isTeamColor = new bool[3];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[8] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { -1, -1 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[9] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { 40 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[10] = val2;
			val.m_propData = (PropItemData[])(object)array;
		}

		public void Unit3(Faction faction)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Expected O, but got Unknown
			//IL_013f: 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_015c: Expected O, but got Unknown
			//IL_018f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0194: 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_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01db: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e1: Expected O, but got Unknown
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Expected O, but got Unknown
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0223: Expected O, but got Unknown
			//IL_0250: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Expected O, but got Unknown
			//IL_0271: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Expected O, but got Unknown
			//IL_0292: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Expected O, but got Unknown
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Expected O, but got Unknown
			//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Expected O, but got Unknown
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Expected O, but got Unknown
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			//IL_0329: Expected O, but got Unknown
			//IL_0344: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Expected O, but got Unknown
			//IL_0365: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Expected O, but got Unknown
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038c: Expected O, but got Unknown
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: Expected O, but got Unknown
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ce: Expected O, but got Unknown
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Expected O, but got Unknown
			//IL_040c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Expected O, but got Unknown
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0434: Expected O, but got Unknown
			//IL_0450: Unknown result type (might be due to invalid IL or missing references)
			//IL_0456: Expected O, but got Unknown
			//IL_0465: Unknown result type (might be due to invalid IL or missing references)
			//IL_046b: Expected O, but got Unknown
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_04a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_04c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Expected O, but got Unknown
			//IL_04fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0501: Unknown result type (might be due to invalid IL or missing references)
			//IL_0516: Unknown result type (might be due to invalid IL or missing references)
			//IL_051b: 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_052a: Expected O, but got Unknown
			//IL_0556: Unknown result type (might be due to invalid IL or missing references)
			//IL_055b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0570: Unknown result type (might be due to invalid IL or missing references)
			//IL_0575: Unknown result type (might be due to invalid IL or missing references)
			//IL_057e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0584: Expected O, but got Unknown
			//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_05df: Unknown result type (might be due to invalid IL or missing references)
			//IL_05e5: Expected O, but got Unknown
			//IL_0615: Unknown result type (might be due to invalid IL or missing references)
			//IL_061a: Unknown result type (might be due to invalid IL or missing references)
			//IL_062f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0634: Unknown result type (might be due to invalid IL or missing references)
			//IL_063d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0643: Expected O, but got Unknown
			//IL_0670: Unknown result type (might be due to invalid IL or missing references)
			//IL_0675: Unknown result type (might be due to invalid IL or missing references)
			//IL_068a: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0698: Unknown result type (might be due to invalid IL or missing references)
			//IL_069e: Expected O, but got Unknown
			//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_06eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f0: 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_06ff: Expected O, but got Unknown
			//IL_0732: Unknown result type (might be due to invalid IL or missing references)
			//IL_0737: 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_0751: Unknown result type (might be due to invalid IL or missing references)
			//IL_075a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0760: Expected O, but got Unknown
			//IL_0793: Unknown result type (might be due to invalid IL or missing references)
			//IL_0798: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c2: Expected O, but got Unknown
			//IL_07f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_080c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0811: Unknown result type (might be due to invalid IL or missing references)
			//IL_081b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0821: Expected O, but got Unknown
			//IL_0851: Unknown result type (might be due to invalid IL or missing references)
			//IL_0856: Unknown result type (might be due to invalid IL or missing references)
			//IL_086b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0870: Unknown result type (might be due to invalid IL or missing references)
			//IL_087a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0880: Expected O, but got Unknown
			//IL_08b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_08b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_08ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_08cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_08d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_08df: Expected O, but got Unknown
			//IL_0912: Unknown result type (might be due to invalid IL or missing references)
			//IL_0917: Unknown result type (might be due to invalid IL or missing references)
			//IL_092c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0931: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("火焰铜甲战士", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], faction, GetSprite("Fire.png"));
			val.health = 4500f;
			val.forceCost = 1u;
			val.sizeMultiplier = 1.1f;
			val.damageMultiplier = 2f;
			val.massMultiplier = 20f;
			val.movementSpeedMuiltiplier = 2f;
			val.attackSpeedMultiplier = 2f;
			val.holdinigWithTwoHands = true;
			val.Entity.SetUnlockKey("Boss3");
			GameObject unitBase = UPool.MyPool.AddObject("Boss3", val.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val.UnitBase = unitBase;
			Boss boss = val.UnitBase.gameObject.AddComponent<Boss>();
			boss.sprite = GetSprite("Fire.png");
			boss.unlock = "Boss4";
			boss.unlockD = "烈火...熄灭了";
			GameObject val2 = UPool.MyPool.AddObject("火焰剑", (GameObject)SLMALoader.SDic["weapons"]["Quan"], true, (HideFlags)52, (Sprite)null, 0, false);
			val2.AddComponent<MeleeWeaponAddEffect>().EffectPrefab = ((GameObject)SLMALoader.SDic["effects"]["6__E_FireArrowEffect"]).GetComponent<UnitEffectBase>();
			val.RightWeapon = val2;
			PropItemData val3 = new PropItemData();
			val3.m_colors = new int[3] { -1, 3, -1 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			val.RightWeaponData = val3;
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[7]
			{
				(GameObject)SLMALoader.SDic["moves"]["Move_FireWave"],
				(GameObject)SLMALoader.SDic["moves"]["Dodge"],
				(GameObject)SLMALoader.SDic["moves"]["Fencer_Dodge"],
				UPool.MyPool.GetObject("愤怒m"),
				(GameObject)SLMALoader.SDic["moves"]["Jester_Dodge"],
				(GameObject)SLMALoader.SDic["moves"]["BlockSlow"],
				(GameObject)SLMALoader.SDic["moves"]["Superboxer_DodgPunch"]
			};
			val.m_props = (GameObject[])(object)new GameObject[13]
			{
				(GameObject)SLMALoader.SDic["clothes"]["Ancient_ShoulderPad001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_Armor001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_Shirt002"],
				(GameObject)SLMALoader.SDic["clothes"]["Ancient_ChestArmor002"],
				(GameObject)SLMALoader.SDic["clothes"]["asia_redjade_shoes001"],
				(GameObject)SLMALoader.SDic["clothes"]["davinci_hair001"],
				(GameObject)SLMALoader.SDic["clothes"]["Cp_good_cleric_chestarmor001"],
				(GameObject)SLMALoader.SDic["clothes"]["Renaissance_ChestArmor"],
				(GameObject)SLMALoader.SDic["clothes"]["evil_axeswap_torso001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_Pants003"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_Pants002"],
				(GameObject)SLMALoader.SDic["clothes"]["legacy_barrelroller_pants001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_WristArmor003"]
			};
			PropItemData[] array = new PropItemData[13];
			val3 = new PropItemData();
			val3.m_colors = new int[3] { -1, 3, 3 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 3, -1 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[1] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 3 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[2] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[4] { -1, -1, 3, -1 };
			val3.m_isTeamColor = new bool[4];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[3] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 3, 3 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[4] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[1] { 47 };
			val3.m_isTeamColor = new bool[1];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[5] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[4] { 3, -1, 3, -1 };
			val3.m_isTeamColor = new bool[4];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[6] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { 3, 3, 3 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[7] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { 3, -1, 3 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[8] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 3, 3 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[9] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { 3, -1 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[10] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[2] { -1, 3 };
			val3.m_isTeamColor = new bool[2];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[11] = val3;
			val3 = new PropItemData();
			val3.m_colors = new int[3] { -1, 3, -1 };
			val3.m_isTeamColor = new bool[3];
			val3.m_positionOffset = new Vector3(0f, 0f, 0f);
			val3.m_scale = new Vector3(1f, 1f, 1f);
			array[12] = val3;
			val.m_propData = (PropItemData[])(object)array;
		}

		public static Sprite GetSprite(string name)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Expected O, but got Unknown
			//IL_0052: 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)
			using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name);
			Texture2D val = new Texture2D(4, 4);
			byte[] array = new byte[stream.Length];
			stream.Read(array, 0, (int)stream.Length);
			ImageConversion.LoadImage(val, array);
			return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
		}

		public static void SetMoveConditionalValue(ConditionalEventInstance gameObject, ConditionType type, ValueType valuet, float value)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: 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_004d: 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)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			bool flag = false;
			EventCondition[] conditions = gameObject.conditions;
			foreach (EventCondition val in conditions)
			{
				if (val.conditionType == type)
				{
					val.valueType = valuet;
					val.value = value;
					flag = true;
				}
			}
			if (!flag)
			{
				List<EventCondition> list = gameObject.conditions.ToList();
				list.Add(new EventCondition
				{
					conditionType = type,
					valueType = valuet,
					value = value
				});
				gameObject.conditions = list.ToArray();
			}
		}

		public void Unit4(Faction faction)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_016e: 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_0188: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Expected O, but got Unknown
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ea: 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_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_022d: Expected O, but got Unknown
			//IL_0269: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Expected O, but got Unknown
			//IL_02ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b2: Expected O, but got Unknown
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c6: Expected O, but got Unknown
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("盒子王", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], faction, GetSprite("Box.png"));
			val.health = 3000f;
			val.forceCost = 1u;
			val.sizeMultiplier = 0.9f;
			val.attackSpeedMultiplier = -1f;
			val.damageMultiplier = 0.3f;
			val.massMultiplier = 1.1f;
			val.movementSpeedMuiltiplier = 2f;
			val.holdinigWithTwoHands = false;
			val.Entity.SetUnlockKey("Boss4");
			GameObject unitBase = UPool.MyPool.AddObject("Boss4", val.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val.UnitBase = unitBase;
			Boss boss = val.UnitBase.gameObject.AddComponent<Boss>();
			boss.sprite = GetSprite("Box.png");
			boss.unlock = "Boss5";
			boss.unlockD = "在我面前,你是透明的。";
			val.LeftWeapon = (GameObject)SLMALoader.SDic["weapons"]["Assassin_Dagger"];
			val.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["Jester_Dagger_L"];
			PropItemData val2 = new PropItemData();
			val2.m_colors = new int[4] { 49, 40, -1, 43 };
			val2.m_isTeamColor = new bool[4];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			val.LeftWeaponData = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 49, -1 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			val.RightWeaponData = val2;
			GameObject val3 = UPool.MyPool.AddObject("超级闪避", (GameObject)SLMALoader.SDic["moves"]["Assassin_Poof"], true, (HideFlags)52, (Sprite)null, 0, false);
			SetMoveConditionalValue(val3.GetComponent<ConditionalEvent>().events[0], (ConditionType)0, (ValueType)0, 3.5f);
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[3]
			{
				(GameObject)SLMALoader.SDic["moves"]["Jump_Berserker"],
				UPool.MyPool.GetObject("愤怒m"),
				val3
			};
			val.m_props = (GameObject[])(object)new GameObject[1] { (GameObject)SLMALoader.SDic["clothes"]["cp_cardboard_head001"] };
			PropItemData[] array = new PropItemData[1];
			val2 = new PropItemData();
			val2.m_colors = new int[1] { -1 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val2;
			val.m_propData = (PropItemData[])(object)array;
		}

		public void Unit5(Faction faction)
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Expected O, but got Unknown
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Expected O, but got Unknown
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: 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_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bf: Expected O, but got Unknown
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e0: Expected O, but got Unknown
			//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Expected O, but got Unknown
			//IL_021c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Expected O, but got Unknown
			//IL_023d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Expected O, but got Unknown
			//IL_025e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0264: Expected O, but got Unknown
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0285: Expected O, but got Unknown
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Expected O, but got Unknown
			//IL_02b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Expected O, but got Unknown
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0307: Unknown result type (might be due to invalid IL or missing references)
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031b: Expected O, but got Unknown
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_034d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0362: Unknown result type (might be due to invalid IL or missing references)
			//IL_0367: Unknown result type (might be due to invalid IL or missing references)
			//IL_0370: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Expected O, but got Unknown
			//IL_03a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ad: 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_03c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d6: Expected O, but got Unknown
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0431: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Expected O, but got Unknown
			//IL_0464: Unknown result type (might be due to invalid IL or missing references)
			//IL_0469: 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_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_048c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0492: Expected O, but got Unknown
			//IL_04c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_04e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Expected O, but got Unknown
			//IL_0525: Unknown result type (might be due to invalid IL or missing references)
			//IL_052a: 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_054d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0553: Expected O, but got Unknown
			//IL_0585: Unknown result type (might be due to invalid IL or missing references)
			//IL_058a: Unknown result type (might be due to invalid IL or missing references)
			//IL_059f: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a4: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("黑化之花", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_SECRET_TREEGIANT"], faction, GetSprite("Flower.png"));
			val.health = 2000f;
			val.forceCost = 1u;
			val.sizeMultiplier = 2.6f;
			val.damageMultiplier = 1f;
			val.attackSpeedMultiplier = 1.1f;
			val.massMultiplier = 20f;
			val.movementSpeedMuiltiplier = 1f;
			val.holdinigWithTwoHands = false;
			val.Entity.SetUnlockKey("Boss5");
			GameObject unitBase = UPool.MyPool.AddObject("Boss5", val.UnitBase, true, (HideFlags)52, (Sprite)null, 0, false);
			val.UnitBase = unitBase;
			Boss boss = val.UnitBase.gameObject.AddComponent<Boss>();
			boss.sprite = GetSprite("Flower.png");
			boss.unlock = "Boss6";
			boss.unlockD = "你没赢,我不管";
			val.LeftWeapon = (GameObject)SLMALoader.SDic["weapons"]["GiantPunch"];
			val.RightWeapon = (GameObject)SLMALoader.SDic["weapons"]["TreeSword"];
			PropItemData val2 = new PropItemData();
			val2.m_colors = new int[2] { 40, 49 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			val.RightWeaponData = val2;
			val.m_props = (GameObject[])(object)new GameObject[8]
			{
				(GameObject)SLMALoader.SDic["clothes"]["FlowerHat001"],
				(GameObject)SLMALoader.SDic["clothes"]["executionerHood001"],
				(GameObject)SLMALoader.SDic["clothes"]["Crusader_Shirt001"],
				(GameObject)SLMALoader.SDic["clothes"]["Medieval_Shirt004"],
				(GameObject)SLMALoader.SDic["clothes"]["Western_gloves001"],
				(GameObject)SLMALoader.SDic["clothes"]["Asia_WristArmor001"],
				(GameObject)SLMALoader.SDic["clothes"]["Renaissance_Pants005"],
				(GameObject)SLMALoader.SDic["clothes"]["misc_monsterfoot001"]
			};
			PropItemData[] array = new PropItemData[8];
			val2 = new PropItemData();
			val2.m_colors = new int[3] { 47, 40, 49 };
			val2.m_isTeamColor = new bool[3];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[0] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { 40 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[1] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 40, 40 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[2] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[3] { 40, 40, 40 };
			val2.m_isTeamColor = new bool[3];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[3] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[1] { 40 };
			val2.m_isTeamColor = new bool[1];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[4] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[3] { 40, 40, 40 };
			val2.m_isTeamColor = new bool[3];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[5] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 40, 40 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[6] = val2;
			val2 = new PropItemData();
			val2.m_colors = new int[2] { 40, 40 };
			val2.m_isTeamColor = new bool[2];
			val2.m_positionOffset = new Vector3(0f, 0f, 0f);
			val2.m_scale = new Vector3(1f, 1f, 1f);
			array[7] = val2;
			val.m_propData = (PropItemData[])(object)array;
		}

		public static void AddTransl(string key, string trans)
		{
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<int, Language> dictionary = new Dictionary<int, Language>();
			dictionary.Add(0, (Language)7);
			dictionary.Add(1, (Language)0);
			dictionary.Add(2, (Language)8);
			dictionary.Add(3, (Language)3);
			dictionary.Add(4, (Language)1);
			dictionary.Add(5, (Language)6);
			dictionary.Add(6, (Language)4);
			dictionary.Add(7, (Language)2);
			Dictionary<Language, Dictionary<string, string>> dictionary2 = (Dictionary<Language, Dictionary<string, string>>)typeof(Localizer).GetField("m_localization", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
			string[] array = trans.Split(new string[1] { "#" }, StringSplitOptions.RemoveEmptyEntries);
			for (int i = 0; i < dictionary.Count; i++)
			{
				if (i < array.Length)
				{
					dictionary2[dictionary[i]].Add(key, array[i]);
				}
			}
			typeof(Localizer).GetField("m_localization", BindingFlags.Static | BindingFlags.NonPublic).SetValue(typeof(Localizer), dictionary2);
		}

		public void DoTrans()
		{
			AddTransl("....吾即是...", "....I am...#....我就是...#....Ich bin...#....Je suis...#....Я - это...#....Yo soy...#....Io sono...;");
			AddTransl("烈火...熄灭了", "The Flame... is extinguished#烈火...熄灭了#Die Flamme... ist erloschen#La Flamme... est éteinte#Пламя... угашено#La llama... está apagada#La fiamma... è spenta;");
			AddTransl("勇者史莱姆", "勇者史莱姆#You're the Hero#勇者史莱姆#Der Held#L'Érö#Герой#El Héroe#Il Eroe;");
			AddTransl("暴走僵尸", "暴走僵尸#Out of Control Zombie#暴走僵尸#Der kontrolllose Zombie#Le Zombie hors de contrôle#Неконтролируемый зомби#El zombi fuera de control#Il zombie fuori controllo;");
			AddTransl("迷失圣灵", "迷失圣灵#Lost Holy Spirit#迷失圣灵#Der verlorene Heilige Geist#L'Esprit saint perdu#Пропавший Святой Дух#El Espíritu Santo perdido#Lo Spirito Santo perduto;");
			AddTransl("火焰铜甲战士", "火焰铜甲战士#Fire Armor Warrior#火焰铜甲战士#Der Feuermantel-Krieger#Le Guerrier en armure de feu#Огненный броневой воин#El guerrero en armadura de fuego#Il guerriero in armatura di fuoco;");
			AddTransl("盒子王", "盒子王#Box King#盒子王#Der König der Boxen#Le Roi des Boîtes#Король коробок#El Rey de las cajas#Il Re dei cassetti;");
			AddTransl("在我面前,你是透明的", "在我面前,你是透明的#You are transparent to me#在我面前,你是透明的#Du bist mir transparent#Vous êtes transparent pour moi#Вы для меня-transparent#Tú eres transparente para mí#Tu sei trasparente per me;");
			AddTransl("黑化之花", "黑化之花#Blackened Flower#黑化之花#Die verfärbte Blume#La fleur noire#Чёрная цветок#La flor negra#La fiore nera;");
			AddTransl("你没赢,我不管", "你没赢,我不管#You didn't win, I don't care#你没赢,我不管#Du hast nicht gewonnen, ich mache mich nicht darum#Vous n'avez pas gagné, je m'en fiche#Вы не выиграли, я не интересуюсь#Tú no ganaste, no me importa#Tu non hai vinto, non mi importa;");
			AddTransl("你很强不过比起我哪位朋友还差了一点", "你很强不过比起我那位朋友还差了一点#You're very strong, but still behind my friend#你很强不过比起我那位朋友还差了一点#Du bist sehr stark, aber immer noch hinter meinem Freund#你很强不过比起我那位朋友还差了一点#Vous êtes très fort, mais toujours derrière mon ami#你很强不过比起我哪位朋友还差了一点#Вы очень сильны, но все еще позади моего друга#你很强不过比起我那位朋友还差了一点#Tú eres muy fuerte, pero todavía detrás de mi amigo#你很强不过比起我那位朋友还差了一点#Tu sei molto forte, ma ancora dietro il mio amico;");
		}
	}

	public static AssetBundle Bundle;

	public static AbilityControl Control { get; set; }

	private void Awake()
	{
		((MonoBehaviour)this).StartCoroutine("Call");
	}

	private IEnumerator Call()
	{
		yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null));
		yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null));
		yield return (object)new WaitForSeconds(0.3f);
		Debug.Log((object)"Start Loading Mod");
		_ = ContentDatabase.Instance().LandfallContentDatabase;
		new Harmony("HeroUnit").PatchAll();
		using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("herounit");
		GameObject obj = Object.Instantiate<GameObject>((Bundle = AssetBundle.LoadFromStream(stream)).LoadAsset<GameObject>("Ability"));
		obj.AddComponent<AbilityControl>();
		Object.DontDestroyOnLoad((Object)(object)obj);
		Control = obj.GetComponent<AbilityControl>();
		GameObject val = UPool.MyPool.AddObject("愤怒", (GameObject)SLMALoader.SDic["effects"]["E_Enrage"], true, (HideFlags)52, (Sprite)null, 0, false);
		val.GetComponentInChildren<UnitDontTakeDamageForSeconds>().seconds = 0f;
		val.GetComponentInChildren<DamageOverTimeEffect>().effectTime = 999999f;
		val.GetComponentInChildren<DamageOverTimeEffect>().effectDuration = 999999f;
		AnimationCurve colorCurve = val.GetComponentInChildren<DamageOverTimeEffect>().colorCurve;
		Keyframe[] array = new Keyframe[2];
		Keyframe val2 = default(Keyframe);
		((Keyframe)(ref val2)).time = 0f;
		((Keyframe)(ref val2)).value = 1f;
		array[0] = val2;
		val2 = default(Keyframe);
		((Keyframe)(ref val2)).time = 1000f;
		((Keyframe)(ref val2)).value = 1f;
		array[1] = val2;
		colorCurve.keys = (Keyframe[])(object)array;
		((Behaviour)val.GetComponentInChildren<DelayEvent>()).enabled = false;
		GameObject val3 = UPool.MyPool.AddObject("愤怒m", (GameObject)SLMALoader.SDic["moves"]["Move_Jarl_Enrage"], true, (HideFlags)52, (Sprite)null, 0, false);
		val3.GetComponentInChildren<Cost>().m_cost = 0u;
		val3.GetComponentInChildren<AddEffectToSelf>().EffectPrefab = val.GetComponent<UnitEffectBase>();
		UnitBlueprint[] array2 = Resources.FindObjectsOfTypeAll<UnitBlueprint>();
		foreach (UnitBlueprint obj2 in array2)
		{
			obj2.health *= 1.2f;
			obj2.attackSpeedMultiplier *= 0.7f;
			List<GameObject> list = obj2.objectsToSpawnAsChildren.ToList();
			if (list == null)
			{
				list = new List<GameObject>();
			}
			list.Add(val3);
			obj2.objectsToSpawnAsChildren = list.ToArray();
		}
		new FactionCreate().CFaction();
		Debug.Log((object)"Loaded HeroUnit Successfully!");
	}

	private void Update()
	{
		if ((Object)(object)MainCam.instance != (Object)null)
		{
			CameraAbilityPossess componentInParent = ((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>();
			if (Object.op_Implicit((Object)(object)componentInParent) && (Object)(object)componentInParent.currentUnit != (Object)null && Object.op_Implicit((Object)(object)((Component)componentInParent.currentUnit).GetComponentInChildren<CameraPossession>()))
			{
				Control.unit = componentInParent.currentUnit;
				((Component)Control).gameObject.SetActive(true);
			}
			else
			{
				Control.unit = null;
				((Component)Control).gameObject.SetActive(false);
			}
		}
	}
}
public class CameraPossession : MonoBehaviour
{
	public class WeaponSet
	{
		public enum WeaponMode
		{
			NotHold,
			Hold
		}

		public GameObject right;

		public GameObject left;

		public WeaponMode mode;
	}

	public Unit unit;

	public GeneralInput input;

	private MovementHandler movementHandler;

	public float dashCooldown;

	public PlayerActions playerActions;

	public float dashMultiplier;

	public float damageFallReductionTime;

	public bool canDash;

	public bool wait;

	public UnitDontTakeDamageForSeconds takeDamageForSeconds;

	public float HealCD;

	public bool CanHeal;

	public bool healwait;

	public float DingCD;

	public bool CanDing;

	public bool Dingwait;

	public float ChangeCD;

	public bool CanChange;

	public bool ChangeWait;

	public float kickCD;

	public bool CanKick;

	public bool KickWait;

	public int index;

	public List<WeaponSet> sets = new List<WeaponSet>();

	public void Start()
	{
		//IL_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0118: Expected O, but got Unknown
		//IL_0132: Unknown result type (might be due to invalid IL or missing references)
		//IL_013c: Expected O, but got Unknown
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_0172: Expected O, but got Unknown
		//IL_018c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Expected O, but got Unknown
		//IL_01c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cc: Expected O, but got Unknown
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Expected O, but got Unknown
		unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>();
		movementHandler = ((Component)unit).GetComponentInChildren<MovementHandler>();
		takeDamageForSeconds = ((Component)unit).gameObject.AddComponent<UnitDontTakeDamageForSeconds>();
		takeDamageForSeconds.playOnStart = false;
		input = unit.Input;
		playerActions = PlayerActions.Instance;
		damageFallReductionTime = 10f;
		dashCooldown = 2.5f;
		dashMultiplier = 1750f;
		HealCD = 10f;
		canDash = true;
		CanHeal = true;
		healwait = false;
		CanDing = true;
		DingCD = 15f;
		kickCD = 10f;
		CanKick = true;
		ChangeCD = 0.5f;
		CanChange = true;
		index = 0;
		sets = new List<WeaponSet>
		{
			new WeaponSet
			{
				right = (GameObject)SLMALoader.SDic["weapons"]["ShortBow"],
				left = (GameObject)SLMALoader.SDic["weapons"]["ShortBow"],
				mode = WeaponSet.WeaponMode.Hold
			},
			new WeaponSet
			{
				right = (GameObject)SLMALoader.SDic["weapons"]["Berserker_axe"],
				left = (GameObject)SLMALoader.SDic["weapons"]["KnightSword"],
				mode = WeaponSet.WeaponMode.NotHold
			},
			new WeaponSet
			{
				right = (GameObject)SLMALoader.SDic["weapons"]["MonkStaff"],
				left = (GameObject)SLMALoader.SDic["weapons"]["Bow"],
				mode = WeaponSet.WeaponMode.Hold
			}
		};
		Loader.Control.ui.Shift.CD = 0f;
		Loader.Control.ui.Shift.inCD = false;
		Loader.Control.ui.FirstAbility.CD = 0f;
		Loader.Control.ui.FirstAbility.inCD = false;
		Loader.Control.ui.SecondAbility.CD = 0f;
		Loader.Control.ui.SecondAbility.inCD = false;
		Loader.Control.ui.ThidAbility.CD = 0f;
		Loader.Control.ui.ThidAbility.inCD = false;
		Loader.Control.ui.Zb.CD = 0f;
		Loader.Control.ui.Zb.inCD = false;
		((MonoBehaviour)this).StartCoroutine("Change");
	}

	public void Update()
	{
		CameraAbilityPossess componentInParent = ((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>();
		if (!Object.op_Implicit((Object)(object)componentInParent) || !((Object)(object)componentInParent.currentUnit == (Object)(object)unit) || unit.data.Dead || !Object.op_Implicit((Object)(object)input) || !input.hasControl)
		{
			return;
		}
		if (!canDash && !wait)
		{
			wait = true;
			((MonoBehaviour)this).StartCoroutine((IEnumerator)DashCooldown(dashCooldown));
			Loader.Control.ui.Shift.SetCD(dashCooldown);
			return;
		}
		if (canDash && ((OneAxisInputControl)playerActions.m_moveFast).IsPressed)
		{
			canDash = false;
			Dash(dashMultiplier);
		}
		if (!CanHeal && !healwait)
		{
			healwait = true;
			((MonoBehaviour)this).StartCoroutine((IEnumerator)HealCooldown(HealCD));
			Loader.Control.ui.FirstAbility.SetCD(HealCD);
			return;
		}
		if (CanHeal && Input.GetKeyDown((KeyCode)49))
		{
			CanHeal = false;
			((MonoBehaviour)this).StartCoroutine("Heal", (object)300f);
		}
		if (!CanDing && !Dingwait)
		{
			Dingwait = true;
			((MonoBehaviour)this).StartCoroutine((IEnumerator)DingCooldown(DingCD));
			Loader.Control.ui.SecondAbility.SetCD(DingCD);
			return;
		}
		if (CanDing && Input.GetKeyDown((KeyCode)50) && (Object)(object)unit.data.targetData != (Object)null)
		{
			CanDing = false;
			((MonoBehaviour)this).StartCoroutine("Ding", (object)2f);
		}
		if (!CanKick && !KickWait)
		{
			KickWait = true;
			((MonoBehaviour)this).StartCoroutine((IEnumerator)KickCooldown(kickCD));
			Loader.Control.ui.ThidAbility.SetCD(kickCD);
			return;
		}
		if (CanKick && Input.GetKeyDown((KeyCode)51) && (Object)(object)unit.data.targetData != (Object)null)
		{
			CanKick = false;
			((MonoBehaviour)this).StartCoroutine("Kick", (object)2f);
		}
		if (!CanChange && !ChangeWait)
		{
			ChangeWait = true;
			((MonoBehaviour)this).StartCoroutine((IEnumerator)ChangeCooldown(ChangeCD));
			Loader.Control.ui.Zb.SetCD(ChangeCD);
		}
		else if (CanChange && Input.GetKeyDown((KeyCode)122))
		{
			CanChange = false;
			((MonoBehaviour)this).StartCoroutine("Change");
		}
	}

	public void Dash(float force)
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//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_0070: 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_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: 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_0155: Unknown result type (might be due to invalid IL or missing references)
		takeDamageForSeconds.seconds = 0.5f;
		takeDamageForSeconds.Go();
		Vector3 val = ((TwoAxisInputControl)playerActions.m_move).X * unit.data.characterForwardObject.right;
		Vector3 val2 = ((TwoAxisInputControl)playerActions.m_move).Y * unit.data.characterForwardObject.forward;
		((Vector3)(ref val)).Normalize();
		((Vector3)(ref val2)).Normalize();
		Rigidbody[] allRigs = unit.data.allRigs.AllRigs;
		for (int i = 0; i < allRigs.Length; i++)
		{
			allRigs[i].AddForce(val * force, (ForceMode)5);
			allRigs[i].AddForce(val2 * force, (ForceMode)5);
		}
		ServiceLocator.GetService<SoundPlayer>().PlaySoundEffect("Effects/Candlehead", 1.5f, unit.data.mainRig.position, (MaterialType)0, (Transform)null, 0.7f);
		allRigs = unit.data.allRigs.AllRigs;
		for (int j = 0; j < allRigs.Length; j++)
		{
			ServiceLocator.GetService<ParticlePlayer>().PlayEffect(2, allRigs[j].position, Vector3.up, (SkinnedMeshRenderer)null);
		}
		ServiceLocator.GetService<SoundPlayer>().PlaySoundEffect("Effects/Log", 1.5f, unit.data.mainRig.position, (MaterialType)0, (Transform)null, 0.7f);
	}

	private void SetTime(float targetTime)
	{
		Time.timeScale = targetTime;
	}

	public IEnumerator<WaitForSeconds> DashCooldown(float cooldown)
	{
		yield return new WaitForSeconds(cooldown);
		wait = false;
		canDash = true;
	}

	public IEnumerator Heal(float heal)
	{
		ServiceLocator.GetService<SoundPlayer>().PlaySoundEffect("Effects/PriestHeal", 1.5f, unit.data.mainRig.position, (MaterialType)0, (Transform)null, 0.7f);
		UnitEffectBase[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<UnitEffectBase>();
		for (int j = 0; j < componentsInChildren.Length; j++)
		{
			Object.Destroy((Object)(object)componentsInChildren[j]);
		}
		GameObject val = Object.Instantiate<GameObject>(Loader.Bundle.LoadAsset<GameObject>("E_治疗"), UPool.MyPool.Pooler.transform);
		UnitEffectBase val2 = UnitEffectBase.AddEffectToTarget(((Component)((Component)unit).transform).gameObject, val.GetComponent<UnitEffectBase>());
		if ((Object)(object)val2 == (Object)null)
		{
			GameObject obj = Object.Instantiate<GameObject>(val, ((Component)unit.data.hip).transform.root);
			obj.transform.position = ((Component)unit.data.hip).transform.position;
			obj.transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
			val2 = obj.GetComponent<UnitEffectBase>();
			TeamHolder.AddTeamHolder(obj, ((Component)unit).gameObject);
		}
		val2.DoEffect();
		((Component)val2).transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
		((Component)val2).gameObject.transform.SetParent(((Component)unit.data.hip).transform);
		val2.Ping();
		for (int i = 0; i <= 5; i++)
		{
			((Damagable)((Component)this).GetComponentInChildren<HealthHandler>()).TakeDamage(0f - heal / 5f, Vector3.zero, (Unit)null, (DamageType)0);
			yield return (object)new WaitForSeconds(0.1f);
		}
	}

	public IEnumerator<WaitForSeconds> HealCooldown(float cooldown)
	{
		yield return new WaitForSeconds(cooldown);
		healwait = false;
		CanHeal = true;
	}

	public IEnumerator Ding(float time)
	{
		ServiceLocator.GetService<SoundPlayer>().PlaySoundEffect("Medieval Hits/KingSword", 1.5f, unit.data.targetData.mainRig.position, (MaterialType)0, (Transform)null, 0.7f);
		Unit target = unit.data.targetData.unit;
		GameObject val = Object.Instantiate<GameObject>(Loader.Bundle.LoadAsset<GameObject>("E_定身"), UPool.MyPool.Pooler.transform);
		UnitEffectBase val2 = UnitEffectBase.AddEffectToTarget(((Component)((Component)target).transform).gameObject, val.GetComponent<UnitEffectBase>());
		if ((Object)(object)val2 == (Object)null)
		{
			GameObject obj = Object.Instantiate<GameObject>(val, ((Component)target.data.hip).transform.root);
			obj.transform.position = ((Component)target.data.hip).transform.position;
			obj.transform.rotation = Quaternion.LookRotation(target.data.mainRig.position);
			val2 = obj.GetComponent<UnitEffectBase>();
			TeamHolder.AddTeamHolder(obj, ((Component)target.data).gameObject);
		}
		val2.DoEffect();
		((Component)val2).transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
		((Component)val2).gameObject.transform.SetParent(((Component)unit.data.hip).transform);
		val2.Ping();
		Rigidbody[] allRigs = target.data.allRigs.AllRigs;
		for (int i = 0; i < allRigs.Length; i++)
		{
			allRigs[i].isKinematic = true;
		}
		yield return (object)new WaitForSeconds(time);
		allRigs = target.data.allRigs.AllRigs;
		for (int j = 0; j < allRigs.Length; j++)
		{
			allRigs[j].isKinematic = false;
		}
	}

	public IEnumerator<WaitForSeconds> DingCooldown(float cooldown)
	{
		yield return new WaitForSeconds(cooldown);
		Dingwait = false;
		CanDing = true;
	}

	public IEnumerator Kick(float mul)
	{
		GameObject gameObject2 = Object.Instantiate<GameObject>(Loader.Bundle.LoadAsset<GameObject>("E_红温"), UPool.MyPool.Pooler.transform);
		UnitEffectBase val = UnitEffectBase.AddEffectToTarget(((Component)((Component)unit).transform).gameObject, gameObject2.GetComponent<UnitEffectBase>());
		if ((Object)(object)val == (Object)null)
		{
			GameObject obj = Object.Instantiate<GameObject>(gameObject2, ((Component)unit.data.hip).transform.root);
			obj.transform.position = ((Component)unit.data.hip).transform.position;
			obj.transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
			val = obj.GetComponent<UnitEffectBase>();
			TeamHolder.AddTeamHolder(obj, ((Component)unit).gameObject);
		}
		val.DoEffect();
		((Component)val).transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
		((Component)val).gameObject.transform.SetParent(((Component)unit.data.hip).transform);
		val.Ping();
		gameObject2 = Object.Instantiate<GameObject>((GameObject)SLMALoader.SDic["moves"]["JumpKick_RedJade_L"], ((Component)unit).transform);
		DodgeMove componentInChildren = gameObject2.GetComponentInChildren<DodgeMove>();
		componentInChildren.forceMultiplier *= mul;
		CollisionWeapon componentInChildren2 = gameObject2.GetComponentInChildren<CollisionWeapon>();
		componentInChildren2.damage *= 0.8f;
		gameObject2.GetComponentInChildren<ConditionalEvent>().DoMovesAndContinuousEvent(gameObject2.GetComponentInChildren<ConditionalEvent>().events[0].NetworkId);
		yield return (object)new WaitForSeconds(4f);
		Object.Destroy((Object)(object)gameObject2);
	}

	public IEnumerator<WaitForSeconds> KickCooldown(float cooldown)
	{
		yield return new WaitForSeconds(cooldown);
		KickWait = false;
		CanKick = true;
	}

	public IEnumerator Change()
	{
		GameObject val = Object.Instantiate<GameObject>(Loader.Bundle.LoadAsset<GameObject>("E_切换"), UPool.MyPool.Pooler.transform);
		UnitEffectBase val2 = UnitEffectBase.AddEffectToTarget(((Component)((Component)unit).transform).gameObject, val.GetComponent<UnitEffectBase>());
		if ((Object)(object)val2 == (Object)null)
		{
			GameObject obj = Object.Instantiate<GameObject>(val, ((Component)unit.data.hip).transform.root);
			obj.transform.position = ((Component)unit.data.hip).transform.position;
			obj.transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
			val2 = obj.GetComponent<UnitEffectBase>();
			TeamHolder.AddTeamHolder(obj, ((Component)unit).gameObject);
		}
		val2.DoEffect();
		((Component)val2).transform.rotation = Quaternion.LookRotation(unit.data.mainRig.position);
		((Component)val2).gameObject.transform.SetParent(((Component)unit.data.hip).transform);
		val2.Ping();
		WeaponSet weaponSet = sets[index];
		Component rightObject = (Component)(object)unit.holdingHandler.rightObject;
		Holdable leftObject = unit.holdingHandler.leftObject;
		unit.holdingHandler.LetGoOfAll();
		if ((Object)(object)rightObject != (Object)null)
		{
			Object.Destroy((Object)(object)rightObject.gameObject);
		}
		if ((Object)(object)leftObject != (Object)null)
		{
			Object.Destroy((Object)(object)((Component)leftObject).gameObject);
		}
		unit.unitBlueprint.SetWeapon(unit, unit.Team, weaponSet.right, (PropItemData)null, (HandType)0, ((Component)unit.data.rightHand).transform.rotation, new List<GameObject>(), false);
		unit.holdingHandler.rightHandActivity = (HandActivity)1;
		unit.unitBlueprint.SetWeapon(unit, unit.Team, (weaponSet.mode == WeaponSet.WeaponMode.Hold) ? null : weaponSet.left, (PropItemData)null, (HandType)1, ((Component)unit.data.leftHand).transform.rotation, new List<GameObject>(), false);
		unit.holdingHandler.leftHandActivity = (HandActivity)((weaponSet.mode == WeaponSet.WeaponMode.Hold) ? 1 : 2);
		unit.data.weaponHandler.fistRefernce = null;
		if (Object.op_Implicit((Object)(object)weaponSet.right))
		{
			unit.m_AttackDistance = weaponSet.right.GetComponentInChildren<Weapon>().maxRange;
			unit.m_PreferedDistance = weaponSet.right.GetComponentInChildren<Weapon>().maxRange + 0.5f;
		}
		for (int i = 0; i < Loader.Control.ui.Z.Length; i++)
		{
			((Component)Loader.Control.ui.Z[i]).gameObject.SetActive(false);
		}
		((Component)Loader.Control.ui.Z[index]).gameObject.SetActive(true);
		unit.api.UpdateECSValues();
		if (index + 1 == sets.Count)
		{
			index = 0;
		}
		else
		{
			index++;
		}
		yield break;
	}

	public IEnumerator<WaitForSeconds> ChangeCooldown(float cooldown)
	{
		yield return new WaitForSeconds(cooldown);
		ChangeWait = false;
		CanChange = true;
	}
}
public class AbilityControl : MonoBehaviour
{
	public UI ui;

	public Unit unit;

	public void Start()
	{
		Loader.Control = this;
		ui = new UI
		{
			Z = (Transform[])(object)new Transform[3]
			{
				((Component)this).transform.Find("Z").GetChild(0).GetChild(0),
				((Component)this).transform.Find("Z").GetChild(0).GetChild(1),
				((Component)this).transform.Find("Z").GetChild(0).GetChild(2)
			},
			Zb = ((Component)((Component)this).transform.Find("Z")).gameObject.AddComponent<UIButtom>(),
			Shift = ((Component)((Component)this).transform.Find("Shift")).gameObject.AddComponent<UIButtom>(),
			FirstAbility = ((Component)((Component)this).transform.Find("1")).gameObject.AddComponent<UIButtom>(),
			SecondAbility = ((Component)((Component)this).transform.Find("2")).gameObject.AddComponent<UIButtom>(),
			ThidAbility = ((Component)((Component)this).transform.Find("3")).gameObject.AddComponent<UIButtom>()
		};
		((MonoBehaviour)this).StartCoroutine("ResetW");
	}

	public void Update()
	{
	}

	public void Reset()
	{
		if ((Object)(object)unit != (Object)null)
		{
			ui.Shift.CD = ((Component)unit).GetComponentInChildren<CameraPossession>().dashCooldown;
			ui.Shift.inCD = ((Component)unit).GetComponentInChildren<CameraPossession>().dashCooldown > 0f;
			ui.FirstAbility.CD = ((Component)unit).GetComponentInChildren<CameraPossession>().HealCD;
			ui.FirstAbility.inCD = ((Component)unit).GetComponentInChildren<CameraPossession>().HealCD > 0f;
			ui.SecondAbility.CD = ((Component)unit).GetComponentInChildren<CameraPossession>().DingCD;
			ui.SecondAbility.inCD = ((Component)unit).GetComponentInChildren<CameraPossession>().DingCD > 0f;
			ui.ThidAbility.CD = ((Component)unit).GetComponentInChildren<CameraPossession>().kickCD;
			ui.ThidAbility.inCD = ((Component)unit).GetComponentInChildren<CameraPossession>().kickCD > 0f;
			ui.Zb.CD = ((Component)unit).GetComponentInChildren<CameraPossession>().ChangeCD;
			ui.Zb.inCD = ((Component)unit).GetComponentInChildren<CameraPossession>().ChangeCD > 0f;
		}
	}

	private IEnumerator ResetW()
	{
		yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)MainCam.instance != (Object)null));
		yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>() != (Object)null));
		s.SetField<CameraAbilityPossess>(((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>(), "m_OnPossessEnterAction", (object)(Action)delegate
		{
			Reset();
		});
	}
}
public class UIButtom : MonoBehaviour
{
	public float CD;

	public bool inCD;

	private Transform Image;

	private Transform Cooldown;

	private void Start()
	{
		Image = ((Component)this).transform.GetChild(0).GetChild(0);
		Cooldown = ((Component)this).transform.GetChild(0).Find("Cooldown");
		inCD = false;
		CD = 0f;
	}

	public void SetCD(float CD)
	{
		inCD = true;
		this.CD = CD;
	}

	private void Update()
	{
		if (inCD && CD >= 0f)
		{
			((Component)Cooldown).gameObject.SetActive(true);
			CD -= Time.deltaTime;
			((Component)Cooldown).GetComponentInChildren<Text>().text = CD.ToString("F2") + "s";
		}
		else
		{
			((Component)Cooldown).gameObject.SetActive(false);
		}
	}
}
public class UI
{
	public UIButtom Shift;

	public UIButtom FirstAbility;

	public UIButtom SecondAbility;

	public UIButtom ThidAbility;

	public UIButtom Zb;

	public Transform[] Z;
}
public class Boss : MonoBehaviour
{
	public string unlock;

	public string unlockD;

	public Sprite sprite;

	private void Start()
	{
		((Component)this).GetComponentInChildren<Unit>().data.healthHandler.AddDieAction((Action)OnDeath);
	}

	private void OnDeath()
	{
		if (!string.IsNullOrWhiteSpace(unlock) && !ServiceLocator.GetService<ISaveLoaderService>().HasUnlockedSecret(unlock))
		{
			ServiceLocator.GetService<ISaveLoaderService>().UnlockSecret(unlock);
			PlacementUI val = Object.FindObjectOfType<PlacementUI>();
			if ((Object)(object)val != (Object)null)
			{
				val.RedrawUI(unlock);
			}
			ServiceLocator.GetService<ModalPanel>().OpenUnlockPanel(unlockD, sprite);
		}
	}
}