Decompiled source of Final 6 v0.0.2

Final 6.dll

Decompiled 2 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.BundleModCore;
using HarmonyLib;
using Landfall.TABS;
using SLMA;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Mod name")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("made in SFT 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 lxc2
{
	public static class UManager
	{
		public static string modname;

		public static string modder;

		private static string com;

		public static SLMABundleMod bundleMod;

		static UManager()
		{
			modname = "SFT";
			modder = "FhpSlime";
		}

		public static void SetRiders(UnitBlueprint me, UnitBlueprint[] riders)
		{
			s.SetField<UnitBlueprint>(me, "Riders", (object)riders);
		}

		public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db)
		{
			if (unit.Entity.Name == "偷盗等级30")
			{
				unit.health = 1000f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 5f;
				unit.sizeMultiplier = 1.1f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪武器");
				unit.holdinigWithTwoHands = true;
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[12]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪大腿盔甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪大臂"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪头盔"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪头部锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪小腿盔甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪手套"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪护肘"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪护膝"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪板甲衣"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪胫甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪裤子"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("中世纪锁子甲")
				});
			}
			if (unit.Entity.Name == "胡狼使者")
			{
				unit.health = 800f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 5f;
				unit.sizeMultiplier = 1.3f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵武器");
				unit.holdinigWithTwoHands = true;
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[12]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵头盔"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵头部锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵小腿锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵扎甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵扎甲裙甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵护臂"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵拖鞋"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵胖次"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵腰带"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵裙子"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("亡灵颈圈")
				});
			}
			if (unit.Entity.Name == "部落勇者")
			{
				unit.health = 800f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 3f;
				unit.sizeMultiplier = 1.2f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落武器");
				unit.holdinigWithTwoHands = true;
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[14]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落下摆"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落兽骨"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落大腿盔甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落头发"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落小肩甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落小腿盔甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落护腰"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落拖鞋"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落斗篷"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落肩甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落胖次"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落颈环"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落骨头腰带"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("部落胫甲")
				});
			}
			if (unit.Entity.Name == "瓦兰吉战士")
			{
				unit.health = 700f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 6f;
				unit.sizeMultiplier = 1.3f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代武器");
				unit.holdinigWithTwoHands = true;
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[14]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代头盔"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代小短裙"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代手套"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代扎甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代护心镜"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代护肘"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代护颈"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代绑腿"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代胫甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代腰带"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代裤子"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代软甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代锁子甲下摆"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("古代鞋子")
				});
			}
			if (unit.Entity.Name == "军中力士")
			{
				unit.health = 800f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 6f;
				unit.sizeMultiplier = 1.2f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝武器");
				unit.holdinigWithTwoHands = true;
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[7]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝包腰"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝头盔"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝布面甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝环臂铠"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝衬衫"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝裤子"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("王朝鞋子")
				});
			}
			if (unit.Entity.Name == "氏族战士")
			{
				unit.health = 600f;
				unit.forceCost = 1000u;
				unit.massMultiplier = 3f;
				unit.sizeMultiplier = 1.4f;
				unit.RightWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京盾");
				unit.LeftWeapon = bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京武器");
				ChineseLibrary.服装设置(unit, (GameObject[])(object)new GameObject[11]
				{
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京头盔"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京头部锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京小背心"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京斗篷"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京板条甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京绑腿"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京腰带"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京衣服"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京裤子"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京锁子甲"),
					bundleMod.GetAssetBundle("lxc2").LoadAsset<GameObject>("维京鞋子")
				});
			}
		}

		public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			Debug.Log((object)"Hey");
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Renderer[] componentsInChildren = cloth.GetComponentsInChildren<Renderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					componentsInChildren[i].materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Green_143734"] };
				}
			}
		}

		public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Transform transform = proj.transform;
				transform.localScale *= 3f;
			}
		}

		public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db)
		{
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: 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_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Expected O, but got Unknown
			//IL_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0142: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_016e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0173: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Expected O, but got Unknown
			//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_0229: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_023f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0244: Unknown result type (might be due to invalid IL or missing references)
			//IL_0249: Unknown result type (might be due to invalid IL or missing references)
			//IL_0253: Expected O, but got Unknown
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0310: Unknown result type (might be due to invalid IL or missing references)
			//IL_0315: Unknown result type (might be due to invalid IL or missing references)
			//IL_031a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0324: Expected O, but got Unknown
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 1)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(-1f, 1f),
					new Keyframe(1f, 1f),
					new Keyframe(5f, 4f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
			}
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 4)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(0f, 0f),
					new Keyframe(0f, 1f),
					new Keyframe(2f, 1f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
				move.GetComponentInChildren<DodgeMove>().forceMultiplier = -1f;
			}
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 3)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(1f, 0.1f),
					new Keyframe(1f, 0.1f),
					new Keyframe(1f, 0.1f),
					new Keyframe(1f, 0.1f),
					new Keyframe(1f, 0.1f)
				});
				move.GetComponentInChildren<DodgeMove>().forceMultiplier = 1f;
			}
			if (unit.unitBlueprint.Entity.Name == "666" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()) && index == 5)
			{
				move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
				{
					new Keyframe(4f, 0.5f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f),
					new Keyframe(0f, 0f)
				});
				move.GetComponentInChildren<DodgeMove>().forceMultiplier = -2f;
			}
		}

		public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				Transform head = unit.data.head;
				head.localScale *= 2f;
			}
		}

		public static void Init(LandfallContentDatabase db)
		{
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: 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_0107: Expected O, but got Unknown
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Expected O, but got Unknown
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Expected O, but got Unknown
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Expected O, but got Unknown
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0213: Expected O, but got Unknown
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Expected O, but got Unknown
			com = "Bundle Mod Init";
			com = "Bundle Mod Init";
			AssetBundle val;
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("lxc2"))
			{
				val = AssetBundle.LoadFromStream(stream);
			}
			if (Loader.BundleMode)
			{
				SLMABundleMod obj = SLMABundleMod.CreatSLMABundleMod("TestMod", "0.0.1");
				obj.AddAssetBundle("lxc2", val);
				obj.Dev_mode = true;
				obj.LoadAssetBundle("lxc2");
				bundleMod = obj;
			}
			MyModItems.GetInstance();
			com = "——————————Fations and Units——————————";
			Faction val2 = SLMATool.CreateFaction("Final 6", (UnitBlueprint[])null, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("派系icon"), 99134);
			val2.m_FactionColor = new Color(0.76f, 0.8f, 0f);
			SLMATool.CreateUnit("偷盗等级30", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("中世纪icon"));
			SLMATool.CreateUnit("胡狼使者", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("亡灵icon"));
			SLMATool.CreateUnit("瓦兰吉战士", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("古代icon"));
			SLMATool.CreateUnit("军中力士", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("王朝icon"));
			SLMATool.CreateUnit("氏族战士", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("维京icon"));
			SLMATool.CreateUnit("部落勇者", (UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_TRIBAL_CLUB"], val2, bundleMod.GetAssetBundle("lxc2").LoadAsset<Sprite>("部落icon"));
			com = "——————————Clothes——————————";
			com = "——————————Weapons——————————";
			com = "——————————Effects——————————";
			com = "——————————Explosions——————————";
			com = "——————————UnitBases——————————";
			com = "——————————Projectiles——————————";
			com = "——————————Moves——————————";
		}

		public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db)
		{
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Expected O, but got Unknown
			Debug.Log((object)weapon);
			if (unit.unitBlueprint.Entity.Name == "unit name")
			{
				MeshRenderer[] componentsInChildren = weapon.GetComponentsInChildren<MeshRenderer>();
				for (int i = 0; i < componentsInChildren.Length; i++)
				{
					((Renderer)componentsInChildren[i]).materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Red_212484"] };
				}
				range.numberOfObjects = 3;
				range.spread = 12f;
			}
		}

		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 void AddLocalization()
		{
			(string, string, string)[] array = new(string, string, string)[6]
			{
				("部落勇者", "Tribal Brave", "部落勇者"),
				("瓦兰吉战士", "Varangian warrior", "瓦兰吉战士"),
				("偷盗等级30", "Theft level 30", "偷盗等级30"),
				("氏族战士", "Clan Warrior", "氏族战士"),
				("军中力士", "army bruiser", "军中力士"),
				("胡狼使者", "Jackal Emissary", "胡狼使者")
			};
			Dictionary<Language, Dictionary<string, string>> dictionary = (Dictionary<Language, Dictionary<string, string>>)typeof(Localizer).GetField("m_localization", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null);
			try
			{
				for (int i = 0; i < array.Length; i++)
				{
					dictionary[(Language)0].Add(array[i].Item1, array[i].Item2);
					dictionary[(Language)7].Add(array[i].Item1, array[i].Item3);
				}
			}
			catch
			{
			}
		}
	}
	[BepInPlugin("LXC2", "LXC2", "1.0.0")]
	internal class Loader : BaseUnityPlugin
	{
		public static bool BundleMode;

		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);
			UManager.AddLocalization();
			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"));
		}

		static Loader()
		{
			BundleMode = true;
		}
	}
}
public class Item : MonoBehaviour
{
	public enum kind
	{
		Weapon,
		Cloth,
		Skill,
		Unit,
		Projectile,
		Other
	}

	public string name;

	public kind Kind;
}
namespace lxc2
{
	public class MyModItems : MonoBehaviour
	{
		private static Dictionary<string, Item> items;

		private static MyModItems instance { get; set; }

		public static MyModItems GetInstance()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)instance == (Object)null)
			{
				instance = new GameObject("MyModItems").AddComponent<MyModItems>();
				Object.DontDestroyOnLoad((Object)(object)instance);
			}
			return instance;
		}

		public void AddItem(Item item)
		{
			items.Add(item.name, item);
		}

		public Item GetItem(string name)
		{
			Item value = new Item
			{
				name = null,
				Kind = Item.kind.Other
			};
			items.TryGetValue(name, out value);
			return value;
		}
	}
}
public class AddpParticle : MonoBehaviour
{
	public GameObject copy;

	public Vector3 vector3;

	public Vector3 scale;

	public Color color;

	private void Start()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Expected O, but got Unknown
		//IL_003a: 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_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject("poolp");
		val.transform.SetParent(((Component)this).transform);
		ParticleSystemRenderer[] componentsInChildren = copy.GetComponentsInChildren<ParticleSystemRenderer>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			GameObject obj = Object.Instantiate<GameObject>(((Component)componentsInChildren[i]).gameObject, ((Component)this).transform.position, ((Component)this).transform.rotation, val.transform);
			obj.transform.localScale = scale;
			obj.GetComponentInChildren<ParticleSystem>().loop = true;
			obj.GetComponentInChildren<ParticleSystem>().startColor = color;
		}
	}
}