using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ErenshorQoL")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+61bae260c3df09b7153448ea61d429bfece293c9")]
[assembly: AssemblyProduct("ErenshorQoL")]
[assembly: AssemblyTitle("ErenshorQoL")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
namespace ErenshorQoL
{
[BepInPlugin("Brumdail.ErenshorQoLMod", "Erenshor Quality of Life Mods", "1.10.14.0000")]
[BepInProcess("Erenshor.exe")]
public class ErenshorQoLMod : BaseUnityPlugin
{
public enum Toggle
{
Off,
On
}
internal class AcceptableShortcuts : AcceptableValueBase
{
public AcceptableShortcuts()
: base(typeof(KeyboardShortcut))
{
}
public override object Clamp(object value)
{
return value;
}
public override bool IsValid(object value)
{
return true;
}
public override string ToDescriptionString()
{
return "# Acceptable values: " + string.Join(", ", UnityInput.Current.SupportedKeyCodes);
}
}
[HarmonyPatch(typeof(TypeText))]
[HarmonyPatch("CheckCommands")]
public class QoLCommands
{
private static void HelpMods()
{
UpdateSocialLog.LogAdd("QoL Modded commands: ", "lightblue");
UpdateSocialLog.LogAdd("/bank - Opens the bank window", "lightblue");
UpdateSocialLog.LogAdd("/forge - Opens the forge (blacksmithing) window", "lightblue");
UpdateSocialLog.LogAdd("/auction - Opens the auction hall window", "lightblue");
UpdateSocialLog.LogAdd("/allscenes - Lists all scenes", "lightblue");
}
private static void HelpPlayer()
{
UpdateSocialLog.LogAdd("\nPlayers commands:", "yellow");
UpdateSocialLog.LogAdd("/players - Get a list of players in zone", "yellow");
UpdateSocialLog.LogAdd("/whisper PlayerName Msg - Send a private message", "yellow");
UpdateSocialLog.LogAdd("/group - Send a message to your group (wait, attack, guard, etc)", "yellow");
UpdateSocialLog.LogAdd("/dance - boogie down.", "yellow");
UpdateSocialLog.LogAdd("/keyring - List held keys", "yellow");
UpdateSocialLog.LogAdd("/showmap - Toggle the Map", "yellow");
UpdateSocialLog.LogAdd("/ruleset - Display server modifiers", "yellow");
UpdateSocialLog.LogAdd("/all players || /all pla - List all players in Erenshor", "yellow");
UpdateSocialLog.LogAdd("/portsim SimName - Teleport specified SimPlayer to player", "yellow");
UpdateSocialLog.LogAdd("/setname SimName - Rename targetted SimPlayer", "yellow");
UpdateSocialLog.LogAdd("/shout - Message the entire zone", "yellow");
UpdateSocialLog.LogAdd("/friend - Target SimPlayer is a FRIEND of this character. Their progress will be loosely tied to this character's progress.", "yellow");
UpdateSocialLog.LogAdd("/time1 - Set Day/Night Cycle to normal speed. ");
UpdateSocialLog.LogAdd("/time10, /time25, /time50 - Set TimeScale multiplier to 10x 25x or 50x speed.", "yellow");
UpdateSocialLog.LogAdd("/time - See what time it is. ");
UpdateSocialLog.LogAdd("/loc - Output player location X, Y, Z values", "yellow");
UpdateSocialLog.LogAdd("Hotkeys:", "yellow");
UpdateSocialLog.LogAdd("o - options", "yellow");
UpdateSocialLog.LogAdd("i - inventory", "yellow");
UpdateSocialLog.LogAdd("b - skills and spells book", "yellow");
UpdateSocialLog.LogAdd("c - consider opponent", "yellow");
UpdateSocialLog.LogAdd("h - greet your target", "yellow");
UpdateSocialLog.LogAdd("q - autoattack toggle", "yellow");
UpdateSocialLog.LogAdd("tab - cycle target", "yellow");
UpdateSocialLog.LogAdd("spacebar - jump", "yellow");
UpdateSocialLog.LogAdd("escape (hold) - exit to menu", "yellow");
}
private static void HelpGM()
{
UpdateSocialLog.LogAdd("\nGM commands: *not available in the demo build", "orange");
UpdateSocialLog.LogAdd("/iamadev - Enable Dev Controls", "orange");
UpdateSocialLog.LogAdd("/allitem - List all items", "orange");
UpdateSocialLog.LogAdd("/item000, /item100, .../item 800 - List Items x00 through x99", "orange");
UpdateSocialLog.LogAdd("/blessit - Bless item on mouse cursor", "orange");
UpdateSocialLog.LogAdd("/additem 12 - (12: Cloth Sleeves) Add item to inventory; use /allitem or /item#00 to get item codes)", "orange");
UpdateSocialLog.LogAdd("/cheater 35 (level 1-35) - OVERWRITE character level and load random level-appropriate equipment (CAUTION: Current character equipment and level will be overwritten!!)", "red");
UpdateSocialLog.LogAdd("/loadset 35 (level 1-35) - Sets targetted SimPlayer to level and gear for level (CAUTION: Current character equipment and level will be overwritten!!)", "red");
UpdateSocialLog.LogAdd("/bedazzl - Targetted SimPlayer gets equipment randomly upgraded to sparkly", "orange");
UpdateSocialLog.LogAdd("/setnude - Targetted SimPlayer loses all equipment", "orange");
UpdateSocialLog.LogAdd("/hpscale 1.0 (multiplier) - NPC HP scale modifier. You must zone to activate this modifier", "orange");
UpdateSocialLog.LogAdd("/livenpc - List living NPCs in zone", "orange");
UpdateSocialLog.LogAdd("/levelup - Maxes target's Earned XP", "orange");
UpdateSocialLog.LogAdd("/level-- - Reduce target's level by 1", "orange");
UpdateSocialLog.LogAdd("/simlocs - Report sim zone population", "orange");
UpdateSocialLog.LogAdd("/sivakme - Add Sivakrux coin to inventory", "orange");
UpdateSocialLog.LogAdd("/fastdev - Increases player RunSpeed to 24", "orange");
UpdateSocialLog.LogAdd("/resists - Add 33 to all base resists", "orange");
UpdateSocialLog.LogAdd("/raining - Changes atmosphere to raining", "orange");
UpdateSocialLog.LogAdd("/thunder - Changes atmosphere to thunderstorm", "orange");
UpdateSocialLog.LogAdd("/bluesky - Changes atmosphere to blue sky", "orange");
UpdateSocialLog.LogAdd("/dosunny - Toggles sun", "orange");
UpdateSocialLog.LogAdd("/cantdie - Target stays at max HP", "orange");
UpdateSocialLog.LogAdd("/devkill - Kill current target", "orange");
UpdateSocialLog.LogAdd("/killall - Kill all spawned NPCs", "orange");
UpdateSocialLog.LogAdd("/add50xp - Add 50 xp to the player", "orange");
UpdateSocialLog.LogAdd("/debugxp - Add 1000 xp to the player", "orange");
UpdateSocialLog.LogAdd("/respec - Proficiency Points Reset", "orange");
UpdateSocialLog.LogAdd("/specs - List targetted SimPlayer's proficiency points", "orange");
UpdateSocialLog.LogAdd("/dospec - Targetted SimPlayer has proficiency points reset", "orange");
UpdateSocialLog.LogAdd("/addphse - Applies Cave Lung debuff to the player", "red");
UpdateSocialLog.LogAdd("/bombard - Applies a myriad of detrimental spells to the target.", "orange");
UpdateSocialLog.LogAdd("/invisme - Toggle Dev Invis", "orange");
UpdateSocialLog.LogAdd("/toscene Stowaway - Teleport to the named scene (may need to use Unstuck Me). Check scenes with /simlocs or use this list of Scenes: Stowaway, Tutorial, Abyssal, Azure, AzynthiClear, Blight, Bonepits, Brake, Braxonia, Braxonian, Duskenlight, Elderstone, FernallaField, Hidden, Krakengard, Loomingwood, Lost Cellar, Malaroth, PrielPlateau, Ripper, Rockshade, Rottenfoot, SaltedStrand, Silkengrass, Soluna, Underspine, Vitheo, VitheosEnd, Willowwatch, Windwashed", "orange");
UpdateSocialLog.LogAdd("/invinci - Make player invincible", "orange");
UpdateSocialLog.LogAdd("/faction 5 - Modify player's faction standing of the target's faction. Use negative numbers to decrease faction.", "orange");
}
private static void HelpOther()
{
UpdateSocialLog.LogAdd("\nOther GM commands: *not available in the demo build", "orange");
UpdateSocialLog.LogAdd("/viewgec - View the total global economy", "orange");
UpdateSocialLog.LogAdd("/resetec - Rest the total global economy to 0", "orange");
UpdateSocialLog.LogAdd("/stoprev - Set party to relaxed state or report who is in combat", "orange");
UpdateSocialLog.LogAdd("/gamepad - Gamepad Control Enabled (experimental)", "orange");
UpdateSocialLog.LogAdd("/control - Toggle between modern and standard controls", "orange");
UpdateSocialLog.LogAdd("/steamid - Lists which AppID and build is running)", "orange");
UpdateSocialLog.LogAdd("/gamerdr - NPC shouts about GamesRadar release date", "orange");
UpdateSocialLog.LogAdd("/testnre - Causes a Null Reference Exception for testing", "orange");
UpdateSocialLog.LogAdd("/force2h - Target SimPlayer forced to use two-handed weapon", "orange");
UpdateSocialLog.LogAdd("/ascview - View target SimPlayer ascensions", "orange");
UpdateSocialLog.LogAdd("/limit20, /limit30, /limit60 - Sets target frame rate", "orange");
UpdateSocialLog.LogAdd("/preview - Enable Demonstration Mode (CAUTION: Save Files will be overwritten!!)", "red");
UpdateSocialLog.LogAdd("/rocfest - Enable RocFest Demonstration Mode (CAUTION: Save Files will be overwritten!!)", "red");
UpdateSocialLog.LogAdd("/saveloc - Output Save Data location", "orange");
UpdateSocialLog.LogAdd("/droneme - Toggle Drone Mode for Camera (/droneme again to turn off)", "orange");
UpdateSocialLog.LogAdd("/debugap - List NPCs attacking the player", "orange");
UpdateSocialLog.LogAdd("/spychar - List information about the target", "orange");
UpdateSocialLog.LogAdd("/spyloot - List loot information about the target", "orange");
UpdateSocialLog.LogAdd("/nodechk - List Nodes in the current zone", "orange");
UpdateSocialLog.LogAdd("/yousolo - Removes SimPlayer from group", "orange");
UpdateSocialLog.LogAdd("/dismiss - Dismiss SimPlayer from group", "orange");
UpdateSocialLog.LogAdd("/allgrps - List group data", "orange");
UpdateSocialLog.LogAdd("/delachv - Clear Achievements", "red");
UpdateSocialLog.LogAdd("/bkquest - Load Back Quest Achievements", "orange");
}
public static void DoHelp()
{
ErenshorQoLLogger.LogDebug((object)"QoLCommands.DoHelp() called");
GameData.Misc.OpenCloseHelp();
HelpOther();
HelpGM();
HelpPlayer();
HelpMods();
UpdateSocialLog.LogAdd("\nUse /help mods, /help gm, /help player, or /help other for the individual lists,", "orange");
}
public static void DoBank()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)GameData.ItemOnCursor == (Object)null || (Object)(object)GameData.ItemOnCursor == (Object)(object)GameData.PlayerInv.Empty)
{
GameData.BankUI.OpenBank(((Component)GameData.PlayerControl).transform.position);
}
else
{
UpdateSocialLog.LogAdd("Remove item from cursor before interacting with the bank.", "yellow");
}
}
public static void DoAuction()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)GameData.ItemOnCursor == (Object)null || (Object)(object)GameData.ItemOnCursor == (Object)(object)GameData.PlayerInv.Empty)
{
GameData.AHUI.OpenAuctionHouse(((Component)GameData.PlayerControl).transform.position);
}
else
{
UpdateSocialLog.LogAdd("Remove item from cursor before interacting with the auction house.", "yellow");
}
}
public static void DoForge()
{
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)GameData.ItemOnCursor == (Object)null || (Object)(object)GameData.ItemOnCursor == (Object)(object)GameData.PlayerInv.Empty)
{
GameData.PlayerAud.PlayOneShot(GameData.Misc.SmithingOpen, GameData.PlayerAud.volume * GameData.SFXVol);
GameData.Smithing.OpenWindow(((Component)GameData.PlayerControl).transform.position);
}
else
{
UpdateSocialLog.LogAdd("Remove item from cursor before interacting with the forge.", "yellow");
}
}
private static bool Prefix()
{
if (QoLCommandsToggle.Value == Toggle.On)
{
bool flag = true;
bool flag2 = true;
bool flag3 = true;
bool flag4 = true;
bool flag5 = true;
if (GameData.TextInput.typed.text.Length >= 5 && flag && GameData.TextInput.typed.text.Substring(0, 5).ToLower() == "/bank")
{
DoBank();
GameData.TextInput.typed.text = "";
GameData.TextInput.CDFrames = 10f;
GameData.TextInput.InputBox.SetActive(false);
GameData.PlayerTyping = false;
return false;
}
if (GameData.TextInput.typed.text.Length >= 6 && flag2 && GameData.TextInput.typed.text.Substring(0, 6).ToLower() == "/forge")
{
DoForge();
GameData.TextInput.typed.text = "";
GameData.TextInput.CDFrames = 10f;
GameData.TextInput.InputBox.SetActive(false);
GameData.PlayerTyping = false;
return false;
}
if (GameData.TextInput.typed.text.Length >= 8 && flag3 && !GameData.GM.DemoBuild && GameData.TextInput.typed.text.Substring(0, 8).ToLower() == "/auction")
{
DoAuction();
GameData.TextInput.typed.text = "";
GameData.TextInput.CDFrames = 10f;
GameData.TextInput.InputBox.SetActive(false);
GameData.PlayerTyping = false;
return false;
}
if (GameData.TextInput.typed.text.Length >= 10 && flag4 && GameData.TextInput.typed.text.Substring(0, 10).ToLower() == "/allscenes")
{
StringBuilder stringBuilder = new StringBuilder("Stowaway, Tutorial");
ZoneAtlasEntry[] atlas = ZoneAtlas.Atlas;
foreach (ZoneAtlasEntry val in atlas)
{
stringBuilder.Append(", " + val.ZoneName);
}
string text = stringBuilder.ToString();
UpdateSocialLog.LogAdd("Zone Names: " + text);
GameData.TextInput.typed.text = "";
GameData.TextInput.CDFrames = 10f;
GameData.TextInput.InputBox.SetActive(false);
GameData.PlayerTyping = false;
return false;
}
if (GameData.TextInput.typed.text.Length >= 5 && flag5)
{
bool flag6 = false;
bool flag7 = false;
bool flag8 = false;
bool flag9 = false;
bool flag10 = false;
if (GameData.TextInput.typed.text.Length >= 12)
{
flag9 = GameData.TextInput.typed.text.Substring(0, 12).ToLower() == "/help player";
}
else if (GameData.TextInput.typed.text.Length >= 11)
{
flag8 = GameData.TextInput.typed.text.Substring(0, 11).ToLower() == "/help other";
}
else if (GameData.TextInput.typed.text.Length >= 10)
{
flag7 = GameData.TextInput.typed.text.Substring(0, 10).ToLower() == "/help mods";
}
else if (GameData.TextInput.typed.text.Length >= 8)
{
flag6 = GameData.TextInput.typed.text.Substring(0, 8).ToLower() == "/help gm";
}
else if (GameData.TextInput.typed.text.Length >= 5)
{
flag10 = GameData.TextInput.typed.text.Substring(0, 5).ToLower() == "/help";
}
if (flag6 || flag7 || flag8 || flag9 || flag10)
{
if (flag6)
{
HelpGM();
}
else if (flag7)
{
HelpMods();
}
else if (flag8)
{
HelpOther();
}
else if (flag9)
{
HelpPlayer();
}
else if (flag10)
{
ErenshorQoLLogger.LogDebug((object)"QoLCommands.DoHelp() called");
DoHelp();
}
GameData.TextInput.typed.text = "";
GameData.TextInput.CDFrames = 10f;
GameData.TextInput.InputBox.SetActive(false);
GameData.PlayerTyping = false;
return false;
}
}
}
return true;
}
}
[HarmonyPatch(typeof(AuctionHouseUI))]
[HarmonyPatch("OpenListItem")]
public class AutoPriceYourItem
{
private static void Postfix(AuctionHouseUI __instance)
{
if (AutoPriceItem.Value == Toggle.On)
{
int num = 0;
num = GameData.SlotToBeListed.MyItem.ItemValue * 6 - 1;
GameData.AHUI.ListPrice.text = $"{num}";
}
}
}
internal const string ModName = "ErenshorQoLMod";
internal const string ModVersion = "1.10.14.0000";
internal const string ModTitle = "Erenshor Quality of Life Mods";
internal const string ModDescription = "Erenshor Quality of Life Mods";
internal const string Author = "Brumdail";
private const string ModGUID = "Brumdail.ErenshorQoLMod";
private static string ConfigFileName = "Brumdail.ErenshorQoLMod.cfg";
private static string ConfigFileFullPath = Paths.ConfigPath + Path.DirectorySeparatorChar + ConfigFileName;
public bool appliedConfigChange;
internal static ErenshorQoLMod context = null;
private readonly Harmony harmony = new Harmony("Brumdail.ErenshorQoLMod");
public static readonly ManualLogSource ErenshorQoLLogger = Logger.CreateLogSource("ErenshorQoLMod");
internal static ConfigEntry<Toggle> AutoLootToggle = null;
internal static ConfigEntry<Toggle> AutoLootDebug = null;
internal static ConfigEntry<float> AutoLootDistance = null;
internal static ConfigEntry<int> AutoLootMinimum = null;
internal static ConfigEntry<Toggle> QoLCommandsToggle = null;
internal static ConfigEntry<KeyboardShortcut> QoLBankKey = null;
internal static ConfigEntry<KeyboardShortcut> QoLAuctionKey = null;
internal static ConfigEntry<KeyboardShortcut> QoLForgeKey = null;
internal static ConfigEntry<Toggle> AutoAttackToggle = null;
internal static ConfigEntry<Toggle> AutoAttackOnSkillToggle = null;
internal static ConfigEntry<Toggle> AutoAttackOnAggro = null;
internal static ConfigEntry<Toggle> AutoPetToggle = null;
internal static ConfigEntry<Toggle> AutoPetOnSkillToggle = null;
internal static ConfigEntry<Toggle> AutoPetOnAggro = null;
internal static ConfigEntry<Toggle> AutoPetOnAutoAttackToggle = null;
internal static ConfigEntry<Toggle> AutoPriceItem = null;
internal static bool _configApplied;
private void Awake()
{
context = this;
Utilities.GenerateConfigs();
harmony.PatchAll();
SetupWatcher();
}
private void OnDestroy()
{
((BaseUnityPlugin)this).Config.Save();
}
private void Update()
{
//IL_0005: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: 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_0033: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
KeyboardShortcut value = QoLBankKey.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
ErenshorQoLLogger.LogDebug((object)"QoLCommands.DoBank() called");
QoLCommands.DoBank();
return;
}
value = QoLAuctionKey.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
ErenshorQoLLogger.LogDebug((object)"QoLCommands.DoAuction() called");
QoLCommands.DoAuction();
return;
}
value = QoLForgeKey.Value;
if (((KeyboardShortcut)(ref value)).IsDown())
{
ErenshorQoLLogger.LogDebug((object)"QoLCommands.DoForge() called");
QoLCommands.DoForge();
}
}
private void SetupWatcher()
{
FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(Paths.ConfigPath, ConfigFileName);
fileSystemWatcher.Changed += ReadConfigValues;
fileSystemWatcher.Created += ReadConfigValues;
fileSystemWatcher.Renamed += ReadConfigValues;
fileSystemWatcher.IncludeSubdirectories = true;
fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject;
fileSystemWatcher.EnableRaisingEvents = true;
}
private void ReadConfigValues(object sender, FileSystemEventArgs e)
{
if (!File.Exists(ConfigFileFullPath))
{
return;
}
try
{
ErenshorQoLLogger.LogDebug((object)"ReadConfigValues called");
((BaseUnityPlugin)this).Config.Reload();
((BaseUnityPlugin)this).Config.SaveOnConfigSet = true;
}
catch
{
ErenshorQoLLogger.LogError((object)("There was an issue loading your " + ConfigFileName));
ErenshorQoLLogger.LogError((object)"Please check your config entries for spelling and format!");
}
}
internal ConfigEntry<T> config<T>(string group, string name, T value, ConfigDescription description)
{
return ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, description);
}
internal ConfigEntry<T> config<T>(string group, string name, T value, string description)
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001b: Expected O, but got Unknown
return ((BaseUnityPlugin)this).Config.Bind<T>(group, name, value, new ConfigDescription(description, (AcceptableValueBase)null, Array.Empty<object>()));
}
}
public class Utilities
{
public static readonly ManualLogSource ErenshorUtilitiesLogger = Logger.CreateLogSource("ErenshorQoLUtilities");
internal static void ApplyConfig()
{
ErenshorQoLMod._configApplied = true;
}
internal static void GenerateConfigs()
{
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Expected O, but got Unknown
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0088: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Expected O, but got Unknown
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Expected O, but got Unknown
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: Expected O, but got Unknown
//IL_0115: Unknown result type (might be due to invalid IL or missing references)
//IL_011b: Expected O, but got Unknown
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012b: Expected O, but got Unknown
//IL_0135: Unknown result type (might be due to invalid IL or missing references)
//IL_013b: Expected O, but got Unknown
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Expected O, but got Unknown
//IL_0156: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Expected O, but got Unknown
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Expected O, but got Unknown
//IL_0178: Unknown result type (might be due to invalid IL or missing references)
//IL_017f: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_0190: Expected O, but got Unknown
//IL_019a: Unknown result type (might be due to invalid IL or missing references)
//IL_01a1: Expected O, but got Unknown
//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Expected O, but got Unknown
//IL_01bc: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Expected O, but got Unknown
ErenshorQoLMod.QoLCommandsToggle = ErenshorQoLMod.context.config("2 - QoL Commands", "Enable QoL Commands", ErenshorQoLMod.Toggle.On, "Enable additional Quality of Life commands like /bank, /auction, updated /help etc.");
ErenshorQoLMod.QoLBankKey = ErenshorQoLMod.context.config<KeyboardShortcut>("2 - QoL Commands", "Bank Key", new KeyboardShortcut((KeyCode)290, Array.Empty<KeyCode>()), new ConfigDescription("Key(s) used to open the Bank window. Use https://docs.unity3d.com/Manual/ConventionalGameInput.html", (AcceptableValueBase)(object)new ErenshorQoLMod.AcceptableShortcuts(), Array.Empty<object>()));
ErenshorQoLMod.QoLAuctionKey = ErenshorQoLMod.context.config<KeyboardShortcut>("2 - QoL Commands", "Auction Key", new KeyboardShortcut((KeyCode)291, Array.Empty<KeyCode>()), new ConfigDescription("Key(s) used to open the Auction House window. Use https://docs.unity3d.com/Manual/ConventionalGameInput.html", (AcceptableValueBase)(object)new ErenshorQoLMod.AcceptableShortcuts(), Array.Empty<object>()));
ErenshorQoLMod.QoLForgeKey = ErenshorQoLMod.context.config<KeyboardShortcut>("2 - QoL Commands", "Forge Key", new KeyboardShortcut((KeyCode)291, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), new ConfigDescription("Key(s) used to open the Forge window. Use https://docs.unity3d.com/Manual/ConventionalGameInput.html", (AcceptableValueBase)(object)new ErenshorQoLMod.AcceptableShortcuts(), Array.Empty<object>()));
ErenshorQoLMod.AutoPriceItem = ErenshorQoLMod.context.config("6 - Auto Price Item", "Auto Set AH Item Price", ErenshorQoLMod.Toggle.On, "Automatically start with the highest sellable auction house price when adding an item.");
ConfigDefinition val = new ConfigDefinition("1 - AutoLoot", "Enable AutoLoot");
ConfigDefinition val2 = new ConfigDefinition("1 - AutoLoot", "Auto Loot Distance");
ConfigDefinition val3 = new ConfigDefinition("1 - AutoLoot", "Auto Loot Minimum Threshold");
ConfigDefinition val4 = new ConfigDefinition("1 - AutoLoot", "AutoLoot Debug Messages");
ConfigDefinition val5 = new ConfigDefinition("1 - AutoLoot", "Enable AutoLooting into the Bank");
ConfigDefinition val6 = new ConfigDefinition("3 - Auto Attack", "Enable Auto Attack");
ConfigDefinition val7 = new ConfigDefinition("3 - Auto Attack", "Auto Attack on Skill Use");
ConfigDefinition val8 = new ConfigDefinition("3 - Auto Attack", "Auto Target,Attack on Aggro");
ConfigDefinition val9 = new ConfigDefinition("4 - Auto Pet", "Enable Auto Pet Command");
ConfigDefinition val10 = new ConfigDefinition("4 - Auto Pet", "Auto Pet Command on Skill Use");
ConfigDefinition val11 = new ConfigDefinition("4 - Auto Pet", "Auto Pet Command on Skill Use");
ConfigDefinition val12 = new ConfigDefinition("4 - Auto Pet", "Auto Pet Command on Auto Attack");
if (!ErenshorQoLMod.context.appliedConfigChange)
{
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Enable AutoLoot'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val2))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val2);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Loot Distance'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val3))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val3);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Loot Minimum Threshold'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val4))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val4);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'AutoLoot Debug Messages'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val5))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val5);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Enable AutoLooting into the Bank'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val6))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val6);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Enable Auto Attack'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val7))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val7);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Attack on Skill Use'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val8))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val8);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Target,Attack on Aggro'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val9))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val9);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Enable Auto Pet Command'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val10))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val10);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Pet Command on Skill Use'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val11))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val11);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Pet Command on Skill Use'");
}
if (((BaseUnityPlugin)ErenshorQoLMod.context).Config.ContainsKey(val12))
{
((BaseUnityPlugin)ErenshorQoLMod.context).Config.Remove(val12);
ErenshorUtilitiesLogger.LogInfo((object)"Removed obsolete setting: 'Auto Pet Command on Auto Attack'");
}
ErenshorQoLMod.context.appliedConfigChange = true;
}
}
}
}