Decompiled source of MoreParryFlashes v1.0.2

MoreParryFlashes.dll

Decompiled a month ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using MoreParryFlashes.Patches;
using UnityEngine;
using UnityEngine.AddressableAssets;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("UltraAutoUpdater")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UltraAutoUpdater")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4187c0a6-ae84-470f-92fd-b09575a01d04")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MoreParryFlashes
{
	[BepInPlugin("D1g1tal.MoreParryFlashes", "MoreParryFlashes", "1.0.2")]
	public class MainPluginClass : BaseUnityPlugin
	{
		private readonly Harmony harmony = new Harmony("D1g1tal.MoreParryFlashes");

		private FlashRefManager refM;

		private void Awake()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			FlashRefManager flashRefManager = new GameObject("FlashRefManager").AddComponent<FlashRefManager>();
			harmony.PatchAll(typeof(SparkPatch));
			harmony.PatchAll(typeof(CerbSparksPatch));
			harmony.PatchAll(typeof(MassSparkPatch));
			harmony.PatchAll(typeof(DroneSparkPatch));
			harmony.PatchAll(typeof(PuppetSparkPatch));
			harmony.PatchAll(typeof(StalkerSparkPatch));
			harmony.PatchAll(typeof(MindflayerSparkPatch));
			harmony.PatchAll(typeof(MannequinSparkPatch));
		}

		private void Update()
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)refM == (Object)null)
			{
				Debug.Log((object)"Created a flash ref manager object");
				refM = new GameObject("FlashRefManager").AddComponent<FlashRefManager>();
			}
		}
	}
}
namespace MoreParryFlashes.Patches
{
	public class FlashRefManager : MonoBehaviour
	{
		public GameObject altFlash;

		public GameObject unparryableFlash;

		public GameObject parryableFlash;

		public static FlashRefManager Instance { get; private set; }

		public void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
		}

		public void Update()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			altFlash = Addressables.LoadAssetAsync<GameObject>((object)"Assets/Prefabs/Enemies/V2.prefab").WaitForCompletion().GetComponent<V2>()
				.altFlash;
			unparryableFlash = MonoSingleton<DefaultReferenceManager>.Instance.unparryableFlash;
			parryableFlash = MonoSingleton<DefaultReferenceManager>.Instance.parryableFlash;
		}

		public static void ParryableFlash(Vector3 pos, Quaternion rot, float time)
		{
		}
	}
	[HarmonyPatch(typeof(Zombie))]
	internal class SparkPatch
	{
		[HarmonyPatch("ParryableCheck")]
		[HarmonyPostfix]
		private static void Spark(Zombie __instance, Rigidbody ___rb, EnemyIdentifier ___eid)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Invalid comparison between Unknown and I4
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: 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_0035: 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_0056: 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_0068: 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_0084: Unknown result type (might be due to invalid IL or missing references)
			if (!___rb.useGravity)
			{
				Vector3 val = (((int)___eid.enemyType == 3) ? (((Component)__instance).transform.position + Vector3.up) : (__instance.chest.transform.position + __instance.chest.transform.forward));
				GameObject val2 = Object.Instantiate<GameObject>(FlashRefManager.Instance.parryableFlash, val, ((Component)__instance).transform.rotation);
				Transform transform = val2.transform;
				transform.localScale *= 3f;
				val2.transform.SetParent(__instance.chest.transform, true);
			}
		}

		[HarmonyPatch("Jump")]
		[HarmonyPostfix]
		private static void JumpSpark(Zombie __instance, EnemyIdentifier ___eid)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Invalid comparison between Unknown and I4
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: 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_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: 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_002a: 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_0061: 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_007a: 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)
			Vector3 val = (((int)___eid.enemyType == 3) ? (((Component)__instance).transform.position + Vector3.up + ((Component)__instance).transform.forward) : (__instance.chest.transform.position + __instance.chest.transform.forward));
			GameObject val2 = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val, ((Component)__instance).transform.rotation);
			Transform transform = val2.transform;
			transform.localScale *= 3f;
			val2.transform.SetParent(__instance.chest.transform, true);
		}
	}
	[HarmonyPatch(typeof(StatueBoss))]
	internal class CerbSparksPatch
	{
		[HarmonyPatch("Throw")]
		[HarmonyPostfix]
		private static void SparkThrow(StatueBoss __instance)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_0030: 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_004a: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(FlashRefManager.Instance.altFlash, ((Component)__instance).transform.position + Vector3.up * 6f + ((Component)__instance).transform.forward * 3f, ((Component)__instance).transform.rotation);
			Transform transform = val.transform;
			transform.localScale *= 5f;
			val.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("Tackle")]
		[HarmonyPostfix]
		private static void SparkDash(StatueBoss __instance)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_0030: 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_004a: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, ((Component)__instance).transform.position + Vector3.up * 6f + ((Component)__instance).transform.forward * 3f, ((Component)__instance).transform.rotation);
			Transform transform = val.transform;
			transform.localScale *= 5f;
			val.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("Stomp")]
		[HarmonyPostfix]
		private static void SparkStomp(StatueBoss __instance)
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_0030: 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_004a: 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_0066: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, ((Component)__instance).transform.position + Vector3.up * 6f + ((Component)__instance).transform.forward * 3f, ((Component)__instance).transform.rotation);
			Transform transform = val.transform;
			transform.localScale *= 5f;
			val.transform.SetParent(((Component)__instance).transform, true);
		}
	}
	[HarmonyPatch(typeof(Mass))]
	internal class MassSparkPatch
	{
		[HarmonyPatch("ExplosiveAttack")]
		[HarmonyPostfix]
		private static void ExpSparkPatch(Mass __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0045: 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_0051: 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_006e: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 10f + ((Component)__instance).transform.forward * 6f;
			GameObject val2 = Object.Instantiate<GameObject>(FlashRefManager.Instance.altFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
			Transform transform = val2.transform;
			transform.localScale *= 7f;
			val2.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("BattleSlam")]
		[HarmonyPostfix]
		private static void BSlamSparkPatch(Mass __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_003b: 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_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0084: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 10f + ((Component)__instance).transform.forward * 6f;
			Vector3 val2 = val - ((Component)MonoSingleton<NewMovement>.Instance).transform.position;
			GameObject val3 = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
			Transform transform = val3.transform;
			transform.localScale *= 7f;
			val3.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("ToBattle")]
		[HarmonyPostfix]
		private static void SlamSparkPatch(Mass __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_003b: 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_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0084: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 10f + ((Component)__instance).transform.forward * 6f;
			Vector3 val2 = val - ((Component)MonoSingleton<NewMovement>.Instance).transform.position;
			GameObject val3 = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
			Transform transform = val3.transform;
			transform.localScale *= 7f;
			val3.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("HomingAttack")]
		[HarmonyPostfix]
		private static void HomSparkPatch(Mass __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0045: 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_0051: 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_006e: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 10f + ((Component)__instance).transform.forward * 6f;
			GameObject val2 = Object.Instantiate<GameObject>(FlashRefManager.Instance.altFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
			Transform transform = val2.transform;
			transform.localScale *= 7f;
			val2.transform.SetParent(((Component)__instance).transform, true);
		}

		[HarmonyPatch("SwingAttack")]
		[HarmonyPostfix]
		private static void SwingSparkPatch(Mass __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_003b: 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_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0084: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 10f + ((Component)__instance).transform.forward * 6f;
			Vector3 val2 = val - ((Component)MonoSingleton<NewMovement>.Instance).transform.position;
			GameObject val3 = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
			Transform transform = val3.transform;
			transform.localScale *= 7f;
			val3.transform.SetParent(((Component)__instance).transform, true);
		}
	}
	[HarmonyPatch(typeof(Drone))]
	internal class DroneSparkPatch
	{
		[HarmonyPatch("PlaySound")]
		[HarmonyPostfix]
		private static void AttackSpark(AudioClip clippe, Drone __instance, EnemyIdentifier ___eid)
		{
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: 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_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_003b: 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_0050: 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_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: 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_0084: 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_0091: Invalid comparison between Unknown and I4
			//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_0116: Unknown result type (might be due to invalid IL or missing references)
			//IL_011e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: 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_0148: Unknown result type (might be due to invalid IL or missing references)
			//IL_014f: Invalid comparison between Unknown and I4
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_0156: Unknown result type (might be due to invalid IL or missing references)
			if ((Object)(object)clippe == (Object)(object)__instance.windUpSound)
			{
				Vector3 val = ((Component)__instance).transform.position + Vector3.up + ((Component)__instance).transform.forward;
				Vector3 val2 = val - ((Component)MonoSingleton<NewMovement>.Instance).transform.position;
				GameObject val3 = Object.Instantiate<GameObject>(FlashRefManager.Instance.parryableFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
				Transform transform = val3.transform;
				transform.localScale *= (float)(((int)___eid.enemyType == 9) ? 8 : 4);
				val3.transform.SetParent(((Component)__instance).transform, true);
			}
			if ((Object)(object)clippe == (Object)(object)__instance.deathSound)
			{
				Vector3 val4 = ((Component)__instance).transform.position + Vector3.up + ((Component)__instance).transform.forward;
				Vector3 val5 = val4 - ((Component)MonoSingleton<NewMovement>.Instance).transform.position;
				GameObject val6 = Object.Instantiate<GameObject>(FlashRefManager.Instance.parryableFlash, val4 + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation);
				Transform transform2 = val6.transform;
				transform2.localScale *= (float)(((int)___eid.enemyType == 9) ? 8 : 4);
				val6.transform.SetParent(((Component)__instance).transform, true);
			}
		}
	}
	[HarmonyPatch(typeof(Puppet))]
	internal class PuppetSparkPatch
	{
		[HarmonyPatch("Swing")]
		[HarmonyPostfix]
		private static void SwingSpark(Puppet __instance, EnemyIdentifier ___eid)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0020: 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_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 3f;
			GameObject val2 = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val + ((Component)__instance).transform.forward, ___eid.weakPoint.transform.rotation);
			Transform transform = val2.transform;
			transform.localScale *= 4.5f;
			val2.transform.SetParent(___eid.weakPoint.transform, true);
		}
	}
	[HarmonyPatch(typeof(Stalker))]
	internal class StalkerSparkPatch
	{
		[HarmonyPatch("Countdown")]
		[HarmonyPostfix]
		private static void SparkCountdownPatch(Stalker __instance)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: 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_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0045: 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_0051: 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_006c: 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)
			Vector3 val = ((Component)__instance).transform.position + Vector3.up * 4f + ((Component)__instance).transform.forward * 2f;
			Transform transform = Object.Instantiate<GameObject>(FlashRefManager.Instance.unparryableFlash, val + ((Component)__instance).transform.forward, ((Component)__instance).transform.rotation).transform;
			transform.localScale *= 8f;
		}
	}
	[HarmonyPatch(typeof(Mindflayer))]
	internal class MindflayerSparkPatch
	{
		[HarmonyPatch("HomingAttack")]
		[HarmonyPostfix]
		private static void ProjSparkPatch(EnemyIdentifier ___eid)
		{
			//IL_0021: 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)
			Transform transform = Object.Instantiate<GameObject>(FlashRefManager.Instance.altFlash, ___eid.weakPoint.transform).transform;
			transform.localScale *= 4f;
		}
	}
	[HarmonyPatch(typeof(Mannequin))]
	internal class MannequinSparkPatch
	{
		[HarmonyPatch("ProjectileAttack")]
		[HarmonyPostfix]
		private static void MannequinProjSparkPatch(EnemyIdentifier ___eid)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: 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_0050: 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_006c: Unknown result type (might be due to invalid IL or missing references)
			GameObject val = Object.Instantiate<GameObject>(FlashRefManager.Instance.altFlash, ___eid.weakPoint.transform.position + ___eid.weakPoint.transform.forward * -0.35f, Quaternion.identity);
			val.transform.LookAt(MonoSingleton<CameraController>.Instance.GetDefaultPos());
			Transform transform = val.transform;
			transform.localScale *= 3f;
			val.transform.SetParent(___eid.weakPoint.transform, true);
		}
	}
}