Decompiled source of EnemyAttackIndicators v1.1.0

EnemyAttackIndicators.dll

Decompiled a year ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using EntityStates;
using EntityStates.AcidLarva;
using EntityStates.BeetleGuardMonster;
using EntityStates.Bell.BellWeapon;
using EntityStates.Bison;
using EntityStates.ClayGrenadier;
using EntityStates.GreaterWispMonster;
using EntityStates.JellyfishMonster;
using EntityStates.LemurianBruiserMonster;
using EntityStates.LemurianMonster;
using EntityStates.LunarGolem;
using EntityStates.LunarWisp;
using EntityStates.VoidBarnacle.Weapon;
using EntityStates.VoidJailer.Weapon;
using EntityStates.Vulture.Weapon;
using EntityStates.Wisp1Monster;
using On.EntityStates.AcidLarva;
using On.EntityStates.BeetleGuardMonster;
using On.EntityStates.Bell.BellWeapon;
using On.EntityStates.Bison;
using On.EntityStates.ClayGrenadier;
using On.EntityStates.GreaterWispMonster;
using On.EntityStates.JellyfishMonster;
using On.EntityStates.LemurianBruiserMonster;
using On.EntityStates.LemurianMonster;
using On.EntityStates.LunarGolem;
using On.EntityStates.LunarWisp;
using On.EntityStates.VoidBarnacle.Weapon;
using On.EntityStates.VoidJailer.Weapon;
using On.EntityStates.Vulture.Weapon;
using On.EntityStates.Wisp1Monster;
using RoR2;
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: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("Dragonyck")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("EnemyAttackIndicators")]
[assembly: AssemblyTitle("EnemyAttackIndicators")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace EnemyAttackIndicators;

internal class Assets
{
	public static AssetBundle MainAssetBundle;

	public static void PopulateAssets()
	{
		if ((Object)(object)MainAssetBundle == (Object)null)
		{
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("EnemyAttackIndicators.wispicons"))
			{
				MainAssetBundle = AssetBundle.LoadFromStream(stream);
			}
		}
	}
}
internal class FilterComponent : MonoBehaviour
{
}
internal class Hook
{
	[Serializable]
	[CompilerGenerated]
	private sealed class <>c
	{
		public static readonly <>c <>9 = new <>c();

		public static hook_OnEnter <>9__0_0;

		public static hook_OnEnter <>9__0_1;

		public static hook_OnEnter <>9__0_2;

		public static hook_OnEnter <>9__0_3;

		public static hook_OnEnter <>9__0_4;

		public static hook_OnExit <>9__0_5;

		public static hook_OnEnter <>9__0_6;

		public static hook_OnExit <>9__0_7;

		public static hook_OnEnter <>9__0_8;

		public static hook_OnExit <>9__0_9;

		public static hook_OnEnter <>9__0_10;

		public static hook_OnExit <>9__0_11;

		public static hook_OnEnter <>9__0_12;

		public static hook_OnExit <>9__0_13;

		public static hook_OnEnter <>9__0_14;

		public static hook_OnExit <>9__0_15;

		public static hook_OnEnter <>9__0_16;

		public static hook_OnExit <>9__0_17;

		public static hook_OnEnter <>9__0_18;

		public static hook_OnEnter <>9__0_19;

		public static hook_OnEnter <>9__0_20;

		public static hook_OnEnter <>9__0_21;

		public static hook_OnEnter <>9__0_22;

		public static hook_OnExit <>9__0_23;

		public static hook_OnEnter <>9__0_24;

		public static hook_OnExit <>9__0_25;

		public static hook_OnEnter <>9__0_26;

		public static hook_OnExit <>9__0_27;

		public static hook_OnEnter <>9__0_28;

		public static hook_OnEnter <>9__0_29;

		public static hook_OnEnter <>9__0_30;

		public static hook_OnEnter <>9__0_31;

		internal void <Hooks>b__0_0(orig_OnEnter orig, ChargeEmbers self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.wispIndicator);
		}

		internal void <Hooks>b__0_1(orig_OnEnter orig, FireEmbers self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_2(orig_OnEnter orig, ChargeCannons self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.greaterWispIndicator);
		}

		internal void <Hooks>b__0_3(orig_OnEnter orig, FireCannons self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_4(orig_OnEnter orig, ChargeTrioBomb self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.bellIndicator);
		}

		internal void <Hooks>b__0_5(orig_OnExit orig, ChargeTrioBomb self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_6(orig_OnEnter orig, ChargeMegaFireball self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.elderIndicator);
		}

		internal void <Hooks>b__0_7(orig_OnExit orig, FireMegaFireball self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_8(orig_OnEnter orig, PrepCharge self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.bisonIndicator);
		}

		internal void <Hooks>b__0_9(orig_OnExit orig, Charge self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_10(orig_OnEnter orig, JellyNova self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.jellyIndicator);
		}

		internal void <Hooks>b__0_11(orig_OnExit orig, JellyNova self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_12(orig_OnEnter orig, ChargeTwinShot self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.lunarGolemIndicator);
		}

		internal void <Hooks>b__0_13(orig_OnExit orig, FireTwinShots self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_14(orig_OnEnter orig, ChargeLunarGuns self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.lunarWispIndicator);
		}

		internal void <Hooks>b__0_15(orig_OnExit orig, FireLunarGuns self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_16(orig_OnEnter orig, SeekingBomb self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.lunarWispIndicator);
		}

		internal void <Hooks>b__0_17(orig_OnExit orig, SeekingBomb self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_18(orig_OnEnter orig, ChargeFire self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.voidJailerIndicator);
		}

		internal void <Hooks>b__0_19(orig_OnEnter orig, Fire self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_20(orig_OnEnter orig, ChargeFireball self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.lemurianIndicator);
		}

		internal void <Hooks>b__0_21(orig_OnEnter orig, FireFireball self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_22(orig_OnEnter orig, FireSunder self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.guardIndicator);
		}

		internal void <Hooks>b__0_23(orig_OnExit orig, FireSunder self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_24(orig_OnEnter orig, ThrowBarrel self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.grenadierIndicator);
		}

		internal void <Hooks>b__0_25(orig_OnExit orig, ThrowBarrel self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_26(orig_OnEnter orig, LarvaLeap self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.larvaIndicator);
		}

		internal void <Hooks>b__0_27(orig_OnExit orig, LarvaLeap self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_28(orig_OnEnter orig, ChargeFire self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.barnacleIndicator);
		}

		internal void <Hooks>b__0_29(orig_OnEnter orig, Fire self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}

		internal void <Hooks>b__0_30(orig_OnEnter orig, ChargeWindblade self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(Prefabs.vultureIndicator);
		}

		internal void <Hooks>b__0_31(orig_OnEnter orig, FireWindblade self)
		{
			orig.Invoke(self);
			((EntityState)(object)self).HandleIndicators(null);
		}
	}

	internal static void Hooks()
	{
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Expected O, but got Unknown
		//IL_007e: 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_0089: Expected O, but got Unknown
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Expected O, but got Unknown
		//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_00e3: Expected O, but got Unknown
		//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_00ae: Expected O, but got Unknown
		//IL_0132: 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_013d: Expected O, but got Unknown
		//IL_00fd: 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: Expected O, but got Unknown
		//IL_018e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0193: Unknown result type (might be due to invalid IL or missing references)
		//IL_0199: Expected O, but got Unknown
		//IL_0157: 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: Expected O, but got Unknown
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f5: Expected O, but got Unknown
		//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Expected O, but got Unknown
		//IL_0246: Unknown result type (might be due to invalid IL or missing references)
		//IL_024b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0251: Expected O, but got Unknown
		//IL_020f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0214: Unknown result type (might be due to invalid IL or missing references)
		//IL_021a: Expected O, but got Unknown
		//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_02b0: Expected O, but got Unknown
		//IL_026b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0270: Unknown result type (might be due to invalid IL or missing references)
		//IL_0276: Expected O, but got Unknown
		//IL_034b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0350: Unknown result type (might be due to invalid IL or missing references)
		//IL_0356: Expected O, but got Unknown
		//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d5: Expected O, but got Unknown
		//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_03b2: Expected O, but got Unknown
		//IL_0370: Unknown result type (might be due to invalid IL or missing references)
		//IL_0375: Unknown result type (might be due to invalid IL or missing references)
		//IL_037b: Expected O, but got Unknown
		//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fa: Expected O, but got Unknown
		//IL_0403: Unknown result type (might be due to invalid IL or missing references)
		//IL_0408: Unknown result type (might be due to invalid IL or missing references)
		//IL_040e: Expected O, but got Unknown
		//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_03d7: Expected O, but got Unknown
		//IL_0314: Unknown result type (might be due to invalid IL or missing references)
		//IL_0319: Unknown result type (might be due to invalid IL or missing references)
		//IL_031f: Expected O, but got Unknown
		//IL_045f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0464: Unknown result type (might be due to invalid IL or missing references)
		//IL_046a: Expected O, but got Unknown
		//IL_0428: Unknown result type (might be due to invalid IL or missing references)
		//IL_042d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0433: Expected O, but got Unknown
		//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04c6: Expected O, but got Unknown
		//IL_0484: Unknown result type (might be due to invalid IL or missing references)
		//IL_0489: Unknown result type (might be due to invalid IL or missing references)
		//IL_048f: Expected O, but got Unknown
		//IL_0517: Unknown result type (might be due to invalid IL or missing references)
		//IL_051c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0522: Expected O, but got Unknown
		//IL_04e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_04e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04eb: Expected O, but got Unknown
		//IL_0573: Unknown result type (might be due to invalid IL or missing references)
		//IL_0578: Unknown result type (might be due to invalid IL or missing references)
		//IL_057e: Expected O, but got Unknown
		//IL_053c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0541: Unknown result type (might be due to invalid IL or missing references)
		//IL_0547: Expected O, but got Unknown
		//IL_0598: Unknown result type (might be due to invalid IL or missing references)
		//IL_059d: Unknown result type (might be due to invalid IL or missing references)
		//IL_05a3: Expected O, but got Unknown
		if (MainPlugin.addWisp.Value)
		{
			object obj = <>c.<>9__0_0;
			if (obj == null)
			{
				hook_OnEnter val = delegate(orig_OnEnter orig, ChargeEmbers self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.wispIndicator);
				};
				<>c.<>9__0_0 = val;
				obj = (object)val;
			}
			ChargeEmbers.OnEnter += (hook_OnEnter)obj;
			object obj2 = <>c.<>9__0_1;
			if (obj2 == null)
			{
				hook_OnEnter val2 = delegate(orig_OnEnter orig, FireEmbers self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_1 = val2;
				obj2 = (object)val2;
			}
			FireEmbers.OnEnter += (hook_OnEnter)obj2;
		}
		if (MainPlugin.addGreaterWisp.Value)
		{
			object obj3 = <>c.<>9__0_2;
			if (obj3 == null)
			{
				hook_OnEnter val3 = delegate(orig_OnEnter orig, ChargeCannons self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.greaterWispIndicator);
				};
				<>c.<>9__0_2 = val3;
				obj3 = (object)val3;
			}
			ChargeCannons.OnEnter += (hook_OnEnter)obj3;
			object obj4 = <>c.<>9__0_3;
			if (obj4 == null)
			{
				hook_OnEnter val4 = delegate(orig_OnEnter orig, FireCannons self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_3 = val4;
				obj4 = (object)val4;
			}
			FireCannons.OnEnter += (hook_OnEnter)obj4;
		}
		if (MainPlugin.addBell.Value)
		{
			object obj5 = <>c.<>9__0_4;
			if (obj5 == null)
			{
				hook_OnEnter val5 = delegate(orig_OnEnter orig, ChargeTrioBomb self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.bellIndicator);
				};
				<>c.<>9__0_4 = val5;
				obj5 = (object)val5;
			}
			ChargeTrioBomb.OnEnter += (hook_OnEnter)obj5;
			object obj6 = <>c.<>9__0_5;
			if (obj6 == null)
			{
				hook_OnExit val6 = delegate(orig_OnExit orig, ChargeTrioBomb self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_5 = val6;
				obj6 = (object)val6;
			}
			ChargeTrioBomb.OnExit += (hook_OnExit)obj6;
		}
		if (MainPlugin.addElder.Value)
		{
			object obj7 = <>c.<>9__0_6;
			if (obj7 == null)
			{
				hook_OnEnter val7 = delegate(orig_OnEnter orig, ChargeMegaFireball self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.elderIndicator);
				};
				<>c.<>9__0_6 = val7;
				obj7 = (object)val7;
			}
			ChargeMegaFireball.OnEnter += (hook_OnEnter)obj7;
			object obj8 = <>c.<>9__0_7;
			if (obj8 == null)
			{
				hook_OnExit val8 = delegate(orig_OnExit orig, FireMegaFireball self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_7 = val8;
				obj8 = (object)val8;
			}
			FireMegaFireball.OnExit += (hook_OnExit)obj8;
		}
		if (MainPlugin.addBison.Value)
		{
			object obj9 = <>c.<>9__0_8;
			if (obj9 == null)
			{
				hook_OnEnter val9 = delegate(orig_OnEnter orig, PrepCharge self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.bisonIndicator);
				};
				<>c.<>9__0_8 = val9;
				obj9 = (object)val9;
			}
			PrepCharge.OnEnter += (hook_OnEnter)obj9;
			object obj10 = <>c.<>9__0_9;
			if (obj10 == null)
			{
				hook_OnExit val10 = delegate(orig_OnExit orig, Charge self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_9 = val10;
				obj10 = (object)val10;
			}
			Charge.OnExit += (hook_OnExit)obj10;
		}
		if (MainPlugin.addJelly.Value)
		{
			object obj11 = <>c.<>9__0_10;
			if (obj11 == null)
			{
				hook_OnEnter val11 = delegate(orig_OnEnter orig, JellyNova self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.jellyIndicator);
				};
				<>c.<>9__0_10 = val11;
				obj11 = (object)val11;
			}
			JellyNova.OnEnter += (hook_OnEnter)obj11;
			object obj12 = <>c.<>9__0_11;
			if (obj12 == null)
			{
				hook_OnExit val12 = delegate(orig_OnExit orig, JellyNova self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_11 = val12;
				obj12 = (object)val12;
			}
			JellyNova.OnExit += (hook_OnExit)obj12;
		}
		if (MainPlugin.addLunarGolem.Value)
		{
			object obj13 = <>c.<>9__0_12;
			if (obj13 == null)
			{
				hook_OnEnter val13 = delegate(orig_OnEnter orig, ChargeTwinShot self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.lunarGolemIndicator);
				};
				<>c.<>9__0_12 = val13;
				obj13 = (object)val13;
			}
			ChargeTwinShot.OnEnter += (hook_OnEnter)obj13;
			object obj14 = <>c.<>9__0_13;
			if (obj14 == null)
			{
				hook_OnExit val14 = delegate(orig_OnExit orig, FireTwinShots self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_13 = val14;
				obj14 = (object)val14;
			}
			FireTwinShots.OnExit += (hook_OnExit)obj14;
		}
		if (MainPlugin.addLunarWisp.Value)
		{
			object obj15 = <>c.<>9__0_14;
			if (obj15 == null)
			{
				hook_OnEnter val15 = delegate(orig_OnEnter orig, ChargeLunarGuns self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.lunarWispIndicator);
				};
				<>c.<>9__0_14 = val15;
				obj15 = (object)val15;
			}
			ChargeLunarGuns.OnEnter += (hook_OnEnter)obj15;
			object obj16 = <>c.<>9__0_15;
			if (obj16 == null)
			{
				hook_OnExit val16 = delegate(orig_OnExit orig, FireLunarGuns self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_15 = val16;
				obj16 = (object)val16;
			}
			FireLunarGuns.OnExit += (hook_OnExit)obj16;
			object obj17 = <>c.<>9__0_16;
			if (obj17 == null)
			{
				hook_OnEnter val17 = delegate(orig_OnEnter orig, SeekingBomb self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.lunarWispIndicator);
				};
				<>c.<>9__0_16 = val17;
				obj17 = (object)val17;
			}
			SeekingBomb.OnEnter += (hook_OnEnter)obj17;
			object obj18 = <>c.<>9__0_17;
			if (obj18 == null)
			{
				hook_OnExit val18 = delegate(orig_OnExit orig, SeekingBomb self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_17 = val18;
				obj18 = (object)val18;
			}
			SeekingBomb.OnExit += (hook_OnExit)obj18;
		}
		if (MainPlugin.addVoidJailer.Value)
		{
			object obj19 = <>c.<>9__0_18;
			if (obj19 == null)
			{
				hook_OnEnter val19 = delegate(orig_OnEnter orig, ChargeFire self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.voidJailerIndicator);
				};
				<>c.<>9__0_18 = val19;
				obj19 = (object)val19;
			}
			ChargeFire.OnEnter += (hook_OnEnter)obj19;
			object obj20 = <>c.<>9__0_19;
			if (obj20 == null)
			{
				hook_OnEnter val20 = delegate(orig_OnEnter orig, Fire self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_19 = val20;
				obj20 = (object)val20;
			}
			Fire.OnEnter += (hook_OnEnter)obj20;
		}
		if (MainPlugin.addLemurian.Value)
		{
			object obj21 = <>c.<>9__0_20;
			if (obj21 == null)
			{
				hook_OnEnter val21 = delegate(orig_OnEnter orig, ChargeFireball self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.lemurianIndicator);
				};
				<>c.<>9__0_20 = val21;
				obj21 = (object)val21;
			}
			ChargeFireball.OnEnter += (hook_OnEnter)obj21;
			object obj22 = <>c.<>9__0_21;
			if (obj22 == null)
			{
				hook_OnEnter val22 = delegate(orig_OnEnter orig, FireFireball self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_21 = val22;
				obj22 = (object)val22;
			}
			FireFireball.OnEnter += (hook_OnEnter)obj22;
		}
		if (MainPlugin.addGuard.Value)
		{
			object obj23 = <>c.<>9__0_22;
			if (obj23 == null)
			{
				hook_OnEnter val23 = delegate(orig_OnEnter orig, FireSunder self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.guardIndicator);
				};
				<>c.<>9__0_22 = val23;
				obj23 = (object)val23;
			}
			FireSunder.OnEnter += (hook_OnEnter)obj23;
			object obj24 = <>c.<>9__0_23;
			if (obj24 == null)
			{
				hook_OnExit val24 = delegate(orig_OnExit orig, FireSunder self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_23 = val24;
				obj24 = (object)val24;
			}
			FireSunder.OnExit += (hook_OnExit)obj24;
		}
		if (MainPlugin.addGrenadier.Value)
		{
			object obj25 = <>c.<>9__0_24;
			if (obj25 == null)
			{
				hook_OnEnter val25 = delegate(orig_OnEnter orig, ThrowBarrel self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.grenadierIndicator);
				};
				<>c.<>9__0_24 = val25;
				obj25 = (object)val25;
			}
			ThrowBarrel.OnEnter += (hook_OnEnter)obj25;
			object obj26 = <>c.<>9__0_25;
			if (obj26 == null)
			{
				hook_OnExit val26 = delegate(orig_OnExit orig, ThrowBarrel self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_25 = val26;
				obj26 = (object)val26;
			}
			ThrowBarrel.OnExit += (hook_OnExit)obj26;
		}
		if (MainPlugin.addLarva.Value)
		{
			object obj27 = <>c.<>9__0_26;
			if (obj27 == null)
			{
				hook_OnEnter val27 = delegate(orig_OnEnter orig, LarvaLeap self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.larvaIndicator);
				};
				<>c.<>9__0_26 = val27;
				obj27 = (object)val27;
			}
			LarvaLeap.OnEnter += (hook_OnEnter)obj27;
			object obj28 = <>c.<>9__0_27;
			if (obj28 == null)
			{
				hook_OnExit val28 = delegate(orig_OnExit orig, LarvaLeap self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_27 = val28;
				obj28 = (object)val28;
			}
			LarvaLeap.OnExit += (hook_OnExit)obj28;
		}
		if (MainPlugin.addBarnacle.Value)
		{
			object obj29 = <>c.<>9__0_28;
			if (obj29 == null)
			{
				hook_OnEnter val29 = delegate(orig_OnEnter orig, ChargeFire self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(Prefabs.barnacleIndicator);
				};
				<>c.<>9__0_28 = val29;
				obj29 = (object)val29;
			}
			ChargeFire.OnEnter += (hook_OnEnter)obj29;
			object obj30 = <>c.<>9__0_29;
			if (obj30 == null)
			{
				hook_OnEnter val30 = delegate(orig_OnEnter orig, Fire self)
				{
					orig.Invoke(self);
					((EntityState)(object)self).HandleIndicators(null);
				};
				<>c.<>9__0_29 = val30;
				obj30 = (object)val30;
			}
			Fire.OnEnter += (hook_OnEnter)obj30;
		}
		if (!MainPlugin.addVulture.Value)
		{
			return;
		}
		object obj31 = <>c.<>9__0_30;
		if (obj31 == null)
		{
			hook_OnEnter val31 = delegate(orig_OnEnter orig, ChargeWindblade self)
			{
				orig.Invoke(self);
				((EntityState)(object)self).HandleIndicators(Prefabs.vultureIndicator);
			};
			<>c.<>9__0_30 = val31;
			obj31 = (object)val31;
		}
		ChargeWindblade.OnEnter += (hook_OnEnter)obj31;
		object obj32 = <>c.<>9__0_31;
		if (obj32 == null)
		{
			hook_OnEnter val32 = delegate(orig_OnEnter orig, FireWindblade self)
			{
				orig.Invoke(self);
				((EntityState)(object)self).HandleIndicators(null);
			};
			<>c.<>9__0_31 = val32;
			obj32 = (object)val32;
		}
		FireWindblade.OnEnter += (hook_OnEnter)obj32;
	}
}
[BepInPlugin("com.Dragonyck.EnemyAttackIndicators", "EnemyAttackIndicators", "1.1.0")]
public class MainPlugin : BaseUnityPlugin
{
	public const string MODUID = "com.Dragonyck.EnemyAttackIndicators";

	public const string MODNAME = "EnemyAttackIndicators";

	public const string VERSION = "1.1.0";

	protected internal static ConfigEntry<bool> addIcons;

	protected internal static ConfigEntry<bool> addWisp;

	protected internal static ConfigEntry<bool> addGreaterWisp;

	protected internal static ConfigEntry<bool> addBell;

	protected internal static ConfigEntry<bool> addElder;

	protected internal static ConfigEntry<bool> addBison;

	protected internal static ConfigEntry<bool> addLunarGolem;

	protected internal static ConfigEntry<bool> addJelly;

	protected internal static ConfigEntry<bool> addLunarWisp;

	protected internal static ConfigEntry<bool> addVoidJailer;

	protected internal static ConfigEntry<bool> addLemurian;

	protected internal static ConfigEntry<bool> addGuard;

	protected internal static ConfigEntry<bool> addGrenadier;

	protected internal static ConfigEntry<bool> addLarva;

	protected internal static ConfigEntry<bool> addBarnacle;

	protected internal static ConfigEntry<bool> addVulture;

	private void Awake()
	{
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Expected O, but got Unknown
		//IL_002c: Expected O, but got Unknown
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Expected O, but got Unknown
		//IL_005c: Expected O, but got Unknown
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_008c: Expected O, but got Unknown
		//IL_008c: Expected O, but got Unknown
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bc: Expected O, but got Unknown
		//IL_00bc: Expected O, but got Unknown
		//IL_00d1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Expected O, but got Unknown
		//IL_00ec: Expected O, but got Unknown
		//IL_0101: Unknown result type (might be due to invalid IL or missing references)
		//IL_0112: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Expected O, but got Unknown
		//IL_011c: Expected O, but got Unknown
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_014c: Expected O, but got Unknown
		//IL_014c: Expected O, but got Unknown
		//IL_0161: 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_017c: Expected O, but got Unknown
		//IL_017c: Expected O, but got Unknown
		//IL_0191: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Expected O, but got Unknown
		//IL_01ac: Expected O, but got Unknown
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01dc: Expected O, but got Unknown
		//IL_01dc: Expected O, but got Unknown
		//IL_01f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_020c: Expected O, but got Unknown
		//IL_020c: Expected O, but got Unknown
		//IL_0221: Unknown result type (might be due to invalid IL or missing references)
		//IL_0232: Unknown result type (might be due to invalid IL or missing references)
		//IL_023c: Expected O, but got Unknown
		//IL_023c: Expected O, but got Unknown
		//IL_0251: Unknown result type (might be due to invalid IL or missing references)
		//IL_0262: Unknown result type (might be due to invalid IL or missing references)
		//IL_026c: Expected O, but got Unknown
		//IL_026c: Expected O, but got Unknown
		//IL_0281: Unknown result type (might be due to invalid IL or missing references)
		//IL_0292: Unknown result type (might be due to invalid IL or missing references)
		//IL_029c: Expected O, but got Unknown
		//IL_029c: Expected O, but got Unknown
		//IL_02b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02cc: Expected O, but got Unknown
		//IL_02cc: Expected O, but got Unknown
		//IL_02e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_02f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fc: Expected O, but got Unknown
		//IL_02fc: Expected O, but got Unknown
		addIcons = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Enemy Icons On Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addWisp = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Wisp Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addGreaterWisp = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Greater Wisp Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addBell = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Brass Contraption Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addElder = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Elder Lemurian Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addBison = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Bison Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addJelly = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Jellyfish Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addLunarGolem = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Lunar Golem Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addLunarWisp = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Lunar Wisp Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addVoidJailer = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Void Jailer Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addLemurian = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Lemurian Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addGuard = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Beetle Guard Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addGrenadier = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Clay Apothecary Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addLarva = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Larva Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addBarnacle = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Void Barnacle Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		addVulture = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("Enable Alloy Vulture Indicator", "Enable"), true, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>()));
		Assets.PopulateAssets();
		Prefabs.CreatePrefabs();
		Hook.Hooks();
	}
}
internal class Prefabs
{
	internal static GameObject wispIndicator;

	internal static GameObject greaterWispIndicator;

	internal static GameObject bellIndicator;

	internal static GameObject elderIndicator;

	internal static GameObject bisonIndicator;

	internal static GameObject jellyIndicator;

	internal static GameObject lunarGolemIndicator;

	internal static GameObject lunarWispIndicator;

	internal static GameObject voidJailerIndicator;

	internal static GameObject lemurianIndicator;

	internal static GameObject grenadierIndicator;

	internal static GameObject barnacleIndicator;

	internal static GameObject guardIndicator;

	internal static GameObject larvaIndicator;

	internal static GameObject vultureIndicator;

	private static Color WispColor = new Color(0.81961f, 0.50196f, 0.13725f);

	private static Color GreaterWispColor = new Color(0.20392f, 0.81176f, 0.09412f);

	private static Color BellColor = new Color(0.42353f, 0.38431f, 0.33333f);

	private static Color ElderColor = new Color(0.85882f, 0.72941f, 0.27059f);

	private static Color BisonColor = new Color(0.73725f, 0.67843f, 0.2549f);

	private static Color JellyColor = new Color(0.45098f, 0.57255f, 0.59608f);

	private static Color LunarGolemColor = new Color(0.45882f, 0.58431f, 0.61176f);

	private static Color LunarWispColor = new Color(0.21961f, 0.44314f, 0.87843f);

	private static Color VoidJailerColor = new Color(0.25882f, 0.37647f, 0.85098f);

	private static Color LemurianColor = new Color(0.505f, 0.352f, 0.66f);

	private static Color GrenadierColor = new Color(0.311f, 0.232f, 0.142f);

	private static Color BarnacleColor = new Color(0.31f, 0.294f, 0.424f);

	private static Color GuardColor = new Color(0.547f, 0.467f, 0.214f);

	private static Color LarvaColor = new Color(0.142f, 0.179f, 0.217f);

	private static Color VultureColor = new Color(0.106f, 0.179f, 0.151f);

	private static GameObject dontDestroyOnLoadParent;

	private static GameObject indicator;

	internal static void CreatePrefabs()
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Expected O, but got Unknown
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: 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_0057: 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_0089: 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_00bb: 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_00ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_011f: 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_0151: Unknown result type (might be due to invalid IL or missing references)
		//IL_016a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0183: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		dontDestroyOnLoadParent = new GameObject();
		dontDestroyOnLoadParent.SetActive(false);
		Object.DontDestroyOnLoad((Object)(object)dontDestroyOnLoadParent);
		indicator = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/BossPositionIndicator.prefab").WaitForCompletion();
		wispIndicator = CreateIndicator("WispIndicator", WispColor, "wisIcon");
		greaterWispIndicator = CreateIndicator("GreaterWispIndicator", GreaterWispColor, "greaterWispIcon");
		bellIndicator = CreateIndicator("BellIndicator", BellColor, "bellIcon");
		elderIndicator = CreateIndicator("ElderLemurianIndicator", ElderColor, "elderIcon");
		bisonIndicator = CreateIndicator("bisonIcon", BisonColor, "bisonIcon");
		jellyIndicator = CreateIndicator("JellyIndicator", JellyColor, "jellyIcon");
		lunarGolemIndicator = CreateIndicator("LunarGolemIndicator", LunarGolemColor, "lunarGolemIcon");
		lunarWispIndicator = CreateIndicator("LunarWispIndicator", LunarWispColor, "lunarWispIcon");
		voidJailerIndicator = CreateIndicator("VoidJailerIndicator", VoidJailerColor, "voidJailerIcon");
		lemurianIndicator = CreateIndicator("VoidJailerIndicator", LemurianColor, "lemurianIcon");
		grenadierIndicator = CreateIndicator("VoidJailerIndicator", GrenadierColor, "grenadierIcon");
		barnacleIndicator = CreateIndicator("VoidJailerIndicator", BarnacleColor, "barnacleIcon");
		guardIndicator = CreateIndicator("VoidJailerIndicator", GuardColor, "guardIcon");
		larvaIndicator = CreateIndicator("VoidJailerIndicator", LarvaColor, "larvaIcon");
		vultureIndicator = CreateIndicator("VultureIndicator", VultureColor, "vultureIcon");
	}

	private static GameObject CreateIndicator(string objName, Color color, string iconName)
	{
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_011d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = Object.Instantiate<GameObject>(indicator);
		((Object)val).name = objName;
		val.transform.SetParent(dontDestroyOnLoadParent.transform);
		val.AddComponent<FilterComponent>();
		Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			if (Object.op_Implicit((Object)(object)componentsInChildren[i]) && ((Object)componentsInChildren[i]).name == "Sprite")
			{
				((Component)componentsInChildren[i]).GetComponent<SpriteRenderer>().color = color;
			}
			if (Object.op_Implicit((Object)(object)componentsInChildren[i]) && ((Object)componentsInChildren[i]).name == "Sprite" && ((Object)componentsInChildren[i].parent).name == "Sprite" && MainPlugin.addIcons.Value)
			{
				GameObject val2 = Object.Instantiate<GameObject>(((Component)componentsInChildren[i]).gameObject, componentsInChildren[i].parent.parent);
				val2.transform.localPosition = new Vector3(0f, 1.4f, 0f);
				val2.transform.localScale = new Vector3(1f, -1f, 1f);
				SpriteRenderer component = val2.GetComponent<SpriteRenderer>();
				component.color = Color.white;
				component.sprite = Assets.MainAssetBundle.LoadAsset<Sprite>(iconName);
			}
		}
		return val;
	}
}
internal static class Extensions
{
	internal static void HandleIndicators(this EntityState state, GameObject indicatorPrefab)
	{
		NetworkUser currentNetworkUser = LocalUserManager.GetFirstLocalUser().currentNetworkUser;
		if (Object.op_Implicit((Object)(object)currentNetworkUser) && Object.op_Implicit((Object)(object)currentNetworkUser.master) && Object.op_Implicit((Object)(object)currentNetworkUser.master.GetBody()) && Object.op_Implicit((Object)(object)state.characterBody) && Object.op_Implicit((Object)(object)state.characterBody.master) && state.characterBody.master.aiComponents != null && Object.op_Implicit((Object)(object)state.characterBody.master.aiComponents[0]) && Object.op_Implicit((Object)(object)state.characterBody.master.aiComponents[0].currentEnemy.gameObject) && (Object)(object)state.characterBody.master.aiComponents[0].currentEnemy.gameObject == (Object)(object)((Component)currentNetworkUser.master.GetBody()).gameObject)
		{
			FilterComponent componentInChildren = state.gameObject.GetComponentInChildren<FilterComponent>();
			if (Object.op_Implicit((Object)(object)componentInChildren))
			{
				Object.Destroy((Object)(object)((Component)componentInChildren).gameObject);
			}
			else if (Object.op_Implicit((Object)(object)indicatorPrefab))
			{
				Object.Instantiate<GameObject>(indicatorPrefab, state.transform).GetComponent<PositionIndicator>().targetTransform = state.transform;
			}
		}
	}
}