Decompiled source of noiseCloneFixes v1.0.2

noiseCloneFixes.dll

Decompiled 4 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using GameplayEntities;
using HarmonyLib;
using LLHandlers;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("FixedCameraPlusPlus")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FixedCameraPlusPlus")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("664de4af-aa69-4f3a-9e6b-dd07c879adf5")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.5", FrameworkDisplayName = ".NET Framework 4.5")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.0")]
[module: UnverifiableCode]
namespace noiseCloneFixes;

[BepInPlugin("us.wallace.plugins.llb.noiseCloneFixes", "noiseCloneFixes Plug-In", "1.0.2.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInProcess("LLBlaze.exe")]
public class Plugin : BaseUnityPlugin
{
	public static class PatchUtils
	{
		public static void LogInstructions(IEnumerable<CodeInstruction> instructions, int from = 0, int to = -1)
		{
			int num = 0;
			if (to == -1)
			{
				to = instructions.Count();
			}
			foreach (CodeInstruction instruction in instructions)
			{
				if (num >= from && num <= to)
				{
					Log.LogDebug((object)(num + ": " + (object)instruction));
				}
				num++;
			}
		}

		public static void LogInstruction(CodeInstruction ci)
		{
			ManualLogSource log = Log;
			OpCode opcode = ci.opcode;
			log.LogInfo((object)("OpCode: " + opcode.ToString() + " | Operand: " + ci.operand));
		}
	}

	private class BallEntityAddExtraBallVisualsPatch
	{
		[HarmonyPatch(typeof(BallEntity), "AddExtraBallVisuals")]
		[HarmonyPrefix]
		public static bool AddExtraBallVisuals_Prefix(BallEntity __instance, float shock_scale)
		{
			//IL_001e: 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_002b: 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_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0120: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0172: 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_01ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ca: 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_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02be: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_034e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f0: Expected I4, but got Unknown
			//IL_0404: Unknown result type (might be due to invalid IL or missing references)
			//IL_0406: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_040e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0410: Unknown result type (might be due to invalid IL or missing references)
			//IL_0415: Unknown result type (might be due to invalid IL or missing references)
			//IL_0422: Unknown result type (might be due to invalid IL or missing references)
			//IL_0426: Invalid comparison between Unknown and I4
			//IL_0455: Unknown result type (might be due to invalid IL or missing references)
			//IL_0459: Invalid comparison between Unknown and I4
			//IL_042f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Unknown result type (might be due to invalid IL or missing references)
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			//IL_045b: Unknown result type (might be due to invalid IL or missing references)
			//IL_045f: Invalid comparison between Unknown and I4
			//IL_04dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Invalid comparison between Unknown and I4
			//IL_0591: Unknown result type (might be due to invalid IL or missing references)
			//IL_0598: Unknown result type (might be due to invalid IL or missing references)
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_05d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_050d: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_04ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0622: Unknown result type (might be due to invalid IL or missing references)
			//IL_063b: 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_0490: Invalid comparison between Unknown and I4
			//IL_0483: Unknown result type (might be due to invalid IL or missing references)
			//IL_0488: Unknown result type (might be due to invalid IL or missing references)
			//IL_0697: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_04d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_04b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0707: Unknown result type (might be due to invalid IL or missing references)
			//IL_070c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0711: Unknown result type (might be due to invalid IL or missing references)
			//IL_0716: Unknown result type (might be due to invalid IL or missing references)
			//IL_0721: Unknown result type (might be due to invalid IL or missing references)
			//IL_0737: Unknown result type (might be due to invalid IL or missing references)
			((VisualEntity)__instance).SetVisualSprite("glowVisual", "serveGlowEffect_1", false, false, new JKMAAHELEMF(200, 200), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, default(Color32));
			((VisualEntity)__instance).GetVisual("glowVisual").SetScale(Vector3.one * 0.64f * ((HitableEntity)__instance).standardScale);
			((VisualEntity)__instance).GetVisual("glowVisual").SetAllMaterialsRenderQueue(1999);
			List<int> list = new List<int>
			{
				0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
				10, 11, 12, 13, 14, 15
			};
			((AnimatableEntity)__instance).AddSpriteAnim("glow", list, HHBCPNCDNDH.NKKIFJJEPOL(20), true, true);
			((AnimatableEntity)__instance).PlayAnim("off", "glowVisual");
			((VisualEntity)__instance).SetVisualSprite("grindVisual", "ballGrind", false, false, new JKMAAHELEMF(256, 256), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, default(Color32));
			((VisualEntity)__instance).GetVisual("grindVisual").SetAllMaterialsRenderQueue(1998);
			((VisualEntity)__instance).SetVisualSprite("shockVisual", "spark_circle_sheet", false, false, new JKMAAHELEMF(200, 200), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, default(Color32));
			((VisualEntity)__instance).GetVisual("shockVisual").SetScale(Vector3.one * shock_scale);
			List<int> list2 = new List<int>
			{
				0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
				10, 11
			};
			((AnimatableEntity)__instance).AddSpriteAnim("shock", list2, HHBCPNCDNDH.NKKIFJJEPOL(20), true, true);
			((AnimatableEntity)__instance).PlayAnim("off", "shockVisual");
			((VisualEntity)__instance).GetVisual("shockVisual").SetAllMaterialsRenderQueue(1998);
			((VisualEntity)__instance).SetVisualSprite("buntVisual", "buntEffect", false, false, new JKMAAHELEMF(128, 128), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, default(Color32));
			Visual visual = ((VisualEntity)__instance).GetVisual("buntVisual");
			visual.SetScale(Vector3.one * 0.6f * ((HitableEntity)__instance).standardScale);
			visual.SetAllMaterialsRenderQueue(1900);
			List<int> list3 = new List<int> { 0, 1, 2, 3, 4 };
			((AnimatableEntity)__instance).AddSpriteAnim("bunt", list3, HHBCPNCDNDH.NKKIFJJEPOL(30), true, true);
			((AnimatableEntity)__instance).PlayAnim("off", "buntVisual");
			bool skate = false;
			bool cop_normal = false;
			bool cop_detective = false;
			HashSet<CharacterVariant> candies = new HashSet<CharacterVariant>();
			bool cop_lucha = false;
			ALDOKEMAOMB.ICOCPAFKCCE((Action<ALDOKEMAOMB>)delegate(ALDOKEMAOMB player)
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Invalid comparison between Unknown and I4
				//IL_0023: Unknown result type (might be due to invalid IL or missing references)
				//IL_002a: Invalid comparison between Unknown and I4
				//IL_0016: 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_0040: Invalid comparison between Unknown and I4
				//IL_0055: Unknown result type (might be due to invalid IL or missing references)
				//IL_005a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0060: Invalid comparison between Unknown and I4
				//IL_0071: Unknown result type (might be due to invalid IL or missing references)
				//IL_0078: Invalid comparison between Unknown and I4
				//IL_007b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0082: Invalid comparison between Unknown and I4
				if ((int)player.JPMBNEEFOJH() == 2)
				{
					candies.Add(player.AIINAIDBHJI);
				}
				if ((int)player.JPMBNEEFOJH() == 9)
				{
					skate = true;
				}
				if ((int)player.JPMBNEEFOJH() != 7)
				{
					cop_normal = true;
				}
				else if ((int)EPCDKLCABNC.LEMKFOAAMKA((Character)7, player.AIINAIDBHJI) == 7)
				{
					cop_lucha = true;
				}
				else if ((int)player.AIINAIDBHJI == 9 || (int)player.AIINAIDBHJI == 10)
				{
					cop_detective = true;
				}
				else
				{
					cop_normal = true;
				}
			});
			((BouncableEntity)__instance).candyballs.Clear();
			__instance.hatTf = (Transform[])(object)new Transform[candies.Count];
			int num = 0;
			foreach (CharacterVariant item in candies)
			{
				string text = "candyBall" + (int)item + "Visual";
				AOOJOMIECLD val = JPLELOFJOOH.NEBGBODHHCG((Character)2, item);
				DLC val2 = EPCDKLCABNC.LEMKFOAAMKA((Character)2, item);
				string text2 = ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC()[0];
				AOOJOMIECLD val3 = (((int)val2 == 10) ? AOOJOMIECLD.HCFBCKBLLAH(val2, "candyBallSaturn", new string[1] { text2 }, 1f, 0, (FKBHNEMDBMK)0) : (((int)item == 9 || (int)item == 10) ? AOOJOMIECLD.HCFBCKBLLAH((Character)2, "candyBallStrait", new string[1] { text2 }, 1f, 0, (FKBHNEMDBMK)0) : (((int)item != 8) ? AOOJOMIECLD.HCFBCKBLLAH((Character)2, "candyBall", new string[1] { text2 }, 1f, 0, (FKBHNEMDBMK)0) : AOOJOMIECLD.HCFBCKBLLAH((Character)2, "candyBall", new string[1] { text2 }, 1f, 0, (FKBHNEMDBMK)3))));
				if ((int)val2 > 0)
				{
					val3.EDKLFODCINA = new Bundle(val2);
				}
				((VisualEntity)__instance).SetVisualModel(text, val3, true, true);
				((VisualEntity)__instance).GetVisual(text).flipMode = (FlipMode)0;
				((BouncableEntity)__instance).candyballs.Add(text);
				Transform transform = ((VisualEntity)__instance).GetVisual(text).gameObject.transform;
				__instance.hatTf[num] = transform.Find("centerhead/hat001");
				num++;
			}
			if (skate)
			{
				((VisualEntity)__instance).SetVisualSprite("bubbleVisual", "bubble", false, false, new JKMAAHELEMF(256, 256), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, default(Color32));
				((VisualEntity)__instance).SetScale(0.7f, "bubbleVisual");
				((VisualEntity)__instance).GetVisual("bubbleVisual").flipMode = (FlipMode)0;
				((VisualEntity)__instance).GetVisual("bubbleVisual").SetAllMaterialsRenderQueue(1998);
			}
			if (cop_normal)
			{
				((VisualEntity)__instance).SetVisualModel("cuffVisual", AOOJOMIECLD.EGOPOAJDFAJ("cuff", new string[1] { "cuffMat" }, 1f, 0, (FKBHNEMDBMK)0), false, true);
				((VisualEntity)__instance).GetVisual("cuffVisual").flipMode = (FlipMode)0;
				((VisualEntity)__instance).SetScale(0.84f * ((HitableEntity)__instance).standardScale, "cuffVisual");
				((AnimatableEntity)__instance).PlayAnim("off", "cuffVisual");
			}
			if (cop_detective)
			{
				((VisualEntity)__instance).SetVisualModel("cuffDetectiveVisual", AOOJOMIECLD.EGOPOAJDFAJ("cuffDetective", new string[1] { "cuffMat" }, 1f, 0, (FKBHNEMDBMK)0), false, true);
				((VisualEntity)__instance).GetVisual("cuffDetectiveVisual").flipMode = (FlipMode)0;
				((VisualEntity)__instance).SetScale(0.84f * ((HitableEntity)__instance).standardScale, "cuffDetectiveVisual");
				((AnimatableEntity)__instance).PlayAnim("off", "cuffDetectiveVisual");
			}
			if (cop_lucha)
			{
				AOOJOMIECLD val4 = AOOJOMIECLD.HCFBCKBLLAH((DLC)7, "cuffLucha", new string[1] { "cuffMat" }, 1f, 0, (FKBHNEMDBMK)0);
				val4.EDKLFODCINA = new Bundle((BundleType)4);
				((VisualEntity)__instance).SetVisualModel("cuffLuchaVisual", val4, false, true);
				((VisualEntity)__instance).GetVisual("cuffLuchaVisual").flipMode = (FlipMode)0;
				((VisualEntity)__instance).SetScale(0.84f * ((HitableEntity)__instance).standardScale, "cuffLuchaVisual");
				((AnimatableEntity)__instance).PlayAnim("off", "cuffLuchaVisual");
			}
			return false;
		}
	}

	private class GrafPlayerModelSetEntityVisualsPatch
	{
		[HarmonyPatch(typeof(GrafPlayerModel), "SetEntityVisuals")]
		[HarmonyPrefix]
		public static bool SetEntityVisuals_Prefix(GrafPlayerModel __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Invalid comparison between Unknown and I4
			//IL_00c7: 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_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: 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_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Invalid comparison between Unknown and I4
			//IL_014b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Invalid comparison between Unknown and I4
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Invalid comparison between Unknown and I4
			//IL_0172: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			AOOJOMIECLD val = JPLELOFJOOH.NEBGBODHHCG(((MovableEntity)__instance).character, ((MovableEntity)__instance).variant);
			((HitableEntity)__instance).standardScale = val.OGMOEKPOBBP;
			((VisualEntity)__instance).SetVisualModel("main", val, false, true);
			((AbilityEntity)__instance).throwingHand = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/s1/s2/s3/shldr/arm1r/arm2r/elbowr/arm3r/arm4r/handr/ballHolder");
			((PlayerEntity)__instance).AddBaseVisuals();
			if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI != 8)
			{
				((VisualEntity)__instance).SetVisualSprite("paintBlobVisual", "ToxicBubble", false, false, new JKMAAHELEMF(100, 100), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, ((GrafPlayer)__instance).outfitEffectColors[((MovableEntity)__instance).variant]);
			}
			else
			{
				((VisualEntity)__instance).SetVisualSprite("paintBlobVisual", "ToxicBubble", false, false, new JKMAAHELEMF(100, 100), default(JKMAAHELEMF), 0f, true, 0f, (Layer)5, new Color32((byte)82, (byte)82, (byte)82, byte.MaxValue));
			}
			((VisualEntity)__instance).GetVisual("paintBlobVisual").flipMode = (FlipMode)0;
			((AnimatableEntity)__instance).PlayAnim("off", "paintBlobVisual");
			((VisualEntity)__instance).GetVisual("paintBlobVisual").gameObject.transform.parent = null;
			AOOJOMIECLD val2 = (((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 11 || (int)((AbilityEntity)__instance).player.AIINAIDBHJI == 12) ? AOOJOMIECLD.HCFBCKBLLAH((DLC)4, "pieceModelNurse", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 1f, 0, (FKBHNEMDBMK)0) : (((int)((AbilityEntity)__instance).player.AIINAIDBHJI != 8) ? AOOJOMIECLD.HCFBCKBLLAH((Character)10, "pieceModel", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 1f, 0, (FKBHNEMDBMK)0) : AOOJOMIECLD.HCFBCKBLLAH((Character)10, "pieceModel", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 1f, 0, (FKBHNEMDBMK)3)));
			((VisualEntity)__instance).SetVisualModel("pieceVisual", val2, false, false);
			((VisualEntity)__instance).GetVisual("pieceVisual").flipMode = (FlipMode)0;
			((AnimatableEntity)__instance).PlayAnim("off", "pieceVisual");
			((VisualEntity)__instance).GetVisual("pieceVisual").gameObject.transform.parent = null;
			((PlayerEntity)__instance).headTf = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/s1/s2/s3/neck/head");
			return false;
		}
	}

	private class BagPlayerModelSetEntityVisualsPatch
	{
		[HarmonyPatch(typeof(BagPlayerModel), "SetEntityVisuals")]
		[HarmonyPrefix]
		public static bool SetEntityVisuals_Prefix(BagPlayerModel __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0085: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Invalid comparison between Unknown and I4
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Invalid comparison between Unknown and I4
			//IL_00d9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Invalid comparison between Unknown and I4
			//IL_00c0: 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_00ef: Invalid comparison between Unknown and I4
			//IL_0198: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Invalid comparison between Unknown and I4
			//IL_0114: Unknown result type (might be due to invalid IL or missing references)
			//IL_017e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			AOOJOMIECLD val = JPLELOFJOOH.NEBGBODHHCG(((MovableEntity)__instance).character, ((MovableEntity)__instance).variant);
			((HitableEntity)__instance).standardScale = val.OGMOEKPOBBP;
			((VisualEntity)__instance).SetVisualModel("main", val, false, true);
			((AbilityEntity)__instance).throwingHand = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/s1/s2/s3/shldl/arm1l/arm2l/elbowl/arm3l/arm4l/handl/ballHolder");
			((PlayerEntity)__instance).AddBaseVisuals();
			((PlayerEntity)__instance).headTf = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/s1/s2/s3/flap/neck");
			if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 9 || (int)((AbilityEntity)__instance).player.AIINAIDBHJI == 10)
			{
				((VisualEntity)__instance).SetVisualModel("shadowVisual", AOOJOMIECLD.HCFBCKBLLAH((Character)11, "shadowMetal", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.39f, 0, (FKBHNEMDBMK)1), false, false);
			}
			else if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 11 || (int)((AbilityEntity)__instance).player.AIINAIDBHJI == 12)
			{
				((VisualEntity)__instance).SetVisualModel("shadowVisual", AOOJOMIECLD.HCFBCKBLLAH((Character)11, "shadowTengu", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.39f, 0, (FKBHNEMDBMK)1), false, false);
			}
			else if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 8)
			{
				((VisualEntity)__instance).SetVisualModel("shadowVisual", AOOJOMIECLD.HCFBCKBLLAH((Character)11, "shadow", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.39f, 0, (FKBHNEMDBMK)3), false, false);
			}
			else
			{
				((VisualEntity)__instance).SetVisualModel("shadowVisual", AOOJOMIECLD.HCFBCKBLLAH((Character)11, "shadow", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.39f, 0, (FKBHNEMDBMK)1), false, false);
			}
			((VisualEntity)__instance).GetVisual("shadowVisual").flipMode = (FlipMode)0;
			((AnimatableEntity)__instance).PlayAnim("off", "shadowVisual");
			((VisualEntity)__instance).GetVisual("shadowVisual").gameObject.transform.parent = null;
			((VisualEntity)__instance).GetVisual("main").secondaryRenderer = ((VisualEntity)__instance).GetVisual("main").mainRenderer;
			foreach (Renderer skinRenderer in ((VisualEntity)__instance).skinRenderers)
			{
				if (((Object)skinRenderer).name == "mesh1Outline" || ((Object)skinRenderer).name == "mesh1MetalOutline" || ((Object)skinRenderer).name == "mesh1TenguOutline")
				{
					((BagPlayer)__instance).mainOutlineRenderer = skinRenderer;
				}
				if (((Object)skinRenderer).name == "mesh1Metal_MainRenderer" || ((Object)skinRenderer).name == "mesh1_MainRenderer" || ((Object)skinRenderer).name == "mesh1Tengu_MainRenderer")
				{
					((VisualEntity)__instance).GetVisual("main").secondaryRenderer = skinRenderer;
				}
			}
			return false;
		}
	}

	private class CandyPlayerModelSetEntityVisualsPatch
	{
		[HarmonyPatch(typeof(CandyPlayerModel), "SetEntityVisuals")]
		[HarmonyPrefix]
		public static bool SetEntityVisuals_Prefix(CandyPlayerModel __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Invalid comparison between Unknown and I4
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: 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_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d3: Invalid comparison between Unknown and I4
			//IL_0057: 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_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_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Invalid comparison between Unknown and I4
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: 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_0092: 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_0081: Unknown result type (might be due to invalid IL or missing references)
			//IL_0086: Unknown result type (might be due to invalid IL or missing references)
			AOOJOMIECLD val = JPLELOFJOOH.NEBGBODHHCG(((MovableEntity)__instance).character, ((MovableEntity)__instance).variant);
			((HitableEntity)__instance).standardScale = val.OGMOEKPOBBP;
			((VisualEntity)__instance).SetVisualModel("main", val, false, true);
			if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 8)
			{
				AOOJOMIECLD val2 = AOOJOMIECLD.HCFBCKBLLAH((Character)2, "runLegs", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), ((HitableEntity)__instance).standardScale, 74, (FKBHNEMDBMK)3);
				DLC val3 = EPCDKLCABNC.LEMKFOAAMKA((Character)2, ((AbilityEntity)__instance).player.AIINAIDBHJI);
				if ((int)val3 > 0)
				{
					val2.EDKLFODCINA = new Bundle(val3);
				}
				((VisualEntity)__instance).SetVisualModel("runLegsVisual", val2, false, true);
			}
			else
			{
				AOOJOMIECLD val4 = AOOJOMIECLD.HCFBCKBLLAH((Character)2, "runLegs", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), ((HitableEntity)__instance).standardScale, 74, (FKBHNEMDBMK)0);
				DLC val5 = EPCDKLCABNC.LEMKFOAAMKA((Character)2, ((AbilityEntity)__instance).player.AIINAIDBHJI);
				if ((int)val5 > 0)
				{
					val4.EDKLFODCINA = new Bundle(val5);
				}
				((VisualEntity)__instance).SetVisualModel("runLegsVisual", val4, false, true);
			}
			((AbilityEntity)__instance).throwingHand = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/sp1/sp2/sp3/sp4/sp5/shldl/arm1l/elbowl/arm2l/arm3l/handl/ballHolder");
			Transform transform = ((VisualEntity)__instance).GetVisual("main").gameObject.transform;
			((PlayerEntity)__instance).AddBaseVisuals();
			((PlayerEntity)__instance).headTf = transform.Find("root/sp1/sp2/sp3/sp4/sp5/neck/head");
			__instance.tauntHatTf = transform.Find("tauntPropbone1");
			Transform val6 = ((PlayerEntity)__instance).headTf.Find("centerhead");
			__instance.hatTf = val6.Find("hat");
			__instance.jaw1Tf = val6.Find("jaw1");
			__instance.jaw2Tf = val6.Find("jaw2");
			__instance.jaw3Tf = val6.Find("jaw3");
			__instance.jaw4Tf = val6.Find("jaw4");
			return false;
		}
	}

	private class BossPlayerModelSetEntityVisualsPatch
	{
		[HarmonyPatch(typeof(BossPlayerModel), "SetEntityVisuals")]
		[HarmonyPrefix]
		public static bool SetEntityVisuals_Prefix(BossPlayerModel __instance)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: 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_0033: 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_006d: Invalid comparison between Unknown and I4
			//IL_0220: Unknown result type (might be due to invalid IL or missing references)
			//IL_0286: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0354: Unknown result type (might be due to invalid IL or missing references)
			//IL_0383: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Invalid comparison between Unknown and I4
			//IL_03c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cd: Invalid comparison between Unknown and I4
			AOOJOMIECLD val = JPLELOFJOOH.NEBGBODHHCG(((MovableEntity)__instance).character, ((MovableEntity)__instance).variant);
			((HitableEntity)__instance).standardScale = val.OGMOEKPOBBP;
			((PlayerEntity)__instance).pxHeight = val.AFPIBJADFLD * 2;
			((VisualEntity)__instance).SetVisualModel("main", val, false, true);
			((AbilityEntity)__instance).throwingHand = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/sp1/sp2/sp3/arm1r/arm2r/arm3r/handr/ballHolder");
			if ((int)((AbilityEntity)__instance).player.AIINAIDBHJI == 8)
			{
				((VisualEntity)__instance).SetVisualModel("boostFlameL", AOOJOMIECLD.HCFBCKBLLAH((Character)6, "boostFlame", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.6f, 0, (FKBHNEMDBMK)3), false, true);
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.parent = ((Component)((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/leg1l/leg2l")).gameObject.transform;
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.localPosition = Vector3.left * 0.5f;
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, 270f);
				((VisualEntity)__instance).SetVisualModel("boostFlameR", AOOJOMIECLD.HCFBCKBLLAH((Character)6, "boostFlame", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.6f, 0, (FKBHNEMDBMK)3), false, true);
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.parent = ((Component)((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/leg1r/leg2r")).gameObject.transform;
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.localPosition = Vector3.left * 0.5f;
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, 270f);
			}
			else
			{
				((VisualEntity)__instance).SetVisualModel("boostFlameL", AOOJOMIECLD.HCFBCKBLLAH((Character)6, "boostFlame", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.6f, 0, (FKBHNEMDBMK)0), false, true);
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.parent = ((Component)((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/leg1l/leg2l")).gameObject.transform;
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.localPosition = Vector3.left * 0.5f;
				((VisualEntity)__instance).GetVisual("boostFlameL").gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, 270f);
				((VisualEntity)__instance).SetVisualModel("boostFlameR", AOOJOMIECLD.HCFBCKBLLAH((Character)6, "boostFlame", ((AOOJOMIECLD)(ref val)).KGFMPDNFIEC(), 0.6f, 0, (FKBHNEMDBMK)0), false, true);
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.parent = ((Component)((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/leg1r/leg2r")).gameObject.transform;
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.localPosition = Vector3.left * 0.5f;
				((VisualEntity)__instance).GetVisual("boostFlameR").gameObject.transform.localRotation = Quaternion.Euler(0f, 0f, 270f);
			}
			((PlayerEntity)__instance).AddBaseVisuals();
			((PlayerEntity)__instance).headTf = ((VisualEntity)__instance).GetVisual("main").gameObject.transform.Find("root/sp1/sp2/sp3/head");
			if ((int)((MovableEntity)__instance).variant == 11 || (int)((MovableEntity)__instance).variant == 12)
			{
				((Component)((VisualEntity)__instance).GetVisual("main").mainRenderer).gameObject.AddComponent<FNDGCLEDHAD>();
			}
			return false;
		}
	}

	private class JPLELOFJOOHMHOHIACFLOHPatch
	{
		[HarmonyPatch(typeof(JPLELOFJOOH), "MHOHIACFLOH")]
		[HarmonyPrefix]
		public static bool MHOHIACFLOH_Prefix(JPLELOFJOOH __instance)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: 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_002a: Invalid comparison between Unknown and I4
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0151: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Invalid comparison between Unknown and I4
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Invalid comparison between Unknown and I4
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Invalid comparison between Unknown and I4
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Invalid comparison between Unknown and I4
			//IL_017b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0183: Invalid comparison between Unknown and I4
			//IL_016f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0101: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: 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_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0186: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Invalid comparison between Unknown and I4
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: 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_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			List<NCBHPNHFLAJ> list = new List<NCBHPNHFLAJ>();
			NCBHPNHFLAJ item = default(NCBHPNHFLAJ);
			for (int i = 0; i < JPLELOFJOOH.LKIFMPEFNGB.Length; i++)
			{
				NCBHPNHFLAJ val = JPLELOFJOOH.LKIFMPEFNGB[i];
				list.Add(val);
				if ((int)val.AIINAIDBHJI == 0)
				{
					int num = 0;
					for (CharacterVariant val2 = (CharacterVariant)1; (int)val2 < 8; val2 = (CharacterVariant)(val2 + 1))
					{
						string[] array = new string[val.MJJFEAGJICG.Length];
						for (int j = 0; j < array.Length; j++)
						{
							if (j == 0)
							{
								array[j] = val.MJJFEAGJICG[j] + "_Alt" + num.ToString("00");
							}
							else
							{
								array[j] = val.MJJFEAGJICG[j];
							}
						}
						((NCBHPNHFLAJ)(ref item))..ctor(val.LALEEFJMMLH, val2, val.BADNNNCEKEF, array, val.MIGKFLKFCIJ, (DLC)0);
						list.Add(item);
						num++;
					}
					if ((int)val.LALEEFJMMLH == 11)
					{
						list.Add(new NCBHPNHFLAJ(val.LALEEFJMMLH, (CharacterVariant)8, val.BADNNNCEKEF, "ScreenSpaceNoiseOverlayMat", (FKBHNEMDBMK)3));
					}
					else
					{
						list.Add(new NCBHPNHFLAJ(val.LALEEFJMMLH, (CharacterVariant)8, val.BADNNNCEKEF, "ScreenSpaceNoiseOverlayMat", (FKBHNEMDBMK)3));
					}
					JPLELOFJOOH.HIDKOLCMMGJ(list, val, (CharacterVariant)13);
				}
				else if ((int)val.AIINAIDBHJI == 9 || (int)val.AIINAIDBHJI == 10)
				{
					JPLELOFJOOH.HIDKOLCMMGJ(list, val, (CharacterVariant)14);
				}
				else if ((int)val.AIINAIDBHJI == 11 || (int)val.AIINAIDBHJI == 12)
				{
					JPLELOFJOOH.HIDKOLCMMGJ(list, val, (CharacterVariant)15);
				}
			}
			JPLELOFJOOH.LKIFMPEFNGB = list.ToArray();
			return false;
		}
	}

	public static ManualLogSource Log { get; private set; }

	private void Awake()
	{
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Expected O, but got Unknown
		Log = ((BaseUnityPlugin)this).Logger;
		((BaseUnityPlugin)this).Logger.LogDebug((object)"fixes your noise clones");
		Harmony val = new Harmony("us.wallace.plugins.llb.noiseCloneFixes");
		val.PatchAll(typeof(BallEntityAddExtraBallVisualsPatch));
		val.PatchAll(typeof(CandyPlayerModelSetEntityVisualsPatch));
		val.PatchAll(typeof(BagPlayerModelSetEntityVisualsPatch));
		val.PatchAll(typeof(GrafPlayerModelSetEntityVisualsPatch));
		val.PatchAll(typeof(BossPlayerModelSetEntityVisualsPatch));
		val.PatchAll(typeof(JPLELOFJOOHMHOHIACFLOHPatch));
		((BaseUnityPlugin)this).Logger.LogDebug((object)"noiseCloneFixes is loaded");
	}

	private void Start()
	{
	}
}