Decompiled source of MULTIVERSE v2.0.1

MULTIVERSE.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 FhpSLib.BundleModCore;
using HarmonyLib;
using Landfall.TABS;
using Landfall.TABS.AI.Components.Modifiers;
using Landfall.TABS.AI.Systems;
using Landfall.TABS.GameMode;
using Landfall.TABS.UnitEditor;
using Landfall.TABS.Workshop;
using MULTIVERSE;
using SLMA;
using TFBGames;
using Unity.Entities;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
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("MULTIVERSE")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("made in SFTBM by FhpSlime")]
[assembly: AssemblyCopyright("Copyright ©  2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266a22")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace MULTIVERSE
{
	public static class UManager
	{
		public static string modname;

		public static string modder;

		private static string com;

		public static SLMABundleMod mod;

		public static List<Unit> bases;

		public static GameObject hiteffect;

		static UManager()
		{
			modname = "multiverse";
			modder = "FhpSlime";
			bases = new List<Unit>();
		}

		public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db)
		{
		}

		public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db)
		{
		}

		public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db)
		{
		}

		public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db)
		{
		}

		public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db)
		{
		}

		public static void Init(LandfallContentDatabase db)
		{
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_040d: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			//IL_049d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0363: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0515: 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_096d: Unknown result type (might be due to invalid IL or missing references)
			//IL_099b: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_09a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_07b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0803: Unknown result type (might be due to invalid IL or missing references)
			//IL_077c: Unknown result type (might be due to invalid IL or missing references)
			//IL_05bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_05cf: Expected O, but got Unknown
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0727: Unknown result type (might be due to invalid IL or missing references)
			AssetBundle val;
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("multiverse"))
			{
				val = AssetBundle.LoadFromStream(stream);
			}
			PaoPaoDatas.AddAssetBundle("base", val);
			Object[] array = PaoPaoDatas.GetAssetBundle("base").LoadAllAssets<Object>();
			foreach (Object val2 in array)
			{
				Object val3 = val2;
				PaoPaoDatas.Tools.Debug.LogWarning("load:" + ((val3 != (Object)null) ? ((object)val3).ToString() : null));
			}
			GameObject[] array2 = PaoPaoDatas.GetAssetBundle("base").LoadAllAssets<GameObject>();
			foreach (GameObject val4 in array2)
			{
				Debug.Log((object)((Object)val4).name);
				if (Object.op_Implicit((Object)(object)val4.GetComponent<WeaponItem>()) && !HelpLibrary.m_weapons.ContainsKey(((CharacterItem)val4.GetComponent<WeaponItem>()).Entity.GUID))
				{
					GameObject gameObject = val4.gameObject;
					PaoPaoDatas.Tools.Debug.LogError("Weapon:" + ((Object)gameObject).name);
					Dictionary<DatabaseID, GameObject> weapons = HelpLibrary.m_weapons;
					weapons.Add(((CharacterItem)val4.GetComponentInChildren<WeaponItem>()).Entity.GUID, val4.gameObject);
					HelpLibrary.m_weapons = weapons;
					Dictionary<DatabaseID, Object> dictionary = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
					dictionary.Add(((CharacterItem)val4.GetComponentInChildren<WeaponItem>()).Entity.GUID, (Object)(object)val4.gameObject);
					typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary);
				}
				if (Object.op_Implicit((Object)(object)val4.GetComponent<ProjectileEntity>()) && !HelpLibrary.m_weapons.ContainsKey(val4.GetComponent<ProjectileEntity>().Entity.GUID))
				{
					GameObject gameObject2 = val4.gameObject;
					PaoPaoDatas.Tools.Debug.LogError("Project:" + ((Object)gameObject2).name);
					Dictionary<DatabaseID, GameObject> projectiles = HelpLibrary.m_projectiles;
					projectiles.Add(val4.GetComponentInChildren<ProjectileEntity>().Entity.GUID, val4.gameObject);
					HelpLibrary.m_projectiles = projectiles;
					Dictionary<DatabaseID, Object> dictionary2 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
					dictionary2.Add(val4.GetComponentInChildren<ProjectileEntity>().Entity.GUID, (Object)(object)val4.gameObject);
					typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary2);
				}
				if (Object.op_Implicit((Object)(object)val4.GetComponent<PropItem>()) && !HelpLibrary.m_characterProps.ContainsKey(((CharacterItem)val4.GetComponent<PropItem>()).Entity.GUID))
				{
					GameObject gameObject3 = val4.gameObject;
					if (Object.op_Implicit((Object)(object)gameObject3.GetComponentInChildren<TeamColor>()))
					{
						TeamColor[] componentsInChildren = gameObject3.GetComponentsInChildren<TeamColor>();
						foreach (TeamColor val5 in componentsInChildren)
						{
							if ((Object)(object)val5.redMaterial == (Object)null)
							{
								int materialID = val5.materialID;
								s.DeepCopyOf<TeamColor>(val5, ((GameObject)SLMALoader.SDic["bases"]["Humanoid"]).GetComponentInChildren<TeamColor>());
								val5.materialID = materialID;
							}
						}
					}
					PaoPaoDatas.Tools.Debug.LogError("Prop:" + ((Object)gameObject3).name);
					Dictionary<DatabaseID, GameObject> characterProps = HelpLibrary.m_characterProps;
					characterProps.Add(((CharacterItem)val4.GetComponentInChildren<PropItem>()).Entity.GUID, val4.gameObject);
					HelpLibrary.m_characterProps = characterProps;
					Dictionary<DatabaseID, Object> dictionary3 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
					dictionary3.Add(((CharacterItem)val4.GetComponentInChildren<PropItem>()).Entity.GUID, (Object)(object)val4.gameObject);
					typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary3);
				}
				if (Object.op_Implicit((Object)(object)val4.GetComponent<SpecialAbility>()) && !HelpLibrary.m_combatMoves.ContainsKey(((CharacterItem)val4.GetComponent<SpecialAbility>()).Entity.GUID))
				{
					GameObject gameObject4 = val4.gameObject;
					PaoPaoDatas.Tools.Debug.LogError("Moves:" + ((Object)gameObject4).name);
					Dictionary<DatabaseID, GameObject> combatMoves = HelpLibrary.m_combatMoves;
					combatMoves.Add(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID, val4.gameObject);
					HelpLibrary.m_combatMoves = combatMoves;
					Dictionary<DatabaseID, Object> dictionary4 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
					dictionary4.Add(((CharacterItem)val4.GetComponentInChildren<SpecialAbility>()).Entity.GUID, (Object)(object)val4.gameObject);
					typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary4);
					if (((Object)val4).name == "祖国人激光发射")
					{
						val4.AddComponent<HomeLanderEyes>().project = val.LoadAsset<GameObject>("祖国人激光");
						val4.GetComponent<HomeLanderEyes>().target = new Color(2f, 0f, 0f);
					}
					if (((Object)val4).name == "祖国人武器切换")
					{
						WeaponChange weaponChange = val4.AddComponent<WeaponChange>();
						weaponChange.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("超人拳头");
						weaponChange.shrink = false;
						((Component)weaponChange).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
						((Component)weaponChange).GetComponent<ConditionalEvent>().controllableByPlayer = false;
						GameObject val6 = (Object.op_Implicit((Object)(object)UPool.MyPool.GetObject("无声超农拳")) ? UPool.MyPool.GetObject("无声超农拳") : UPool.MyPool.AddObject("无声超农拳", (GameObject)SLMALoader.SDic["weapons"]["Leg_SuperP_W"], true, (HideFlags)52, (Sprite)null, 0, false));
						Object.Destroy((Object)(object)((Component)val6.transform.GetChild(9)).gameObject);
						val6.GetComponent<MeleeWeapon>().SoundRef = null;
						val6.GetComponent<MeleeWeapon>().SoundPathData.Category = null;
						val6.GetComponent<MeleeWeapon>().SoundPathData.Effect = null;
						val6.GetComponent<CollisionWeapon>().damage = 2000f;
						Object.Destroy((Object)(object)val6.GetComponentInChildren<CollisionSound>());
						WeaponChange weaponChange2 = ((Component)val4.transform.GetChild(0)).gameObject.AddComponent<WeaponChange>();
						weaponChange2.target = val6;
						weaponChange2.shrink = false;
						((Component)weaponChange2).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
						((Component)weaponChange2).GetComponent<ConditionalEvent>().controllableByPlayer = false;
					}
				}
				if (!Object.op_Implicit((Object)(object)val4.GetComponent<Unit>()) || HelpLibrary.m_unitBases.ContainsKey(val4.GetComponent<Unit>().Entity.GUID))
				{
					continue;
				}
				GameObject gameObject5 = val4.gameObject;
				if (Object.op_Implicit((Object)(object)gameObject5.GetComponentInChildren<TeamColor>()))
				{
					TeamColor[] componentsInChildren = gameObject5.GetComponentsInChildren<TeamColor>();
					foreach (TeamColor val7 in componentsInChildren)
					{
						if ((Object)(object)val7.redMaterial == (Object)null)
						{
							int materialID2 = val7.materialID;
							s.DeepCopyOf<TeamColor>(val7, ((GameObject)SLMALoader.SDic["bases"]["Humanoid"]).GetComponentInChildren<TeamColor>());
							val7.materialID = materialID2;
						}
					}
				}
				if (Object.op_Implicit((Object)(object)gameObject5.GetComponentInChildren<EyeSpawner>()))
				{
					gameObject5.GetComponentInChildren<EyeSpawner>().eyeObject = ((GameObject)SLMALoader.SDic["bases"]["Humanoid"]).GetComponentInChildren<EyeSpawner>().eyeObject;
				}
				PaoPaoDatas.UnitBasesData.bases.Add(val4.GetComponent<Unit>());
				Dictionary<DatabaseID, GameObject> unitBases = HelpLibrary.m_unitBases;
				unitBases.Add(val4.GetComponentInChildren<Unit>().Entity.GUID, val4.gameObject);
				HelpLibrary.m_unitBases = unitBases;
				Dictionary<DatabaseID, Object> dictionary5 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
				dictionary5.Add(val4.GetComponentInChildren<Unit>().Entity.GUID, (Object)(object)val4.gameObject);
				typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary5);
			}
			Material[] array3 = val.LoadAllAssets<Material>();
			foreach (Material val8 in array3)
			{
				if (Object.op_Implicit((Object)(object)Shader.Find(((Object)val8.shader).name)))
				{
					val8.shader = Shader.Find(((Object)val8.shader).name);
				}
			}
			SoundBank[] array4 = PaoPaoDatas.GetAssetBundle("base").LoadAllAssets<SoundBank>();
			foreach (SoundBank obj in array4)
			{
				SoundBank soundBank = ServiceLocator.GetService<SoundPlayer>().soundBank;
				List<SoundBankCategory> list = soundBank.Categories.ToList();
				SoundBankCategory[] categories = obj.Categories;
				foreach (SoundBankCategory item in categories)
				{
					list.Add(item);
				}
				soundBank.Categories = list.ToArray();
			}
			LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
			FieldInfo field = typeof(LandfallContentDatabase).GetField("m_voiceBundles", BindingFlags.Instance | BindingFlags.NonPublic);
			Dictionary<DatabaseID, VoiceBundle> dictionary6 = (Dictionary<DatabaseID, VoiceBundle>)field.GetValue(landfallContentDatabase);
			VoiceBundle[] array5 = PaoPaoDatas.GetAssetBundle("base").LoadAllAssets<VoiceBundle>();
			foreach (VoiceBundle val9 in array5)
			{
				dictionary6.Add(val9.Entity.GUID, val9);
			}
			field.SetValue(landfallContentDatabase, dictionary6);
			ServiceLocator.GetService<CustomContentLoaderModIO>().QuickRefresh((WorkshopContentType)0, (Action)null);
			new GameObject
			{
				hideFlags = (HideFlags)61,
				name = "core"
			}.AddComponent<ScenesManager>();
			Init2();
			DoTrans();
		}

		public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db)
		{
		}

		public static void TryChangeColorbyindex(this GameObject gameObject, Color color, int index)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			Material val = new Material(Shader.Find("Standard"));
			val.SetColor("_Color", color);
			val.SetFloat("_Mode", 3f);
			val.SetInt("_SrcBlend", 5);
			val.SetInt("_DstBlend", 10);
			val.EnableKeyword("_ALPHABLEND_ON");
			val.renderQueue = 3000;
			if (Object.op_Implicit((Object)(object)gameObject.GetComponentInChildren<TeamColor>()))
			{
				Object.Destroy((Object)(object)gameObject.GetComponentInChildren<TeamColor>());
			}
			Renderer[] componentsInChildren = gameObject.GetComponentsInChildren<Renderer>();
			for (int i = 0; i < componentsInChildren.Length; i++)
			{
				Material[] materials = componentsInChildren[i].materials;
				int num = 0;
				if (num < materials.Length)
				{
					componentsInChildren[i].materials[num] = val;
					break;
				}
			}
		}

		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 DestoryAll<T>(this GameObject game) where T : Object
		{
			if (Object.op_Implicit((Object)(object)game.GetComponentInChildren<T>()))
			{
				T[] componentsInChildren = game.GetComponentsInChildren<T>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					Object.Destroy((Object)(object)componentsInChildren[i]);
				}
			}
		}

		public static GameObject CreateNewMove(string name, int id = 0)
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Expected O, but got Unknown
			GameObject obj = UPool.MyPool.AddObject(name, (GameObject)SLMALoader.SDic["moves"]["Halfling_Jump"], true, (HideFlags)52, (Sprite)null, id, false);
			obj.DestoryAll<DodgeMove>();
			((UnityEventBase)obj.GetComponentInChildren<ConditionalEvent>().events[0].turnOnEvent).RemoveAllListeners();
			((UnityEventBase)obj.GetComponentInChildren<ConditionalEvent>().events[0].continuousEvent).RemoveAllListeners();
			return obj;
		}

		public static void SetMoveConditionalValue(this 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 static bool LoadAssetBundle(SLMABundleMod mod, string name)
		{
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_027f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c0: Unknown result type (might be due to invalid IL or missing references)
			AssetBundle assetBundle = mod.GetAssetBundle(name);
			if (!Object.op_Implicit((Object)(object)assetBundle))
			{
				return false;
			}
			GameObject[] array = assetBundle.LoadAllAssets<GameObject>();
			foreach (GameObject val in array)
			{
				if (val.GetComponentInChildren<IDatabaseEntity>() != null)
				{
					IDatabaseEntity componentInChildren = val.GetComponentInChildren<IDatabaseEntity>();
					Dictionary<DatabaseID, GameObject> dictionary = new Dictionary<DatabaseID, GameObject>();
					if (componentInChildren is WeaponItem)
					{
						dictionary = HelpLibrary.m_weapons;
					}
					else if (componentInChildren is SpecialAbility)
					{
						dictionary = HelpLibrary.m_combatMoves;
					}
					else if (componentInChildren is PropItem)
					{
						dictionary = HelpLibrary.m_characterProps;
					}
					else if (componentInChildren is Unit)
					{
						dictionary = HelpLibrary.m_unitBases;
					}
					else if (componentInChildren is ProjectileEntity)
					{
						dictionary = HelpLibrary.m_projectiles;
					}
					Debug.Log((object)("[FhpSlib]Load:" + val.GetComponentInChildren<IDatabaseEntity>().Entity.Name));
					dictionary.Add(val.GetComponentInChildren<IDatabaseEntity>().Entity.GUID, val.gameObject);
					Dictionary<DatabaseID, Object> dictionary2 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
					dictionary2.Add(val.GetComponentInChildren<IDatabaseEntity>().Entity.GUID, (Object)(object)val.gameObject);
					typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary2);
					if (componentInChildren is WeaponItem)
					{
						HelpLibrary.m_weapons = dictionary;
					}
					else if (componentInChildren is SpecialAbility)
					{
						HelpLibrary.m_combatMoves = dictionary;
					}
					else if (componentInChildren is PropItem)
					{
						HelpLibrary.m_characterProps = dictionary;
					}
					else if (componentInChildren is Unit)
					{
						HelpLibrary.m_unitBases = dictionary;
					}
					else if (componentInChildren is ProjectileEntity)
					{
						HelpLibrary.m_projectiles = dictionary;
					}
				}
			}
			UnitBlueprint[] array2 = assetBundle.LoadAllAssets<UnitBlueprint>();
			foreach (UnitBlueprint val2 in array2)
			{
				Dictionary<DatabaseID, UnitBlueprint> unitBlueprints = HelpLibrary.m_unitBlueprints;
				unitBlueprints.Add(val2.Entity.GUID, val2);
				Dictionary<DatabaseID, Object> dictionary3 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
				dictionary3.Add(val2.Entity.GUID, (Object)(object)val2);
				typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary3);
				HelpLibrary.m_unitBlueprints = unitBlueprints;
			}
			Faction[] array3 = assetBundle.LoadAllAssets<Faction>();
			foreach (Faction val3 in array3)
			{
				Dictionary<DatabaseID, Faction> factions = HelpLibrary.m_factions;
				factions.Add(val3.Entity.GUID, val3);
				Dictionary<DatabaseID, Object> dictionary4 = (Dictionary<DatabaseID, Object>)typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(ContentDatabase.Instance().AssetLoader);
				dictionary4.Add(val3.Entity.GUID, (Object)(object)val3);
				typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(ContentDatabase.Instance().AssetLoader, dictionary4);
				HelpLibrary.m_factions = factions;
			}
			return true;
		}

		public static void AddTransl(string key, string trans)
		{
			//IL_0085: 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++)
			{
				dictionary2[dictionary[i]].Add(key, array[i]);
			}
			typeof(Localizer).GetField("m_localization", BindingFlags.Static | BindingFlags.NonPublic).SetValue(typeof(Localizer), dictionary2);
		}

		public static void DoTrans()
		{
			AddTransl("祖国人", "祖国人#Homelander#祖国の人々#Heimatvolk#Peuple du pays#Люди Родины#Povo da Pátria#Popolo della Patria");
			AddTransl("祖国人激光", "祖国人激光#Homelander Laser#祖国の人々 レーザー#Heimatvolk Laser#Peuple du pays Laser#Люди Родины Лазер#Povo da Pátria Laser#Popolo della Patria Laser");
			AddTransl("祖国人武器切换", "祖国人武器切换#Homelander Weapon Switch#祖国の人々 武器切り替え#Heimatvolk Waffenwechsel#Peuple du pays Changement d'arme#Люди Родины Смена оружия#Povo da Pátria Troca de Arma#Popolo della Patria Cambio Arma");
			AddTransl("祖国人拳头", "祖国人拳头#Homelander Fist#祖国の人々 拳#Heimatvolk Faust#Peuple du pays Poing#Люди Родины Кулак#Povo da Pátria Punho#Popolo della Patria Pugno");
			AddTransl("时间倒流", "时间倒流#Time Reversal#時間逆転#Zeitrücklauf#Inversion du temps#Обратное время#Reversão do tempo#Inversione del tempo");
			AddTransl("时空炸弹", "时空炸弹#Space-time Bomb#時空爆弾#Raum-Zeit-Bombe#Bombe espace-temps#Пространственно-временная бомба#Bomba de espaço-tempo#Bombardamento spaziotemporale");
			AddTransl("猎空", "猎空#Tracer#スカイハンター#Himmeljäger#Chasseur céleste#Небесный охотник#Caçador do céu#Cacciatore celeste");
			AddTransl("猎枪", "猎枪#Hunting Rifle#ハンティングライフル#Jagdgewehr#Fusil de chasse#Охотничье ружье#Rifle de caça#Fucile da caccia");
			AddTransl("毁灭战士", "毁灭战士#Doom guy#ドゥームウォリアー#Zerstörungskrieger#Guerrier de l'apocalypse#Воин гибели#Guerreiro da ruína#Guerriero della distruzione");
			AddTransl("毁灭大剑", "毁灭大剑#Doom Greatsword#ドゥームグレートソード#Zerstörungsgroßschwert#Grande épée de l'apocalypse#Громадный меч гибели#Grande espada da ruína#Gran spada della distruzione");
			AddTransl("超级霰弹枪", "超级霰弹枪#Super Shotgun#スーパーショットガン#Super-Schrotflinte#Super fusil à pompe#Супердробовик#Super Escopeta#Fucile a pompa super");
			AddTransl("毁灭战士武器切换", "毁灭战士武器切换#Doom guy Weapon Switch#ドゥームウォリアー 武器切り替え#Waffe wechseln Guerrier de l'apocalypse#Guerrier changement d'arme#Переключение оружия воина гибели#Mudar Arma Guerreiro da ruína#Cambio Arma Guerriero della distruzione");
			AddTransl("自我治愈", "自我治愈#Self Healing#セルフヒーリング#Selbstheilung#Auto-guérison#Самолечение#Auto Cura#Auto Guarigione");
			AddTransl("毁灭手刀", "毁灭手刀#Doom Hand Blade#ドゥームハンドブレード#Zerstörung handklinge#Lame de main de l'apocalypse#Клинок руки гибели#Lâmina da mão da ruína#Lama a mano della distruzione");
			AddTransl("冰冻发射", "冰冻发射#Ice Blast#アイスブラスト#Eisstoß#Blast de glace#Ледяной всплеск#Explosão de gelo#Esplosione di ghiaccio");
			AddTransl("冰冻子弹", "冰冻子弹#Freeze Bullets#凍結弾丸#Eisige Kugeln#Balles gelées#Замораживающие пули#Balas congelantes#Proiettili congelati");
			AddTransl("闪电侠", "闪电侠#Flash#稲妻の男#Blitzmann#Homme éclair#Мужчина молния#Homem raio#Uomo fulmine");
			AddTransl("虚化", "虚化#Phasing#フェージング#Phasing#Phase#Фазирование#Faseamento#Faseamento");
			AddTransl("瞬移", "瞬移#Teleportation#テレポーテーション#Teleportation#Téléportation#Телепортация#Teletransporte#Teletrasporto");
			AddTransl("龙卷风", "龙卷风#Tornado#トルネード#Tornado#Tornade#Торнадо#Tornado#Tornado");
			AddTransl("高达", "高达#Gundam#Gundam#Gundam#Гандам#Gundam#Gundam#Gundam");
			AddTransl("高达剑", "高达剑#Gundam Sword#Gundam Katana#Gundam-Schwert#Épée Gundam#Ручной меч Гандама#Espada Gundam#Spada Gundam");
			AddTransl("高达枪", "高达枪#Gundam Gun#Gundam Rifle#Gundam-Gewehr#Fusil Gundam#Ружьё Гандама#Pistola Gundam#Fucile Gundam");
			AddTransl("牙狼", "牙狼#GARO#GARO#Vampirjäger#Chasseur de vampires#Вампир-охотник#Cazador de vampiros#Cacciatore di vampiri");
			AddTransl("牙狼马", "牙狼马#GARO Horse#GARO Stallion#Vampirjäger Pferd#Cheval de chasseur de vampires#Конь Вампир-охотника#Caballo Cazador de vampiros#Cavallo Cacciatore di vampiri");
			AddTransl("牙狼剑", "牙狼剑#GARO Sword#GARO Katana#Vampirjäger Schwert#Épée Chasseur de vampires#Ручной меч Вампир-охотника#Spada Cazador de vampiros#Spada Cacciatore di vampiri");
			AddTransl("斩马刀", "斩马刀#Slashing Horse Sword#Slashing Horse Katana#Pferdeschwert#Épée à cheval#Ручной меч для коня#Spada per cavallo#Spada da cavallo");
			AddTransl("烈火月牙", "烈火月牙#Fiery Moon Tooth#Fiery Moon Fang#Feuermond-Zahn#Dents de lune incandescente#Огненный лунный зуб#Dientes de luna ardiente#Denti di luna ardente");
			AddTransl("闪光剑舞", "闪光剑舞#Flashy Sword Dance#Flashy Sword Ballet#Blitzschwert-Tanz#Danse des éclairs#Мгновенный танец с мечом#Baile de flash#Danze di flash");
			AddTransl("牙狼变身", "牙狼变身#GARO Transformation#GARO Metamorphosis#Vampirjäger Verwandlung#Transformation Chasseur de vampires#Преобразование Вампир-охотника#Transformación Cazador de vampiros#Trasformazione Cacciatore di vampiri");
			AddTransl("金刚不坏-低配", "金刚不坏-低配#Vajra Unbreakable-Low Grade#Vajra Unbreakable-Low Power#Vajra Unbreakable-Niedrigstufe#Vajra Unbreakable-Bas niveau#Ваджра Непобедимый-Лow Grade#Vajra No Puede Ser Derrotado-Bajo Potencia#Vajra Imprunescibile-Bassa Potenza");
			AddTransl("高达盾", "高达盾#Gundam Shield#Gundam Schild#Gundam-Schild#Bouclier Gundam#Щит Гандама#Scudo Gundam#Scudo Gundam");
			AddTransl("高达武器切换", "高达武器切换#Gundam Weapon Switch#Gundam Waffenwechsel#Gundam-Waffe-Auswahl#Armes Gundam#Оружие Гандама#Armas Gundam#Armi Gundam");
			AddTransl("无声超农拳", "无声超农拳#Silent Overlord Fist#無聲超農拳#Der Stille Überherrliche Faust#Silent Seigneur Fiste#Бесшумный Господарь П Fist#Silencioso Señor de la Fuerza#Silenzioso Signore della Fista");
			AddTransl("近战无敌躲闪", "近战无敌躲闪#Close-Range Invincibility Dodge#近戰無敵躲閃#Nahe Kampf Unbesiegbarer Ausweich#Combats Proches Invincibles Évitement#Ближний бой Непобедимый Уклон#Pelea Cercana Invencible Evitación#Lotta Vicina Invincibile Evitamento");
			AddTransl("牙狼-二阶段", "牙狼-二阶段#Tooth Wolf - Second Stage#牙狼-二阶段#Der Zahnwolf - Zweite Phase#La Louve Dentaire - Deuxième Phase#Зубной Волк - Вторая Фаза#Lobezno - Fase 2#Lupo Dentato - Fase 2");
			AddTransl("金刚狼爪子", "金刚狼爪子#Wolverine Claw#金剛狼爪子#Der Vajra-Wolf-Kralle#Griffe de Loup de Vajra#Золотой Волк Коготь#Garra de Lobo de Vajra#Artiglio di Lupo di Vajra");
			AddTransl("死侍-刀", "死侍-刀#Deadpool - Blade#死侍-刀#Der Todesdienst - Klinge#Serviteur de la Mort - Épée#Слуга Смерти - Меч#Sirviente de la Muerte - Espada#Servitore della Morte - Spada");
			AddTransl("死侍", "死侍#Deadpool#死侍#Todesdienst#Serviteur de la Mort#Слуга Смерти#Sirviente de la Muerte#Servitore della Morte");
			AddTransl("金刚狼", "金刚狼#Wolverine#金剛狼#Der Vajra-Wolf#Loupe de Vajra#Золотой Волк#Lobo de Vajra#Lupo di Vajra");
			AddTransl("死侍小刀", "死侍小刀#Deadpool Short Sword#死侍小刀#Der Todesdienst - Kurze Schwert#Courte Épée de Serviteur de la Mort#Краткая Мечь Слуги Смерти#Corta Espada de Sirviente de la Muerte#Spada Corta del Servitore della Morte");
			AddTransl("死侍飞刀", "死侍飞刀#Deadpool Flying Blade#死侍飞刀#Der Todesdienst - Fliegende Klinge#Épée Volante de Serviteur de la Mort#Летящий Мечь Слуги Смерти#Cuchilla Voladora del Sirviente de la Muerte#Spada Volante del Servitore della Morte");
			AddTransl("死侍飞旋", "死侍飞旋#Deadpool Flying Spin#死侍飞旋#Der Todesdienst - Fliegende Drehung#Tourbillon Volant de Serviteur de la Mort#Летящий Вращение Слуги Смерти#Giro Volador del Sirviente de la Muerte#Giro Volante del Servitore della Morte");
			AddTransl("死侍手雷", "死侍手雷#Deadpool Hand Thunder#死侍手雷#Der Todesdienst - Hand-Donner#Foudre de la Main de Serviteur de la Mort#Рукавица Молнии Слуги Смерти#Relámpago de la Mano del Sirviente de la Muerte#Lampo della Mano del Servitore della Morte");
			AddTransl("死侍长刀", "死侍长刀#Deadpool Long Sword#死侍长刀#Der Todesdienst - Lange Schwert#Épée Longue de Serviteur de la Mort#Длинная Мечь Слуги Смерти#Espada Larga del Sirviente de la Muerte#Spada Lunga del Servitore della Morte");
			AddTransl("黄金沙鹰", "黄金沙鹰#Golden Sand Eagle#黄金沙鹰#Der goldene Sand-Eagle#Aigle d'Or des Dunes#Золотой песчаный Орёл#Águila de Oro de la Arena#Aquila d'Oro della Sabbia");
		}

		private static void Init2()
		{
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0154: Expected O, but got Unknown
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Expected O, but got Unknown
			//IL_0195: 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)
			Faction val = SLMATool.CreateFaction("MULTIVERSE", (UnitBlueprint[])null, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 4132534);
			GameObject val2 = CreateNewMove("PerMove");
			GameObject obj = UPool.MyPool.AddObject("金刚不坏", val2, true, (HideFlags)52, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 112111126, true);
			((CharacterItem)obj.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			obj.AddComponent<SuperArmor>().armorhealth = 1000f;
			UnitBlueprint val3 = SLMATool.CreateUnit("祖国人", (UnitBlueprint)null, val, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("homelander"));
			val3.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val3.m_props = (GameObject[])(object)new GameObject[1] { PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("祖国人") };
			val3.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[5]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("祖国人激光发射"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("祖国人武器切换"),
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Hover"],
				UPool.MyPool.GetObject("金刚不坏")
			};
			val3.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(NeverStopRunning) };
			val3.health = 8000f;
			val3.forceCost = 10000u;
			val3.massMultiplier = 5f;
			val3.attackSpeedMultiplier = -1f;
			val3.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("HomeLander");
			val3.movementSpeedMuiltiplier = 3f;
			val3.LeftWeapon = UPool.MyPool.GetObject("无声超农拳");
			val3.RightWeapon = UPool.MyPool.GetObject("无声超农拳");
			val3.holdinigWithTwoHands = false;
			val3.animationMultiplier = 1.4f;
			val3.stepMultiplier = 0.71428573f;
			val3.Validate();
			Init3();
		}

		private static void Init3()
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Expected O, but got Unknown
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Expected O, but got Unknown
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Expected O, but got Unknown
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Expected O, but got Unknown
			CreateNewMove("PerMove2");
			GameObject val = UPool.MyPool.AddObject("不易摔倒", (GameObject)SLMALoader.SDic["moves"]["Hover"], true, (HideFlags)52, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 112133, true);
			val.GetComponentInChildren<Wings>().flightForce = 0.0001f;
			((CharacterItem)val.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("时空炸弹").AddComponent<TimeBoom>();
			GameObject val2 = UPool.MyPool.AddObject("时间倒流", (GameObject)SLMALoader.SDic["moves"]["BallAndChain_Jump"], true, (HideFlags)52, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 11214548, true);
			val2.AddComponent<TimeRepeater>();
			PlaySoundEffect val3 = val2.TryGetC<PlaySoundEffect>();
			if (Object.op_Implicit((Object)(object)val3))
			{
				val3.SoundRef = "MULTIVERSE/LieKong back";
				val3.PlayOnAwake = false;
			}
			((CharacterItem)val2.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			Object.Destroy((Object)(object)val2.GetComponentInChildren<DodgeMove>());
			UnitBlueprint val4 = SLMATool.CreateUnit("猎空", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("猎空图标"));
			val4.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val4.m_props = (GameObject[])(object)new GameObject[1] { PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猎空") };
			val4.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				val,
				val2,
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("近战无敌躲闪"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("时空炸弹Move")
			};
			val4.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val4.health = 4000f;
			val4.forceCost = 5000u;
			val4.massMultiplier = 5f;
			val4.attackSpeedMultiplier = -1f;
			val4.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("LieKong");
			val4.movementSpeedMuiltiplier = 3f;
			val4.LeftWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猎枪");
			val4.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猎枪");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猎枪").GetComponent<RangeWeapon>()
				.ObjectToSpawn = (GameObject)SLMALoader.SDic["projectiles"]["P_PulseSMG"];
			val4.holdinigWithTwoHands = false;
			val4.animationMultiplier = 1.4f;
			val4.stepMultiplier = 0.71428573f;
			val4.Validate();
			Init4();
		}

		public static T TryGetC<T>(this GameObject g) where T : MonoBehaviour
		{
			if ((Object)(object)g.GetComponentInChildren<T>() != (Object)null)
			{
				return g.GetComponentInChildren<T>();
			}
			return g.AddComponent<T>();
		}

		private static void Init4()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			//IL_0265: Unknown result type (might be due to invalid IL or missing references)
			//IL_026b: Expected O, but got Unknown
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Expected O, but got Unknown
			//IL_029a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a0: Unknown result type (might be due to invalid IL or missing references)
			CreateNewMove("PerMove3");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭大剑_W").AddComponent<SpSword>();
			GameObject obj = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("冰冻发射");
			((CharacterItem)obj.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			obj.AddComponent<HMP>().project = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("冰冻子弹");
			UnitBlueprint val = SLMATool.CreateUnit("毁灭战士", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("毁灭战士logo"));
			val.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭战士_P").AddComponent<HealSelf>();
			val.m_props = (GameObject[])(object)new GameObject[1] { PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭战士_P") };
			WeaponChanger weaponChanger = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭战士武器切换").AddComponent<WeaponChanger>();
			weaponChanger.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭大剑_W");
			weaponChanger.shrink = false;
			((Component)weaponChanger).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			((Component)weaponChanger).GetComponent<ConditionalEvent>().controllableByPlayer = false;
			WeaponChanger weaponChanger2 = ((Component)PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭战士武器切换").transform.GetChild(0)).gameObject.AddComponent<WeaponChanger>();
			weaponChanger2.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("超级霰弹枪_W");
			weaponChanger2.shrink = false;
			((Component)weaponChanger2).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			((Component)weaponChanger2).GetComponent<ConditionalEvent>().controllableByPlayer = false;
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[6]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("冰冻发射"),
				UPool.MyPool.GetObject("不易摔倒"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("自我治愈"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭战士武器切换"),
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				(GameObject)SLMALoader.SDic["moves"]["Fencer_Dodge"]
			};
			val.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val.health = 6611.5703f;
			val.forceCost = 10000u;
			val.massMultiplier = 5f;
			val.sizeMultiplier = 1.1f;
			val.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("空VB");
			val.movementSpeedMuiltiplier = 3f;
			val.LeftWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭手刀_W");
			val.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("超级霰弹枪_W");
			val.holdinigWithTwoHands = false;
			val.Validate();
			Init5();
		}

		private static void Init5()
		{
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Expected O, but got Unknown
			//IL_005c: 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_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022f: Expected O, but got Unknown
			//IL_024b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Expected O, but got Unknown
			//IL_026d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Expected O, but got Unknown
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0295: Expected O, but got Unknown
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Expected O, but got Unknown
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d9: Expected O, but got Unknown
			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Expected O, but got Unknown
			//IL_0309: Unknown result type (might be due to invalid IL or missing references)
			//IL_030f: Unknown result type (might be due to invalid IL or missing references)
			CreateNewMove("PerMove4");
			UnitBlueprint val = SLMATool.CreateUnit("闪电侠", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("flash"));
			val.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val.m_props = (GameObject[])(object)new GameObject[2]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("闪电侠_P"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("闪电侠_P - 虚化")
			};
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("闪电侠_P").AddComponent<HealSelfS>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("闪电侠_P").AddComponent<FlashPro>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("虚化").AddComponent<FlashMode>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移").AddComponent<FlashAss>();
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[17]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("瞬移"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("虚化"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("龙卷风"),
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Quickdraw"],
				(GameObject)SLMALoader.SDic["moves"]["Dodge"]
			};
			val.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepPreferredDistance) };
			val.health = 5200f;
			val.maxSizeRandom = 0f;
			val.minSizeRandom = 0f;
			val.animationMultiplier = 11.2f;
			val.stepMultiplier = 5f / 56f;
			val.forceCost = 5200u;
			val.turnSpeed = 100f;
			val.movementSpeedMuiltiplier = 52f;
			val.sizeMultiplier = 1f;
			val.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("闪电侠");
			val.holdinigWithTwoHands = false;
			val.Validate();
			Init6();
		}

		private static void Init6()
		{
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0236: Expected O, but got Unknown
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_024a: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0319: Unknown result type (might be due to invalid IL or missing references)
			//IL_0323: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateNewMove("PerMove5");
			GameObject obj = UPool.MyPool.AddObject("金刚不坏-低配", val, true, (HideFlags)52, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 1781626, true);
			((CharacterItem)obj.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			obj.AddComponent<SuperArmor>().armorhealth = 500f;
			UnitBlueprint val2 = SLMATool.CreateUnit("高达", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("高达logo"));
			val2.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达base");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达base").AddComponent<Robot>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达剑").AddComponent<ExplosionDoWhenAttack>();
			WeaponChanger weaponChanger = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达武器切换").AddComponent<WeaponChanger>();
			weaponChanger.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达剑");
			weaponChanger.shrink = false;
			((Component)weaponChanger).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			((Component)weaponChanger).GetComponent<ConditionalEvent>().controllableByPlayer = false;
			WeaponChanger weaponChanger2 = ((Component)PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达武器切换").transform.GetChild(0)).gameObject.AddComponent<WeaponChanger>();
			weaponChanger2.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达枪");
			weaponChanger2.shrink = false;
			((Component)weaponChanger2).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			((Component)weaponChanger2).GetComponent<ConditionalEvent>().controllableByPlayer = false;
			val2.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				UPool.MyPool.GetObject("金刚不坏-低配"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达武器切换"),
				(GameObject)SLMALoader.SDic["moves"]["SkeletonGiant_Damage_L"]
			};
			val2.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val2.health = 888.8889f;
			val2.forceCost = 8000u;
			val2.massMultiplier = 5f;
			val2.sizeMultiplier = 3f;
			val2.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("空VB");
			val2.movementSpeedMuiltiplier = 3f;
			val2.LeftWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达盾");
			val2.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达枪");
			Transform transform = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("高达剑").transform;
			transform.localScale *= 2f;
			Transform transform2 = val2.RightWeapon.transform;
			transform2.localScale *= 2f;
			val2.holdinigWithTwoHands = false;
			val2.Validate();
			Init7();
		}

		private static void Init7()
		{
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Expected O, but got Unknown
			//IL_0101: Expected O, but got Unknown
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Expected O, but got Unknown
			//IL_0194: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Expected O, but got Unknown
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Expected O, but got Unknown
			//IL_031e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03eb: Expected O, but got Unknown
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040c: Expected O, but got Unknown
			//IL_0427: Unknown result type (might be due to invalid IL or missing references)
			//IL_042d: Expected O, but got Unknown
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_044e: Expected O, but got Unknown
			//IL_0469: Unknown result type (might be due to invalid IL or missing references)
			//IL_046f: Expected O, but got Unknown
			//IL_0492: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Expected O, but got Unknown
			//IL_0539: Unknown result type (might be due to invalid IL or missing references)
			//IL_053f: Expected O, but got Unknown
			//IL_0583: Unknown result type (might be due to invalid IL or missing references)
			//IL_0589: Expected O, but got Unknown
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = CreateNewMove("PerMove6");
			GameObject val2 = UPool.MyPool.AddObject("变身出场", val, true, (HideFlags)52, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("multiverse logo"), 1132133, true);
			((CharacterItem)val2.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			((CharacterItem)val2.GetComponentInChildren<SpecialAbility>()).Entity.SpriteIcon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("牙狼logo");
			val2.AddComponent<YaLangSpawn>().sword = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼剑base");
			UnitBlueprint val3 = SLMATool.CreateUnit("牙狼", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("牙狼logo"));
			val3.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼base");
			val3.UnitBase.AddComponent<YaLangNotDie>();
			val3.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[5]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼变身"),
				(GameObject)SLMALoader.SDic["moves"]["Dodge"],
				val2
			};
			val3.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val3.health = 3000f;
			val3.forceCost = 8000u;
			val3.massMultiplier = 100f;
			val3.sizeMultiplier = 1f;
			val3.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("牙狼VB");
			val3.movementSpeedMuiltiplier = 2f;
			val3.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼剑");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼剑").AddComponent<SpSword>();
			val3.holdinigWithTwoHands = true;
			val3.Validate();
			UnitBlueprint val4 = SLMATool.CreateUnit("牙狼-二阶段", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)null, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("牙狼logo"));
			val4.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼的马");
			val4.UnitBase.AddComponent<YaLangHorse>().newskill = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("闪光剑舞");
			val4.UnitBase.GetComponent<YaLangHorse>().target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼剑");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼变身").GetComponentInChildren<UnitSpawner>()
				.unitBlueprint = val4;
			val4.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(NeverStopRunning) };
			val4.health = 5000f;
			val4.forceCost = 8000u;
			val4.massMultiplier = 100f;
			val4.sizeMultiplier = 1f;
			val4.balanceMultiplier *= 100f;
			val4.balanceForceMultiplier *= 100f;
			val4.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("牙狼马VB");
			val4.movementSpeedMuiltiplier = 6f;
			val4.Validate();
			val4.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[6]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["Wings_Leg_SuperP"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"]
			};
			UnitBlueprint val5 = SLMATool.CreateUnit("牙狼-二阶段-", (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)null, PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("牙狼logo"));
			val5.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼二形态base");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("牙狼变身").GetComponentInChildren<UnitSpawner>()
				.unitBlueprint = val4;
			s.SetField<UnitBlueprint>(val4, "Riders", (object)new UnitBlueprint[1] { val5 });
			val5.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[5]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("剑气"),
				UPool.MyPool.GetObject("金刚不坏-低配"),
				(GameObject)SLMALoader.SDic["moves"]["Dodge"]
			};
			val5.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val5.health = 5000f;
			val5.forceCost = 8000u;
			val5.massMultiplier = 5f;
			val5.sizeMultiplier = 1.1f;
			val5.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("牙狼VB");
			val5.movementSpeedMuiltiplier = 1f;
			val5.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("斩马剑");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("斩马剑").AddComponent<SpSword>();
			val5.holdinigWithTwoHands = false;
			val5.Validate();
			Init8();
		}

		private static void Init8()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Expected O, but got Unknown
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0157: Expected O, but got Unknown
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Expected O, but got Unknown
			//IL_0193: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Expected O, but got Unknown
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Expected O, but got Unknown
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			CreateNewMove("PerMove7");
			UnitBlueprint val = SLMATool.CreateUnit("金刚狼", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("金刚A梦"));
			val.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val.m_props = (GameObject[])(object)new GameObject[2]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("金刚狼"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("金刚狼爪子")
			};
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("金刚狼").AddComponent<HealSelf>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("金刚狼").AddComponent<JinGangZhua>();
			val.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭手刀_W");
			val.LeftWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("毁灭手刀_W");
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[6]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Quickdraw"],
				(GameObject)SLMALoader.SDic["moves"]["Jump_Berserker"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				(GameObject)SLMALoader.SDic["moves"]["Dodge"]
			};
			val.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(NeverStopRunning) };
			val.health = 4000f;
			val.maxSizeRandom = 0f;
			val.minSizeRandom = 0f;
			val.forceCost = 4000u;
			val.turnSpeed = 100f;
			val.movementSpeedMuiltiplier = 3f;
			val.attackSpeedMultiplier = -1f;
			val.sizeMultiplier = 1f;
			val.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("狼叔VB");
			val.holdinigWithTwoHands = false;
			val.Validate();
			Init9();
		}

		private static void Init9()
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Expected O, but got Unknown
			//IL_0234: Unknown result type (might be due to invalid IL or missing references)
			//IL_023a: Expected O, but got Unknown
			//IL_0255: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Expected O, but got Unknown
			//IL_0276: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Expected O, but got Unknown
			//IL_0297: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Expected O, but got Unknown
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Expected O, but got Unknown
			//IL_02da: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e0: Expected O, but got Unknown
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
			CreateNewMove("PerMove8");
			UnitBlueprint val = SLMATool.CreateUnit("死侍", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("漫威知名出生"));
			val.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val.m_props = (GameObject[])(object)new GameObject[2]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("漫威知名出生"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("漫威知名出生-刀")
			};
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("漫威知名出生").AddComponent<HealSelf>();
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("漫威知名出生").AddComponent<SiShiNotDie>();
			val.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("黄金沙鹰");
			val.LeftWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("黄金沙鹰");
			SiShiChangeWeapon siShiChangeWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍武器切换").AddComponent<SiShiChangeWeapon>();
			siShiChangeWeapon.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍长刀");
			siShiChangeWeapon.shrink = false;
			((Component)siShiChangeWeapon).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			SiShiChangeWeapon siShiChangeWeapon2 = ((Component)PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍武器切换").transform.GetChild(0)).gameObject.AddComponent<SiShiChangeWeapon>();
			siShiChangeWeapon2.target = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("黄金沙鹰");
			siShiChangeWeapon2.shrink = false;
			((Component)siShiChangeWeapon2).GetComponent<ConditionalEvent>().events[0].conditions[0].cooldownRange = 0f;
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[10]
			{
				UPool.MyPool.GetObject("不易摔倒"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍武器切换"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍飞旋"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("死侍飞刀"),
				(GameObject)SLMALoader.SDic["moves"]["ProjectileDodge_Quickdraw"],
				(GameObject)SLMALoader.SDic["moves"]["Move_SpeedExplosions_Chariot_Horse"],
				(GameObject)SLMALoader.SDic["moves"]["SwordArtParry"],
				(GameObject)SLMALoader.SDic["moves"]["BlockAlways"],
				(GameObject)SLMALoader.SDic["moves"]["Jester_Kick"],
				(GameObject)SLMALoader.SDic["moves"]["Dodge"]
			};
			val.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(NeverStopRunning) };
			val.health = 4000f;
			val.maxSizeRandom = 0f;
			val.minSizeRandom = 0f;
			val.forceCost = 4000u;
			val.turnSpeed = 100f;
			val.movementSpeedMuiltiplier = 3f;
			val.attackSpeedMultiplier = 3f;
			val.sizeMultiplier = 1f;
			val.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("死侍VB");
			val.holdinigWithTwoHands = false;
			val.Validate();
			Init10();
		}

		private static void Init10()
		{
			//IL_0015: 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_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_0127: Unknown result type (might be due to invalid IL or missing references)
			UnitBlueprint val = SLMATool.CreateUnit("壶魔神", (UnitBlueprint)null, (Faction)SLMATool.SLMADic["MULTIVERSE"], PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("强欲之壶logo"));
			val.UnitBase = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("猛男v3");
			val.m_props = (GameObject[])(object)new GameObject[3]
			{
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("壶魔神"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("壶魔神2"),
				PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("壶魔神3")
			};
			val.RightWeapon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("念力宝剑");
			PaoPaoDatas.GetAssetBundle("base").LoadAsset<GameObject>("念力宝剑").AddComponent<NianSword>();
			val.holdinigWithTwoHands = true;
			GameObject val2 = UPool.MyPool.AddObject("壶魔神", CreateNewMove("PerMove9"), true, (HideFlags)52, (Sprite)null, 324343, true);
			((CharacterItem)val2.GetComponentInChildren<SpecialAbility>()).tags = new List<Tag>
			{
				new Tag
				{
					tagType = (TagType)0,
					value = "MULTIVERSE"
				}
			};
			((CharacterItem)val2.GetComponentInChildren<SpecialAbility>()).Entity.SpriteIcon = PaoPaoDatas.GetAssetBundle("base").LoadAsset<Sprite>("强欲之壶logo");
			val2.AddComponent<Hu>();
			val.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val2 };
			val.health = 4000f;
			val.maxSizeRandom = 0f;
			val.minSizeRandom = 0f;
			val.forceCost = 2000u;
			val.sizeMultiplier = 1f;
			val.voiceBundle = PaoPaoDatas.GetAssetBundle("base").LoadAsset<VoiceBundle>("空VB");
			val.Validate();
		}
	}
	[BepInPlugin("multiverse", "fhp.cc.multiverse", "1.0.0")]
	internal class Loader : BaseUnityPlugin
	{
		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 WaitForSecondsRealtime(0.3f);
			SLMALoader.GetInstance();
			LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
			UManager.Init(landfallContentDatabase);
			new Harmony(UManager.modname).PatchAll();
			GOSLMA.EditWeapons = ((GOSLMA.EditWeapons == null) ? new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons) : ((Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons), GOSLMA.EditWeapons)));
			GOSLMA.EditClothes = ((GOSLMA.EditClothes == null) ? new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes) : ((Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes), GOSLMA.EditClothes)));
			GOSLMA.EditCombatMoves = ((GOSLMA.EditCombatMoves == null) ? new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves) : ((Action<GameObject, int, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves), GOSLMA.EditCombatMoves)));
			GOSLMA.CodeAfterSpawn = ((GOSLMA.CodeAfterSpawn == null) ? new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn) : ((Action<Unit, LandfallContentDatabase>)Delegate.Combine(new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn), GOSLMA.CodeAfterSpawn)));
			GOSLMA.EditProjectiles = ((GOSLMA.EditProjectiles == null) ? new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles) : ((Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles), GOSLMA.EditProjectiles)));
			UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>();
			for (int i = 0; i < array.Length; i++)
			{
				UManager.EditBlueprint(array[i], landfallContentDatabase);
			}
			Debug.Log((object)("Loaded " + UManager.modname + " Successfully"));
			Debug.Log((object)(UManager.modname + "is made in SFT by FhpSlime"));
			Debug.Log((object)(UManager.modder + "wished you a pleasant trip"));
		}
	}
}
public static class STool
{
	public static void RendererColorChanger(Renderer[] renderers, Color color)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < renderers.Length; i++)
		{
			Material[] materials = renderers[i].materials;
			for (int j = 0; j < materials.Length; j++)
			{
				materials[j].color = color;
			}
		}
	}

	public static List<T> ToList<T>(T[] ts)
	{
		List<T> list = new List<T>();
		foreach (T item in ts)
		{
			list.Add(item);
		}
		return list;
	}

	public static void RendererColorChanger(MeshRenderer[] renderers, Color color)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < renderers.Length; i++)
		{
			Material[] materials = ((Renderer)renderers[i]).materials;
			for (int j = 0; j < materials.Length; j++)
			{
				materials[j].color = color;
			}
		}
	}

	public static void RendererColorChanger(SkinnedMeshRenderer[] renderers, Color color)
	{
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		for (int i = 0; i < renderers.Length; i++)
		{
			Material[] materials = ((Renderer)renderers[i]).materials;
			for (int j = 0; j < materials.Length; j++)
			{
				materials[j].color = color;
			}
		}
	}

	public static void RendererColorChanger(Renderer[] renderers, Material[] color)
	{
		for (int i = 0; i < renderers.Length; i++)
		{
			renderers[i].materials = color;
		}
	}

	public static void RendererColorChanger(MeshRenderer[] renderers, Material[] color)
	{
		for (int i = 0; i < renderers.Length; i++)
		{
			((Renderer)renderers[i]).materials = color;
		}
	}

	public static void RendererColorChanger(SkinnedMeshRenderer[] renderers, Material[] color)
	{
		for (int i = 0; i < renderers.Length; i++)
		{
			((Renderer)renderers[i]).materials = color;
		}
	}

	public static Vector3 AddV3(Vector3 vector3, float x, float y, float z)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		return new Vector3(vector3.x + x, vector3.y + y, vector3.z + z);
	}
}
public class ScenesManager : MonoBehaviour
{
	public ScenesManager()
	{
		SceneManager.sceneLoaded += SceneLoaded;
	}

	public void SceneLoaded(Scene scene, LoadSceneMode loadSceneMode)
	{
		//IL_0145: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Expected O, but got Unknown
		//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Expected O, but got Unknown
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Expected O, but got Unknown
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		if (((Scene)(ref scene)).name == "UnitCreator_GamepadUI")
		{
			((MonoBehaviour)this).StartCoroutine(AddScroll());
			UnitEditorManager component = ((Scene)(ref scene)).GetRootGameObjects().ToList().Find((GameObject x) => Object.op_Implicit((Object)(object)x.GetComponent<UnitEditorManager>()))
				.GetComponent<UnitEditorManager>();
			List<UnitBaseWrapper> list = component.UnitBases.ToList();
			foreach (Unit basis in PaoPaoDatas.UnitBasesData.bases)
			{
				UnitBlueprint val = SLMATool.CreateUnit("MoreContent Custom:" + basis.Entity.Name, (UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)null, (Sprite)null);
				val.UnitBase = ((Component)basis).gameObject;
				list.Add(new UnitBaseWrapper
				{
					BaseDisplayName = basis.Entity.Name,
					BaseIcon = basis.Entity.SpriteIcon,
					UnitBaseBlueprint = val,
					UnitBaseRestriction = (UnitBaseRestrictions)0
				});
			}
			component.UnitBases = list.ToArray();
		}
		if (!PaoPaoDatas.HiddenWeapons.scences.Contains(((Scene)(ref scene)).name))
		{
			return;
		}
		GameObject val2 = new GameObject("Core");
		GameObject[] array = PaoPaoDatas.HiddenWeapons.secrets[((Scene)(ref scene)).name];
		for (int i = 0; i < array.Length; i++)
		{
			Renderer[] componentsInChildren = Object.Instantiate<GameObject>(array[i], val2.transform).GetComponentsInChildren<Renderer>();
			foreach (Renderer val3 in componentsInChildren)
			{
				List<Material> list2 = new List<Material>();
				Material[] materials = val3.materials;
				foreach (Material val4 in materials)
				{
					if (((Object)val4).name.Contains("RP_"))
					{
						if (((Object)val4).name.Replace("RP_", "").Contains("Unit_Red"))
						{
							list2.Add(((Renderer)((GameObject)SLMALoader.SDic["bases"]["Humanoid"]).GetComponentInChildren<SkinnedMeshRenderer>()).materials[0]);
						}
					}
					else
					{
						list2.Add(val4);
					}
				}
				val3.materials = list2.ToArray();
			}
		}
	}

	public IEnumerator AddScroll()
	{
		yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)GameObject.Find("Unit Editor UI/BigUI/AddContentPage/Scroll View") != (Object)null));
		if (!Object.op_Implicit((Object)(object)GameObject.Find("Unit Editor UI/BigUI/UnitBase").GetComponent<ScrollRect>()))
		{
			OtherLibrary.DeepCopyOf<ScrollRect>(GameObject.Find("Unit Editor UI/BigUI/UnitBase").AddComponent<ScrollRect>(), GameObject.Find("Unit Editor UI/BigUI/AddContentPage/Scroll View").GetComponentInChildren<ScrollRect>());
			GameObject val = Object.Instantiate<GameObject>(((Component)GameObject.Find("Unit Editor UI/BigUI/AddContentPage/Scroll View").transform.GetChild(1)).gameObject, GameObject.Find("Unit Editor UI/BigUI/UnitBase").transform);
			GameObject.Find("Unit Editor UI/BigUI/UnitBase").GetComponentInChildren<ScrollRect>().verticalScrollbar = val.GetComponentInChildren<Scrollbar>();
			GameObject.Find("Unit Editor UI/BigUI/UnitBase").GetComponentInChildren<ScrollRect>().viewport = ((Component)GameObject.Find("Unit Editor UI/BigUI/UnitBase").transform.GetChild(1)).GetComponentInChildren<RectTransform>();
			GameObject.Find("Unit Editor UI/BigUI/UnitBase").GetComponentInChildren<ScrollRect>().content = ((Component)GameObject.Find("Unit Editor UI/BigUI/UnitBase").transform.GetChild(1)).GetComponentInChildren<RectTransform>();
		}
	}
}
namespace MULTIVERSE
{
	public class WeaponTrail : MonoBehaviour
	{
		public void Update()
		{
			if (!((Component)this).GetComponentInChildren<MeleeWeapon>().isSwinging)
			{
				if (((Component)this).GetComponentInChildren<TrailRenderer>().emitting)
				{
					((Component)this).GetComponentInChildren<TrailRenderer>().emitting = false;
					((Component)this).GetComponentsInChildren<TrailRenderer>()[1].emitting = false;
				}
			}
			else if (!((Component)this).GetComponentInChildren<TrailRenderer>().emitting)
			{
				((Component)this).GetComponentInChildren<TrailRenderer>().emitting = true;
				((Component)this).GetComponentsInChildren<TrailRenderer>()[1].emitting = true;
			}
		}
	}
}
public class HomeLanderEyes : Move
{
	public Transform[] eyes;

	public GameObject project;

	public Unit unit;

	public Color target;

	private Color org;

	private void Start()
	{
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		unit = ((Component)this).GetComponentInParent<Unit>();
		eyes = (Transform[])(object)new Transform[2]
		{
			((Component)((Component)unit).GetComponentInChildren<PropItem>()).transform.GetChild(0).GetChild(0).GetChild(1),
			((Component)((Component)unit).GetComponentInChildren<PropItem>()).transform.GetChild(1).GetChild(0).GetChild(1)
		};
		Transform[] array = eyes;
		foreach (Transform val in array)
		{
			s.AddCopiedComponent<RangeWeapon>(((Component)val).gameObject, ((GameObject)SLMALoader.SDic["weapons"]["Leg_WizardStaff"]).GetComponentInChildren<RangeWeapon>());
			((Component)val).gameObject.GetComponentInChildren<RangeWeapon>().ObjectToSpawn = project;
			((Weapon)((Component)val).gameObject.GetComponentInChildren<RangeWeapon>()).connectedData = ((Component)this).GetComponentInParent<Unit>().data;
			((Component)val).gameObject.AddComponent<ShootPosition>();
			org = ((Component)val).gameObject.GetComponentInChildren<Renderer>().materials[0].color;
		}
	}

	public override void DoMove(Rigidbody enemyWeapon, Rigidbody enemyTorso, DataHandler targetData)
	{
		((MonoBehaviour)this).StartCoroutine_Auto(Attack(enemyTorso));
	}

	private IEnumerator Attack(Rigidbody enemyTorso)
	{
		((Component)((Component)this).GetComponentInParent<Unit>().data.head).GetComponentInChildren<GooglyEye>().SetState((EyeState)0);
		Transform[] array = eyes;
		foreach (Transform val in array)
		{
			ChineseLibrary.颜色设置(((Component)val).gameObject, target);
			RangeWeapon componentInChildren = ((Component)val).gameObject.GetComponentInChildren<RangeWeapon>();
			Vector3 position = val.position;
			Vector3 val2 = val.position - enemyTorso.position;
			((Weapon)componentInChildren).Attack(position, enemyTorso, ((Vector3)(ref val2)).normalized, false);
		}
		yield return (object)new WaitForSeconds(0.6f);
		Transform[] array2 = eyes;
		for (int j = 0; j < array2.Length; j++)
		{
			ChineseLibrary.颜色设置(((Component)array2[j]).gameObject, org);
		}
	}
}
public class WeaponChange : Move
{
	public bool shrink;

	public GameObject target;

	private bool changing;

	public override void DoMove(Rigidbody enemyWeapon, Rigidbody enemyTorso, DataHandler targetData)
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Invalid comparison between Unknown and I4
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_012a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
		Unit component = ((Component)((Component)this).transform.root).GetComponent<Unit>();
		bool num = (int)((Component)this).GetComponent<ConditionalEvent>().events[0].conditions[0].valueType == 1;
		float value = ((Component)this).GetComponent<ConditionalEvent>().events[0].conditions[0].value;
		if (num)
		{
			if (Vector3.Distance(component.data.mainRig.position, enemyTorso.position) < value && Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.holdingHandler.leftObject) && ((CharacterItem)((Component)component.holdingHandler.leftObject).GetComponentInChildren<WeaponItem>()).Entity.GUID.m_modID != ((CharacterItem)target.GetComponentInChildren<WeaponItem>()).Entity.GUID.m_modID && !changing)
			{
				Call();
			}
		}
		else if (Vector3.Distance(component.data.mainRig.position, enemyTorso.position) > value && Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.holdingHandler.leftObject) && ((CharacterItem)((Component)component.holdingHandler.leftObject).GetComponentInChildren<WeaponItem>()).Entity.GUID.m_modID != ((CharacterItem)target.GetComponentInChildren<WeaponItem>()).Entity.GUID.m_modID && !changing)
		{
			Call();
		}
	}

	private void Start()
	{
		changing = false;
	}

	private void Call()
	{
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		Unit component = ((Component)((Component)this).transform.root).GetComponent<Unit>();
		changing = true;
		Holdable rightObject = component.holdingHandler.rightObject;
		Holdable leftObject = component.holdingHandler.leftObject;
		component.holdingHandler.LetGoOfAll();
		Object.Destroy((Object)(object)((Component)rightObject).gameObject);
		Object.Destroy((Object)(object)((Component)leftObject).gameObject);
		component.unitBlueprint.SetWeapon(component, component.Team, target, (PropItemData)null, (HandType)0, ((Component)component.data.mainRig).transform.rotation, new List<GameObject>(), false);
		component.holdingHandler.rightHandActivity = (HandActivity)1;
		component.unitBlueprint.SetWeapon(component, component.Team, target, (PropItemData)null, (HandType)1, ((Component)component.data.mainRig).transform.rotation, new List<GameObject>(), false);
		component.holdingHandler.leftHandActivity = (HandActivity)2;
		component.data.weaponHandler.fistRefernce = null;
		component.m_AttackDistance = ((Weapon)target.GetComponentInChildren<MeleeWeapon>()).maxRange;
		component.m_PreferedDistance = ((Weapon)target.GetComponentInChildren<MeleeWeapon>()).maxRange + 0.5f;
		component.api.UpdateECSValues();
		changing = false;
	}
}
namespace MULTIVERSE
{
	public static class PaoPaoDatas
	{
		public static class Tools
		{
			public static class Debug
			{
				public static void Log(object con)
				{
					if (Dev_mode)
					{
						Debug.Log(con);
					}
				}

				public static void LogWarning(object con)
				{
					if (Dev_mode)
					{
						Debug.LogWarning(con);
					}
				}

				public static void LogError(object con)
				{
					if (Dev_mode)
					{
						Debug.LogError(con);
					}
				}
			}
		}

		public static class HiddenWeapons
		{
			public static List<SecretUnlock> unlocks = new List<SecretUnlock>();

			public static List<string> scences = new List<string>();

			public static Dictionary<string, GameObject[]> secrets = new Dictionary<string, GameObject[]>();

			public static void LoadAssets(AssetBundle bundle)
			{
				Tools.Debug.Log(((Object)bundle).name);
				Tools.Debug.Log(bundle.LoadAllAssets<SecretUnlock>().Length);
				GameObject[] array = bundle.LoadAllAssets<GameObject>();
				foreach (GameObject val in array)
				{
					if (Object.op_Implicit((Object)(object)val.GetComponent<SecretUnlock>()))
					{
						SecretUnlock component = val.GetComponent<SecretUnlock>();
						unlocks.Add(component);
						Tools.Debug.Log(((Object)((Component)component).gameObject).name);
						string[] array2 = ((Object)((Component)component).gameObject).name.Split(new string[1] { "#" }, StringSplitOptions.RemoveEmptyEntries);
						((Object)((Component)component).gameObject).name = array2[1];
						if (!scences.Contains(array2[0]))
						{
							scences.Add(array2[0]);
						}
						if (secrets.ContainsKey(array2[0]))
						{
							List<GameObject> list = secrets[array2[0]].ToList();
							list.Add(((Component)component).gameObject);
							secrets[array2[0]] = list.ToArray();
						}
						else
						{
							secrets.Add(array2[0], (GameObject[])(object)new GameObject[1] { ((Component)component).gameObject });
						}
					}
				}
			}
		}

		public static class UnitBasesData
		{
			public static List<Unit> bases = new List<Unit>();
		}

		public static class ClothesData
		{
			public static Dictionary<string, GameObject> clothes = new Dictionary<string, GameObject>();

			public static Dictionary<string, UnitBlueprint> clothesprint = new Dictionary<string, UnitBlueprint>();
		}

		public static Dictionary<string, AssetBundle> bundlepools = new Dictionary<string, AssetBundle>();

		public static bool Dev_mode = true;

		public static AssetBundle GetAssetBundle(string name)
		{
			if (name == null)
			{
				return null;
			}
			if (bundlepools.ContainsKey(name))
			{
				return bundlepools[name];
			}
			return null;
		}

		public static void AddAssetBundle(string name, AssetBundle bundle)
		{
			if (name != null && !((Object)(object)bundle == (Object)null))
			{
				if (bundlepools.ContainsKey(name))
				{
					bundlepools.Add(name + "-", bundle);
				}
				else
				{
					bundlepools.Add(name, bundle);
				}
			}
		}
	}
}
[HarmonyPatch(typeof(CollisionWeapon), "OnCollisionEnter")]
internal class WeaponPatch
{
	[HarmonyPrefix]
	public static bool Prefix(CollisionWeapon __instance, Collision collision, ref MeleeWeapon ___meleeWeapon, ref Rigidbody ___rig, ref DataHandler ___connectedData)
	{
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		if (!Object.op_Implicit((Object)(object)((Component)__instance).GetComponentInChildren<SpSword>()) && Object.op_Implicit((Object)(object)collision.gameObject.GetComponentInParent<Unit>()) && Object.op_Implicit((Object)(object)((Component)collision.gameObject.GetComponentInParent<Unit>()).GetComponentInChildren<SuperArmor>()) && ((Component)collision.gameObject.GetComponentInParent<Unit>()).GetComponentInChildren<SuperArmor>().armorhealth >= __instance.damage && ((Component)__instance).GetComponentInParent<Unit>().Team != collision.gameObject.GetComponentInParent<Unit>().Team)
		{
			___meleeWeapon.StopSwing();
		}
		return true;
	}
}
[HarmonyPatch(typeof(ProjectileHit), "Hit")]
internal class ProjectilePatch
{
	[HarmonyPrefix]
	public static bool Prefix(ProjectileHit __instance, RaycastHit sentHit, float multiplier, ref MoveTransform ___move, ref RaycastTrail ___trail, ref TeamHolder ___teamHolder)
	{
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0074: Unknown result type (might be due to invalid IL or missing references)
		//IL_0088: Unknown result type (might be due to invalid IL or missing references)
		//IL_008d: Unknown result type (might be due to invalid IL or missing references)
		if (Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref sentHit)).transform).gameObject.GetComponentInParent<Unit>()) && Object.op_Implicit((Object)(object)((Component)((Component)((RaycastHit)(ref sentHit)).transform).gameObject.GetComponentInParent<Unit>()).GetComponentInChildren<SuperArmor>()) && ((Component)((Component)((RaycastHit)(ref sentHit)).transform).gameObject.GetComponentInParent<Unit>()).GetComponentInChildren<SuperArmor>().armorhealth >= __instance.damage)
		{
			if (Object.op_Implicit((Object)(object)___move))
			{
				___move.velocity = Vector3.Reflect(___move.velocity, ((RaycastHit)(ref sentHit)).normal) * Random.Range(0.2f, 0.4f);
			}
			if (Object.op_Implicit((Object)(object)___trail))
			{
				___trail.ignoredFrames = 3;
			}
			return false;
		}
		return true;
	}
}
public class SuperArmor : MonoBehaviour
{
	public float armorhealth;
}
public class TimeReBei : MonoBehaviour
{
	private List<Vector3> vector3 = new List<Vector3>();

	private List<Quaternion> quaternions = new List<Quaternion>();

	private List<Vector3> local = new List<Vector3>();

	public bool retime;

	public void Update()
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: 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_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_0109: Unknown result type (might be due to invalid IL or missing references)
		//IL_0144: Unknown result type (might be due to invalid IL or missing references)
		if (!retime)
		{
			vector3.Add(((Component)this).gameObject.transform.position);
			quaternions.Add(((Component)this).transform.rotation);
			local.Add(((Component)this).transform.localScale);
			return;
		}
		int num = Mathf.CeilToInt(5f);
		for (int i = 0; i < num; i++)
		{
			if (vector3.Count < 1 || quaternions.Count < 1 || local.Count < 1)
			{
				vector3.Clear();
				quaternions.Clear();
				local.Clear();
				retime = false;
				break;
			}
			((Component)this).transform.position = vector3[vector3.Count - 1];
			vector3.RemoveAt(vector3.Count - 1);
			((Component)this).transform.rotation = quaternions[quaternions.Count - 1];
			quaternions.RemoveAt(quaternions.Count - 1);
			((Component)this).transform.localScale = local[local.Count - 1];
			local.RemoveAt(local.Count - 1);
		}
	}
}
public class TimeRepeater : Move
{
	private Unit unit;

	private TeamSystem m_teamSystem;

	private List<Unit> m_allUnits;

	private Dictionary<Team, List<Unit>> m_teamUnits;

	private Dictionary<Team, List<Unit>> m_winConditionUnits;

	public int retime;

	public void Start()
	{
		unit = ((Component)this).GetComponentInParent<Unit>();
		m_teamSystem = World.Active.GetOrCreateManager<TeamSystem>();
		m_allUnits = (List<Unit>)s.GetField<TeamSystem>(m_teamSystem, "m_allUnits");
		m_teamUnits = (Dictionary<Team, List<Unit>>)s.GetField<TeamSystem>(m_teamSystem, "m_teamUnits");
		m_winConditionUnits = (Dictionary<Team, List<Unit>>)s.GetField<TeamSystem>(m_teamSystem, "m_winConditionUnits");
		unit.data.healthHandler.willBeRewived = true;
		unit.data.healthHandler.AddDieAction((Action)TimeRe);
		Rigidbody[] componentsInChildren = ((Component)unit).GetComponentsInChildren<Rigidbody>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			((Component)componentsInChildren[i]).gameObject.AddComponent<TimeReBei>();
		}
	}

	public override void DoMove(Rigidbody enemyWeapon, Rigidbody enemyTorso, DataHandler targetData)
	{
		throw new NotImplementedException();
	}

	private void PreventGameEnd()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		if (m_winConditionUnits.ContainsKey(unit.Team))
		{
			m_winConditionUnits[unit.Team].Add(unit);
		}
	}

	private void FixUnitFromTeamSystem()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		if (m_winConditionUnits.ContainsKey(unit.Team))
		{
			List<Unit> list = m_winConditionUnits[unit.Team];
			while (list.Contains(unit))
			{
				list.Remove(unit);
			}
		}
		bool flag = m_winConditionUnits.ContainsKey((Team)0) && m_winConditionUnits[(Team)0].Count != 0;
		bool flag2 = m_winConditionUnits.ContainsKey((Team)1) && m_winConditionUnits[(Team)1].Count != 0;
		SetOnlyOneTeamAlive(flag != flag2);
	}

	private void SetOnlyOneTeamAlive(bool flag)
	{
		PropertyInfo property = typeof(TeamSystem).GetProperty("OnlyOneTeamAlive", (BindingFlags)(-1));
		if (property != null)
		{
			property.SetValue(m_teamSystem, flag);
		}
	}

	private void TimeRe()
	{
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
		if (retime < 3)
		{
			PreventGameEnd();
			unit.data.hasBeenRevived = true;
			unit.data.healthHandler.willBeRewived = false;
			ServiceLocator.GetService<GameModeService>().CurrentGameMode.OnUnitDied(unit);
			unit.dead = true;
			unit.data.Dead = true;
			((MonoBehaviour)this).StartCoroutine_Auto(SpawnStage());
			return;
		}
		unit.data.hasBeenRevived = true;
		unit.data.healthHandler.willBeRewived = false;
		ServiceLocator.GetService<GameModeService>().CurrentGameMode.OnUnitDied(unit);
		unit.dead = true;
		unit.data.Dead = true;
		if (m_winConditionUnits.ContainsKey(unit.Team))
		{
			List<Unit> list = m_winConditionUnits[unit.Team];
			while (list.Contains(unit))
			{
				list.Remove(unit);
			}
		}
		FixUnitFromTeamSystem();
	}

	private IEnumerator SpawnStage()
	{
		((Component)this).GetComponentInChildren<PlaySoundEffect>().Go();
		Rigidbody[] componentsInChildren = ((Component)unit).GetComponentsInChildren<Rigidbody>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)((Component)componentsInChildren[i]).gameObject.GetComponent<TimeReBei>()))
			{
				((Component)componentsInChildren[i]).gameObject.GetComponent<TimeReBei>().retime = true;
			}
		}
		((Component)unit).gameObject.AddComponent<ColorSwitch>().SwitchColor();
		yield return (object)new WaitForSeconds(2f);
		Rigidbody[] componentsInChildren2 = ((Component)unit).GetComponentsInChildren<Rigidbody>();
		for (int j = 0; j < componentsInChildren2.Length; j++)
		{
			if (Object.op_Implicit((Object)(object)((Component)componentsInChildren2[j]).gameObject.GetComponent<TimeReBei>()))
			{
				((Component)componentsInChildren2[j]).gameObject.GetComponent<TimeReBei>().retime = false;
			}
		}
		Object.Destroy((Object)(object)((Component)unit).gameObject.GetComponent<ColorSwitch>());
		Unit component = unit.unitBlueprint.Spawn(unit.data.mainRig.position, ((Component)unit).transform.rotation, unit.Team, 1f, (UnitPoolInfo?)null)[0].GetComponent<Unit>();
		Rigidbody[] allRigs = component.data.allRigs.AllRigs;
		Rigidbody[] allRigs2 = unit.data.allRigs.AllRigs;
		for (int k = 0; k < allRigs.Length; k++)
		{
			allRigs[k].position = allRigs2[k].position;
			((Component)allRigs[k]).transform.localScale = ((Component)allRigs2[k]).transform.localScale;
			allRigs[k].rotation = allRigs2[k].rotation;
		}
		ParticleSystem[] componentsInChildren3 = ((Component)((Component)component).gameObject.transform.Find("SpawnEffects")).GetComponentsInChildren<ParticleSystem>();
		for (int l = 0; l < componentsInChildren3.Length; l++)
		{
			componentsInChildren3[l].maxParticles = 0;
		}
		retime++;
		((Component)component).GetComponentInChildren<TimeRepeater>().retime = retime;
		Object.Destroy((Object)(object)((Component)unit).gameObject);
	}
}
[RequireComponent(typeof(MoveTransform), typeof(SpellTarget))]
public class MagicProjectiel : MonoBehaviour
{
	private MoveTransform move;

	public Transform upTarget;

	public float minRot = 300f;

	public float maxRot = 700f;

	public float drag = 15f;

	public float force = 50f;

	public float upForce = 200f;

	public AnimationCurve upForceOverRange;

	public AnimationCurve upForceOverTimes;

	public AnimationCurve dragOverTime;

	public AnimationCurve forceOverTime;

	public float preditction;

	private float rot;

	private float counter;

	private SpellTarget target;

	private string 作者 = "";

	private void Start()
	{
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		作者 = "by Fhp史莱姆";
		rot = Random.Range(minRot, maxRot);
		upTarget.Rotate(((Component)this).transform.forward * Random.Range(0f, 360f), (Space)0);
		move = ((Component)((Component)this).transform.root).GetComponent<MoveTransform>();
		target = ((Component)((Component)this).transform.root).GetComponent<SpellTarget>();
	}

	private void Update()
	{
		//IL_0186: Unknown result type (might be due to invalid IL or missing references)
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: