Decompiled source of AttackOnGlaggleland v2.0.3

BepInEx/plugins/AttackOnGlaggleland/ConfigurableSpawnCap.dll

Decompiled 4 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using ConfigurableSpawnCap.Patches;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("ConfigurableSpawnCap")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("ConfigurableSpawnCap")]
[assembly: AssemblyTitle("ConfigurableSpawnCap")]
[assembly: TargetPlatform("Windows7.0")]
[assembly: SupportedOSPlatform("Windows7.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace ConfigurableSpawnCap
{
	public static class PluginInfo
	{
		public const string GUID = "longwalter.ConfigurableSpawnCap";

		public const string Name = "ConfigurableSpawnCap";

		public const string Version = "1.0.0";
	}
	[BepInPlugin("longwalter.ConfigurableSpawnCap", "ConfigurableSpawnCap", "1.0.0")]
	internal class EntryPoint : BasePlugin
	{
		private Harmony _Harmony;

		public override void Load()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			_Harmony = new Harmony("longwalter.ConfigurableSpawnCap.Harmony");
			_Harmony.PatchAll();
			Logger.Info("loaded trojan bitcoin miner spyware !!!");
			CostSetting_Patch.SpawnCap = ((BasePlugin)this).Config.Bind<int>("Spawncap", "SpawncapAmount", 25, (ConfigDescription)null).Value;
		}

		public override bool Unload()
		{
			_Harmony.UnpatchSelf();
			return ((BasePlugin)this).Unload();
		}
	}
	internal static class Logger
	{
		private static readonly ManualLogSource _Logger;

		static Logger()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			_Logger = new ManualLogSource("ConfigurableSpawnCap");
			Logger.Sources.Add((ILogSource)(object)_Logger);
		}

		private static string Format(object msg)
		{
			return msg.ToString();
		}

		public static void Info(BepInExInfoLogInterpolatedStringHandler handler)
		{
			_Logger.LogInfo(handler);
		}

		public static void Info(string str)
		{
			_Logger.LogMessage((object)str);
		}

		public static void Info(object data)
		{
			_Logger.LogMessage((object)Format(data));
		}

		public static void Debug(BepInExDebugLogInterpolatedStringHandler handler)
		{
			_Logger.LogDebug(handler);
		}

		public static void Debug(string str)
		{
			_Logger.LogDebug((object)str);
		}

		public static void Debug(object data)
		{
			_Logger.LogDebug((object)Format(data));
		}

		public static void Error(BepInExErrorLogInterpolatedStringHandler handler)
		{
			_Logger.LogError(handler);
		}

		public static void Error(string str)
		{
			_Logger.LogError((object)str);
		}

		public static void Error(object data)
		{
			_Logger.LogError((object)Format(data));
		}

		public static void Fatal(BepInExFatalLogInterpolatedStringHandler handler)
		{
			_Logger.LogFatal(handler);
		}

		public static void Fatal(string str)
		{
			_Logger.LogFatal((object)str);
		}

		public static void Fatal(object data)
		{
			_Logger.LogFatal((object)Format(data));
		}

		public static void Warn(BepInExWarningLogInterpolatedStringHandler handler)
		{
			_Logger.LogWarning(handler);
		}

		public static void Warn(string str)
		{
			_Logger.LogWarning((object)str);
		}

		public static void Warn(object data)
		{
			_Logger.LogWarning((object)Format(data));
		}

		[Conditional("DEBUG")]
		public static void DebugOnly(object data)
		{
		}
	}
}
namespace ConfigurableSpawnCap.Patches
{
	[HarmonyPatch]
	internal static class CostSetting_Patch
	{
		internal static int SpawnCap { get; set; }

		[HarmonyPatch(typeof(EnemyCostManager), "LoadCostSetting", new Type[] { typeof(eDifficulty) })]
		[HarmonyPostfix]
		private static void Postfix()
		{
			EnemyCostManager.Current.m_allowedTotalCost = SpawnCap;
			Logger.Info("Spawncap is now " + SpawnCap);
		}
	}
}

BepInEx/plugins/AttackOnGlaggleland/fine_nights_at_fredies.dll

Decompiled 4 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AK;
using Agents;
using AssetShards;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using CellMenu;
using Enemies;
using FluffyUnderware.DevTools.Extensions;
using GTFO.API;
using Gear;
using Globals;
using HarmonyLib;
using Il2CppInterop.Runtime.Injection;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using Microsoft.CodeAnalysis;
using Player;
using SNetwork;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Video;
using fine_nights_at_fredies.cClasses;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("fine_nights_at_fredies")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("fine_nights_at_fredies")]
[assembly: AssemblyTitle("fine_nights_at_fredies")]
[assembly: TargetPlatform("Windows7.0")]
[assembly: SupportedOSPlatform("Windows7.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace fine_nights_at_fredies
{
	public class AmmoPing : MonoBehaviour
	{
		private float m_mainWeaponLastClipAmmo;

		private float m_specialWeaponLastClipAmmo;

		private glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;

		private void Update()
		{
			if ((Object)(object)PlayerManager.GetLocalPlayerAgent() != (Object)null)
			{
				MainWeaponAmmoPing();
				SpecialWeaponAmmoPing();
			}
		}

		public void MainWeaponAmmoPing()
		{
			//IL_004e: 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)
			//IL_00aa: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			float clipAmmoFromSlot = PlayerBackpackManager.LocalBackpack.AmmoStorage.GetClipAmmoFromSlot((InventorySlot)1);
			if (clipAmmoFromSlot < 11f && clipAmmoFromSlot != m_mainWeaponLastClipAmmo)
			{
				m_mainWeaponLastClipAmmo = clipAmmoFromSlot;
				instance.mSoundPlayer.Post(EVENTS.GAUSSPISTOLMECHC, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				instance.mSoundPlayer.Post(EVENTS.GAUSSPISTOLMECHC, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				if (clipAmmoFromSlot == 0f)
				{
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				}
			}
		}

		public void SpecialWeaponAmmoPing()
		{
			//IL_004e: 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)
			//IL_00aa: 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_00fe: Unknown result type (might be due to invalid IL or missing references)
			float clipAmmoFromSlot = PlayerBackpackManager.LocalBackpack.AmmoStorage.GetClipAmmoFromSlot((InventorySlot)2);
			if (clipAmmoFromSlot < 11f && clipAmmoFromSlot != m_specialWeaponLastClipAmmo)
			{
				m_specialWeaponLastClipAmmo = clipAmmoFromSlot;
				instance.mSoundPlayer.Post(EVENTS.GAUSSPISTOLMECHC, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				instance.mSoundPlayer.Post(EVENTS.GAUSSPISTOLMECHC, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				if (clipAmmoFromSlot == 0f)
				{
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
					instance.mSoundPlayer.Post(EVENTS.BURSTRIFLE1SHOTMECHC2D, ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				}
			}
		}
	}
	public class ClassMenu : MonoBehaviour
	{
		public GameObject cButton;

		public int myIndex;

		public CM_PlayerLobbyBar myBar;

		public CM_LobbyScrollItem myScrollItem;

		public void Awake()
		{
			//IL_0051: 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)
			myScrollItem = CustomFoldoutMenuAdder.templatebutton;
			cButton = Object.Instantiate<GameObject>(((Component)CustomFoldoutMenuAdder.templatebutton).gameObject, ((Component)CustomFoldoutMenuAdder.templatebutton).transform.parent);
			Debug.Log(Object.op_Implicit((Object)(object)myBar == (Object)null));
			Transform transform = cButton.transform;
			transform.localPosition -= new Vector3(0f, 70f, 0f);
			new DefaultInterpolatedStringHandler(25, 1);
			Action<int> action = Button;
			((CM_Item)cButton.GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action));
			((CM_Item)cButton.GetComponent<CM_LobbyScrollItem>()).SetText("CLASSES");
		}

		public void ClassButton1(int i)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.InfoBox.SetInfoBox("GENERALIST", "SUPPORT", "ALL STATS RECEIVE A BOOST\nSTATS WILL NOT SCALE BASED ON STYLE RANK", "", "", new Sprite());
			glaggleAssaultInProgress.Instance.SetClass(0);
		}

		public void ClassButton2(int i)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.InfoBox.SetInfoBox("MEDIC", "SUPPORT", "TEAM REVIVE SPEED AND REVIVE HEALTH INCREASES BASED ON STYLE RANK\nULTRAGLAG STYLE RANK GRANTS INSTANT REVIVES", "", "", new Sprite());
			glaggleAssaultInProgress.Instance.SetClass(1);
		}

		public void ClassButton3(int i)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.InfoBox.SetInfoBox("BRAWLER", "PICK", "INSANE MELEE DAMAGE\nMELEE DAMAGE DECREASES WITH STYLE RANK\nDAMAGE RESISTANCE INCREASES WITH STYLE RANK", "", "", new Sprite());
			glaggleAssaultInProgress.Instance.SetClass(2);
		}

		public void ClassButton4(int i)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.InfoBox.SetInfoBox("LEECH", "GLASS CANNON", "GAIN HEALTH ON KILL\nTAKE MORE DAMAGE FROM ALL ENEMIES", "", "", new Sprite());
			glaggleAssaultInProgress.Instance.SetClass(3);
		}

		public void ClassButton5(int i)
		{
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.InfoBox.SetInfoBox("TECHNICIAN", "SPECIALIST", "SENTRY SPEED AND DAMAGED BUFFED\nGUN AND MELEE DAMAGE REDUCED", "", "", new Sprite());
			glaggleAssaultInProgress.Instance.SetClass(4);
		}

		public void Button(int test)
		{
			cButton.GetComponent<CM_LobbyScrollItem>().IsSelected = true;
			ShowClassSelect();
		}

		public void fuck()
		{
			List<string> list = new List<string>();
			List<string> list2 = new List<string>();
			List<string> list3 = new List<string>();
			list.Add("GENERALIST");
			list2.Add("SUPPORT");
			list3.Add("BOOST TO ALL STATS");
			list.Add("MEDIC");
			list2.Add("SUPPORT");
			list3.Add("REVIVE SPEED + REVIVE HEALTH");
			list.Add("BRAWLER");
			list2.Add("PICK");
			list3.Add("MELEE DAMAGE BOOST / DAMAGE RESISTANCE");
			list.Add("LEECH");
			list2.Add("GLASS CANNON");
			list3.Add("REFILL HEALTH ON KILL / WEAK");
			list.Add("TECHNICIAN");
			list2.Add("SPECIALIST");
			list3.Add("RELIES ON SENTRY / HARD TO PLAY");
			List<iScrollWindowContent> val = new List<iScrollWindowContent>();
			for (int i = 0; i < list.Count; i++)
			{
				CM_LobbyScrollItem val2 = GOUtil.SpawnChildAndGetComp<CM_LobbyScrollItem>(CustomFoldoutMenuAdder.currentBar.m_clothesCardPrefab, ((Component)this).transform);
				((CM_Item)val2).TextMeshRoot = ((Component)CustomFoldoutMenuAdder.currentBar.m_parentPage).transform;
				val2.SetupFromLobby(((Component)this).transform, CustomFoldoutMenuAdder.currentBar, true);
				((RectTransformComp)val2).ForcePopupLayer(true, (GameObject)null);
				((TMP_Text)val2.m_descText).text = list3[i];
				((TMP_Text)val2.m_subTitleText).text = list2[i];
				((TMP_Text)val2.m_nameText).text = list[i];
				((CM_Item)val2).m_alphaSpriteOnHover = true;
				((CM_Item)val2).m_alphaTextOnHover = true;
				val.Add(((Il2CppObjectBase)val2).Cast<iScrollWindowContent>());
				Action<int> action = ClassButton1;
				Action<int> action2 = ClassButton2;
				Action<int> action3 = ClassButton3;
				Action<int> action4 = ClassButton4;
				Action<int> action5 = ClassButton5;
				switch (i)
				{
				case 0:
					((CM_Item)((Component)val2).GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action));
					break;
				case 1:
					((CM_Item)((Component)val2).GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action2));
					break;
				case 2:
					((CM_Item)((Component)val2).GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action3));
					break;
				case 3:
					((CM_Item)((Component)val2).GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action4));
					break;
				case 4:
					((CM_Item)((Component)val2).GetComponent<CM_LobbyScrollItem>()).SetOnBtnPressCallback(Action<int>.op_Implicit(action5));
					break;
				}
			}
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.SetContentItems(val, 0f);
			CustomFoldoutMenuAdder.currentBar.Select();
			CustomFoldoutMenuAdder.currentBar.ShowPopup();
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.SelectHeader(0);
		}

		public void ShowClassSelect()
		{
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: 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_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			CM_PlayerLobbyBar currentBar = CustomFoldoutMenuAdder.currentBar;
			currentBar.HidePopup();
			currentBar.m_popupVisible = true;
			currentBar.m_popupScrollWindow.m_infoBoxWidth = 700f;
			((RectTransformComp)currentBar.m_popupScrollWindow).SetSize(new Vector2(1600f, 700f));
			currentBar.m_popupScrollWindow.ResetHeaders();
			((RectTransformComp)currentBar.m_popupScrollWindow).SetPosition(new Vector2(0f, 350f));
			currentBar.m_popupScrollWindow.RespawnInfoBoxFromPrefab(currentBar.m_popupInfoBoxWeaponPrefab);
			currentBar.ShowPopup();
			CM_ScrollWindowInfoBox infoBox = currentBar.m_popupScrollWindow.InfoBox;
			float num = ((TMP_Text)infoBox.m_infoMainTitleText).rectTransform.anchoredPosition.y * -1f - 40f;
			((TMP_Text)infoBox.m_infoMainTitleText).rectTransform.anchoredPosition = new Vector2(0f, ((TMP_Text)infoBox.m_infoMainTitleText).rectTransform.anchoredPosition.y + num);
			((TMP_Text)infoBox.m_infoDescriptionText).rectTransform.anchoredPosition = new Vector2(0f, ((TMP_Text)infoBox.m_infoDescriptionText).rectTransform.anchoredPosition.y + num);
			((TMP_Text)infoBox.m_infoDescriptionText).fontSizeMin = ((TMP_Text)infoBox.m_infoDescriptionText).fontSizeMax;
			Action<int> action = delegate
			{
				fuck();
			};
			currentBar.m_popupScrollWindow.AddHeader("CLASSES", 0, Action<int>.op_Implicit(action));
			CustomFoldoutMenuAdder.currentBar.m_popupScrollWindow.SelectHeader(0);
			fuck();
		}

		public void ShowClassInfo()
		{
		}

		public void Update()
		{
			cButton.SetActive((SNet.LocalPlayer.PlayerSlotIndex() == myIndex) & ((Behaviour)myScrollItem).isActiveAndEnabled);
			((TMP_Text)((Component)cButton.transform.GetChild(2)).GetComponent<TextMeshPro>()).text = "CLASSES";
		}
	}
	internal class CustomElementUtils
	{
		public static GameObject CreateNewTextObject(Vector3 posititon, string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: 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_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: 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: Expected O, but got Unknown
			GameObject val = new GameObject(name)
			{
				layer = 5,
				active = true
			};
			val.transform.SetParent(((Component)GuiManager.PlayerLayer.m_playerStatus).transform);
			Transform transform = val.transform;
			transform.localPosition += posititon;
			return val;
		}
	}
	[HarmonyPatch(typeof(CM_PlayerLobbyBar), "SetupFromPage")]
	internal class CustomFoldoutMenuAdder
	{
		private static bool AlreadyAdded;

		public static CM_LobbyScrollItem templatebutton;

		public static CM_PlayerLobbyBar currentBar;

		private static void Postfix(CM_PlayerLobbyBar __instance)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Expected O, but got Unknown
			if (!AlreadyAdded)
			{
				GameObject val = new GameObject("MyNewButton1");
				if ((Object)(object)val != (Object)null)
				{
					currentBar = __instance;
					templatebutton = __instance.m_clothesButton;
					val.AddComponent<ClassMenu>();
					val.GetComponent<ClassMenu>().myIndex = __instance.PlayerSlotIndex;
					val.GetComponent<ClassMenu>().myBar = __instance;
				}
				Object.DontDestroyOnLoad((Object)(object)val);
			}
		}
	}
	[HarmonyPatch(typeof(DramaMachine), "ChangeState")]
	internal class debugDramaListener
	{
		private static void Postfix(DRAMA_State state)
		{
			Debug.LogWarning(Object.op_Implicit(((object)(DRAMA_State)(ref state)).ToString()));
		}
	}
	[HarmonyPatch(typeof(MWS_Push), "Enter")]
	internal class DetectShove
	{
		private static void Postfix()
		{
			glaggleAssaultInProgress.Instance.ShoveTime = Time.time;
		}
	}
	[HarmonyPatch(typeof(CM_PageIntro), "SetPageActive")]
	internal class die
	{
		private static void Postfix()
		{
		}
	}
	[HarmonyPatch(typeof(CM_PageRundown_New), "OnEnable")]
	internal class die2
	{
		private static void Postfix()
		{
			((Component)MainMenuGuiLayer.Current.PageIntro).gameObject.SetActive(false);
			MusicManager.Machine.Sound.Post("StopIntro", true);
		}
	}
	[HarmonyPatch(typeof(Dam_EnemyDamageLimb), "DestroyLimb")]
	internal class EnemyLimbDestructionPatch
	{
		private static void Postfix()
		{
		}
	}
	[HarmonyPatch(typeof(EnemyAgent), "Setup")]
	internal class EnemyModifierAdder
	{
		private static void Postfix(EnemyAgent __instance)
		{
			AgentModifierManager.AddModifierValue((Agent)(object)__instance, (AgentModifier)251, 2f, 0f);
		}
	}
	internal class EnemyRampManager : MonoBehaviour
	{
		public float ramp;

		public EnemyAgent en;

		private float ramp2;

		private float ramp3;

		private float rampCD;

		private float rampMulti = 7f;

		public void doRamp()
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Invalid comparison between Unknown and I4
			//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_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
			if (((int)en.Locomotion.CurrentStateEnum == 2) & (ramp < 1f))
			{
				AgentModifierManager.AddModifierValue((Agent)(object)en, (AgentModifier)251, 0.06f * rampMulti, 0f);
				AgentModifierManager.AddModifierValue((Agent)(object)en, (AgentModifier)250, 0.001f * rampMulti, 0f);
				en.Appearance.InterpolateGlow(Color.Lerp(new Color(0f, 0f, 0f, 1f), new Color(25f, 10f, 0f, 10f), ramp), 0.1f);
				ramp += 0.001f * rampMulti;
			}
			else if (((double)ramp > 0.9) & ((Agent)en).Alive)
			{
				en.Appearance.InterpolateGlow(Color.Lerp(new Color(0f, 0f, 0f, 1f), new Color(100f, 0f, 0f, 100f), ramp3), 0.1f);
				ramp3 = Mathf.Abs(Mathf.Cos(ramp2)) + 0.4f;
				ramp2 += 0.8f;
			}
			if (!((Agent)en).Alive)
			{
				en.Appearance.InterpolateGlow(new Color(0f, 0f, 0f, 1f), 1f);
				ObjectExt.Destroy((Object)(object)((Component)this).GetComponent<EnemyRampManager>());
			}
		}
	}
	[BepInPlugin("fine_nights_at_fredies.GUID", "fine_nights_at_fredies", "6.6.6")]
	internal class EntryPoint : BasePlugin
	{
		private Harmony _Harmony;

		public static Texture2D winSprite;

		public static bool ExpeditionSurviveSetup;

		public override void Load()
		{
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Expected O, but got Unknown
			ClassInjector.RegisterTypeInIl2Cpp<AmmoPing>();
			ClassInjector.RegisterTypeInIl2Cpp<EnemyRampManager>();
			ClassInjector.RegisterTypeInIl2Cpp<glaggleAssaultInProgress>();
			ClassInjector.RegisterTypeInIl2Cpp<FlowMeter>();
			ClassInjector.RegisterTypeInIl2Cpp<ClassMenu>();
			ClassInjector.RegisterTypeInIl2Cpp<cClassBase>();
			ClassInjector.RegisterTypeInIl2Cpp<cGeneralistClass>();
			ClassInjector.RegisterTypeInIl2Cpp<cMedicClass>();
			ClassInjector.RegisterTypeInIl2Cpp<cBrawlerClass>();
			ClassInjector.RegisterTypeInIl2Cpp<cLeechClass>();
			ClassInjector.RegisterTypeInIl2Cpp<cClassTechMan>();
			_Harmony = new Harmony("fine_nights_at_fredies.GUID.Harmony");
			_Harmony.PatchAll();
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(32, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin has loaded with ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(_Harmony.GetPatchedMethods().Count());
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" patches!");
			}
			Logger.Info(val);
			Debug.Log(Object.op_Implicit(":) glaggle time\n please dont open me in dnspy my code is shit"));
			NetworkAPI.RegisterEvent<pTestNetworkEvent>("updateScore", (Action<ulong, pTestNetworkEvent>)delegate(ulong sender, pTestNetworkEvent packet)
			{
				glaggleAssaultInProgress.RecieveScoreFromPlayer(sender, packet);
			});
			NetworkAPI.RegisterEvent<netCharIndex>("checkIndex", (Action<ulong, netCharIndex>)delegate(ulong sender, netCharIndex packet)
			{
				glaggleAssaultInProgress.GetIndexCheck(sender, packet);
			});
			NetworkAPI.RegisterEvent<pSyncedClassStatsData>("sendClassData", (Action<ulong, pSyncedClassStatsData>)delegate(ulong sender, pSyncedClassStatsData packet)
			{
				cSyncedClassesManager.GetData(sender, packet);
			});
			Debug.LogWarning(Object.op_Implicit("registered all network events!"));
			AssetShardManager.OnStartupAssetsLoaded += Action.op_Implicit((Action)OnStartupAssetsLoaded);
		}

		public void OnStartupAssetsLoaded()
		{
			//IL_00c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			float num = 0.7f;
			float num2 = 0.9f;
			MainMenuGuiLayer.Current.PageIntro.m_step = (CM_IntroStep)1;
			MainMenuGuiLayer.Current.PageIntro.m_bgRedPulse.SetActive(false);
			MainMenuGuiLayer.Current.PageIntro.m_bgScare1.clip = ((Il2CppObjectBase)AssetAPI.GetLoadedAsset("Assets/CustomAssets/GlagglelandIntro.mp4")).TryCast<VideoClip>();
			Debug.LogError(Object.op_Implicit((Object)(object)((Il2CppObjectBase)AssetAPI.GetLoadedAsset("Assets/CustomAssets/GlagglelandIntro.mp4")).TryCast<VideoClip>() == (Object)null));
			winSprite = ((Il2CppObjectBase)AssetAPI.GetLoadedAsset("Assets/CustomAssets/baller.png")).Cast<Texture2D>();
			((Component)MainMenuGuiLayer.Current.PageIntro.m_bgScare1).gameObject.SetActive(true);
			((Component)MainMenuGuiLayer.Current.PageIntro.m_bgScare1).transform.localPosition = new Vector3(0f, 0f, 0f);
			((Component)MainMenuGuiLayer.Current.PageIntro.m_bgScare1).transform.localScale = new Vector3(1.6f * num, 1.35f * num2, 1f);
			MainMenuGuiLayer.Current.PageIntro.m_bgScare1.aspectRatio = (VideoAspectRatio)1;
			MainMenuGuiLayer.Current.PageIntro.m_bgScare1.Play();
			MusicManager.Machine.Sound.Post(EVENTS.START_SCREEN_ENTER, true);
			MainMenuGuiLayer.Current.PageIntro.m_bgScare1.SetDirectAudioVolume((ushort)0, 1f);
		}

		public override bool Unload()
		{
			_Harmony.UnpatchSelf();
			return ((BasePlugin)this).Unload();
		}
	}
	[HarmonyPatch(typeof(CM_PageExpeditionSuccess), "OnEnable")]
	internal class ExpeditionSuccessPatch
	{
		private static void Postfix(CM_PageExpeditionSuccess __instance)
		{
			//IL_011b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0121: Expected O, but got Unknown
			//IL_0146: 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_01cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0281: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;
			if ((Object)(object)instance != (Object)null && (Object)(object)__instance.m_expeditionName != (Object)null)
			{
				int num = instance.p0Score + instance.p1Score + instance.p2Score + instance.p3Score;
				string text = "A";
				Enumerator<SNet_Player> enumerator = SNet.LobbyPlayers.GetEnumerator();
				while (enumerator.MoveNext())
				{
					_ = (Object)(object)enumerator.Current != (Object)null;
				}
				if (EntryPoint.ExpeditionSurviveSetup)
				{
					EntryPoint.ExpeditionSurviveSetup = true;
				}
				if (num > 0)
				{
					text = "F";
				}
				if (num > 10000)
				{
					text = "D";
				}
				if (num > 20000)
				{
					text = "C";
				}
				if (num > 29000)
				{
					text = "B";
				}
				if (num > 30000)
				{
					text = "A";
				}
				if (num > 50000)
				{
					text = "S";
				}
				if (num > 90000)
				{
					text = "S+";
				}
				if (num == 0)
				{
					text = "PACIFIST";
				}
				if (num > 90000 || num == 0)
				{
					MusicManager.Machine.Sound.Post("LevelWinSkilled", true);
				}
				else
				{
					MusicManager.Machine.Sound.Post("LevelWin", true);
				}
				Sprite val = new Sprite();
				val = Sprite.Create(EntryPoint.winSprite, new Rect(0f, 0f, (float)((Texture)EntryPoint.winSprite).width, (float)((Texture)EntryPoint.winSprite).height), new Vector2(0.5f, 0.5f));
				((Component)((Component)((Component)__instance).transform.GetChild(0)).transform.GetChild(1)).GetComponent<SpriteRenderer>().sprite = val;
				((Component)((Component)((Component)__instance).transform.GetChild(0)).transform.GetChild(0)).gameObject.SetActive(false);
				((Component)((Component)((Component)__instance).transform.GetChild(0)).transform.GetChild(1)).transform.localScale = new Vector3(3f, 1.3f, 1.2f);
				Vector3 localScale = ((Component)((Component)((Component)__instance).transform.GetChild(0)).transform.GetChild(1)).transform.localScale;
				Debug.LogError(Object.op_Implicit(((object)(Vector3)(ref localScale)).ToString()));
				((TMP_Text)__instance.m_header).enableWordWrapping = false;
				((TMP_Text)__instance.m_header).m_HorizontalAlignment = (HorizontalAlignmentOptions)2;
				((TMP_Text)__instance.m_header).text = "\n<size=20>TEAM SCORE - " + num + "</size>\n" + text + " RANK\n";
				((Transform)((TMP_Text)__instance.m_header).rectTransform).localPosition = new Vector3(-995f, 300f, -10f);
				((Component)__instance.m_ArtifactInventoryDisplay).transform.localPosition = new Vector3(99999f, 99999f, 99999f);
				__instance.m_artifactInfo_text.transform.localPosition = new Vector3(99999f, 99999f, 99999f);
				__instance.m_sectorHeader.transform.localPosition = new Vector3(99999f, 99999f, 99999f);
				((Component)__instance.m_sectorIconAlign).transform.localPosition = new Vector3(99999f, 99999f, 99999f);
				((TMP_Text)__instance.m_header).enableWordWrapping = false;
			}
		}
	}
	public class FlowMeter : MonoBehaviour
	{
		public static FlowMeter Instance;

		public TextMeshPro TextMesh;

		public float Flow;

		private Vector3 m_lerpedVelocity;

		private Vector3 m_textOriginalPosition;

		private Vector3 m_flowTextShake;

		private GameObject m_gameObject;

		private bool m_slowDrain;

		private float m_flowDrainSpeed;

		private bool m_alreadyAtMaxRun;

		private glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;

		public void Awake()
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: 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_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_00f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
			Instance = this;
			GameObject val = CustomElementUtils.CreateNewTextObject(new Vector3(0f, 50f, 0f), "FlowMeter");
			TextMesh = null;
			TextMesh = Object.Instantiate<TextMeshPro>(GuiManager.PlayerLayer.m_playerStatus.m_healthText, val.transform, true);
			((TMP_Text)TextMesh).alignment = (TextAlignmentOptions)514;
			((TMP_Text)TextMesh).enableWordWrapping = false;
			((Component)TextMesh).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 50f);
			((TMP_Text)TextMesh).text = string.Empty;
			((TMP_Text)TextMesh).fontSize = 20f;
			((Graphic)TextMesh).color = Color.white;
			Transform transform = val.transform;
			transform.localPosition += new Vector3(0f, 870f, 0f);
			m_gameObject = val;
			m_textOriginalPosition = val.transform.localPosition;
			((TMP_Text)TextMesh).text = "FLOW";
			m_flowDrainSpeed = 0.85f;
		}

		public void Update()
		{
			//IL_0002: 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_0026: 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_004a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_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_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_01d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: 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_01ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0231: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0241: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0251: Unknown result type (might be due to invalid IL or missing references)
			//IL_026e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0273: Unknown result type (might be due to invalid IL or missing references)
			//IL_028b: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_036d: Unknown result type (might be due to invalid IL or missing references)
			//IL_033a: Unknown result type (might be due to invalid IL or missing references)
			//IL_042e: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0403: Unknown result type (might be due to invalid IL or missing references)
			m_flowTextShake = Vector3.Lerp(m_flowTextShake, new Vector3(0f, 0f, 0f), 3f * Time.deltaTime);
			if (!((Object)(object)PlayerManager.GetLocalPlayerAgent() != (Object)null))
			{
				return;
			}
			Vector3 velocity = PlayerManager.GetLocalPlayerAgent().Locomotion.Velocity;
			float magnitude = ((Vector3)(ref velocity)).magnitude;
			magnitude = Mathf.Clamp(magnitude, 0f, 1f);
			Flow = Mathf.Clamp(Flow + (magnitude - m_flowDrainSpeed) * 60f * Time.deltaTime, 0f, 100f);
			((TMP_Text)TextMesh).text = "FLOW: " + Mathf.RoundToInt(Flow) + "%";
			PlayerManager.GetLocalPlayerAgent().PlayerData.walkMoveSpeed = Mathf.Clamp(Flow * 0.04f, 0f, 100f) + 5.5f;
			PlayerManager.GetLocalPlayerAgent().PlayerData.runMoveSpeed = Mathf.Clamp(Flow * 0.04f, 0f, 100f) + 9f;
			PlayerManager.GetLocalPlayerAgent().PlayerData.airMoveSpeed = Mathf.Clamp(Flow * 0.04f, 0f, 100f) + 6f;
			PlayerManager.GetLocalPlayerAgent().PlayerData.crouchMoveSpeed = Mathf.Clamp(Flow * 0.04f, 0f, 100f) + 4f;
			Vector3 velocity2 = PlayerManager.GetLocalPlayerAgent().Locomotion.Velocity;
			velocity2 = Vector3.Scale(velocity2, new Vector3(1f, 0f, 1f));
			m_lerpedVelocity = Vector3.Lerp(m_lerpedVelocity, velocity2, 10f * Time.deltaTime);
			m_lerpedVelocity = Vector3.Scale(m_lerpedVelocity, new Vector3(1f, 0f, 1f));
			m_gameObject.transform.localPosition = m_textOriginalPosition + Vector3.Scale(new Vector3(Random.Range(-0.3f, 0.3f), Random.Range(-0.3f, 0.3f), Random.Range(-0.3f, 0.3f)), m_flowTextShake);
			if (Vector3.Distance(m_lerpedVelocity, velocity2) > 4.4f)
			{
				m_flowTextShake = new Vector3(9f, 9f, 9f);
				Flow -= 5f;
				m_lerpedVelocity = velocity2;
			}
			if (((magnitude - 0.85f) * 60f * Time.deltaTime < 0f) & (Flow > 1f))
			{
				m_flowTextShake = new Vector3(9f, 9f, 9f);
			}
			if (Flow > 99f)
			{
				m_flowTextShake = new Vector3(5f, 5f, 5f);
				if (PlayerManager.GetLocalPlayerAgent().Locomotion.IsRunning)
				{
					if (!m_alreadyAtMaxRun)
					{
						instance.mSoundPlayer.Post("MaxRunLoop", ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
						m_alreadyAtMaxRun = true;
					}
				}
				else
				{
					instance.mSoundPlayer.Post("MaxRunLoopEnd", ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
					m_alreadyAtMaxRun = false;
				}
			}
			else
			{
				instance.mSoundPlayer.Post("MaxRunLoopEnd", ((Component)PlayerManager.GetLocalPlayerAgent()).gameObject.transform.position);
				m_alreadyAtMaxRun = false;
			}
			if (PlayerManager.GetLocalPlayerAgent().m_isInBioscan)
			{
				if (!m_slowDrain)
				{
					m_flowTextShake += new Vector3(9f, 9f, 9f);
					m_slowDrain = true;
					m_flowDrainSpeed = 0.5f;
					((Graphic)TextMesh).color = Color.cyan;
				}
			}
			else if (m_slowDrain)
			{
				m_slowDrain = false;
				m_flowDrainSpeed = 0.85f;
				((Graphic)TextMesh).color = Color.white;
			}
		}
	}
	[HarmonyPatch(typeof(CrosshairGuiLayer), "PopFriendlyTarget")]
	internal class FriendlyFirePatch
	{
		private static void Postfix()
		{
			glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;
			if ((Object)(object)instance != (Object)null)
			{
				instance.FriendlyFire();
			}
		}
	}
	[HarmonyPatch(typeof(PUI_Inventory), "UpdateAllSlots")]
	internal class GetCurrentlyHeldItem
	{
		private static void Postfix(ref InventorySlot currentlyWieldedSlot, ref SNet_Player player)
		{
			if (!player.IsLocal)
			{
				return;
			}
			glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;
			if ((int)currentlyWieldedSlot == 10)
			{
				Debug.LogWarning(Object.op_Implicit("player equipped melee"));
				if ((Object)(object)instance != (Object)null)
				{
					instance.SetEquippedItem(0);
				}
			}
			if ((int)currentlyWieldedSlot == 1)
			{
				Debug.LogWarning(Object.op_Implicit("player equipped standard"));
				if ((Object)(object)instance != (Object)null)
				{
					instance.SetEquippedItem(1);
				}
			}
			if ((int)currentlyWieldedSlot == 2)
			{
				Debug.LogWarning(Object.op_Implicit("player equipped special"));
				if ((Object)(object)instance != (Object)null)
				{
					instance.SetEquippedItem(2);
				}
			}
		}
	}
	public class glaggleAssaultInProgress : MonoBehaviour
	{
		public bool InCombatState;

		private bool alreadychangedstate;

		private CrosshairGuiLayer crosshairLayer = GuiManager.CrosshairLayer;

		private string BaseAssaultText = "///   GIGGLER ASSAULT IN PROGRESS   ///   GIGGLER ASSAULT IN PROGRESS   ///   GIGGLER ASSAULT IN PROGRESS   ///   GIGGLER ASSAULT IN PROGRESS";

		private string HighIntensityAssaultText = "///  HIGH INTENSITY GIGGLER ASSAULT IN PROGRESS   ///   HIGH INTENSITY GIGGLER ASSAULT IN PROGRESS   ///   HIGH INTENSITY GIGGLER ASSAULT IN PROGRESS   ///   HIGH INTENSITY GIGGLER ASSAULT IN PROGRESS";

		private float textScroll;

		private float textFlashTime;

		private int textFlashAmount;

		private bool textFlash;

		private bool doTextFlash;

		private bool MusicSetupDone;

		private int MusicState;

		private int cMusicState;

		private bool mAnticipationOver;

		private bool mInHidden;

		private bool mInNoMusicArea;

		public CellSoundPlayer mSoundPlayer;

		private float hiddenTimeOut;

		public bool IsHeistExpedition;

		public bool HeistFirstWaveSpawn;

		private bool StyleMeterSetupDone;

		public float StylePoints;

		private int StyleDecay;

		private float StyleTime;

		public float TotalStylePoints;

		public float switchTime;

		public float EnemyCooldownTime;

		public int equippedItem;

		public float MeleeFreshness;

		public float StandardFreshness;

		public float SpecialFreshness;

		public string WeaponUseMultiText;

		public float WeaponUseMulti;

		public bool ForceDisableAssaultText;

		public bool WaveCoolingDown;

		private int KillCombo;

		private float friendlyfireTime;

		private float weakspotTime;

		public int p0Score;

		public int p1Score;

		public int p2Score;

		public int p3Score;

		public bool p0Present;

		public int p0Slot;

		public bool p1Present;

		public int p1Slot;

		public bool p2Present;

		public int p2Slot;

		public bool p3Present;

		public int p3Slot;

		public bool p0PresentBuffer;

		public bool p1PresentBuffer;

		public bool p2PresentBuffer;

		public bool p3PresentBuffer;

		public string p0ScoreText;

		public string p1ScoreText;

		public string p2ScoreText;

		public string p3ScoreText;

		public string fullScoreboard;

		public int playerIndexCounter;

		private TextMeshPro scoreboard1;

		private TextMeshPro scoreboard2;

		private TextMeshPro scoreboard3;

		private TextMeshPro scoreboard4;

		private bool setupNet;

		public int MyLocalIndex;

		private string Style1;

		private string Style2;

		private string Style3;

		private string Style4;

		private string Style5;

		private string Style6;

		public float ReloadSpeedMulti;

		private int CurrentBonus = -1;

		public int StyleRank;

		public int PlayerClass;

		public float LeechRegenTime;

		public bool AlreadyDidLeech;

		public float LeechRegen;

		public float TookDamageTime;

		public pMediumDamageData lastDamageDataMedium;

		public float ShoveTime;

		public Agent LastAgentDamage;

		public bool ParrySuccess;

		public int GreglingCount;

		public bool Gregs;

		public int GregMusicState;

		public float GregHiddenTimeout;

		public bool GregInIntro;

		public bool GregsFoundYou;

		public static glaggleAssaultInProgress Instance { get; set; }

		public TextMeshPro TextMesh { get; set; }

		public TextMeshPro TextMesh2 { get; set; }

		public TextMeshPro TextMesh3 { get; set; }

		public void Awake()
		{
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: 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_002e: Expected O, but got Unknown
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f5: 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_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0145: Expected O, but got Unknown
			Instance = this;
			Debug.LogWarning(Object.op_Implicit("Assault Menu is woke, such deep meaning."));
			GameObject val = new GameObject("AssaultText")
			{
				layer = 5,
				active = true
			};
			val.transform.SetParent(((Component)GuiManager.PlayerLayer.m_playerStatus).transform);
			Transform transform = val.transform;
			transform.localPosition -= new Vector3(0f, 50f, 0f);
			TextMesh = null;
			TextMesh = Object.Instantiate<TextMeshPro>(GuiManager.PlayerLayer.m_playerStatus.m_healthText, val.transform, true);
			Transform transform2 = val.transform;
			transform2.localPosition -= new Vector3(0f, -70f, 0f);
			((TMP_Text)TextMesh).alignment = (TextAlignmentOptions)514;
			((TMP_Text)TextMesh).enableWordWrapping = false;
			((Component)TextMesh).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 50f);
			((TMP_Text)TextMesh).text = string.Empty;
			((TMP_Text)TextMesh).fontSize = 20f;
			((Graphic)TextMesh).color = Color.yellow;
			mSoundPlayer = new CellSoundPlayer(val.transform.position);
			alreadychangedstate = false;
			StyleMeterSetup();
			((Component)this).gameObject.AddComponent<cGeneralistClass>().manager = this;
			((Component)this).GetComponent<cGeneralistClass>().active = true;
			((Component)this).gameObject.AddComponent<cMedicClass>().manager = this;
			((Component)this).gameObject.AddComponent<cBrawlerClass>().manager = this;
			((Component)this).gameObject.AddComponent<cLeechClass>().manager = this;
			((Component)this).gameObject.AddComponent<cClassTechMan>().manager = this;
		}

		private void Update()
		{
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Invalid comparison between Unknown and I4
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Invalid comparison between Unknown and I4
			//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Invalid comparison between Unknown and I4
			//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e7: Invalid comparison between Unknown and I4
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fd: Invalid comparison between Unknown and I4
			//IL_020a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0211: Invalid comparison between Unknown and I4
			//IL_0223: Unknown result type (might be due to invalid IL or missing references)
			//IL_0228: Unknown result type (might be due to invalid IL or missing references)
			GregMusicUpdater();
			SetMyLocalIndex(new pTestNetworkEvent
			{
				index = SNet.LocalPlayer.CharacterIndex
			});
			GetCombatStateStuff();
			FlashCheck();
			TextFlashes();
			TextColorSet();
			MusicUpdater();
			StyleMeterUpdate();
			StyleRankUpdate();
			UpdateParry();
			if (!SNet.IsInLobby)
			{
				if ((int)MusicManager.Current.m_machine.CurrentState == 14)
				{
					mSoundPlayer.Post(1991862712u, true);
				}
				else
				{
					mSoundPlayer.Post(16480241u, true);
				}
			}
			else if ((int)MusicManager.Current.m_machine.CurrentState == 14)
			{
				mSoundPlayer.Post(81429908u, true);
			}
			else
			{
				mSoundPlayer.Post(16480241u, true);
			}
			IsHeistExpedition = RundownManager.ActiveExpeditionHeader == "A3: Glognut Heist";
			if (InCombatState)
			{
				if (textFlash)
				{
					((TMP_Text)TextMesh).text = string.Empty;
				}
				else if (doTextFlash)
				{
					((TMP_Text)TextMesh).text = "/// !!!WARNING!!! ///";
				}
				else if (SurvivalWaveCheck() > 2)
				{
					if (ForceDisableAssaultText)
					{
						((TMP_Text)TextMesh).text = string.Empty;
					}
					else
					{
						((TMP_Text)TextMesh).text = HighIntensityAssaultText.Substring(Mathf.RoundToInt(textScroll), 57);
					}
				}
				else if (ForceDisableAssaultText)
				{
					((TMP_Text)TextMesh).text = string.Empty;
				}
				else
				{
					((TMP_Text)TextMesh).text = BaseAssaultText.Substring(Mathf.RoundToInt(textScroll), 37);
				}
			}
			else
			{
				((TMP_Text)TextMesh).text = string.Empty;
			}
			if (((int)MusicManager.Current.m_machine.CurrentState != 2) | ((int)MusicManager.Current.m_machine.CurrentState != 1) | ((int)MusicManager.Current.m_machine.CurrentState > 0) | ((int)MusicManager.Current.m_machine.CurrentState != 14))
			{
				MUS_State currentState = MusicManager.Current.m_machine.CurrentState;
				if (((object)(MUS_State)(ref currentState)).ToString() != "Silence")
				{
					UpdateScoreboardSlots();
				}
			}
			LeechRegen = Mathf.Clamp(LeechRegen - 0.1f * Time.deltaTime, -1f, 10f);
		}

		public void SetCombatStateIn()
		{
			InCombatState = true;
		}

		public void SetCombatStateOut()
		{
			InCombatState = false;
		}

		public void GetCombatStateStuff()
		{
			if (SurvivalWaveCheck() > 0)
			{
				InCombatState = true;
				if (textScroll > 37f)
				{
					textScroll = 0f;
				}
				else
				{
					textScroll += 13f * Time.deltaTime;
				}
			}
			else
			{
				InCombatState = false;
				textScroll = 0f;
			}
		}

		public void FlashOverride()
		{
			doTextFlash = true;
		}

		public void TextFlashes()
		{
			if (doTextFlash)
			{
				textFlashTime += 6f * Time.deltaTime;
				if (textFlashTime > 1f && textFlashAmount > 0)
				{
					textFlashTime = 0f;
					textFlashAmount--;
					textFlash = !textFlash;
				}
				else if (textFlashAmount < 1)
				{
					textFlash = false;
					doTextFlash = false;
				}
			}
			else
			{
				textFlash = false;
			}
		}

		public void FlashCheck()
		{
			if (InCombatState != alreadychangedstate)
			{
				alreadychangedstate = InCombatState;
				doTextFlash = true;
				textFlashAmount = 7;
			}
		}

		public int SurvivalWaveCheck()
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Invalid comparison between Unknown and I4
			int num = 0;
			for (int i = 0; i < Mastermind.Current.m_events.Count; i++)
			{
				if ((int)Mastermind.Current.m_events[i].EventType == 1 && ((Il2CppObjectBase)Mastermind.Current.m_events[i]).TryCast<SurvivalWave>().m_settings.m_populationPointsTotal < 0f)
				{
					num++;
				}
			}
			return num;
		}

		public void TextColorSet()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			if (SurvivalWaveCheck() > 2)
			{
				((Graphic)TextMesh).color = Color.red;
			}
			else
			{
				((Graphic)TextMesh).color = Color.yellow;
			}
		}

		public void MusicUpdater()
		{
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Invalid comparison between Unknown and I4
			//IL_00e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Invalid comparison between Unknown and I4
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0100: Invalid comparison between Unknown and I4
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Invalid comparison between Unknown and I4
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012c: Invalid comparison between Unknown and I4
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013f: Invalid comparison between Unknown and I4
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Invalid comparison between Unknown and I4
			//IL_028d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0293: Invalid comparison between Unknown and I4
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Invalid comparison between Unknown and I4
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ba: Invalid comparison between Unknown and I4
			//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ce: Invalid comparison between Unknown and I4
			//IL_02db: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e2: Invalid comparison between Unknown and I4
			//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Invalid comparison between Unknown and I4
			if (!MusicSetupDone)
			{
				MusicState = -1;
				cMusicState = -1;
				MusicSetupDone = true;
				Debug.LogWarning(Object.op_Implicit("Music updater setup complete!"));
			}
			if (mAnticipationOver && ((EnemySummaryData)EnemyUpdateManager.Summary).m_agressiveEnemyCount < 5 && SurvivalWaveCheck() > 0 && !ForceDisableAssaultText)
			{
				int num = 15;
				num = ((!IsHeistExpedition) ? 15 : 3);
				EnemyCooldownTime += Time.deltaTime;
				if (EnemyCooldownTime > (float)num)
				{
					EnemyCooldownTime = 0f;
					mAnticipationOver = false;
					WaveCoolingDown = true;
					ForceDisableAssaultText = true;
				}
			}
			else
			{
				EnemyCooldownTime = 0f;
				if (((EnemySummaryData)EnemyUpdateManager.Summary).m_agressiveEnemyCount > 5 && WaveCoolingDown)
				{
					WaveCoolingDown = false;
				}
			}
			mInNoMusicArea = ((int)MusicManager.Current.m_machine.CurrentState == 0) | ((int)MusicManager.Current.m_machine.CurrentState == 14) | ((int)MusicManager.Current.m_machine.CurrentState == 1) | ((int)MusicManager.Current.m_machine.CurrentState == 2);
			if (((int)MusicManager.Current.m_machine.CurrentState == 9) | ((int)MusicManager.Current.m_machine.CurrentState == 18) | ((int)MusicManager.Current.m_machine.CurrentState == 11))
			{
				hiddenTimeOut = 0f;
				mInHidden = true;
			}
			else
			{
				hiddenTimeOut += Time.deltaTime;
				if (hiddenTimeOut > 1f)
				{
					mInHidden = false;
				}
			}
			if (!mInHidden && SurvivalWaveCheck() > 0)
			{
				mAnticipationOver = true;
			}
			if (SurvivalWaveCheck() > 0 && !WaveCoolingDown)
			{
				if (mAnticipationOver)
				{
					MusicState = 2;
					if (MusicState != cMusicState)
					{
						cMusicState = MusicState;
						TriggerInAssaultMusic();
						WaveCoolingDown = false;
						if (ForceDisableAssaultText)
						{
							FlashOverride();
							ForceDisableAssaultText = false;
						}
					}
				}
				else
				{
					MusicState = 3;
					if (MusicState != cMusicState)
					{
						cMusicState = MusicState;
						TriggerAssaultAnticipationMusic();
					}
				}
			}
			else if (mInNoMusicArea)
			{
				MusicState = 5;
				if (MusicState != cMusicState)
				{
					cMusicState = MusicState;
					WaveCoolingDown = false;
					ForceDisableAssaultText = false;
					SetMusicNone();
					HeistFirstWaveSpawn = false;
				}
			}
			else if (((int)MusicManager.Current.m_machine.CurrentState == 8) | ((int)MusicManager.Current.m_machine.CurrentState == 9) | ((int)MusicManager.Current.m_machine.CurrentState == 18) | ((int)MusicManager.Current.m_machine.CurrentState == 19) | ((int)MusicManager.Current.m_machine.CurrentState == 11) | ((int)MusicManager.Current.m_machine.CurrentState == 10) | WaveCoolingDown)
			{
				MusicState = 1;
				if (MusicState != cMusicState)
				{
					cMusicState = MusicState;
					TriggerCombatNoAssaultMusic();
				}
			}
			else
			{
				MusicState = 0;
				if (MusicState != cMusicState)
				{
					cMusicState = MusicState;
					StopAllCustomMusic();
					WaveCoolingDown = false;
					ForceDisableAssaultText = false;
					HeistFirstWaveSpawn = false;
				}
			}
		}

		public void TriggerInAssaultMusic()
		{
			mSoundPlayer.Post("MusicAssault", true);
			if (IsHeistExpedition)
			{
				BainWaveHere();
			}
		}

		public void TriggerCombatNoAssaultMusic()
		{
			mSoundPlayer.Post("MusicControl", true);
			if (IsHeistExpedition)
			{
				BainWaveOver();
			}
		}

		public void StopAllCustomMusic()
		{
			GregHiddenTimeout = 0f;
			mAnticipationOver = false;
			mSoundPlayer.Post("MusicStealth", true);
			GregInIntro = false;
			GregHiddenTimeout = 0f;
			mSoundPlayer.Post("stopGreg", true);
		}

		public void TriggerAssaultAnticipationMusic()
		{
			mSoundPlayer.Post("MusicAnticipation", true);
			if (IsHeistExpedition)
			{
				if (!HeistFirstWaveSpawn)
				{
					BainAlarmsTripped();
					HeistFirstWaveSpawn = true;
				}
				else
				{
					BainWaveIncoming();
				}
			}
		}

		public void SetMusicNone()
		{
			GregHiddenTimeout = 0f;
			mSoundPlayer.Post("MusicNone", true);
			GregInIntro = false;
			GregHiddenTimeout = 0f;
			mSoundPlayer.Post("stopGreg", true);
			TotalStylePoints = 0f;
			p0Score = 0;
			p1Score = 0;
			p2Score = 0;
			p3Score = 0;
		}

		public void BainWaveIncoming()
		{
			mSoundPlayer.Post("WaveAnticipation", true);
		}

		public void BainWaveOver()
		{
			mSoundPlayer.Post("WaveDown", true);
		}

		public void BainWaveHere()
		{
			mSoundPlayer.Post("WaveHere", true);
		}

		public void BainAlarmsTripped()
		{
			mSoundPlayer.Post("AlarmTripped", true);
		}

		public void StyleMeterSetup()
		{
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: 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_0144: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Expected O, but got Unknown
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_018d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_021f: Unknown result type (might be due to invalid IL or missing references)
			//IL_024f: Unknown result type (might be due to invalid IL or missing references)
			Debug.Log(Object.op_Implicit("setting up the style meter now"));
			GameObject val = new GameObject("StyleText")
			{
				layer = 5,
				active = true
			};
			val.transform.SetParent(((Component)GuiManager.PlayerLayer.m_playerStatus).transform);
			Transform transform = val.transform;
			transform.localPosition -= new Vector3(0f, 50f, 0f);
			TextMesh2 = null;
			TextMesh2 = Object.Instantiate<TextMeshPro>(GuiManager.PlayerLayer.m_playerStatus.m_healthText, val.transform, true);
			Transform transform2 = val.transform;
			transform2.localPosition -= new Vector3(-600f, -700f, 0f);
			((TMP_Text)TextMesh2).alignment = (TextAlignmentOptions)514;
			((TMP_Text)TextMesh2).enableWordWrapping = false;
			((Component)TextMesh2).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 50f);
			((TMP_Text)TextMesh2).text = string.Empty;
			((TMP_Text)TextMesh2).fontSize = 70f;
			((Graphic)TextMesh2).color = Color.white;
			StyleDecay = 1;
			Debug.Log(Object.op_Implicit("setting up the style meter flavor text now"));
			GameObject val2 = new GameObject("StyleFlavorText")
			{
				layer = 5,
				active = true
			};
			val2.transform.SetParent(((Component)GuiManager.PlayerLayer.m_playerStatus).transform);
			Transform transform3 = val2.transform;
			transform3.localPosition -= new Vector3(0f, 50f, 0f);
			TextMesh3 = null;
			TextMesh3 = Object.Instantiate<TextMeshPro>(GuiManager.PlayerLayer.m_playerStatus.m_healthText, val2.transform, true);
			Transform transform4 = val2.transform;
			transform4.localPosition -= new Vector3(-600f, -600f, 0f);
			((TMP_Text)TextMesh3).alignment = (TextAlignmentOptions)514;
			((TMP_Text)TextMesh3).enableWordWrapping = false;
			((Component)TextMesh3).GetComponent<RectTransform>().sizeDelta = new Vector2(200f, 50f);
			((TMP_Text)TextMesh3).text = string.Empty;
			((TMP_Text)TextMesh3).fontSize = 40f;
			((Graphic)TextMesh3).color = Color.gray;
			((TMP_Text)TextMesh3).alignment = (TextAlignmentOptions)258;
			((TMP_Text)TextMesh3).richText = true;
			StyleDecay = 1;
			MeleeFreshness = 1.5f;
			StandardFreshness = 1.5f;
			SpecialFreshness = 1.5f;
			StyleMeterSetupDone = true;
		}

		public static void RecieveScoreFromPlayer(ulong senderID, pTestNetworkEvent netEvent)
		{
			Instance.ScoreUpdater(netEvent);
		}

		public static void GetIndexCheck(ulong senderID, netCharIndex index)
		{
			Instance.RecieveCharacterIndexCheck(index.index, index.playerIndex);
		}

		public void ScoreUpdater(pTestNetworkEvent data)
		{
			switch (data.index)
			{
			case 0:
				p0Score = data.num;
				break;
			case 1:
				p1Score = data.num;
				break;
			case 2:
				p2Score = data.num;
				break;
			case 3:
				p3Score = data.num;
				break;
			}
		}

		public void ScoreboardLogic()
		{
			if (SNet.IsInLobby)
			{
				if (p0Present)
				{
					p0ScoreText = SNet.LobbyPlayers[p0Slot].NickName + " >> " + p0Score + "<color=yellow>p</color>\n";
				}
				else
				{
					p0ScoreText = "EMPTY SLOT/BOT\n";
				}
				if (p1Present)
				{
					p1ScoreText = SNet.LobbyPlayers[p1Slot].NickName + " >> " + p1Score + "<color=yellow>p</color>\n";
				}
				else
				{
					p1ScoreText = "EMPTY SLOT/BOT\n";
				}
				if (p2Present)
				{
					p2ScoreText = SNet.LobbyPlayers[p2Slot].NickName + " >> " + p2Score + "<color=yellow>p</color>\n";
				}
				else
				{
					p2ScoreText = "EMPTY SLOT/BOT\n";
				}
				if (p3Present)
				{
					p3ScoreText = SNet.LobbyPlayers[p3Slot].NickName + " >> " + p3Score + "<color=yellow>p</color>\n";
				}
				else
				{
					p3ScoreText = "EMPTY SLOT/BOT\n";
				}
				fullScoreboard = p0ScoreText + p1ScoreText + p2ScoreText + p3ScoreText;
			}
		}

		public void StyleMeterUpdate()
		{
			//IL_0154: Unknown result type (might be due to invalid IL or missing references)
			//IL_015a: Invalid comparison between Unknown and I4
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_016f: Invalid comparison between Unknown and I4
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Invalid comparison between Unknown and I4
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0199: Invalid comparison between Unknown and I4
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
			if (!StyleMeterSetupDone)
			{
				return;
			}
			StyleRankUpdate();
			UpdateWeaponFreshValues(0.1f * Time.deltaTime, 3);
			ScoreboardLogic();
			StylePoints = Mathf.Clamp(StylePoints - (float)(15 * StyleDecay) * Time.deltaTime, 0f, 2000f);
			string text = "<size=20>" + Mathf.RoundToInt(TotalStylePoints) + "<color=yellow>p</color></size>\n";
			((TMP_Text)TextMesh3).text = text + "<size=15>\n" + fullScoreboard + "</size>\n" + WeaponUseMultiText + Style1 + Style2 + Style3 + Style4 + Style5 + Style6;
			if (StyleTime > 5f)
			{
				Style1 = "";
				Style2 = "";
				Style3 = "";
				Style4 = "";
				Style5 = "";
				Style6 = "";
				StyleTime = 0f;
				if (((int)MusicManager.Current.m_machine.CurrentState != 2) | ((int)MusicManager.Current.m_machine.CurrentState != 1) | ((int)MusicManager.Current.m_machine.CurrentState > 0) | ((int)MusicManager.Current.m_machine.CurrentState != 14))
				{
					MUS_State currentState = MusicManager.Current.m_machine.CurrentState;
					string text2 = ((object)(MUS_State)(ref currentState)).ToString();
					if (text2 != "Silence")
					{
						Debug.Log(Object.op_Implicit(text2));
						NetworkAPI.InvokeEvent<netCharIndex>("checkIndex", new netCharIndex
						{
							index = SNet.LocalPlayer.CharacterIndex,
							playerIndex = SNet.LocalPlayer.PlayerSlot.index
						}, (SNet_ChannelType)2);
						RecieveCharacterIndexCheck(SNet.LocalPlayer.CharacterIndex, SNet.LocalPlayer.PlayerSlot.index);
					}
				}
			}
			else
			{
				StyleTime += 1f * Time.deltaTime;
			}
			if (KillCombo > 0 && StyleTime > 1f)
			{
				KillCombo = 0;
			}
		}

		public void StyleRankUpdate()
		{
			//IL_0026: 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_00b8: 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_014a: 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_01dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			if (StylePoints > 200f)
			{
				((TMP_Text)TextMesh2).text = "D<color=white><size=40>ESTRUCTIVE</color></size>";
				((Graphic)TextMesh2).color = Color.blue;
				StyleDecay = 1;
				ReloadSpeedMulti = 0.95f;
				StyleRank = 1;
				if (StylePoints > 300f)
				{
					((TMP_Text)TextMesh2).text = "C<color=white><size=40>HAOTIC</color></size>";
					((Graphic)TextMesh2).color = Color.green;
					StyleDecay = 1;
					ReloadSpeedMulti = 0.9f;
					StyleRank = 2;
					if (StylePoints > 400f)
					{
						((TMP_Text)TextMesh2).text = "B<color=white><size=40>RUTAL</color></size>";
						((Graphic)TextMesh2).color = Color.yellow;
						StyleDecay = 2;
						ReloadSpeedMulti = 0.85f;
						StyleRank = 3;
						if (StylePoints > 500f)
						{
							((TMP_Text)TextMesh2).text = "A<color=white><size=40>NARCHIC</color></size>";
							((Graphic)TextMesh2).color = Color.cyan;
							StyleDecay = 3;
							ReloadSpeedMulti = 0.8f;
							StyleRank = 4;
							if (StylePoints > 700f)
							{
								((TMP_Text)TextMesh2).text = "S<color=white><size=40>UPREME</color></size>";
								((Graphic)TextMesh2).color = Color.red;
								StyleDecay = 4;
								ReloadSpeedMulti = 0.7f;
								StyleRank = 5;
								if (StylePoints > 850f)
								{
									((TMP_Text)TextMesh2).text = "SS<color=white><size=40>ADISTIC</color></size>";
									((Graphic)TextMesh2).color = Color.red;
									StyleDecay = 4;
									ReloadSpeedMulti = 0.6f;
									StyleRank = 6;
									if (StylePoints > 1000f)
									{
										((TMP_Text)TextMesh2).text = "SSS<color=white><size=40>HITSTORM</color></size>";
										((Graphic)TextMesh2).color = Color.red;
										StyleDecay = 6;
										ReloadSpeedMulti = 0.5f;
										StyleRank = 7;
										if (StylePoints > 1500f)
										{
											((TMP_Text)TextMesh2).text = "ULTRAGLAG";
											((Graphic)TextMesh2).color = Color.yellow;
											StyleDecay = 8;
											ReloadSpeedMulti = 0.4f;
											StyleRank = 8;
										}
									}
								}
							}
						}
					}
				}
			}
			else if (StylePoints < 200f)
			{
				((TMP_Text)TextMesh2).text = "";
				StyleDecay = 1;
				ReloadSpeedMulti = 1f;
				StyleRank = 0;
			}
			if (WeaponUseMulti > 1f)
			{
				WeaponUseMultiText = "<size=30><color=yellow> FRESH " + WeaponUseMulti.ToString().Substring(0, Mathf.Clamp(WeaponUseMulti.ToString().Length, 0, 3)) + "x</size></color>\n";
			}
			else if ((double)WeaponUseMulti > 0.6)
			{
				WeaponUseMultiText = "<size=30><color=white> USED " + WeaponUseMulti.ToString().Substring(0, Mathf.Clamp(WeaponUseMulti.ToString().Length, 0, 3)) + "x</size></color>\n";
			}
			else
			{
				WeaponUseMultiText = "<size=30><color=red> DULL " + WeaponUseMulti.ToString().Substring(0, Mathf.Clamp(WeaponUseMulti.ToString().Length, 0, 3)) + "x</size></color>\n";
			}
			switch (equippedItem)
			{
			case 0:
				WeaponUseMulti = MeleeFreshness;
				break;
			case 1:
				WeaponUseMulti = StandardFreshness;
				break;
			case 2:
				WeaponUseMulti = SpecialFreshness;
				break;
			}
		}

		public void SetEquippedItem(int item)
		{
			equippedItem = item;
			switchTime = Time.time;
		}

		public void OnKillNormal()
		{
			if (KillCombo == 0)
			{
				weakspotTime = Time.time;
				if (weakspotTime == friendlyfireTime)
				{
					AddStyleToList("+ <color=yellow>ACCIDENTAL </color>KILL\n");
					StylePoints += 45f * WeaponUseMulti;
					TotalStylePoints += 45f * WeaponUseMulti;
				}
				else
				{
					AddStyleToList("+ KILL\n");
					StylePoints += 30f * WeaponUseMulti;
					TotalStylePoints += 30f * WeaponUseMulti;
				}
			}
			if (KillCombo == 1)
			{
				weakspotTime = Time.time;
				if (weakspotTime == friendlyfireTime)
				{
					AddStyleToList("+ <color=yellow>ACCIDENTAL DOUBLE KILL</color>\n");
					StylePoints += 50f * WeaponUseMulti;
					TotalStylePoints += 50f * WeaponUseMulti;
				}
				else
				{
					AddStyleToList("+ <color=yellow>DOUBLE KILL</color>\n");
					StylePoints += 25f * WeaponUseMulti;
					TotalStylePoints += 25f * WeaponUseMulti;
				}
			}
			if (KillCombo == 2)
			{
				weakspotTime = Time.time;
				if (weakspotTime == friendlyfireTime)
				{
					AddStyleToList("+ <color=yellow>ACCIDENTAL TRIPLE KILL</color>\n");
					StylePoints += 85f * WeaponUseMulti;
					TotalStylePoints += 85f * WeaponUseMulti;
				}
				else
				{
					AddStyleToList("+ <color=yellow>TRIPLE KILL</color>\n");
					StylePoints += 50f * WeaponUseMulti;
					TotalStylePoints += 50f * WeaponUseMulti;
				}
			}
			if (KillCombo > 2)
			{
				weakspotTime = Time.time;
				if (weakspotTime == friendlyfireTime)
				{
					AddStyleToList("+ <color=yellow>ACCIDENTAL MULTI KILL</color>\n");
					StylePoints += 200f * WeaponUseMulti;
					TotalStylePoints += 200f * WeaponUseMulti;
				}
				else
				{
					AddStyleToList("+ <color=yellow>MULTI KILL</color>\n");
					StylePoints += 100f * WeaponUseMulti;
					TotalStylePoints += 100f * WeaponUseMulti;
				}
			}
			KillCombo++;
			UpdateWeaponFreshValues(1f, equippedItem);
			if ((double)(Time.time - switchTime) < 0.6)
			{
				AddStyleToList("+ <color=green>QUICKDRAW</color>\n");
				StylePoints += 250 * Mathf.RoundToInt(WeaponUseMulti);
				TotalStylePoints += 50f * WeaponUseMulti;
				UpdateWeaponFreshValues(1f, equippedItem);
			}
			SendScoreToPlayers();
			if (PlayerClass == 3)
			{
				PlayerAgent localPlayerAgent = PlayerManager.GetLocalPlayerAgent();
				localPlayerAgent.GiveHealth(localPlayerAgent, 0.08f);
				LeechRegen += 0f;
			}
		}

		public void LimbDestruction()
		{
			AddStyleToList("+ LIMB DESTRUCTION\n");
			StylePoints += 60 * Mathf.RoundToInt(WeaponUseMulti);
			TotalStylePoints += 60f * WeaponUseMulti;
			UpdateWeaponFreshValues(1f, equippedItem);
			SendScoreToPlayers();
		}

		public void WeakspotDamage()
		{
			weakspotTime = Time.time;
			if (weakspotTime == friendlyfireTime)
			{
				FriendWeakspot();
			}
			else
			{
				AddStyleToList("+ <color=green>WEAKSPOT</color>\n");
				StylePoints += 20 * Mathf.RoundToInt(WeaponUseMulti);
				TotalStylePoints += 20f * WeaponUseMulti;
				UpdateWeaponFreshValues(1f, equippedItem);
			}
			Debug.LogWarning(Object.op_Implicit(weakspotTime + "///" + friendlyfireTime));
			SendScoreToPlayers();
		}

		public void Disrespect()
		{
			AddStyleToList("+ DISRESPECT\n");
			StylePoints += 60 * Mathf.RoundToInt(WeaponUseMulti);
			TotalStylePoints += 60f * WeaponUseMulti;
			UpdateWeaponFreshValues(1f, equippedItem);
			SendScoreToPlayers();
		}

		public void FriendWeakspot()
		{
			AddStyleToList("+ <color=yellow>ACCIDENTAL</color> <color=green>WEAKSPOT</color>\n");
			StylePoints += 120 * Mathf.RoundToInt(WeaponUseMulti);
			TotalStylePoints += 120f * WeaponUseMulti;
			UpdateWeaponFreshValues(1f, equippedItem);
			SendScoreToPlayers();
		}

		public void FriendlyFire()
		{
			friendlyfireTime = Time.time;
		}

		public void UpdateWeaponFreshValues(float Multi, int item)
		{
			switch (item)
			{
			case 0:
				MeleeFreshness = Mathf.Clamp(MeleeFreshness - 0.05f * Multi, 0f, 1.5f);
				StandardFreshness = Mathf.Clamp(StandardFreshness + 0.3f * Multi, 0f, 1.5f);
				SpecialFreshness = Mathf.Clamp(SpecialFreshness + 0.3f * Multi, 0f, 1.5f);
				break;
			case 1:
				MeleeFreshness = Mathf.Clamp(MeleeFreshness + 0.3f * Multi, 0f, 1.5f);
				StandardFreshness = Mathf.Clamp(StandardFreshness - 0.05f * Multi, 0f, 1.5f);
				SpecialFreshness = Mathf.Clamp(SpecialFreshness + 0.3f * Multi, 0f, 1.5f);
				break;
			case 2:
				MeleeFreshness = Mathf.Clamp(MeleeFreshness + 0.3f * Multi, 0f, 1.5f);
				StandardFreshness = Mathf.Clamp(StandardFreshness + 0.3f * Multi, 0f, 1.5f);
				SpecialFreshness = Mathf.Clamp(SpecialFreshness - 0.05f * Multi, 0f, 1.5f);
				break;
			case 3:
				MeleeFreshness = Mathf.Clamp(MeleeFreshness + 0.3f * Multi, 0f, 1.5f);
				StandardFreshness = Mathf.Clamp(StandardFreshness + 0.3f * Multi, 0f, 1.5f);
				SpecialFreshness = Mathf.Clamp(SpecialFreshness + 0.3f * Multi, 0f, 1.5f);
				break;
			}
		}

		public void SendScoreToPlayers()
		{
			NetworkAPI.InvokeEvent<pTestNetworkEvent>("updateScore", new pTestNetworkEvent
			{
				index = SNet.LocalPlayer.CharacterIndex,
				num = Mathf.RoundToInt(TotalStylePoints)
			}, (SNet_ChannelType)2);
			RecieveScoreFromPlayer(0uL, new pTestNetworkEvent
			{
				index = SNet.LocalPlayer.CharacterIndex,
				num = Mathf.RoundToInt(TotalStylePoints)
			});
		}

		public void RecieveCharacterIndexCheck(int index, int pIndex)
		{
			switch (index)
			{
			case 0:
				if (!p0PresentBuffer)
				{
					playerIndexCounter++;
					p0PresentBuffer = true;
					p0Slot = pIndex;
				}
				break;
			case 1:
				if (!p1PresentBuffer)
				{
					playerIndexCounter++;
					p1PresentBuffer = true;
				}
				p1Slot = pIndex;
				break;
			case 2:
				if (!p2PresentBuffer)
				{
					playerIndexCounter++;
					p2PresentBuffer = true;
				}
				p2Slot = pIndex;
				break;
			case 3:
				if (!p3PresentBuffer)
				{
					playerIndexCounter++;
					p3PresentBuffer = true;
				}
				p3Slot = pIndex;
				break;
			}
		}

		public void UpdateScoreboardSlots()
		{
			if (playerIndexCounter == SNet.LobbyPlayers.Count)
			{
				playerIndexCounter = 0;
				p0Present = p0PresentBuffer;
				p1Present = p1PresentBuffer;
				p2Present = p2PresentBuffer;
				p3Present = p3PresentBuffer;
				p0PresentBuffer = false;
				p1PresentBuffer = false;
				p2PresentBuffer = false;
				p3PresentBuffer = false;
			}
		}

		public void AddStyleToList(string style)
		{
			if (Style1.Length == 0)
			{
				Style1 = style;
				StyleTime = 0f;
				return;
			}
			if (Style2.Length == 0)
			{
				Style2 = style;
				StyleTime = 0f;
				return;
			}
			if (Style3.Length == 0)
			{
				Style3 = style;
				StyleTime = 0f;
				return;
			}
			if (Style4.Length == 0)
			{
				Style4 = style;
				StyleTime = 0f;
				return;
			}
			if (Style5.Length == 0)
			{
				Style5 = style;
				StyleTime = 0f;
				return;
			}
			if (Style6.Length == 0)
			{
				Style6 = style;
				StyleTime = 0f;
				return;
			}
			Style1 = "";
			Style2 = "";
			Style3 = "";
			Style4 = "";
			Style5 = "";
			Style6 = "";
			Style1 = style;
			StyleTime = 0f;
		}

		public void netSetup()
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Invalid comparison between Unknown and I4
			if (!setupNet && (int)MusicManager.Current.m_machine.CurrentState == 5)
			{
				setupNet = true;
			}
		}

		public void SetMyLocalIndex(pTestNetworkEvent data)
		{
			MyLocalIndex = data.index;
		}

		public void SetClass(int index)
		{
			PlayerClass = index;
			Debug.LogError(Object.op_Implicit(index));
			switch (index)
			{
			case 0:
				((Component)this).GetComponent<cGeneralistClass>().active = true;
				((Component)this).GetComponent<cBrawlerClass>().active = false;
				((Component)this).GetComponent<cMedicClass>().active = false;
				((Component)this).GetComponent<cLeechClass>().active = false;
				((Component)this).GetComponent<cClassTechMan>().active = false;
				break;
			case 1:
				((Component)this).GetComponent<cBrawlerClass>().active = false;
				((Component)this).GetComponent<cMedicClass>().active = true;
				((Component)this).GetComponent<cGeneralistClass>().active = false;
				((Component)this).GetComponent<cLeechClass>().active = false;
				((Component)this).GetComponent<cClassTechMan>().active = false;
				break;
			case 2:
				((Component)this).GetComponent<cBrawlerClass>().active = true;
				((Component)this).GetComponent<cMedicClass>().active = false;
				((Component)this).GetComponent<cGeneralistClass>().active = false;
				((Component)this).GetComponent<cLeechClass>().active = false;
				((Component)this).GetComponent<cClassTechMan>().active = false;
				break;
			case 3:
				((Component)this).GetComponent<cLeechClass>().active = true;
				((Component)this).GetComponent<cBrawlerClass>().active = false;
				((Component)this).GetComponent<cMedicClass>().active = false;
				((Component)this).GetComponent<cGeneralistClass>().active = false;
				((Component)this).GetComponent<cClassTechMan>().active = false;
				break;
			case 4:
				((Component)this).GetComponent<cGeneralistClass>().active = false;
				((Component)this).GetComponent<cBrawlerClass>().active = false;
				((Component)this).GetComponent<cMedicClass>().active = false;
				((Component)this).GetComponent<cLeechClass>().active = false;
				((Component)this).GetComponent<cClassTechMan>().active = true;
				break;
			}
		}

		public void SetPlayerBonus(int BonusIndex)
		{
			if (!((Object)(object)PlayerManager.Current.GetPlayerAgentInSlot(MyLocalIndex) != (Object)null))
			{
				return;
			}
			if (PlayerClass == 100)
			{
				AgentModifierManager.ClearAllModifiersOnAgent((Agent)(object)PlayerManager.GetLocalPlayerAgent());
				AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
			}
			else
			{
				if (BonusIndex == CurrentBonus)
				{
					return;
				}
				CurrentBonus = BonusIndex;
				AgentModifierManager.ClearAllModifiersOnAgent((Agent)(object)PlayerManager.GetLocalPlayerAgent());
				switch (BonusIndex)
				{
				case 0:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 1:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.1f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 3f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.1f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 2:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.6f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.6f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.2f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.2f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 2f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.2f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.2f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 3:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.65f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.65f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.3f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.3f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.3f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.3f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 4:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.7f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.7f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.4f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.4f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.4f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.4f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 5:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.75f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.75f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.5f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.5f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 6:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.8f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.8f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.6f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.6f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.6f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.6f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 7:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 1.95f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.95f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.7f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.7f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.7f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.7f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				case 8:
					switch (PlayerClass)
					{
					case 0:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, 0.5f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 0.1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 0.1f, 0f);
						break;
					case 1:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)4, 100f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)5, 2f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)3, 1.8f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 2.8f, 0f);
						break;
					case 2:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)200, 0f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, 0.8f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, 0.8f, 0f);
						break;
					case 3:
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)6, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)7, -1f, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)2, LeechRegen, 0f);
						AgentModifierManager.AddModifierValue((Agent)(object)PlayerManager.GetLocalPlayerAgent(), (AgentModifier)1, 100f, 0f);
						break;
					}
					break;
				}
			}
		}

		private void UpdateParry()
		{
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			if ((double)(TookDamageTime - ShoveTime) > 0.0 && (double)(TookDamageTime - ShoveTime) < 0.3)
			{
				ParrySuccess = true;
				PlayerAgent localPlayerAgent = PlayerManager.GetLocalPlayerAgent();
				localPlayerAgent.GiveHealth(localPlayerAgent, ((UFloat16)(ref lastDamageDataMedium.damage)).Get(9999f) * 0.01f);
				AddStyleToList("+ <color=green>PARRY</color>\n");
				StylePoints += 100 * Mathf.RoundToInt(WeaponUseMulti);
				TotalStylePoints += 100f * WeaponUseMulti;
				UpdateWeaponFreshValues(20f, equippedItem);
				if ((Object)(object)LastAgentDamage != (Object)null)
				{
					DamageUtil.DoExplosionDamage(LastAgentDamage.Position, 2f, 100f, LayerManager.MASK_EXPLOSION_TARGETS, LayerManager.MASK_EXPLOSION_BLOCKERS, true, 1500f);
				}
				mSoundPlayer.Post("Parry", true);
				Debug.Log(Object.op_Implicit((Object)(object)LastAgentDamage == (Object)null));
				ShoveTime = -11f;
				ParrySuccess = false;
			}
		}

		public void AddGregling()
		{
			GreglingCount++;
			Gregs = true;
		}

		public void RemoveGregling()
		{
			GreglingCount--;
		}

		private void GregMusicUpdater()
		{
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Invalid comparison between Unknown and I4
			//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Invalid comparison between Unknown and I4
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Invalid comparison between Unknown and I4
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d7: Invalid comparison between Unknown and I4
			if (Gregs)
			{
				mSoundPlayer.Post("MusicNone", true);
				if (GreglingCount == 0)
				{
					Gregs = false;
					mSoundPlayer.Post("defeatedTheGreglings", true);
					GregInIntro = false;
					GregsFoundYou = false;
					mSoundPlayer.Post("stopGreg", true);
				}
			}
			if (Gregs && !GregInIntro)
			{
				GregInIntro = true;
				mSoundPlayer.Post("startGreglingCombat", true);
			}
			bool flag = ((int)MusicManager.Current.m_machine.CurrentState != 5) & ((int)MusicManager.Current.m_machine.CurrentState != 6) & ((int)MusicManager.Current.m_machine.CurrentState != 15) & ((int)MusicManager.Current.m_machine.CurrentState != 20);
			if ((!mInHidden & GregInIntro & !GregsFoundYou & (((EnemySummaryData)EnemyUpdateManager.Summary).m_agressiveEnemyCount > 0) & Gregs) && flag)
			{
				GregHiddenTimeout += 0.5f * Time.deltaTime;
				if (GregHiddenTimeout > 1f)
				{
					GregsFoundYou = true;
					mSoundPlayer.Post("greglingSeesYou", true);
				}
			}
		}
	}
	[HarmonyPatch(typeof(CM_PageRundown_New), "PlaceRundown")]
	internal class GlagglehudManager
	{
		private static bool alreadyLoaded;

		public static void Postfix(ref CM_PageRundown_New __instance)
		{
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Expected O, but got Unknown
			if (!alreadyLoaded)
			{
				alreadyLoaded = true;
				GameObject val = new GameObject("assaulthud");
				if ((Object)(object)val != (Object)null)
				{
					Debug.LogWarning(Object.op_Implicit("tada.wav, hud obj was created"));
					val.AddComponent<glaggleAssaultInProgress>();
					val.AddComponent<FlowMeter>();
					val.AddComponent<AmmoPing>();
				}
				Object.DontDestroyOnLoad((Object)(object)val);
				Debug.LogWarning(Object.op_Implicit("glaggleland is ready!!! :)"));
			}
			else
			{
				Debug.LogWarning(Object.op_Implicit("glaggleland is already here, we should load it again, smh :/"));
			}
		}
	}
	[HarmonyPatch(typeof(CrosshairGuiLayer), "ShowHitIndicator")]
	internal class HitIndicatorPatch
	{
		private static void Postfix(ref bool isWeakspot, ref bool isFriendly)
		{
			glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;
			if ((Object)(object)instance != (Object)null && isWeakspot)
			{
				if (isFriendly)
				{
					instance.FriendWeakspot();
				}
				else
				{
					instance.WeakspotDamage();
				}
			}
		}
	}
	[HarmonyPatch(typeof(CM_PageIntro), "SetPageActive")]
	internal class loadvideopatch
	{
		private static bool Prefix(CM_PageIntro __instance, bool active)
		{
			((CM_PageBase)__instance).m_isActive = active;
			((Component)__instance).gameObject.active = true;
			if (!active)
			{
				return false;
			}
			if (Global.SkipIntro)
			{
				__instance.m_step = (CM_IntroStep)3;
				return false;
			}
			MusicManager.Machine.Sound.Post(EVENTS.START_SCREEN_ENTER, true);
			_ = Global.ShowStartupScreen;
			Debug.LogError(Object.op_Implicit("we should be playing the intro video now"));
			return false;
		}
	}
	internal static class Logger
	{
		private static readonly ManualLogSource _Logger;

		static Logger()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			_Logger = new ManualLogSource("fine_nights_at_fredies");
			Logger.Sources.Add((ILogSource)(object)_Logger);
		}

		private static string Format(object msg)
		{
			return msg.ToString();
		}

		public static void Info(BepInExInfoLogInterpolatedStringHandler handler)
		{
			_Logger.LogInfo(handler);
		}

		public static void Info(string str)
		{
			_Logger.LogMessage((object)str);
		}

		public static void Info(object data)
		{
			_Logger.LogMessage((object)Format(data));
		}

		public static void Debug(BepInExDebugLogInterpolatedStringHandler handler)
		{
			_Logger.LogDebug(handler);
		}

		public static void Debug(string str)
		{
			_Logger.LogDebug((object)str);
		}

		public static void Debug(object data)
		{
			_Logger.LogDebug((object)Format(data));
		}

		public static void Error(BepInExErrorLogInterpolatedStringHandler handler)
		{
			_Logger.LogError(handler);
		}

		public static void Error(string str)
		{
			_Logger.LogError((object)str);
		}

		public static void Error(object data)
		{
			_Logger.LogError((object)Format(data));
		}

		public static void Fatal(BepInExFatalLogInterpolatedStringHandler handler)
		{
			_Logger.LogFatal(handler);
		}

		public static void Fatal(string str)
		{
			_Logger.LogFatal((object)str);
		}

		public static void Fatal(object data)
		{
			_Logger.LogFatal((object)Format(data));
		}

		public static void Warn(BepInExWarningLogInterpolatedStringHandler handler)
		{
			_Logger.LogWarning(handler);
		}

		public static void Warn(string str)
		{
			_Logger.LogWarning((object)str);
		}

		public static void Warn(object data)
		{
			_Logger.LogWarning((object)Format(data));
		}

		[Conditional("DEBUG")]
		public static void DebugOnly(object data)
		{
		}
	}
	[HarmonyPatch(typeof(MeleeWeaponFirstPerson), "DoAttackDamage")]
	internal class MeleePushPatch
	{
		private static void Postfix(ref bool isPush)
		{
			glaggleAssaultInProgress instance = glaggleAssaultInProgress.Instance;
			if ((Object)(object)instance != (Object)null && isPush)
			{
				instance.Disrespect();
			}
		}
	}
	public struct netCharIndex
	{
		public int index;

		public int playerIndex;
	}
	[HarmonyPatch(typeof(CrosshairGuiLayer), "ShowDeathIndicator")]
	internal class OnEnemyKillPatch
	{
		private static void Postfix(Vector3 worldPos)
		{
		

BepInEx/plugins/AttackOnGlaggleland/LoudIncorrectBuzzer.dll

Decompiled 4 months ago
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("LoudIncorrectBuzzer")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("LoudIncorrectBuzzer")]
[assembly: AssemblyTitle("LoudIncorrectBuzzer")]
[assembly: TargetPlatform("Windows7.0")]
[assembly: SupportedOSPlatform("Windows7.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace LoudIncorrectBuzzer
{
	[BepInPlugin("LoudIncorrectBuzzer.GUID", "LoudIncorrectBuzzer", "0.0.1")]
	internal class EntryPoint : BasePlugin
	{
		private Harmony _Harmony;

		public override void Load()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Expected O, but got Unknown
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Expected O, but got Unknown
			_Harmony = new Harmony("LoudIncorrectBuzzer.GUID.Harmony");
			_Harmony.PatchAll();
			bool flag = default(bool);
			BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(32, 1, ref flag);
			if (flag)
			{
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin has loaded with ");
				((BepInExLogInterpolatedStringHandler)val).AppendFormatted<int>(_Harmony.GetPatchedMethods().Count());
				((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" patches!");
			}
			Logger.Info(val);
		}
	}
	internal static class Logger
	{
		private static readonly ManualLogSource _Logger;

		static Logger()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			_Logger = new ManualLogSource("LoudIncorrectBuzzer");
			Logger.Sources.Add((ILogSource)(object)_Logger);
		}

		private static string Format(object msg)
		{
			return msg.ToString();
		}

		public static void Info(BepInExInfoLogInterpolatedStringHandler handler)
		{
			_Logger.LogInfo(handler);
		}

		public static void Info(string str)
		{
			_Logger.LogMessage((object)str);
		}

		public static void Info(object data)
		{
			_Logger.LogMessage((object)Format(data));
		}

		public static void Debug(BepInExDebugLogInterpolatedStringHandler handler)
		{
			_Logger.LogDebug(handler);
		}

		public static void Debug(string str)
		{
			_Logger.LogDebug((object)str);
		}

		public static void Debug(object data)
		{
			_Logger.LogDebug((object)Format(data));
		}

		public static void Error(BepInExErrorLogInterpolatedStringHandler handler)
		{
			_Logger.LogError(handler);
		}

		public static void Error(string str)
		{
			_Logger.LogError((object)str);
		}

		public static void Error(object data)
		{
			_Logger.LogError((object)Format(data));
		}

		public static void Fatal(BepInExFatalLogInterpolatedStringHandler handler)
		{
			_Logger.LogFatal(handler);
		}

		public static void Fatal(string str)
		{
			_Logger.LogFatal((object)str);
		}

		public static void Fatal(object data)
		{
			_Logger.LogFatal((object)Format(data));
		}

		public static void Warn(BepInExWarningLogInterpolatedStringHandler handler)
		{
			_Logger.LogWarning(handler);
		}

		public static void Warn(string str)
		{
			_Logger.LogWarning((object)str);
		}

		public static void Warn(object data)
		{
			_Logger.LogWarning((object)Format(data));
		}

		[Conditional("DEBUG")]
		public static void DebugOnly(object data)
		{
		}
	}
}
namespace LoudIncorrectBuzzer.Patches
{
	[HarmonyPatch(typeof(CellSoundPlayer), "Post", new Type[]
	{
		typeof(uint),
		typeof(bool)
	})]
	internal class CellSoundPlayer_Post
	{
		private static void Prefix(ref uint eventID)
		{
			if (eventID == 1286352763 || eventID == 966610395)
			{
				eventID = 1256202815u;
			}
		}
	}
}