Decompiled source of OutwardStatusUtility v1.1.0

OutwardStatusUtility.dll

Decompiled 2 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("OutwardStatusUtility")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Apply multiple status effects to player with a keypress")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+2f2c5ef42b0dab3310846e70ce4aa0eb22ee9a05")]
[assembly: AssemblyProduct("OutwardStatusUtility")]
[assembly: AssemblyTitle("OutwardStatusUtility")]
[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 OutwardStatusUtility
{
	[BepInPlugin("com.Glowstick.outwardstatusutility", "Outward Status Utility", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string GUID = "com.Glowstick.outwardstatusutility";

		public const string NAME = "Outward Status Utility";

		public const string VERSION = "1.0.0";

		internal static ManualLogSource Log;

		public static ConfigEntry<KeyCode> ApplyStatusKey;

		public static ConfigEntry<KeyCode> RemoveStatusKey;

		public static ConfigEntry<bool> EnableBoons;

		public static ConfigEntry<bool> EnableRecoveryEffects;

		public static ConfigEntry<bool> EnableCombatBuffs;

		public static ConfigEntry<bool> EnableSpecialBuffs;

		public static ConfigEntry<bool> EnableImbuements;

		public static ConfigEntry<bool> EnableRuneEffects;

		public static ConfigEntry<bool> EnableFoodBuffs;

		public static ConfigEntry<bool> EnableRestEffects;

		public static ConfigEntry<bool> EnableEnvironmentalEffects;

		public static ConfigEntry<bool> EnableMiscEffects;

		public static ConfigEntry<bool> EnableHexes;

		public static ConfigEntry<bool> EnableDebuffs;

		public static ConfigEntry<bool> EnableDoTs;

		public static ConfigEntry<bool> EnableExtremeNegatives;

		public static ConfigEntry<bool> EnableFoodDebuffs;

		public static ConfigEntry<bool> EnableDiseases;

		public static ConfigEntry<bool> EnableCustomEffects;

		public static ConfigEntry<string> CustomStatusNames;

		private static readonly List<string> PositiveBoonNames = new List<string>
		{
			"Rage", "Discipline", "Warm", "Cool", "Mist", "Bless", "Possessed", "Rage Amplified", "Discipline Amplified", "Warm Amplified",
			"Cool Amplified", "Mist Amplified", "Bless Amplified", "Possessed Amplified"
		};

		private static readonly List<string> RecoveryEffectNames = new List<string>
		{
			"Health Recovery 2", "Stamina Recovery 2", "Mana Ratio Recovery 2", "Health Recovery 3", "Stamina Recovery 3", "Mana Ratio Recovery 3", "Health Recovery 4", "Stamina Recovery 4", "Mana Ratio Recovery 4", "Health Recovery Small",
			"Stamina Recovery Small", "Mana Ratio Recovery Small", "Health Recovery 5", "Stamina Recovery 5", "Mana Ratio Recovery 5", "Passive Mana Regen", "ExtremeManaRegen1"
		};

		private static readonly List<string> CombatBuffNames = new List<string>
		{
			"Stamina Cost Reduction", "Mana Cost Reduction", "Speed Up", "Elemental Resistance", "Elemental Immunity", "Environment Resistance", "Stability Up", "Defense Bonus", "Stealth Up", "Stability Up 2",
			"Attack Up", "Impact Up", "Armor Penalties Reduction", "Elemental Resistance 2", "Protection 1", "Protection 2", "Barrier 1", "Barrier 2", "StatusBuildUpResUp", "Shimmer"
		};

		private static readonly List<string> SpecialBuffNames = new List<string>
		{
			"Exalted", "Energized", "Alert", "Unerring Read", "Prime", "ElemFireBuff", "ElemFrostBuff", "ElemDecayBuff", "ElemLightBuff", "ElemEtherealBuff",
			"ElemChromaticBuff", "KillStreak", "Craze", "GhostRhythm", "SkyRhythm"
		};

		private static readonly List<string> ImbueEffectNames = new List<string>
		{
			"Poison Imbue", "Greater Poison Imbue", "Fire Imbue", "Greater Fire Imbue", "Frost Imbue", "Greater Frost Imbue", "Lightning Imbue", "Greater Lightning Imbue", "Greater Ethereal Imbue", "Wind Imbue",
			"Greater Decay Imbue", "Decay Shield Imbue", "Ethereal Shield Imbue", "Fire Shield Imbue", "Frost Shield Imbue", "Lightning Shield Imbue", "Mystic Fire Imbue", "Mystic Frost Imbue", "Divine Light Imbue", "Infuse Blood",
			"Infuse Mana", "Frost Bullet Imbue", "Blood Bullet Imbue", "Shatter Bullet Imbue"
		};

		private static readonly List<string> RuneEffectNames = new List<string>
		{
			"Wolf Fal Runes", "Wolf Runic Protection", "Shim Runes", "Egoth Runes", "Dez Runes", "Fal Runes", "Runic Lantern Amplified", "Runic Lantern", "Runic Blade", "Runic Protection Amplified",
			"Runic Protection", "Runic Heal Amplified", "Fireflies"
		};

		private static readonly List<string> HexEffectNames = new List<string> { "Confusion", "Pain", "Chill", "Haunted", "Doom", "Curse" };

		private static readonly List<string> DebuffEffectNames = new List<string>
		{
			"Slow Down", "Dizzy", "Stun", "Elemental Vulnerability", "Cripple", "Weaken", "Sapped", "Panic", "Dispirited", "Breathless",
			"Hampered", "Drawback", "StatusBuildUpResDown"
		};

		private static readonly List<string> DotEffectNames = new List<string> { "Burn", "Poisoned", "Poisoned +", "Bleeding", "Bleeding +", "Burning", "Immolate", "Blaze", "HolyBlaze", "Plague" };

		private static readonly List<string> ExtremeNegativeNames = new List<string>
		{
			"Petrification", "Petrified", "Aetherbomb", "AetherbombExplosion", "Tainted", "Corrupt Positive", "Corrupt Negative", "Defiled Positive", "Defiled Negative", "ColdExposure",
			"Freezing", "HeatExposure", "Temperature Burning", "AncientDwellerSlowing"
		};

		private static readonly List<string> FoodBuffNames = new List<string>
		{
			"Full", "Refreshed", "Gaberry Wine", "Food Stability Up", "Food Cool", "Food Mist", "Food Bless", "Food Possessed", "Food Discipline", "Food Attack Up",
			"Food Impact Up", "Food Water Stamina", "PureWater", "HealingWater"
		};

		private static readonly List<string> FoodDebuffNames = new List<string> { "Starving", "Hungry", "Bloated", "Parched", "Thirsty", "Food Dizzy", "Food Poisoned", "Food Poisoned +", "Food Slow Down", "Drunk" };

		private static readonly List<string> EnvironmentNames = new List<string> { "Wet", "Environment Cold Resistance", "Environment Heat Resistance", "Food Environment Heat Resistance", "Food Environment Cold Resistance", "Cold1", "Cold2", "Hallowed Marsh Poison Lvl1", "Hallowed Marsh Poison Lvl2", "SulphurPoison" };

		private static readonly List<string> RestEffectNames = new List<string>
		{
			"Drowsy", "Tired", "Camo Tent buff", "Fur Tent buff", "Luxurious Tent buff", "Tent buff", "Cierzo Inns", "Monsoon Inns", "Berg Inns", "Levant Inns",
			"Mage Tent buff", "Plant Tent Buff", "Harmattant Inn A", "Harmattant Inn B", "Lockwell's Revelation Tired", "Lockwell's Revelation Very Tired", "Scourge Tent Buff", "Fire Totem Sleep", "Ice Totem Sleep", "Light Totem Sleep",
			"Decay Totem Sleep", "Ethereal Totem Sleep", "Calygrey Sleep", "Caldera Inn Sleep", "Caldera Hall Sleep", "Caldera Basic Sleep", "SaunaInn"
		};

		private static readonly List<string> DiseaseNames = new List<string>
		{
			"Infection1", "Infection2", "Infection3", "Indigestion1", "Indigestion2", "Ambraine Withdrawal", "AmbraineWithdrawalPreEffects", "Leywilt1", "Leywilt2", "Hunch1",
			"Hunch2", "HiveInfestation1", "hiveInfestation2", "MeekaFever1", "MeekaFever2"
		};

		private static readonly List<string> MiscEffectNames = new List<string>
		{
			"Bandage", "Gift of Blood", "Gift of Blood Ally", "Blood Leech Victim", "Blood Leech", "Titanic Golem 1", "Titanic Golem 2", "Titanic Golem 3", "Corruption Recovery 1", "Corruption Recovery 2",
			"Corruption Resistance 1", "Corruption Resistance 2", "EliteSupremeShellRage", "SupremeShellRage", "EliteSupremeShellDiscipline", "LionmanElderBoonLvl1", "LionmanElderBoonLvl2", "CrimsonMineLvl", "CrimsonSunLvl", "GargoyleBoonLvl",
			"ScarletEmissaryProt", "SlughellProt", "GrandmotherBoon", "TempleBuff", "TempleBuffPlus", "Bag Over Encumbered", "Pouch Over Encumbered", "Force Bubble", "Wind Imbue Stats"
		};

		private void Awake()
		{
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"Outward Status Utility 1.0.0 is loading...");
			ApplyStatusKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "Apply Status Key", (KeyCode)290, "Key to press to apply status effects to your character");
			RemoveStatusKey = ((BaseUnityPlugin)this).Config.Bind<KeyCode>("General", "Remove Status Key", (KeyCode)263, "Key to press to remove all status effects from your character");
			EnableBoons = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Boons", true, "Apply boon effects (Rage, Discipline, Bless, Cool, Warm, Mist, Possessed)");
			EnableRecoveryEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Recovery Effects", true, "Apply health/stamina/mana recovery effects");
			EnableCombatBuffs = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Combat Buffs", true, "Apply combat buffs (Attack Up, Protection, Speed Up, Resistance, etc.)");
			EnableSpecialBuffs = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Special Buffs", true, "Apply special buffs (Exalted, Energized, Prime, Elemental Buffs, etc.)");
			EnableImbuements = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Imbuements", false, "Apply weapon/shield imbue effects (Fire, Frost, Lightning, Poison, etc.)");
			EnableRuneEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Rune Effects", false, "Apply rune effects (Shim, Egoth, Dez, Fal, Runic Lantern, etc.)");
			EnableFoodBuffs = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Food Buffs", true, "Apply positive food/drink effects (Full, Refreshed, Gaberry Wine, etc.)");
			EnableRestEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Rest Effects", false, "Apply tent and inn rest effects (may cause sleep/drowsy)");
			EnableEnvironmentalEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Environmental Effects", false, "Apply environmental resistance effects (Cold/Heat resistance, Wet, etc.)");
			EnableMiscEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("1. Positive Effects", "Enable Misc Effects", true, "Apply miscellaneous positive effects (Gift of Blood, Corruption Recovery, etc.)");
			EnableHexes = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Hexes", false, "⚠\ufe0f Apply hex effects (Confusion, Pain, Chill, Haunted, Doom, Curse)");
			EnableDebuffs = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Debuffs", false, "⚠\ufe0f Apply debuff effects (Slow Down, Dizzy, Weaken, Sapped, Cripple, etc.)");
			EnableDoTs = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Damage Over Time", false, "⚠\ufe0f Apply DOT effects (Bleeding, Burning, Poisoned, Immolate, Plague)");
			EnableExtremeNegatives = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Extreme Negatives", false, "⚠\ufe0f⚠\ufe0f DANGEROUS! Apply extreme negative effects (Petrified, Corruption, Freezing, etc.)");
			EnableFoodDebuffs = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Food Debuffs", false, "⚠\ufe0f Apply negative food effects (Starving, Hungry, Parched, Drunk, etc.)");
			EnableDiseases = ((BaseUnityPlugin)this).Config.Bind<bool>("2. Negative Effects", "Enable Diseases", false, "⚠\ufe0f Apply disease effects (Infection, Indigestion, Fever, Withdrawal, etc.)");
			EnableCustomEffects = ((BaseUnityPlugin)this).Config.Bind<bool>("3. Custom Effects", "Enable Custom Effects", false, "Enable custom status effect list (uses Custom Status Names below)");
			CustomStatusNames = ((BaseUnityPlugin)this).Config.Bind<string>("3. Custom Effects", "Custom Status Names", "", "Comma-separated list of status effect identifier names (e.g., 'Rage,Discipline,Cool,Fire Imbue'). See documentation for full list.");
			new Harmony("com.Glowstick.outwardstatusutility").PatchAll();
			Log.LogInfo((object)"Outward Status Utility 1.0.0 loaded successfully!");
			Log.LogInfo((object)$"Press {ApplyStatusKey.Value} to apply status effects");
			Log.LogInfo((object)$"Press {RemoveStatusKey.Value} to remove all status effects");
			Log.LogInfo((object)"Total effects available: 400+");
		}

		private void Update()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			if (Input.GetKeyDown(ApplyStatusKey.Value))
			{
				ApplyStatusEffects();
			}
			if (Input.GetKeyDown(RemoveStatusKey.Value))
			{
				RemoveAllStatusEffects();
			}
		}

		private void ApplyStatusEffects()
		{
			try
			{
				CharacterManager instance = CharacterManager.Instance;
				if ((Object)(object)instance == (Object)null)
				{
					Log.LogWarning((object)"CharacterManager not found!");
					return;
				}
				Character firstLocalCharacter = instance.GetFirstLocalCharacter();
				if ((Object)(object)firstLocalCharacter == (Object)null)
				{
					Log.LogWarning((object)"Player character not found!");
					return;
				}
				Log.LogInfo((object)("Applying status effects to " + firstLocalCharacter.Name + "..."));
				List<string> list = new List<string>();
				if (EnableBoons.Value)
				{
					list.AddRange(PositiveBoonNames);
					Log.LogDebug((object)"Added Boon effects");
				}
				if (EnableRecoveryEffects.Value)
				{
					list.AddRange(RecoveryEffectNames);
					Log.LogDebug((object)"Added Recovery effects");
				}
				if (EnableCombatBuffs.Value)
				{
					list.AddRange(CombatBuffNames);
					Log.LogDebug((object)"Added Combat Buff effects");
				}
				if (EnableSpecialBuffs.Value)
				{
					list.AddRange(SpecialBuffNames);
					Log.LogDebug((object)"Added Special Buff effects");
				}
				if (EnableImbuements.Value)
				{
					list.AddRange(ImbueEffectNames);
					Log.LogDebug((object)"Added Imbuement effects");
				}
				if (EnableRuneEffects.Value)
				{
					list.AddRange(RuneEffectNames);
					Log.LogDebug((object)"Added Rune effects");
				}
				if (EnableFoodBuffs.Value)
				{
					list.AddRange(FoodBuffNames);
					Log.LogDebug((object)"Added Food Buff effects");
				}
				if (EnableRestEffects.Value)
				{
					list.AddRange(RestEffectNames);
					Log.LogDebug((object)"Added Rest effects");
				}
				if (EnableEnvironmentalEffects.Value)
				{
					list.AddRange(EnvironmentNames);
					Log.LogDebug((object)"Added Environmental effects");
				}
				if (EnableMiscEffects.Value)
				{
					list.AddRange(MiscEffectNames);
					Log.LogDebug((object)"Added Misc effects");
				}
				if (EnableHexes.Value)
				{
					list.AddRange(HexEffectNames);
					Log.LogWarning((object)"Added Hex effects (may be harmful!)");
				}
				if (EnableDebuffs.Value)
				{
					list.AddRange(DebuffEffectNames);
					Log.LogWarning((object)"Added Debuff effects (may be harmful!)");
				}
				if (EnableDoTs.Value)
				{
					list.AddRange(DotEffectNames);
					Log.LogWarning((object)"Added DOT effects (will cause damage!)");
				}
				if (EnableExtremeNegatives.Value)
				{
					list.AddRange(ExtremeNegativeNames);
					Log.LogWarning((object)"Added Extreme Negative effects (DANGEROUS!)");
				}
				if (EnableFoodDebuffs.Value)
				{
					list.AddRange(FoodDebuffNames);
					Log.LogWarning((object)"Added Food Debuff effects");
				}
				if (EnableDiseases.Value)
				{
					list.AddRange(DiseaseNames);
					Log.LogWarning((object)"Added Disease effects");
				}
				if (EnableCustomEffects.Value && !string.IsNullOrEmpty(CustomStatusNames.Value))
				{
					IEnumerable<string> enumerable = from s in CustomStatusNames.Value.Split(new char[1] { ',' })
						select s.Trim() into s
						where !string.IsNullOrEmpty(s)
						select s;
					list.AddRange(enumerable);
					Log.LogInfo((object)$"Custom effects enabled: {enumerable.Count()} names added");
				}
				HashSet<string> hashSet = new HashSet<string>(list);
				if (list.Count == 0)
				{
					Log.LogWarning((object)"No status effects enabled! Check your configuration.");
					CharacterUI characterUI = firstLocalCharacter.CharacterUI;
					if (characterUI != null)
					{
						characterUI.ShowInfoNotification("No status effects enabled!");
					}
					return;
				}
				Log.LogInfo((object)$"Attempting to apply {list.Count} status effects from enabled categories");
				StatusEffect[] array = Resources.FindObjectsOfTypeAll<StatusEffect>();
				int num = 0;
				int num2 = 0;
				StatusEffect[] array2 = array;
				foreach (StatusEffect val in array2)
				{
					if ((Object)(object)val == (Object)null || !hashSet.Contains(val.IdentifierName))
					{
						continue;
					}
					try
					{
						if ((Object)(object)firstLocalCharacter.StatusEffectMngr.AddStatusEffect(val, firstLocalCharacter) != (Object)null)
						{
							Log.LogDebug((object)("Applied: " + val.IdentifierName));
							num++;
						}
						else
						{
							Log.LogDebug((object)("Failed to apply: " + val.IdentifierName));
							num2++;
						}
					}
					catch (Exception ex)
					{
						Log.LogDebug((object)("Failed to apply " + val.IdentifierName + ": " + ex.Message));
						num2++;
					}
				}
				Log.LogInfo((object)$"Status effects applied: {num} successful, {num2} failed");
				if ((Object)(object)firstLocalCharacter.CharacterUI != (Object)null)
				{
					firstLocalCharacter.CharacterUI.ShowInfoNotification($"Applied {num} status effects!");
				}
			}
			catch (Exception ex2)
			{
				Log.LogError((object)("Error applying status effects: " + ex2.Message));
				Log.LogError((object)ex2.StackTrace);
			}
		}

		private void RemoveAllStatusEffects()
		{
			try
			{
				CharacterManager instance = CharacterManager.Instance;
				if ((Object)(object)instance == (Object)null)
				{
					Log.LogWarning((object)"CharacterManager not found!");
					return;
				}
				Character firstLocalCharacter = instance.GetFirstLocalCharacter();
				if ((Object)(object)firstLocalCharacter == (Object)null)
				{
					Log.LogWarning((object)"Player character not found!");
					return;
				}
				Log.LogInfo((object)("Removing all status effects from " + firstLocalCharacter.Name + "..."));
				StatusEffectManager statusEffectMngr = firstLocalCharacter.StatusEffectMngr;
				if ((Object)(object)statusEffectMngr == (Object)null)
				{
					Log.LogWarning((object)"StatusEffectManager not found!");
					return;
				}
				List<StatusEffect> statuses = statusEffectMngr.Statuses;
				if (statuses == null || statuses.Count == 0)
				{
					Log.LogInfo((object)"No status effects to remove.");
					CharacterUI characterUI = firstLocalCharacter.CharacterUI;
					if (characterUI != null)
					{
						characterUI.ShowInfoNotification("No active status effects!");
					}
					return;
				}
				int count = statuses.Count;
				Log.LogInfo((object)$"Found {count} active status effects to remove");
				List<string> list = new List<string>();
				foreach (StatusEffect item in statuses)
				{
					if ((Object)(object)item != (Object)null)
					{
						list.Add(item.IdentifierName);
					}
				}
				int num = 0;
				foreach (string item2 in list)
				{
					try
					{
						statusEffectMngr.CleanseStatusEffect(item2);
						num++;
						Log.LogDebug((object)("Removed: " + item2));
					}
					catch (Exception ex)
					{
						Log.LogDebug((object)("Failed to remove " + item2 + ": " + ex.Message));
					}
				}
				Log.LogInfo((object)$"Successfully removed {num} status effects");
				if ((Object)(object)firstLocalCharacter.CharacterUI != (Object)null)
				{
					firstLocalCharacter.CharacterUI.ShowInfoNotification($"Removed {num} status effects!");
				}
			}
			catch (Exception ex2)
			{
				Log.LogError((object)("Error removing status effects: " + ex2.Message));
				Log.LogError((object)ex2.StackTrace);
			}
		}
	}
	[BepInPlugin("com.Glowstick.statuseffectdumper", "Status Effect Dumper", "1.0.0")]
	public class StatusEffectDumper : BaseUnityPlugin
	{
		internal static ManualLogSource Log;

		private void Awake()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"Status Effect Dumper loading...");
			new Harmony("com.Glowstick.statuseffectdumper").PatchAll();
		}

		private void Start()
		{
			((MonoBehaviour)this).StartCoroutine(DumpStatusEffectsDelayed());
		}

		private IEnumerator DumpStatusEffectsDelayed()
		{
			yield return (object)new WaitForSeconds(5f);
			DumpAllStatusEffects();
		}

		private void DumpAllStatusEffects()
		{
			try
			{
				Log.LogInfo((object)"Dumping all status effects...");
				StatusEffect[] array = Resources.FindObjectsOfTypeAll<StatusEffect>();
				if (array == null || array.Length == 0)
				{
					Log.LogWarning((object)"No status effects found!");
					return;
				}
				Log.LogInfo((object)$"Found {array.Length} status effects");
				List<string> list = new List<string>();
				List<string> list2 = new List<string>();
				StatusEffect[] array2 = array;
				foreach (StatusEffect val in array2)
				{
					if ((Object)(object)val == (Object)null)
					{
						continue;
					}
					string text = val.IdentifierName ?? "UNNAMED";
					string text2 = "Unknown";
					try
					{
						if (val.EffectFamily != (StatusEffectFamily)null)
						{
							text2 = ((object)val.EffectFamily).ToString();
						}
					}
					catch
					{
					}
					list.Add(text);
					list2.Add(text + " | Family: " + text2);
				}
				list.Sort();
				list2.Sort();
				string text3 = Path.Combine(Paths.BepInExRootPath, "StatusEffects_Dump.txt");
				string text4 = Path.Combine(Paths.BepInExRootPath, "StatusEffects_Detailed.txt");
				File.WriteAllLines(text3, list);
				Log.LogInfo((object)$"Wrote {list.Count} status effect names to: {text3}");
				List<string> list3 = new List<string>
				{
					"=== OUTWARD STATUS EFFECTS DUMP ===",
					$"Generated: {DateTime.Now}",
					$"Total Effects: {list.Count}",
					"",
					"Format: IdentifierName | Family",
					"================================================",
					""
				};
				list3.AddRange(list2);
				File.WriteAllLines(text4, list3);
				Log.LogInfo((object)("Wrote detailed info to: " + text4));
				Log.LogInfo((object)"=== STATUS EFFECT IDENTIFIER NAMES ===");
				foreach (string item in list.Take(50))
				{
					Log.LogInfo((object)item);
				}
				if (list.Count > 50)
				{
					Log.LogInfo((object)$"... and {list.Count - 50} more (see file for full list)");
				}
				Log.LogInfo((object)"Status effect dump complete!");
			}
			catch (Exception ex)
			{
				Log.LogError((object)("Error dumping status effects: " + ex.Message));
				Log.LogError((object)ex.StackTrace);
			}
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "OutwardStatusUtility";

		public const string PLUGIN_NAME = "OutwardStatusUtility";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}