Decompiled source of HeMoDingDing Mod v1.0.1

HeMoDingDingMod.dll

Decompiled a month 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 EzECS.Barriers;
using HarmonyLib;
using HeMoDingDingMod.ECS;
using HeMoDingDingMod.unity脚本;
using HeMoDingDingMod.unity脚本.检测相关类.基类;
using HeMoDingDingMod.unity脚本.蠕虫类;
using HeMoDingDingMod.unity脚本.补丁空间;
using HeMoDingDingMod.unity脚本.补丁空间.补丁添加进;
using HeMoDingDingMod.unity脚本.补丁空间.锁定胜利判断单例;
using HeMoDingDingMod.我的反射;
using HeMoDingDingMod.角色类.初王;
using HeMoDingDingMod.角色类.幸运方块j;
using HeMoDingDingMod.角色类.武装直升机;
using Landfall.TABC;
using Landfall.TABS;
using Landfall.TABS.AI.Components;
using Landfall.TABS.AI.Components.Modifiers;
using Landfall.TABS.AI.Components.Tags;
using Landfall.TABS.AI.Systems;
using Landfall.TABS.GameMode;
using Landfall.TABS.GameState;
using Landfall.TABS.UnitEditor;
using TFBGames;
using Unity.Collections;
using Unity.Entities;
using Unity.Jobs;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using ZhaoHuanshi.召唤类;

[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.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace ZhaoHuanshi.召唤类
{
	public enum SimulatedButtonType
	{
		Normal,
		Confirm,
		Cooldown
	}
	public class SimulatedButtonConfig
	{
		public string Key { get; set; }

		public string DisplayName { get; set; }

		public SimulatedButtonType Type { get; set; } = SimulatedButtonType.Normal;


		public Action OnClick { get; set; }

		public float CooldownSeconds { get; set; } = 1f;


		public string ConfirmMessage { get; set; } = "确认执行?";

	}
	public static class 模拟按钮管理器
	{
		private class ButtonState
		{
			public bool IsOnCooldown = false;

			public bool IsWaitingConfirm = false;

			public float LastClickTime = 0f;

			public SettingsInstance SettingsInstance;

			public SimulatedButtonConfig Config;
		}

		[CompilerGenerated]
		private sealed class <CooldownCoroutine>d__16 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public ButtonState state;

			private float <elapsed>5__1;

			private float <cooldown>5__2;

			private int <remaining>5__3;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <CooldownCoroutine>d__16(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<elapsed>5__1 = 0f;
					<cooldown>5__2 = state.Config.CooldownSeconds;
					UpdateButtonOptions(state, new string[2] { "冷却中...", "冷却中..." }, 0);
					break;
				case 1:
					<>1__state = -1;
					break;
				}
				if (<elapsed>5__1 < <cooldown>5__2)
				{
					<elapsed>5__1 += Time.deltaTime;
					if (<elapsed>5__1 < <cooldown>5__2)
					{
						<remaining>5__3 = Mathf.CeilToInt(<cooldown>5__2 - <elapsed>5__1);
						UpdateButtonOptions(state, new string[2]
						{
							$"冷却中 {<remaining>5__3}s",
							$"冷却中 {<remaining>5__3}s"
						}, 0);
					}
					<>2__current = null;
					<>1__state = 1;
					return true;
				}
				state.IsOnCooldown = false;
				UpdateButtonOptions(state, new string[2] { "点击执行", "已点击" }, 0);
				Debug.Log((object)("[模拟按钮管理器] 按钮 " + state.Config.Key + " 冷却结束"));
				return false;
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[CompilerGenerated]
		private sealed class <ResetButtonValueDelayed>d__19 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public ButtonState state;

			public float delay;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <ResetButtonValueDelayed>d__19(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_0027: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = (object)new WaitForSecondsRealtime(delay);
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					ResetButtonValue(state);
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private static GlobalSettingsHandler _settingsHandler;

		private static Dictionary<string, ButtonState> _buttonStates = new Dictionary<string, ButtonState>();

		private static MonoBehaviour _coroutineRunner;

		private static bool _isInitialized = false;

		public static void Initialize(MonoBehaviour coroutineRunner)
		{
			if (!_isInitialized)
			{
				_coroutineRunner = coroutineRunner;
				_settingsHandler = ServiceLocator.GetService<GlobalSettingsHandler>();
				if ((Object)(object)_settingsHandler == (Object)null)
				{
					Debug.LogError((object)"[模拟按钮管理器] 无法获取 GlobalSettingsHandler");
					return;
				}
				_isInitialized = true;
				Debug.Log((object)"[模拟按钮管理器] 初始化成功");
			}
		}

		public static void AddNormalButton(string key, string displayName, Action onClick)
		{
			SimulatedButtonConfig config = new SimulatedButtonConfig
			{
				Key = key,
				DisplayName = displayName,
				Type = SimulatedButtonType.Normal,
				OnClick = onClick
			};
			AddButton(config);
		}

		public static void AddCooldownButton(string key, string displayName, Action onClick, float cooldownSeconds = 1f)
		{
			SimulatedButtonConfig config = new SimulatedButtonConfig
			{
				Key = key,
				DisplayName = displayName,
				Type = SimulatedButtonType.Cooldown,
				OnClick = onClick,
				CooldownSeconds = cooldownSeconds
			};
			AddButton(config);
		}

		public static void AddConfirmButton(string key, string displayName, Action onClick, string confirmMessage = "确认执行?")
		{
			SimulatedButtonConfig config = new SimulatedButtonConfig
			{
				Key = key,
				DisplayName = displayName,
				Type = SimulatedButtonType.Confirm,
				OnClick = onClick,
				ConfirmMessage = confirmMessage
			};
			AddButton(config);
		}

		public static void AddButton(SimulatedButtonConfig config)
		{
			if (!_isInitialized)
			{
				Debug.LogError((object)"[模拟按钮管理器] 未初始化,请先调用 Initialize()");
				return;
			}
			try
			{
				if (_buttonStates.ContainsKey(config.Key))
				{
					Debug.LogWarning((object)("[模拟按钮管理器] 按钮已存在: " + config.Key));
					return;
				}
				ButtonState buttonState = new ButtonState
				{
					Config = config,
					IsOnCooldown = false,
					IsWaitingConfirm = false,
					LastClickTime = 0f
				};
				SettingsInstance val = (buttonState.SettingsInstance = CreateButtonSettingsInstance(config));
				AddToGameplaySettings(val);
				val.OnValueChanged += delegate(int value)
				{
					OnButtonValueChanged(config.Key, value > 0);
				};
				_buttonStates[config.Key] = buttonState;
				Debug.Log((object)("[模拟按钮管理器] 成功添加按钮: " + config.DisplayName + " (" + config.Key + ")"));
			}
			catch (Exception ex)
			{
				Debug.LogError((object)("[模拟按钮管理器] 添加按钮失败: " + ex.Message));
			}
		}

		private static SettingsInstance CreateButtonSettingsInstance(SimulatedButtonConfig config)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			SettingsInstance val = new SettingsInstance();
			val.localizeOptions = false;
			val.settingsType = (SettingsType)0;
			val.m_settingsKey = config.Key;
			val.settingName = config.DisplayName;
			val.toolTip = GetTooltipByType(config);
			val.options = new string[2] { "点击执行", "已点击" };
			val.defaultValue = 0;
			val.currentValue = 0;
			val.defaultSliderValue = 0f;
			val.currentSliderValue = 0f;
			val.min = 0f;
			val.max = 1f;
			return val;
		}

		private static string GetTooltipByType(SimulatedButtonConfig config)
		{
			return config.Type switch
			{
				SimulatedButtonType.Normal => "点击执行:" + config.DisplayName, 
				SimulatedButtonType.Confirm => "点击后需要再次确认:" + config.DisplayName, 
				SimulatedButtonType.Cooldown => $"点击执行(冷却 {config.CooldownSeconds} 秒):{config.DisplayName}", 
				_ => "点击执行:" + config.DisplayName, 
			};
		}

		private static void OnButtonValueChanged(string key, bool isClicked)
		{
			if (!_buttonStates.TryGetValue(key, out var value) || !isClicked)
			{
				return;
			}
			if (value.IsOnCooldown)
			{
				Debug.Log((object)("[模拟按钮管理器] 按钮 " + key + " 正在冷却中"));
				ResetButtonValue(value);
				return;
			}
			switch (value.Config.Type)
			{
			case SimulatedButtonType.Normal:
				ExecuteButtonClick(value);
				break;
			case SimulatedButtonType.Confirm:
				HandleConfirmButton(value);
				break;
			case SimulatedButtonType.Cooldown:
				HandleCooldownButton(value);
				break;
			}
		}

		private static void ExecuteButtonClick(ButtonState state)
		{
			try
			{
				Debug.Log((object)("[模拟按钮管理器] 按钮被点击: " + state.Config.DisplayName));
				state.Config.OnClick?.Invoke();
			}
			catch (Exception ex)
			{
				Debug.LogError((object)("[模拟按钮管理器] 按钮执行失败: " + ex.Message));
			}
			finally
			{
				_coroutineRunner.StartCoroutine(ResetButtonValueDelayed(state, 0.1f));
			}
		}

		private static void HandleConfirmButton(ButtonState state)
		{
			if (!state.IsWaitingConfirm)
			{
				state.IsWaitingConfirm = true;
				UpdateButtonOptions(state, new string[2] { "确认执行?", "取消" }, 0);
				Debug.Log((object)("[模拟按钮管理器] 请再次点击确认: " + state.Config.DisplayName));
			}
			else
			{
				state.IsWaitingConfirm = false;
				ExecuteButtonClick(state);
				UpdateButtonOptions(state, new string[2] { "点击执行", "已点击" }, 0);
			}
		}

		private static void HandleCooldownButton(ButtonState state)
		{
			state.IsOnCooldown = true;
			state.LastClickTime = Time.time;
			ExecuteButtonClick(state);
			_coroutineRunner.StartCoroutine(CooldownCoroutine(state));
		}

		[IteratorStateMachine(typeof(<CooldownCoroutine>d__16))]
		private static IEnumerator CooldownCoroutine(ButtonState state)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <CooldownCoroutine>d__16(0)
			{
				state = state
			};
		}

		private static void UpdateButtonOptions(ButtonState state, string[] options, int currentValue)
		{
			if (state.SettingsInstance != null)
			{
				state.SettingsInstance.options = options;
				state.SettingsInstance.currentValue = currentValue;
				FieldInfo field = typeof(SettingsInstance).GetField("OnValueChanged", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
			}
		}

		private static void ResetButtonValue(ButtonState state)
		{
			if (state.SettingsInstance != null)
			{
				typeof(SettingsInstance).GetField("currentValue", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)?.SetValue(state.SettingsInstance, 0);
			}
		}

		[IteratorStateMachine(typeof(<ResetButtonValueDelayed>d__19))]
		private static IEnumerator ResetButtonValueDelayed(ButtonState state, float delay)
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <ResetButtonValueDelayed>d__19(0)
			{
				state = state,
				delay = delay
			};
		}

		private static void AddToGameplaySettings(SettingsInstance instance)
		{
			FieldInfo field = typeof(GlobalSettingsHandler).GetField("m_gameplaySettings", BindingFlags.Instance | BindingFlags.NonPublic);
			List<SettingsInstance> list = ((SettingsInstance[])field.GetValue(_settingsHandler))?.ToList() ?? new List<SettingsInstance>();
			if (list.Any((SettingsInstance s) => s.m_settingsKey == instance.m_settingsKey))
			{
				Debug.LogWarning((object)("[模拟按钮管理器] 设置项已存在: " + instance.m_settingsKey));
				return;
			}
			list.Add(instance);
			field.SetValue(_settingsHandler, list.ToArray());
		}

		public static void RemoveButton(string key)
		{
			if (_buttonStates.ContainsKey(key))
			{
				FieldInfo field = typeof(GlobalSettingsHandler).GetField("m_gameplaySettings", BindingFlags.Instance | BindingFlags.NonPublic);
				List<SettingsInstance> list = ((SettingsInstance[])field.GetValue(_settingsHandler))?.ToList() ?? new List<SettingsInstance>();
				SettingsInstance val = ((IEnumerable<SettingsInstance>)list).FirstOrDefault((Func<SettingsInstance, bool>)((SettingsInstance s) => s.m_settingsKey == key));
				if (val != null)
				{
					list.Remove(val);
					field.SetValue(_settingsHandler, list.ToArray());
				}
				_buttonStates.Remove(key);
				Debug.Log((object)("[模拟按钮管理器] 已移除按钮: " + key));
			}
		}

		public static void ClearAllButtons()
		{
			foreach (string item in _buttonStates.Keys.ToList())
			{
				RemoveButton(item);
			}
		}
	}
}
namespace HeMoDingDingMod
{
	[BepInPlugin("HeMoDingDingMod", "HeMoDingDingMod", "1.0.0")]
	internal class Loader : BaseUnityPlugin
	{
		[CompilerGenerated]
		private sealed class <call>d__1 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public Loader <>4__this;

			private GameObject <HeMoDingdingDanli>5__1;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <call>d__1(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<HeMoDingdingDanli>5__1 = null;
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				//IL_003a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0044: Expected O, but got Unknown
				//IL_0087: Unknown result type (might be due to invalid IL or missing references)
				//IL_0091: Expected O, but got Unknown
				//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
				//IL_00cb: Expected O, but got Unknown
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					UManager.Init();
					<HeMoDingdingDanli>5__1 = new GameObject("HeMoDingdingDanli");
					Object.DontDestroyOnLoad((Object)(object)<HeMoDingdingDanli>5__1);
					<HeMoDingdingDanli>5__1.AddComponent<添加自定义内容>();
					Debug.Log((object)"黑莫丁丁mod已加载完毕");
					<>2__current = (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null));
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>2__current = (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null));
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -1;
					UManager.音库合并方法();
					多国语言部分333.添加语言();
					幸运方块加载类.更新列表();
					幸运方块加载类.更新爆炸对象列表();
					幸运方块加载类.更新效果对象列表();
					添加设置按钮.Initialize();
					模拟按钮管理器.Initialize((MonoBehaviour)(object)<>4__this);
					模拟按钮管理器.AddNormalButton("幸运方块刷新所有单位列表", "[幸运方块] 刷新所有单位列表", delegate
					{
						Debug.Log((object)"刷新列表!!");
						幸运方块加载类.更新列表();
					});
					模拟按钮管理器.AddNormalButton("幸运方块刷新爆炸物列表和效果列表", "[幸运方块] ", delegate
					{
						Debug.Log((object)"刷新列表!!");
						幸运方块加载类.更新爆炸对象列表();
						幸运方块加载类.更新效果对象列表();
					});
					添加设置按钮.AddToggle("单位测试模式", "[黑莫丁丁] 特色功能", HeMoDingDing游戏模式单例.Instance.IsLocked, delegate(bool isEnabled)
					{
						if (isEnabled)
						{
							HeMoDingDing游戏模式单例.Instance.Lock();
						}
						else
						{
							HeMoDingDing游戏模式单例.Instance.Unlock();
						}
						Debug.Log((object)("沉浸式模式" + (isEnabled ? "启用" : "禁用")));
					});
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		private void Awake()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"黑莫丁丁补丁注入中...");
			Harmony val = new Harmony("HeMoDingDingMod");
			val.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"黑莫丁丁补丁注入完成!");
			((MonoBehaviour)this).StartCoroutine(call());
		}

		[IteratorStateMachine(typeof(<call>d__1))]
		private IEnumerator call()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <call>d__1(0)
			{
				<>4__this = this
			};
		}
	}
	public static class UManager
	{
		public enum 对象类
		{
			单位模型,
			武器,
			技能,
			服饰,
			抛射物
		}

		public static string modname = "HeMoDingDingMod";

		public static AssetBundle ab;

		public static List<UnitBlueprint> 编辑器单位基础 = new List<UnitBlueprint>();

		public static int MYmodid = 228472303;

		public static int MYmodunitid = 62847203;

		public static void 音库合并方法()
		{
			SoundPlayer service = ServiceLocator.GetService<SoundPlayer>();
			if ((Object)(object)service == (Object)null)
			{
				Debug.LogError((object)"无法获取SoundPlayer服务");
				ab.Unload(false);
				return;
			}
			SoundBank soundBank = service.soundBank;
			if ((Object)(object)soundBank == (Object)null)
			{
				Debug.LogError((object)"SoundPlayer中的soundBank为空");
				ab.Unload(false);
				return;
			}
			SoundBank[] array = ab.LoadAllAssets<SoundBank>();
			if (array != null && array.Length != 0)
			{
				List<SoundBankCategory> list = soundBank.Categories?.ToList() ?? new List<SoundBankCategory>();
				SoundBank[] array2 = array;
				foreach (SoundBank val in array2)
				{
					if ((Object)(object)val != (Object)null && val.Categories != null)
					{
						list.AddRange(val.Categories);
						Debug.Log((object)$"已合并SoundBank: {((Object)val).name}, 类别数: {val.Categories.Length}");
					}
					else if ((Object)(object)val == (Object)null)
					{
						Debug.LogWarning((object)"遇到空的SoundBank引用,已跳过");
					}
					else
					{
						Debug.LogWarning((object)("SoundBank " + ((Object)val).name + " 的Categories为空"));
					}
				}
				soundBank.Categories = list.ToArray();
				Debug.Log((object)$"SoundBank合并完成,总类别数: {list.Count}");
			}
			else
			{
				Debug.LogWarning((object)"主AssetBundle中没有找到任何SoundBank");
			}
		}

		public static void Init()
		{
			//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_0243: Unknown result type (might be due to invalid IL or missing references)
			//IL_0260: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_0338: Unknown result type (might be due to invalid IL or missing references)
			//IL_048d: Unknown result type (might be due to invalid IL or missing references)
			//IL_049e: Unknown result type (might be due to invalid IL or missing references)
			//IL_054a: Unknown result type (might be due to invalid IL or missing references)
			//IL_05dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_05f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0659: Unknown result type (might be due to invalid IL or missing references)
			//IL_069f: Unknown result type (might be due to invalid IL or missing references)
			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_080d: Unknown result type (might be due to invalid IL or missing references)
			//IL_08c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_090c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a3a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b0a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0b89: Unknown result type (might be due to invalid IL or missing references)
			//IL_0d95: Unknown result type (might be due to invalid IL or missing references)
			//IL_0df4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e07: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e1a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e2d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0e99: Unknown result type (might be due to invalid IL or missing references)
			//IL_0eca: Unknown result type (might be due to invalid IL or missing references)
			//IL_114a: Unknown result type (might be due to invalid IL or missing references)
			//IL_1150: Unknown result type (might be due to invalid IL or missing references)
			//IL_1187: Unknown result type (might be due to invalid IL or missing references)
			//IL_1291: Unknown result type (might be due to invalid IL or missing references)
			//IL_12cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_12d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_1306: Unknown result type (might be due to invalid IL or missing references)
			//IL_131e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1336: Unknown result type (might be due to invalid IL or missing references)
			//IL_134e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1381: Unknown result type (might be due to invalid IL or missing references)
			//IL_1393: Unknown result type (might be due to invalid IL or missing references)
			//IL_13d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_1453: Unknown result type (might be due to invalid IL or missing references)
			//IL_1598: Unknown result type (might be due to invalid IL or missing references)
			//IL_159e: Unknown result type (might be due to invalid IL or missing references)
			//IL_1632: Unknown result type (might be due to invalid IL or missing references)
			Assembly executingAssembly = Assembly.GetExecutingAssembly();
			Stream manifestResourceStream = executingAssembly.GetManifestResourceStream("HeMoDingDingMod.hemodingdongsass");
			AssetBundle val = (ab = AssetBundle.LoadFromStream(manifestResourceStream));
			Material[] array = val.LoadAllAssets<Material>();
			if (array == null || array.Length == 0)
			{
				Debug.LogWarning((object)"主AssetBundle中没有找到任何材质");
			}
			else
			{
				Material[] array2 = array;
				foreach (Material val2 in array2)
				{
					if ((Object)(object)val2 == (Object)null)
					{
						Debug.LogWarning((object)"遇到空的材质引用,已跳过");
						continue;
					}
					if ((Object)(object)val2.shader == (Object)null)
					{
						Debug.LogWarning((object)("材质 " + ((Object)val2).name + " 的Shader为空,无法修复"));
						continue;
					}
					Shader val3 = Shader.Find(((Object)val2.shader).name);
					if ((Object)(object)val3 != (Object)null)
					{
						val2.shader = val3;
						Debug.Log((object)("修复材质: " + ((Object)val2).name + ", Shader: " + ((Object)val3).name));
					}
					else
					{
						Debug.LogWarning((object)("找不到Shader: " + ((Object)val2.shader).name + ", 材质: " + ((Object)val2).name));
					}
				}
			}
			Faction val4 = 游戏内容工具.创建派系("UNIT_KONGBUSHENGWU", null, val.LoadAsset<Sprite>("恐怖生物派系dsadsicon"), -4, 49582393);
			GameObject val5 = 游戏内容工具.注册单位Base(val.LoadAsset<GameObject>("世界吞噬者模型"));
			val5.GetComponentInChildren<平滑蠕虫跟随>().节间距 = 2f;
			val5.GetComponentInChildren<平滑蠕虫跟随>().最大允许距离倍数 = 0.9f;
			val5.GetComponentInChildren<吞噬者移动类>().巡游时间 = 7f;
			val5.GetComponentInChildren<吞噬者移动类>().转向速度 = 80f;
			UnitBlueprint val6 = 游戏内容工具.复制单位("UNIT_SHIJIETUNSHIZHE", 游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1166250463)), val4, val.LoadAsset<Sprite>("世界吞噬者dsfk"), (DatabaseID?)new DatabaseID(-3, 350452348));
			val6.UnitBase = val5;
			val6.sizeMultiplier = 0.8f;
			val6.health = 599f;
			val6.forceCost = 4800u;
			val6.SetUnitSounds("Secret Attack Vocals/Raptor", "Secret Death Vocals/Raptor", 0.6f);
			UnitBlueprint val7 = 游戏内容工具.复制单位("世界吞噬者基础蓝图", 游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1166250463)), (Faction)null, val.LoadAsset<Sprite>("世界吞噬者dsfk"), (DatabaseID?)new DatabaseID(-3, 345363465));
			val7.UnitBase = val5;
			编辑器单位基础.Add(val7);
			游戏内容工具.注册道具(游戏物品加入.Instance.创建物品("调整身体体节连接", val.LoadAsset<GameObject>("空服饰3453"), new DatabaseID(-3, 176742343))).AddComponent<蠕虫服饰调整>();
			游戏内容工具.注册道具(游戏物品加入.Instance.创建物品("调整蠕虫移动属性", val.LoadAsset<GameObject>("空服饰3453"), new DatabaseID(-3, 176742344))).AddComponent<蠕虫服饰调整2>();
			游戏内容工具.注册道具(游戏物品加入.Instance.创建物品("调整蠕虫移动属性2", val.LoadAsset<GameObject>("空服饰3453"), new DatabaseID(-3, 176742345))).AddComponent<蠕虫服饰调整3>();
			UnitBlueprint val8 = 游戏内容工具.复制单位("UNIT_HEIJIABUBUSIZHAN", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("玛丽卡死icon"), (DatabaseID?)new DatabaseID(-3, 312534211));
			val8.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[0];
			val8.health = 9000f;
			val8.massMultiplier = 20f;
			GameObject rightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("黑剑23243"), 对象类.武器);
			val8.RightWeapon = rightWeapon;
			val8.m_props = (GameObject[])(object)new GameObject[11]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯后披风"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯大腿护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯大臂护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯头盔"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯小腿护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯小臂护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯护膝"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯肩膀护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯胸甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯腰部护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("玛利喀斯鞋子"), 对象类.服饰)
			};
			GameObject val9 = 游戏内容工具.注册单位Base(游戏物品加入.Instance.创建物品("灰色人物模型", 获取工具.获取原版内容游戏物品("m_unitBases", new DatabaseID(-1, 1760500345)), new DatabaseID(-3, 13972330)));
			TeamColor[] componentsInChildren = val9.GetComponentsInChildren<TeamColor>();
			for (int j = 0; j < componentsInChildren.Length; j++)
			{
				componentsInChildren[j].blueMaterial = val.LoadAsset<Material>("低反射灰色12");
				componentsInChildren[j].redMaterial = val.LoadAsset<Material>("低反射灰色12");
			}
			val8.UnitBase = val9;
			val8.forceCost = 10000u;
			val8.SetUnitSounds("Reinassance Attack Vocals/Jouster", "Reinassance Attack Vocals/Jouster", 0.4f);
			UnitBlueprint val10 = 游戏内容工具.复制单位("UNIT_YILIUTI", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("遗留着uu"), (DatabaseID?)new DatabaseID(-3, 312534212));
			val10.forceCost = 120u;
			val10.m_props = (GameObject[])(object)new GameObject[7]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士大臂套"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士头部插件"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士小臂刺"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士躯干装饰剑"), 对象类.服饰),
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 1944888562)),
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 273394296))
			};
			val10.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("死亡剑士刀剑"), 对象类.武器);
			val10.health = 20f;
			val10.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("cd瞬移技能")) };
			val10.UnitBase = 获取工具.获取原版内容游戏物品("m_unitBases", new DatabaseID(-1, 1288909650));
			val10.SetUnitSounds("Reinassance Attack Vocals/Halberd", "Reinassance Death Vocals/Halberd", 0.5f);
			UnitBlueprint val11 = 游戏内容工具.复制单位("UNIT_KUANGBAOZHADANREN", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("精神病人32213"), (DatabaseID?)new DatabaseID(-3, 312534213));
			val11.sizeMultiplier = 1f;
			val11.health = 70f;
			val11.forceCost = 350u;
			val11.m_props = (GameObject[])(object)new GameObject[6]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才左腿装饰"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才的夹克"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才的脑袋"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才的连体服饰"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才背包342"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("爆破鬼才的轮子腰带"), 对象类.服饰)
			};
			val11.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("扔炸弹34"), 对象类.武器);
			val11.LeftWeapon = val11.RightWeapon;
			注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("大小炸弹34"), 对象类.抛射物);
			val11.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("桶装爆破进243")) };
			val11.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(NeverStopRunning) };
			val11.SetUnitSounds("Western Attack Vocals/Quickdraw", "Western Death Vocals/Quickdraw", 1.5f);
			UnitBlueprint val12 = 游戏内容工具.复制单位("UNIT_JUEXINGSHUBING", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("觉醒骷髅兵3we"), (DatabaseID?)new DatabaseID(-3, 312534214));
			val12.sizeMultiplier = 0.7f;
			val12.health = 200f;
			val12.forceCost = 500u;
			val12.m_props = (GameObject[])(object)new GameObject[4]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("觉醒骷髅大褂"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("觉醒骷髅帽子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("觉醒骷髅裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("觉醒骷髅鞋子"), 对象类.服饰)
			};
			val12.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("觉醒骷髅复制剑"), 对象类.武器);
			val12.UnitBase = 获取工具.获取原版内容游戏物品("m_unitBases", new DatabaseID(-1, 1288909650));
			val12.SetUnitSounds("Halloween Attack Vocals/SkeletonWarrior", "Halloween Death Vocals/SkeletonWarrior", 0.95f);
			UnitBlueprint val13 = 游戏内容工具.复制单位("UNIT_YONGYEQIANXINGZHE", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("幻影刺客sdkfhj"), (DatabaseID?)new DatabaseID(-3, 332534267));
			val13.health = 900f;
			val13.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[2]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("体积雾技能")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客瞬移技能"))
			};
			val13.m_props = (GameObject[])(object)new GameObject[5]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客头发"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客意义不明的手臂套子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客鞋子"), 对象类.服饰)
			};
			val13.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("暗影刺客武器"), 对象类.武器);
			val13.LeftWeapon = val13.RightWeapon;
			val13.forceCost = 1500u;
			val13.SetUnitSounds("Fantasy Dark Attack Vocals/FantasyAssassin", "Fantasy Dark Death Vocals/FantasyAssassin", 0.95f);
			UnitBlueprint val14 = 游戏内容工具.复制单位("UNIT_SHIluoTANXIANJIA", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("失落冒险家43rdsf"), (DatabaseID?)new DatabaseID(-3, 332534268));
			val14.sizeMultiplier = 1.5f;
			val14.health = 1400f;
			val14.massMultiplier = 20f;
			val14.m_props = (GameObject[])(object)new GameObject[6]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者外套"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者头盔和头发"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者披风"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("迷雾行者鞋子"), 对象类.服饰)
			};
			val14.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { 获取工具.获取原版内容游戏物品("m_combatMoves", new DatabaseID(-1, 920020464)) };
			val14.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("十字巨剑3434"), 对象类.武器);
			val14.holdinigWithTwoHands = true;
			val14.movementSpeedMuiltiplier = 1.8f;
			val14.forceCost = 3700u;
			val14.SetUnitSounds("Fantasy Dark Attack Vocals/StormPriest", "Fantasy Dark Death Vocals/StormPriest", 0.85f);
			UnitBlueprint val15 = 游戏内容工具.复制单位("UNIT_ZHONGXINGJUNCHUANQIANGQBING", (UnitBlueprint)null, val4, val.LoadAsset<Sprite>("重装步兵daskfn"), (DatabaseID?)new DatabaseID(-3, 332534269));
			val15.health = 3000f;
			val15.sizeMultiplier = 1.7f;
			val15.massMultiplier = 30f;
			val15.m_props = (GameObject[])(object)new GameObject[12]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵上板甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵下体板甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵前挡"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵大腿护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵大臂护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵头盔"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵护手"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵护膝刺甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵护颈"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵板甲裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵羊角护臂"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("重装亡灵鞋子"), 对象类.服饰)
			};
			GameObject val16 = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("空技能3434"));
			val16.AddComponent<重装亡灵抛射物免疫添加工具>();
			val15.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val16 };
			val15.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("戳矛23"), 对象类.武器);
			val15.LeftWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("石头盾牌345"), 对象类.武器);
			val15.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(重装亡灵后撤步) };
			val15.forceCost = 8000u;
			val15.SetUnitSounds("Pirate Attack Vocals/Cannon", "Pirate Attack Vocals/Cannon", 0.85f);
			GameObject unitBase = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("单位模型直升机23"), 对象类.单位模型);
			UnitBlueprint val17 = 游戏内容工具.复制单位("UNIT_WUZHUANGZHISHENGJI", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("生成武装直升机图标"), (DatabaseID?)new DatabaseID(-3, 332534270));
			val17.UnitBase = unitBase;
			val17.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("直升机机炮sad"), 对象类.武器);
			val17.LeftWeapon = val17.RightWeapon;
			val17.massMultiplier = 100f;
			val17.SetRiders((UnitBlueprint[])(object)new UnitBlueprint[4]
			{
				游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1885243923)),
				游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1885243923)),
				游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1885243923)),
				游戏内容工具.获取原版单位蓝图(new DatabaseID(-1, 1885243923))
			});
			val17.forceCost = 6000u;
			GameObject val18 = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("空技能3434"));
			val18.AddComponent<直升机抗性添加工具>();
			val17.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[1] { val18 };
			val17.SetUnitSounds("Legacy Attack Vocals/Tank", "Legacy Attack Vocals/Tank");
			Faction 指定派系 = 游戏内容工具.获取原版派系(new DatabaseID(-1, 673578412));
			添加单位到指定派系(val17, 指定派系, 自动排序: true, 去重: true);
			UnitBlueprint val19 = 游戏内容工具.复制单位("UNIT_AERDENGZHINAGEFULEI", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("葛孚雷图标32"), (DatabaseID?)new DatabaseID(-3, 332534271));
			val19.health = 1500f;
			val19.massMultiplier = 12f;
			val19.movementSpeedMuiltiplier = 1.8f;
			GameObject[] first = (GameObject[])(object)new GameObject[6]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—护肘"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—肩甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—躯干护甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—披风"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—狮子宰相"), 对象类.服饰)
			};
			GameObject[] array3 = (GameObject[])(object)new GameObject[12]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—下把胡子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—前摆"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—右摆"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—后摆"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—头发"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—左摆"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—无骨骼胡子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—毛发挂件"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—皇冠"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—腰部系绳"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王服饰—鞋子"), 对象类.服饰)
			};
			val19.m_props = first.Concat(array3).ToArray();
			val19.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王武器dsfj"), 对象类.武器);
			val19.holdinigWithTwoHands = true;
			GameObject unitBase2 = (val19.UnitBase = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("强壮的人形单位"), 对象类.单位模型));
			val19.sizeMultiplier = 1.8f;
			GameObject val21 = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("半血升级技能"));
			GameObject val22 = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("葛孚雷死亡二阶段"));
			val19.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("初王冲刺践踏")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("向下砸斧子asd")),
				val21,
				val22
			};
			val19.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val19.forceCost = 6000u;
			UnitBlueprint val23 = 游戏内容工具.复制单位("战士何来露", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("葛孚雷图标32"), (DatabaseID?)new DatabaseID(-3, 332534272));
			val23.UnitBase = unitBase2;
			val23.health = 1000f;
			val23.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[3]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("何来露投技")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("何来露掀地板23")),
				val21
			};
			val23.m_props = array3;
			val23.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("何来露拳头245"), 对象类.武器);
			val23.LeftWeapon = val23.RightWeapon;
			val23.sizeMultiplier = 1.8f;
			val23.movementSpeedMuiltiplier = 3f;
			val22.GetComponent<死亡后进入2阶段>().二阶段单位蓝图 = val23;
			val19.SetUnitSounds("Viking Attack Vocals/Jarl", "Viking Attack Vocals/Jarl", 0.7f);
			val23.SetUnitSounds("Viking Attack Vocals/Jarl", "Viking Attack Vocals/Jarl", 0.7f);
			UnitBlueprint val24 = 游戏内容工具.复制单位("UNIT_SHUXUELAOSHI", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("数学老师图标32"), (DatabaseID?)new DatabaseID(-3, 332534273));
			val24.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("数学家之力sdakfh"), 对象类.武器);
			val24.holdinigWithTwoHands = true;
			val24.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val24.forceCost = 600u;
			val24.m_props = (GameObject[])(object)new GameObject[4]
			{
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 789074667)),
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 1515039722)),
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 1263832372)),
				获取工具.获取原版内容游戏物品("m_characterProps", new DatabaseID(-1, 1012097602))
			};
			val24.SetUnitSounds("Misc Attack Vocals/Crow", "Misc Attack Vocals/Crow");
			Faction 指定派系2 = 游戏内容工具.获取原版派系(new DatabaseID(-1, 442148333));
			Faction 指定派系3 = 游戏内容工具.获取原版派系(new DatabaseID(-1, 1701001489));
			添加单位到指定派系(val19, 指定派系2, 自动排序: true, 去重: true);
			添加单位到指定派系(val24, 指定派系3, 自动排序: true, 去重: true);
			UnitBlueprint val25 = 游戏内容工具.复制单位("UNIT_XINGYUNFANGKUAI", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("幸运方块图标123"), (DatabaseID?)new DatabaseID(-3, 332534274));
			val25.UnitBase = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("幸运方块模型"), 对象类.单位模型);
			val25.forceCost = 650u;
			val25.health = 100f;
			val25.SetUnitSounds("Misc Attack Vocals/Crow", "Misc Attack Vocals/Crow");
			添加单位到指定派系(val25, 指定派系, 自动排序: true, 去重: true);
			UnitBlueprint val26 = 游戏内容工具.复制单位("UNIT_XINGUIREN", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("基兰图标asl1"), (DatabaseID?)new DatabaseID(-3, 332534275));
			val26.m_props = (GameObject[])(object)new GameObject[12]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--前挡"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--头发"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--肩甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--胡子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--胸甲"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--腰部后披风"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--腰部系绳"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--面具"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--鞋子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("基兰服饰--魔法圆盘"), 对象类.服饰)
			};
			val26.RightWeapon = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("时间老头武器23"), 对象类.武器);
			val26.LeftWeapon = val26.RightWeapon;
			val26.MovementComponents = new List<IMovementComponent> { (IMovementComponent)(object)default(KeepRangedDistance) };
			val26.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[2]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("在目标出召唤时钟")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("给予高价值单位复活效果"))
			};
			val26.forceCost = 3000u;
			val26.SetUnitSounds("Misc Attack Vocals/Crow", "Misc Attack Vocals/Crow");
			添加单位到指定派系(val26, 指定派系, 自动排序: true, 去重: true);
			UnitBlueprint val27 = 游戏内容工具.复制单位("UNIT_SHETI", (UnitBlueprint)null, (Faction)null, val.LoadAsset<Sprite>("瑟提图标asdas"), (DatabaseID?)new DatabaseID(-3, 332534276));
			val27.UnitBase = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("强壮人形单位带肌肉版本"), 对象类.单位模型);
			val27.m_props = (GameObject[])(object)new GameObject[9]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_上衣"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_发型"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_手套"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_腰带"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_裤子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_鞋子"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_龙头装饰"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_肩部皮毛"), 对象类.服饰),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提服饰_豪意值附体"), 对象类.服饰)
			};
			val27.health = 3000f;
			val27.massMultiplier = 20f;
			val27.forceCost = 7000u;
			val27.movementSpeedMuiltiplier = 1.8f;
			val27.objectsToSpawnAsChildren = (GameObject[])(object)new GameObject[4]
			{
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("腕豪技能_强手裂颅")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("腕豪技能_叹为观止")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("腕豪技能_豪意值系统")),
				注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("腕豪技能_蓄意轰拳"))
			};
			GameObject val28 = 注册创建游戏对象自动id分配(val.LoadAsset<GameObject>("瑟提拳头与中"), 对象类.武器);
			val28.GetComponent<MeleeWeapon>().curveForce = 150000f;
			val27.RightWeapon = val28;
			val27.LeftWeapon = val27.RightWeapon;
			val27.SetUnitSounds("Misc Attack Vocals/Crow", "Misc Attack Vocals/Crow");
			添加单位到指定派系(val27, 指定派系, 自动排序: true, 去重: true);
			List<UnitBlueprint> list = new List<UnitBlueprint>();
			UnitBlueprint[] units = val4.Units;
			foreach (UnitBlueprint item in units)
			{
				list.Add(item);
			}
			list.Sort((UnitBlueprint unit1, UnitBlueprint unit2) => unit1.GetUnitCost(true).CompareTo(unit2.GetUnitCost(true)));
			val4.Units = list.ToArray();
		}

		public static GameObject 注册创建游戏对象自动id分配(GameObject 对象, 对象类 类型 = 对象类.技能)
		{
			//IL_001d: 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_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			switch (类型)
			{
			case 对象类.技能:
			{
				GameObject result5 = 游戏内容工具.注册能力(游戏物品加入.Instance.创建物品(((Object)对象).name, 对象, new DatabaseID(-3, MYmodid)));
				MYmodid++;
				return result5;
			}
			case 对象类.服饰:
			{
				GameObject result4 = 游戏内容工具.注册道具(游戏物品加入.Instance.创建物品(((Object)对象).name, 对象, new DatabaseID(-3, MYmodid)));
				MYmodid++;
				return result4;
			}
			case 对象类.抛射物:
			{
				GameObject result3 = 游戏内容工具.注册投射物(游戏物品加入.Instance.创建物品(((Object)对象).name, 对象, new DatabaseID(-3, MYmodid)));
				MYmodid++;
				return result3;
			}
			case 对象类.单位模型:
			{
				GameObject result2 = 游戏内容工具.注册单位Base(游戏物品加入.Instance.创建物品(((Object)对象).name, 对象, new DatabaseID(-3, MYmodid)));
				MYmodid++;
				return result2;
			}
			case 对象类.武器:
			{
				GameObject result = 游戏内容工具.注册武器(游戏物品加入.Instance.创建物品(((Object)对象).name, 对象, new DatabaseID(-3, MYmodid)));
				MYmodid++;
				return result;
			}
			default:
				return null;
			}
		}

		public static void 添加单位到指定派系(UnitBlueprint[] 指定的所有单位, Faction 指定派系, bool 自动排序 = false, bool 去重 = false)
		{
			if (指定的所有单位 == null || 指定的所有单位.Length == 0)
			{
				return;
			}
			List<UnitBlueprint> list = new List<UnitBlueprint>();
			if (指定派系.Units != null)
			{
				list.AddRange(指定派系.Units);
			}
			list.AddRange(指定的所有单位);
			if (去重)
			{
				list = (from unit in list
					where ((unit != null) ? unit.Entity : null) != null
					group unit by unit.Entity.GUID into @group
					select @group.First()).ToList();
			}
			if (自动排序)
			{
				list.Sort((UnitBlueprint unit1, UnitBlueprint unit2) => unit1.GetUnitCost(true).CompareTo(unit2.GetUnitCost(true)));
			}
			指定派系.Units = list.ToArray();
		}

		public static void 添加单位到指定派系(UnitBlueprint 指定单位, Faction 指定派系, bool 自动排序 = false, bool 去重 = false)
		{
			if (!((Object)(object)指定单位 == (Object)null))
			{
				添加单位到指定派系((UnitBlueprint[])(object)new UnitBlueprint[1] { 指定单位 }, 指定派系, 自动排序, 去重);
			}
		}
	}
	public class 游戏物品加入
	{
		private GameObject 物品对象池;

		private static 游戏物品加入 _instance;

		public static 游戏物品加入 Instance
		{
			get
			{
				if (_instance == null)
				{
					_instance = new 游戏物品加入();
				}
				return _instance;
			}
		}

		private 游戏物品加入()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			Debug.Log((object)"开始创建对象池");
			物品对象池 = new GameObject
			{
				hideFlags = (HideFlags)61
			};
			((Object)物品对象池).name = "HeMoDingDingObject";
			物品对象池.SetActive(false);
			Debug.Log((object)"对象池创建完毕");
		}

		public GameObject 创建物品(string 名字, GameObject 要复制的物体, DatabaseID 物体标识, Sprite icon = null)
		{
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log((object)"开始创建物品");
			GameObject val = Object.Instantiate<GameObject>(要复制的物体, 物品对象池.transform);
			((Object)val).hideFlags = (HideFlags)52;
			SetHideFlagsRecursive(val, (HideFlags)52);
			((Object)val).name = 名字 + Assembly.GetCallingAssembly().GetName().Name;
			IDatabaseEntity componentInChildren = val.GetComponentInChildren<IDatabaseEntity>();
			if (componentInChildren != null)
			{
				CharacterItem val2 = (CharacterItem)(object)((componentInChildren is CharacterItem) ? componentInChildren : null);
				componentInChildren.Entity.GUID = 物体标识;
				componentInChildren.Entity.Name = 名字;
				if ((Object)(object)icon != (Object)null)
				{
					componentInChildren.Entity.SpriteIcon = icon;
				}
			}
			Debug.Log((object)("物品创建完毕" + ((Object)val).name));
			return val;
		}

		private void SetHideFlagsRecursive(GameObject obj, HideFlags flags)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Expected O, but got Unknown
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)obj == (Object)null)
			{
				return;
			}
			((Object)obj).hideFlags = flags;
			foreach (Transform item in obj.transform)
			{
				Transform val = item;
				if ((Object)(object)val != (Object)null)
				{
					SetHideFlagsRecursive(((Component)val).gameObject, flags);
				}
			}
		}
	}
	public static class 游戏内容工具
	{
		private static LandfallContentDatabase 内容数据库 => ContentDatabase.Instance().LandfallContentDatabase;

		private static AssetLoader 资源加载器 => ContentDatabase.Instance().AssetLoader;

		private static Dictionary<DatabaseID, Object> 非流式资源字典 => (Dictionary<DatabaseID, Object>)(typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(资源加载器));

		public static GameObject 注册单位Base(GameObject 单位基础)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return 注册游戏对象到数据库(单位基础, 单位基础.GetComponent<Unit>().Entity.GUID, "m_unitBases", (GameObject db) => db.GetComponent<Unit>().Entity.GUID);
		}

		public static GameObject 注册武器(GameObject 武器对象)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return 注册游戏对象到数据库(武器对象, ((CharacterItem)武器对象.GetComponent<WeaponItem>()).Entity.GUID, "m_weapons", (GameObject obj) => ((CharacterItem)obj.GetComponent<WeaponItem>()).Entity.GUID);
		}

		public static GameObject 注册能力(GameObject 能力对象)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return 注册游戏对象到数据库(能力对象, ((CharacterItem)能力对象.GetComponent<SpecialAbility>()).Entity.GUID, "m_combatMoves", (GameObject obj) => ((CharacterItem)obj.GetComponent<SpecialAbility>()).Entity.GUID);
		}

		public static GameObject 注册投射物(GameObject 投射物对象)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return 注册游戏对象到数据库(投射物对象, 投射物对象.GetComponent<ProjectileEntity>().Entity.GUID, "m_projectiles", (GameObject obj) => obj.GetComponent<ProjectileEntity>().Entity.GUID);
		}

		public static GameObject 注册道具(GameObject 道具对象)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			return 注册游戏对象到数据库(道具对象, ((CharacterItem)道具对象.GetComponent<PropItem>()).Entity.GUID, "m_characterProps", (GameObject obj) => ((CharacterItem)obj.GetComponent<PropItem>()).Entity.GUID);
		}

		private static GameObject 注册游戏对象到数据库(GameObject 游戏对象, DatabaseID 对象ID, string 数据库字段名, Func<GameObject, DatabaseID> 获取ID函数)
		{
			//IL_0009: 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)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<DatabaseID, GameObject> dictionary = 获取字典<GameObject>(数据库字段名);
			if (!dictionary.ContainsKey(对象ID))
			{
				dictionary.Add(对象ID, 游戏对象);
				非流式资源字典.Add(对象ID, (Object)(object)游戏对象);
				设置字典值<GameObject>(数据库字段名, dictionary);
			}
			return 游戏对象;
		}

		public static UnitBlueprint 获取原版单位蓝图(DatabaseID id)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<DatabaseID, UnitBlueprint> dictionary = 获取字典<UnitBlueprint>("m_unitBlueprints");
			UnitBlueprint value;
			return dictionary.TryGetValue(id, out value) ? value : null;
		}

		public static Faction 获取原版派系(DatabaseID id)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Dictionary<DatabaseID, Faction> dictionary = 获取字典<Faction>("m_factions");
			Faction value;
			return dictionary.TryGetValue(id, out value) ? value : null;
		}

		public static UnitBlueprint 复制单位(string 名称, UnitBlueprint 源单位蓝图 = null, Faction 所属派系 = null, Sprite 图标 = null, DatabaseID? 自定义ID = null)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)源单位蓝图 == (Object)null)
			{
				源单位蓝图 = 获取原版单位蓝图(new DatabaseID(-1, 1166250463));
			}
			if ((Object)(object)源单位蓝图 == (Object)null)
			{
				Debug.LogError((object)"无法获取源单位蓝图");
				return null;
			}
			Debug.LogWarning((object)"开始创建蓝图");
			UnitBlueprint val = Object.Instantiate<UnitBlueprint>(源单位蓝图);
			val.Entity.GUID = (DatabaseID)(((??)自定义ID) ?? DatabaseID.NewID());
			val.Entity.Name = 名称;
			((Object)val).name = 名称;
			if ((Object)(object)图标 != (Object)null)
			{
				val.Entity.SpriteIcon = 图标;
			}
			Debug.LogWarning((object)"完成蓝图创建并指定ID");
			Dictionary<DatabaseID, UnitBlueprint> dictionary = 获取字典<UnitBlueprint>("m_unitBlueprints");
			if (!dictionary.ContainsKey(val.Entity.GUID))
			{
				非流式资源字典.Add(val.Entity.GUID, (Object)(object)val);
				dictionary.Add(val.Entity.GUID, val);
				设置字典值<UnitBlueprint>("m_unitBlueprints", dictionary);
				Debug.LogWarning((object)"成功添加到数据库");
			}
			if ((Object)(object)所属派系 != (Object)null && (Object)(object)val != (Object)null)
			{
				List<UnitBlueprint> list = 所属派系.Units?.ToList() ?? new List<UnitBlueprint>();
				if (!list.Contains(val))
				{
					list.Add(val);
					所属派系.Units = list.ToArray();
				}
			}
			return val;
		}

		public static Faction 创建派系(string 名称, UnitBlueprint[] 单位列表 = null, Sprite 图标 = null, int 模组ID = 0, int 派系ID = 0)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: 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_00b3: 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_00ea: Unknown result type (might be due to invalid IL or missing references)
			Faction val = ScriptableObject.CreateInstance<Faction>();
			val.Init();
			val.Entity.GUID = (DatabaseID)((模组ID != 0 && 派系ID != 0) ? new DatabaseID(模组ID, 派系ID) : DatabaseID.NewID());
			val.Entity.Name = 名称;
			((Object)val).name = 名称;
			val.Units = (UnitBlueprint[])(((object)单位列表) ?? ((object)new UnitBlueprint[0]));
			if ((Object)(object)图标 != (Object)null)
			{
				val.Entity.SpriteIcon = 图标;
			}
			Dictionary<DatabaseID, Faction> dictionary = 获取字典<Faction>("m_factions");
			if (!dictionary.ContainsKey(val.Entity.GUID))
			{
				非流式资源字典.Add(val.Entity.GUID, (Object)(object)val);
				dictionary.Add(val.Entity.GUID, val);
				List<DatabaseID> list = 获取默认快捷栏派系ID列表();
				if (!list.Contains(val.Entity.GUID))
				{
					list.Add(val.Entity.GUID);
					排序并设置默认快捷栏列表(list, dictionary);
				}
				设置字典值<Faction>("m_factions", dictionary);
			}
			return val;
		}

		private static Dictionary<DatabaseID, T> 获取字典<T>(string 字段名) where T : Object
		{
			return (Dictionary<DatabaseID, T>)(typeof(LandfallContentDatabase).GetField(字段名, BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(内容数据库));
		}

		private static void 设置字典值<T>(string 字段名, Dictionary<DatabaseID, T> 字典) where T : Object
		{
			typeof(LandfallContentDatabase).GetField(字段名, BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(内容数据库, 字典);
		}

		private static List<DatabaseID> 获取默认快捷栏派系ID列表()
		{
			return (List<DatabaseID>)(typeof(LandfallContentDatabase).GetField("m_defaultHotbarFactionIds", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(内容数据库));
		}

		private static void 排序并设置默认快捷栏列表(List<DatabaseID> 列表, Dictionary<DatabaseID, Faction> 派系字典)
		{
			Faction value2;
			List<DatabaseID> value = 列表.OrderBy((DatabaseID id) => 派系字典.TryGetValue(id, out value2) ? value2.index : int.MaxValue).ToList();
			typeof(LandfallContentDatabase).GetField("m_defaultHotbarFactionIds", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(内容数据库, value);
		}
	}
	public static class 获取工具
	{
		private static LandfallContentDatabase 内容数据库 => ContentDatabase.Instance().LandfallContentDatabase;

		private static AssetLoader 资源加载器 => ContentDatabase.Instance().AssetLoader;

		private static Dictionary<DatabaseID, Object> 非流式资源字典 => (Dictionary<DatabaseID, Object>)(typeof(AssetLoader).GetField("m_nonStreamableAssets", BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(资源加载器));

		private static Dictionary<DatabaseID, T> 获取字典<T>(string 字段名) where T : Object
		{
			return (Dictionary<DatabaseID, T>)(typeof(LandfallContentDatabase).GetField(字段名, BindingFlags.Instance | BindingFlags.NonPublic)?.GetValue(内容数据库));
		}

		public static GameObject 获取原版内容游戏物品(string 字典名, DatabaseID id)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return 获取字典<GameObject>(字典名)[id];
		}
	}
}
namespace HeMoDingDingMod.角色类.瑟提
{
	public class 向下射线检测并识别替换材质 : MonoBehaviour
	{
		[Header("射线检测设置")]
		public LayerMask 地面层级 = LayerMask.op_Implicit(512);

		public float 射线长度 = 10f;

		public bool 显示调试射线 = true;

		[Header("粒子系统设置")]
		public ParticleSystem 目标粒子发射器;

		public bool 包含子级粒子系统 = false;

		private void Start()
		{
			执行射线检测并替换材质();
		}

		[ContextMenu("手动执行射线检测")]
		private void 执行射线检测并替换材质()
		{
			//IL_003d: 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_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: 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_0061: 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_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)目标粒子发射器 == (Object)null)
			{
				Debug.LogError((object)("[射线检测] " + ((Object)((Component)this).gameObject).name + " - 未指定目标粒子发射器!"));
				return;
			}
			Vector3 val = ((Component)this).transform.position + new Vector3(0f, 10f, 0f);
			Vector3 down = Vector3.down;
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(val, down, ref val2, 射线长度 * 2f, LayerMask.op_Implicit(地面层级)))
			{
				GameObject gameObject = ((Component)((RaycastHit)(ref val2)).collider).gameObject;
				Debug.Log((object)$"[射线检测] {((Object)((Component)this).gameObject).name} 检测到物体: {((Object)gameObject).name},距离: {((RaycastHit)(ref val2)).distance:F2}");
				Renderer val3 = 获取父级网格渲染器(gameObject);
				if ((Object)(object)val3 != (Object)null)
				{
					Material material = val3.material;
					Debug.Log((object)("[材质替换] 成功获取材质: " + ((Object)material).name + ",来源: " + ((Object)((Component)val3).gameObject).name));
					替换粒子材质(material);
				}
				else
				{
					Debug.LogWarning((object)("[射线检测] " + ((Object)gameObject).name + " 及其父级都没有找到网格渲染器组件!"));
				}
			}
			else
			{
				Debug.LogWarning((object)$"[射线检测] {((Object)((Component)this).gameObject).name} 未检测到任何碰撞体(射线长度: {射线长度})");
			}
		}

		private Renderer 获取父级网格渲染器(GameObject 目标物体)
		{
			Renderer componentInParent = 目标物体.GetComponentInParent<Renderer>();
			if ((Object)(object)componentInParent != (Object)null)
			{
				return componentInParent;
			}
			return null;
		}

		private void 替换粒子材质(Material 新材质)
		{
			ParticleSystemRenderer component = ((Component)目标粒子发射器).GetComponent<ParticleSystemRenderer>();
			if ((Object)(object)component != (Object)null)
			{
				材质替换记录(component, 新材质);
			}
			else
			{
				Debug.LogError((object)("[材质替换] 目标物体 " + ((Object)目标粒子发射器).name + " 没有找到 ParticleSystemRenderer 组件!"));
			}
			if (!包含子级粒子系统)
			{
				return;
			}
			ParticleSystemRenderer[] componentsInChildren = ((Component)目标粒子发射器).GetComponentsInChildren<ParticleSystemRenderer>();
			ParticleSystemRenderer[] array = componentsInChildren;
			foreach (ParticleSystemRenderer val in array)
			{
				if ((Object)(object)val != (Object)(object)component)
				{
					材质替换记录(val, 新材质);
				}
			}
		}

		private void 材质替换记录(ParticleSystemRenderer 粒子渲染器, Material 新材质)
		{
			string text = (((Object)(object)((Renderer)粒子渲染器).material != (Object)null) ? ((Object)((Renderer)粒子渲染器).material).name : "无材质");
			((Renderer)粒子渲染器).material = 新材质;
			Debug.Log((object)("[材质替换] 已替换 " + ((Object)((Component)粒子渲染器).gameObject).name + " 的材质: " + text + " -> " + ((Object)新材质).name));
		}
	}
	public class 技能类_强手裂颅 : 碰撞检测获取单位基类定制版本
	{
		public Transform 指定中心点;

		public float 伤害 = 100f;

		public float 力度大小 = 500f;

		protected override void Start()
		{
			base.Start();
			if ((Object)(object)指定中心点 == (Object)null)
			{
				指定中心点 = ((Component)this).transform;
			}
		}

		public override void 完成单次检测(UnitEffectBase 效果实例, Unit 召唤者, Unit 受影响者, GameObject 召唤物体)
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: 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_0043: 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_0051: 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)
			base.完成单次检测(效果实例, 召唤者, 受影响者, 召唤物体);
			if (Object.op_Implicit((Object)(object)受影响者))
			{
				Rigidbody mainRig = 受影响者.data.mainRig;
				Vector3 val = 受影响者.data.mainRig.position - 指定中心点.position;
				mainRig.AddForce(((Vector3)(ref val)).normalized * 力度大小, (ForceMode)5);
				((Damagable)受影响者.data.healthHandler).TakeDamage(伤害, ((Component)this).transform.position, 召唤者, (DamageType)0);
			}
		}
	}
	public class 朝向目标实例化物体 : MonoBehaviour
	{
		public bool 检测地面 = false;

		private Unit 此单位;

		private void Start()
		{
			此单位 = ((Component)((Component)this).transform.root).GetComponent<Unit>();
		}

		public void 实例化生成(GameObject 实例化物体)
		{
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: 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_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)实例化物体 == (Object)null) && Object.op_Implicit((Object)(object)此单位) && Object.op_Implicit((Object)(object)此单位.data.targetData))
			{
				Vector3 val = 此单位.data.targetData.mainRig.position - 此单位.data.mainRig.position;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				Vector3 val2 = default(Vector3);
				((Vector3)(ref val2))..ctor(normalized.x, 0f, normalized.z);
				Vector3 val3 = ((Component)this).transform.position;
				if (检测地面)
				{
					val3 = 获取地面位置(((Component)this).transform.position);
				}
				GameObject val4 = Object.Instantiate<GameObject>(实例化物体, val3, Quaternion.LookRotation(val2));
				TeamHolder.AddTeamHolder(val4, ((Component)this).gameObject);
			}
		}

		public Vector3 获取地面位置(Vector3 测试位置, float 检测高度 = 10f, int 地面层级 = 512)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: 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)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(测试位置.x, 测试位置.y + 检测高度, 测试位置.z);
			float num = 检测高度 * 3f;
			RaycastHit val2 = default(RaycastHit);
			if (Physics.Raycast(val, Vector3.down, ref val2, num, 地面层级))
			{
				return ((RaycastHit)(ref val2)).point;
			}
			return new Vector3(测试位置.x, 测试位置.y - 检测高度 * 0.5f, 测试位置.z);
		}
	}
	public class 技能类_叹为观止 : MonoBehaviour
	{
		private enum 大招状态
		{
			空闲,
			第一阶段_冲刺抓取,
			第二阶段_升空,
			第三阶段_砸地向密集区,
			完成
		}

		[CompilerGenerated]
		private sealed class <豪意值初始化>d__43 : IEnumerator<object>, IDisposable, IEnumerator
		{
			private int <>1__state;

			private object <>2__current;

			public 技能类_叹为观止 <>4__this;

			object IEnumerator<object>.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			object IEnumerator.Current
			{
				[DebuggerHidden]
				get
				{
					return <>2__current;
				}
			}

			[DebuggerHidden]
			public <豪意值初始化>d__43(int <>1__state)
			{
				this.<>1__state = <>1__state;
			}

			[DebuggerHidden]
			void IDisposable.Dispose()
			{
				<>1__state = -2;
			}

			private bool MoveNext()
			{
				switch (<>1__state)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<>2__current = null;
					<>1__state = 1;
					return true;
				case 1:
					<>1__state = -1;
					<>4__this.查找豪意值系统 = ((Component)((Component)<>4__this).transform.root).GetComponent<豪意值系统>();
					return false;
				}
			}

			bool IEnumerator.MoveNext()
			{
				//ILSpy generated this explicit interface implementation from .override directive in MoveNext
				return this.MoveNext();
			}

			[DebuggerHidden]
			void IEnumerator.Reset()
			{
				throw new NotSupportedException();
			}
		}

		[Header("第一阶段:冲刺抓取")]
		public float 冲刺力度;

		public AnimationCurve 冲刺力度曲线;

		[Tooltip("触发抓取的距离阈值")]
		public float 抓取距离阈值 = 2f;

		[Tooltip("抓取超时时间")]
		public float 抓取超时时间 = 2f;

		public LayerMask 射线检测层 = LayerMask.op_Implicit(16384);

		[Header("第二阶段:升空")]
		public float 升空力度;

		public AnimationCurve 升空力度曲线;

		[Tooltip("最大升空高度")]
		public float 最大升空高度 = 15f;

		[Header("第三阶段:砸地向密集区")]
		public float 下落力度;

		public AnimationCurve 下落力度曲线;

		[Tooltip("砸地冲击波预制体")]
		public GameObject 砸地冲击波预制体;

		[Tooltip("砸地伤害倍率(基于目标最大生命值)")]
		public float 砸地伤害倍率 = 0.4f;

		[Tooltip("砸地范围")]
		public float 砸地范围 = 8f;

		[Header("冲刺特效")]
		public GameObject 冲刺特效预制体;

		[Tooltip("升空特效")]
		public GameObject 升空特效预制体;

		[Header("单位获取工具")]
		public 最近单位获取工具类32 单位获取工具;

		public UnityEvent 到达抓取事件;

		public UnityEvent 到达砸地事件;

		[Header("调试")]
		private bool 启用异常日志 = true;

		public bool 强制抓取 = true;

		public float 强制抓取时间参数 = 2f;

		private 大招状态 当前状态 = 大招状态.空闲;

		private Unit 此单位;

		private DataHandler 单位数据;

		private Rigidbody 单位主刚体;

		private DataHandler 目标数据;

		private Rigidbody 目标主刚体;

		private Rigidbody[] 目标全部刚体数组;

		private Vector3 密集区域位置;

		private Vector3 抓取偏移位置;

		private Vector3 升空起始位置;

		private Vector3 记录朝向方向;

		private float 状态计时器 = 0f;

		private float 曲线总时间_冲刺 = 0f;

		private float 曲线总时间_升空 = 0f;

		private float 曲线总时间_下落 = 0f;

		private bool 已抓取成功 = false;

		private bool 有密集区域 = false;

		private Coroutine 当前击飞协程 = null;

		public bool 启用 = true;

		private 豪意值系统 查找豪意值系统;

		private void Start()
		{
			try
			{
				此单位 = ((Component)((Component)this).transform.root).GetComponent<Unit>();
				if ((Object)(object)此单位 == (Object)null)
				{
					记录异常("Start: 未找到Unit组件");
					return;
				}
				单位数据 = 此单位.data;
				if ((Object)(object)单位数据 == (Object)null)
				{
					记录异常("Start: 单位数据为空");
					return;
				}
				单位主刚体 = 单位数据.mainRig;
				if ((Object)(object)单位主刚体 == (Object)null)
				{
					记录异常("Start: 单位主刚体为空");
				}
				曲线总时间_冲刺 = 获取曲线总时间(冲刺力度曲线);
				曲线总时间_升空 = 获取曲线总时间(升空力度曲线);
				曲线总时间_下落 = 获取曲线总时间(下落力度曲线);
			}
			catch (Exception ex)
			{
				记录异常("Start发生异常: " + ex.Message + "\n" + ex.StackTrace);
			}
			((MonoBehaviour)this).StartCoroutine(豪意值初始化());
		}

		[IteratorStateMachine(typeof(<豪意值初始化>d__43))]
		private IEnumerator 豪意值初始化()
		{
			//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
			return new <豪意值初始化>d__43(0)
			{
				<>4__this = this
			};
		}

		private void Update()
		{
			if (!启用)
			{
				return;
			}
			try
			{
				switch (当前状态)
				{
				case 大招状态.第一阶段_冲刺抓取:
					更新冲刺抓取阶段();
					break;
				case 大招状态.第二阶段_升空:
					更新升空阶段();
					break;
				case 大招状态.第三阶段_砸地向密集区:
					更新砸地阶段();
					break;
				}
			}
			catch (Exception ex)
			{
				记录异常("Update异常: " + ex.Message + "\n" + ex.StackTrace);
			}
		}

		private void 记录异常(string 消息)
		{
			if (启用异常日志)
			{
				Debug.LogError((object)("[叹为观止] " + 消息));
			}
		}

		private void 更新冲刺抓取阶段()
		{
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0111: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013d: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (冲刺力度曲线 == null)
				{
					记录异常("更新冲刺抓取阶段: 冲刺力度曲线为空");
					return;
				}
				状态计时器 += Time.deltaTime;
				float num = 冲刺力度曲线.Evaluate(状态计时器);
				if ((Object)(object)目标主刚体 != (Object)null && (Object)(object)单位主刚体 != (Object)null)
				{
					Vector3 val = 目标主刚体.position - 单位主刚体.position;
					Vector3 normalized = ((Vector3)(ref val)).normalized;
					单位主刚体.AddForce(normalized * 冲刺力度 * num * Time.deltaTime * 220f, (ForceMode)5);
					if (!已抓取成功)
					{
						if (强制抓取 && 状态计时器 >= 强制抓取时间参数)
						{
							抓取成功();
						}
						else
						{
							RaycastHit[] array = Physics.RaycastAll(单位主刚体.position, normalized, 抓取距离阈值, LayerMask.op_Implicit(射线检测层));
							RaycastHit[] array2 = array;
							for (int i = 0; i < array2.Length; i++)
							{
								RaycastHit val2 = array2[i];
								if ((Object)(object)((Component)((RaycastHit)(ref val2)).collider).transform.root == (Object)(object)((Component)目标主刚体).transform.root)
								{
									抓取成功();
									break;
								}
							}
						}
					}
				}
				if ((状态计时器 >= 曲线总时间_冲刺 || 状态计时器 >= 抓取超时时间) && !已抓取成功)
				{
					记录异常("更新冲刺抓取阶段: 抓取超时,重置大招");
					重置大招();
				}
			}
			catch (Exception ex)
			{
				记录异常("更新冲刺抓取阶段异常: " + ex.Message);
			}
		}

		private void 抓取成功()
		{
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				已抓取成功 = true;
				UnityEvent obj = 到达抓取事件;
				if (obj != null)
				{
					obj.Invoke();
				}
				清除刚体动能(单位主刚体);
				清除刚体动能(目标主刚体);
				if ((Object)(object)单位主刚体 != (Object)null && (Object)(object)目标主刚体 != (Object)null)
				{
					抓取偏移位置 = ((Component)单位主刚体).transform.InverseTransformPoint(目标主刚体.position);
					升空起始位置 = 单位主刚体.position;
				}
				if ((Object)(object)升空特效预制体 != (Object)null && (Object)(object)单位主刚体 != (Object)null)
				{
					GameObject val = Object.Instantiate<GameObject>(升空特效预制体, 单位主刚体.position, Quaternion.identity);
					TeamHolder.AddTeamHolder(val, ((Component)this).gameObject);
				}
				当前状态 = 大招状态.第二阶段_升空;
				状态计时器 = 0f;
				计算密集区域();
			}
			catch (Exception ex)
			{
				记录异常("抓取成功异常: " + ex.Message);
			}
		}

		private void 更新升空阶段()
		{
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: 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_007a: 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_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: 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_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0175: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0225: Unknown result type (might be due to invalid IL or missing references)
			//IL_0227: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (升空力度曲线 == null)
				{
					记录异常("更新升空阶段: 升空力度曲线为空");
					return;
				}
				状态计时器 += Time.deltaTime;
				float num = 升空力度曲线.Evaluate(状态计时器);
				float num2 = Time.deltaTime * 220f;
				if ((Object)(object)单位主刚体 != (Object)null)
				{
					Vector3 val = Vector3.up;
					Vector3 val3;
					if (有密集区域 && 密集区域位置 != Vector3.zero)
					{
						Vector3 val2 = 密集区域位置 - 单位主刚体.position;
						val2.y = 0f;
						((Vector3)(ref val2)).Normalize();
						val3 = Vector3.up + val2 * 0.5f;
						val = ((Vector3)(ref val3)).normalized;
					}
					else if (记录朝向方向 != Vector3.zero)
					{
						val3 = Vector3.up + 记录朝向方向 * 0.3f;
						val = ((Vector3)(ref val3)).normalized;
					}
					单位主刚体.AddForce(val * 升空力度 * num * num2, (ForceMode)5);
					if (单位主刚体.position.y - 升空起始位置.y >= 最大升空高度)
					{
						单位主刚体.velocity = Vector3.zero;
						切换到砸地阶段();
					}
				}
				if ((Object)(object)目标主刚体 != (Object)null && (Object)(object)单位主刚体 != (Object)null)
				{
					Vector3 val4 = ((Component)单位主刚体).transform.TransformPoint(抓取偏移位置);
					Vector3 val5 = val4 - 目标主刚体.position;
					if (目标全部刚体数组 != null && 目标全部刚体数组.Length != 0)
					{
						Rigidbody[] array = 目标全部刚体数组;
						foreach (Rigidbody val6 in array)
						{
							if ((Object)(object)val6 != (Object)null)
							{
								val6.MovePosition(val6.position + val5);
							}
						}
					}
				}
				if (状态计时器 >= 曲线总时间_升空)
				{
					切换到砸地阶段();
				}
			}
			catch (Exception ex)
			{
				记录异常("更新升空阶段异常: " + ex.Message);
			}
		}

		private void 切换到砸地阶段()
		{
			当前状态 = 大招状态.第三阶段_砸地向密集区;
			状态计时器 = 0f;
		}

		private void 更新砸地阶段()
		{
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: 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_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_008a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0220: 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_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: 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_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0128: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_017a: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				if (下落力度曲线 == null)
				{
					记录异常("更新砸地阶段: 下落力度曲线为空");
					return;
				}
				状态计时器 += Time.deltaTime;
				float num = 下落力度曲线.Evaluate(状态计时器);
				float num2 = Time.deltaTime * 220f;
				if ((Object)(object)单位主刚体 != (Object)null)
				{
					Vector3 val2;
					if (有密集区域 && 密集区域位置 != Vector3.zero)
					{
						Vector3 val = 密集区域位置 - 单位主刚体.position;
						val2 = ((Vector3)(ref val)).normalized;
					}
					else
					{
						val2 = Vector3.down;
					}
					float num3 = 下落力度 * num;
					单位主刚体.AddForce(val2 * num3 * num2, (ForceMode)5);
					if ((Object)(object)目标主刚体 != (Object)null && (Object)(object)单位主刚体 != (Object)null)
					{
						Vector3 val3 = ((Component)单位主刚体).transform.TransformPoint(抓取偏移位置);
						Vector3 val4 = val3 - 目标主刚体.position;
						if (目标全部刚体数组 != null && 目标全部刚体数组.Length != 0)
						{
							Rigidbody[] array = 目标全部刚体数组;
							foreach (Rigidbody val5 in array)
							{
								if ((Object)(object)val5 != (Object)null)
								{
									val5.MovePosition(val5.position + val4);
								}
							}
						}
					}
				}
				RaycastHit val6 = default(RaycastHit);
				if ((Object)(object)单位主刚体 != (Object)null && Physics.Raycast(单位主刚体.position, Vector3.down, ref val6, 3f, 512))
				{
					执行砸地(((RaycastHit)(ref val6)).point);
					重置大招();
				}
				if (状态计时器 >= 曲线总时间_下落)
				{
					执行砸地(((Object)(object)单位主刚体 != (Object)null) ? 单位主刚体.position : ((Component)this).transform.position);
					重置大招();
				}
			}
			catch (Exception ex)
			{
				记录异常("更新砸地阶段异常: " + ex.Message);
			}
		}

		private void 执行砸地(Vector3 砸地位置)
		{
			//IL_002e: 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_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			try
			{
				UnityEvent obj = 到达砸地事件;
				if (obj != null)
				{
					obj.Invoke();
				}
				if (!((Object)(object)砸地冲击波预制体 != (Object)null))
				{
					return;
				}
				GameObject val = Object.Instantiate<GameObject>(砸地冲击波预制体, 砸地位置, Quaternion.identity);
				TeamHolder.AddTeamHolder(val, ((Component)this).gameObject);
				Explosion component = val.GetComponent<Explosion>();
				if (!((Object)(object)component != (Object)null) || !((Object)(object)目标数据 != (Object)null))
				{
					return;
				}
				if (Object.op_Implicit((Object)(object)查找豪意值系统))
				{
					component.damage += 目标数据.maxHealth * 查找豪意值系统.获取豪意值01;
					component.radius = 砸地范围;
					if ((Object)(object)目标数据.healthHandler != (Object)null)
					{
						((Damagable)目标数据.healthHandler).TakeDamage(10f + 目标数据.maxHealth * 查找豪意值系统.获取豪意值01, ((Component)this).transform.position, (Unit)null, (DamageType)0);
					}
				}
				else
				{
					component.damage += 目标数据.maxHealth * 砸地伤害倍率;
					component.radius = 砸地范围;
					if ((Object)(object)目标数据.healthHandler != (Object)null)
					{
						((Damagable)目标数据.healthHandler).TakeDamage(目标数据.maxHealth * 砸地伤害倍率, ((Component)this).transform.position, (Unit)null, (DamageType)0);
					}
				}
			}
			catch (Exception ex)
			{
				记录异常("执行