Decompiled source of AssetNavigationGenerationExecutionLibraryPlugin CCM v2.2.2
AssetNavigationGeneralExecutionLibraryPlugin_CCM.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Text.RegularExpressions; using System.Windows.Forms; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using Bounce.ManagedCollections; using Bounce.Singletons; using DataModel; using HarmonyLib; using ModP.B64; using ModdingTales; using Newtonsoft.Json; using TaleSpire.ContentManagement; using Unity.Collections; using Unity.Mathematics; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("AssetNavigationGeneralExecutionLibraryPlugin_CCM")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Nth Dimension")] [assembly: AssemblyProduct("AssetNavigationGeneralExecutionLibraryPlugin_CCM")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("AssetNavigationGeneralExecutionLibraryPlugin_CCM")] [assembly: ComVisible(false)] [assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")] [assembly: AssemblyFileVersion("2.2.2.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("2.2.2.0")] namespace LordAshes; [BepInPlugin("org.lordashes.plugins.angel.ccm", "Asset Navigation and General Execution Library Plugin (CCM)", "2.2.2.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class AssetNavigationGeneralExecutionLibraryPlugin : BaseUnityPlugin { private class KeyboardBinding { public KeyboardShortcut binding { get; set; } public string handler { get; set; } public object parameter { get; set; } public KeyboardBinding(KeyboardShortcut binding, string handler, object parameter) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) this.binding = binding; this.handler = handler; this.parameter = parameter; } } [HarmonyPatch(typeof(CreatureBoardAsset), "OnBaseLoaded")] public class PatchOnBaseLoaded { public static void Postfix(CreatureBoardAsset __instance) { //IL_00aa: 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_0047: 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) CreatureGuid creatureId; if ((Object)(object)__instance != (Object)null && __instance.Link != null && IsAngelAsset(__instance.Link)) { string[] obj = new string[6] { "OnBaseLoaded: ", ((Object)__instance).name, " (", null, null, null }; creatureId = __instance.CreatureId; obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[4] = "), ANGEL Asset. Link: "; obj[5] = __instance.Link; LoggingPlugin.LogInfo(string.Concat(obj)); ApplyCustomContents(__instance, __instance.Link); } else { string[] obj2 = new string[6] { "OnBaseLoaded: ", ((Object)__instance).name, " (", null, null, null }; creatureId = __instance.CreatureId; obj2[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj2[4] = "), Non-ANGEL Asset. Link: "; obj2[5] = __instance.Link; LoggingPlugin.LogInfo(string.Concat(obj2)); } if (!closeMenuOnSpawn) { LoggingPlugin.LogTrace("Reopen Menu"); CancelSpawnTool(); CommonCustomsMenuPlugin._self.Open(); } } } [HarmonyPatch(typeof(CreatureBoardAsset), "OnCreatureDataChanged")] public class PatchOnCreatureDataChanged { public static bool Prefix(CreatureBoardAsset __instance, in CreatureDataV3 newData) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance != (Object)null) { string[] obj = new string[8] { "OnCreatureDataChanged: ", ((Object)__instance).name, " (", null, null, null, null, null }; CreatureGuid creatureId = __instance.CreatureId; obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[4] = "), Link: "; obj[5] = ((__instance.Link == null) ? "Null" : __instance.Link); obj[6] = " => "; obj[7] = ((newData.Link == null) ? "Null" : newData.Link); LoggingPlugin.LogInfo(string.Concat(obj)); if (__instance.Link != newData.Link) { RemoveCustomContents(__instance.CreatureId); if (GetAngelInfo(newData.Link).Count > 0) { LoggingPlugin.LogTrace("Asset Has ANGEL Content"); ApplyCustomContents(__instance, newData.Link); } else { LoggingPlugin.LogTrace("Asset Has No ANGEL Content"); } } } return true; } } [HarmonyPatch(typeof(CreatureManager), "DeleteCreature")] public class PatchDeleteCreature { public static void Postfix(CreatureGuid creatureId, UniqueCreatureGuid uniqueId, bool deleteUniqueFromBackend) { //IL_0039: 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) SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "ClearInfo", new object[3] { ((object)(CreatureGuid)(ref creatureId)).ToString(), "org.lordashes.plugins.hidebase", false }, (object)null); RemoveCustomContents(creatureId); foreach (Action<CreatureGuid> item in _subscriptionsAssetRemove) { item(creatureId); } } } [HarmonyPatch(typeof(CreatureManager), "DeleteCreatures")] public class PatchDeleteCreatures { public static void Postfix(CreatureGuid[] creatureIds, BList<UniqueCreatureGuid> uniqueIds, bool deleteUniqueFromBackend) { //IL_000a: 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) //IL_0011: 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_001a: Unknown result type (might be due to invalid IL or missing references) foreach (CreatureGuid creatureId in creatureIds) { PatchDeleteCreature.Postfix(creatureId, default(UniqueCreatureGuid), deleteUniqueFromBackend: false); } } } [HarmonyPatch(typeof(CreatureBoardAsset), "Select")] public class PatchSelect { public static void Postfix(CreatureBoardAsset __instance) { ((MonoBehaviour)_self).StartCoroutine(setPortraitBadge(__instance)); } } [HarmonyPatch(typeof(CreatureManager), "SetCreatureFlyingState")] public class PatchSetCreatureFlyingState { public static void Postfix(CreatureGuid creatureId, bool flyingState) { //IL_0003: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) CreatureBoardAsset val = null; CreaturePresenter.TryGetAsset(creatureId, ref val); if ((Object)(object)val != (Object)null) { string[] obj = new string[5] { val.Name, " (", null, null, null }; CreatureGuid creatureId2 = val.CreatureId; obj[2] = ((object)(CreatureGuid)(ref creatureId2)).ToString(); obj[3] = ") Changed Flying State To "; obj[4] = flyingState.ToString(); LoggingPlugin.LogTrace(string.Concat(obj)); if (val.Link != null && val.Link.ToUpper().Contains("ANGEL=") && val.IsExplicitlyHidden && flyingState) { string name = val.Name; creatureId2 = val.CreatureId; LoggingPlugin.LogTrace(name + " (" + ((object)(CreatureGuid)(ref creatureId2)).ToString() + "): Hidden Flying ANGEL Assets Not Supported. Removing Flying State."); CreatureManager.SetCreatureFlyingState(creatureId, false); } } } } [HarmonyPatch(typeof(CreatureManager), "SetCreatureExplicitHideState")] public class PatchSetCreatureExplicitHideState { public static void Postfix(CreatureGuid creatureId, bool hideState) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) CreatureBoardAsset val = null; CreaturePresenter.TryGetAsset(creatureId, ref val); if (!((Object)(object)val != (Object)null)) { return; } string[] obj = new string[5] { val.Name, " (", null, null, null }; CreatureGuid creatureId2 = val.CreatureId; obj[2] = ((object)(CreatureGuid)(ref creatureId2)).ToString(); obj[3] = ") Changed Hidden State To "; obj[4] = hideState.ToString(); LoggingPlugin.LogTrace(string.Concat(obj)); if (val.Link == null || !val.Link.ToUpper().Contains("ANGEL=")) { return; } foreach (GameObject item in from gameObject in Object.FindObjectsByType<GameObject>((FindObjectsSortMode)0) where ((Object)gameObject).name.StartsWith(((object)(CreatureGuid)(ref creatureId)).ToString()) select gameObject) { if ((Object)(object)item != (Object)null) { Renderer[] componentsInChildren = item.GetComponentsInChildren<Renderer>(); foreach (Renderer val2 in componentsInChildren) { string[] obj2 = new string[9] { val.Name, " (", null, null, null, null, null, null, null }; creatureId2 = val.CreatureId; obj2[2] = ((object)(CreatureGuid)(ref creatureId2)).ToString(); obj2[3] = "): Setting "; obj2[4] = ((Object)item).name; obj2[5] = " Renderer "; obj2[6] = ((Object)val2).name; obj2[7] = " Enable To "; obj2[8] = (!hideState).ToString(); LoggingPlugin.LogTrace(string.Concat(obj2)); val2.enabled = !hideState; } } } if (hideState && ((MovableBoardAsset)val).IsFlying) { string name = val.Name; creatureId2 = val.CreatureId; LoggingPlugin.LogTrace(name + " (" + ((object)(CreatureGuid)(ref creatureId2)).ToString() + "): Hidden Flying ANGEL Assets Not Supported. Removing Flying State."); CreatureManager.SetCreatureFlyingState(creatureId, false); } } } private static class Provider { [CompilerGenerated] private sealed class <GetAngelAssets>d__0 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public ReadOnlyDictionary<string, AssetInfo> existingAssets; public Func<Dictionary<string, AssetInfo>, string, IEnumerator> callback; private Dictionary<string, AssetInfo> <assets>5__1; private List<string> <potentialAssets>5__2; private string <cacheFolder>5__3; private List<string> <fullAssets>5__4; private List<string>.Enumerator <>s__5; private string <assetPath>5__6; private string <assetFileName>5__7; private Exception <ex>5__8; private int <pa>5__9; private string <assetBundleName>5__10; private string <assetBundleLocation>5__11; private AssetInfo <info>5__12; private string[] <>s__13; private int <>s__14; private string <variant>5__15; private AssetInfo <copy>5__16; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GetAngelAssets>d__0(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <assets>5__1 = null; <potentialAssets>5__2 = null; <cacheFolder>5__3 = null; <fullAssets>5__4 = null; <>s__5 = default(List<string>.Enumerator); <assetPath>5__6 = null; <assetFileName>5__7 = null; <ex>5__8 = null; <assetBundleName>5__10 = null; <assetBundleLocation>5__11 = null; <info>5__12 = null; <>s__13 = null; <variant>5__15 = null; <copy>5__16 = null; <>1__state = -2; } private bool MoveNext() { //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_0271: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <assets>5__1 = new Dictionary<string, AssetInfo>(); <potentialAssets>5__2 = new List<string>(); try { <potentialAssets>5__2 = (from f in File.Catalog(false) where f.Contains("CustomData/") && Path.GetFileNameWithoutExtension(f) == Path.GetFileName(f) select f).ToList(); LoggingPlugin.LogTrace("Filter Based Potential Asset Detection"); } catch { LoggingPlugin.LogTrace("Non-Filter Based Potential Asset Detection"); <fullAssets>5__4 = File.Catalog(false).ToList(); <>s__5 = <fullAssets>5__4.GetEnumerator(); try { while (<>s__5.MoveNext()) { <assetPath>5__6 = <>s__5.Current; try { <assetFileName>5__7 = (<assetPath>5__6.Contains("/") ? <assetPath>5__6.Substring(<assetPath>5__6.LastIndexOf("/") + 1) : <assetPath>5__6); LoggingPlugin.LogTrace("Analyzing '" + <assetPath>5__6 + "' With Extension '" + Path.GetExtension(<assetFileName>5__7) + "'"); if (<assetPath>5__6.Contains("CustomData/") && Path.GetFileNameWithoutExtension(<assetPath>5__6) == Path.GetFileName(<assetPath>5__6)) { <potentialAssets>5__2.Add(<assetPath>5__6); } <assetFileName>5__7 = null; } catch (Exception ex) { <ex>5__8 = ex; LoggingPlugin.LogWarning("Unable To Determine Extension Of '" + <assetPath>5__6 + "'"); LoggingPlugin.LogWarning("Details: " + <ex>5__8.Message); } <assetPath>5__6 = null; } } finally { ((IDisposable)<>s__5).Dispose(); } <>s__5 = default(List<string>.Enumerator); <fullAssets>5__4 = null; } LoggingPlugin.LogDebug("Found " + <potentialAssets>5__2.Count + " Potential Assets"); <cacheFolder>5__3 = Paths.PluginPath + "/.cache/org.lordashes.plugins.commoncustomsmenu/"; <pa>5__9 = 0; break; case 1: <>1__state = -1; <assetBundleName>5__10 = <potentialAssets>5__2[<pa>5__9]; _self.notification = "Registering... [Provider: ANGEL]"; if (!existingAssets.ContainsKey(<assetBundleName>5__10)) { <assetBundleLocation>5__11 = File.Find(<assetBundleName>5__10, (CacheType)999)[0]; LoggingPlugin.LogTrace("Seeking " + <assetBundleName>5__10 + "..."); if (!<assets>5__1.ContainsKey(<assetBundleName>5__10)) { <info>5__12 = GetAngelAssetInfo(<assetBundleName>5__10, <assetBundleLocation>5__11, <cacheFolder>5__3); if (<info>5__12 != null) { if (<info>5__12.name == "") { <info>5__12.name = ((<info>5__12.prefab != "") ? <info>5__12.prefab : System.Guid.NewGuid().ToString()); } if (<info>5__12.kind == "") { <info>5__12.kind = "Creature"; } if (<info>5__12.header == "") { <info>5__12.header = "Medieval Fantasy"; } if (<info>5__12.groupName == "") { <info>5__12.groupName = "Custom Content"; } _self.notification = "Registering... [Provider: ANGEL, Pack: " + <info>5__12.pack + ", Item: " + <info>5__12.prefab + "]"; <assets>5__1.Add(<assetBundleName>5__10, <info>5__12); if (<info>5__12.variants != null && <info>5__12.variants.Length != 0) { <>s__13 = <info>5__12.variants; for (<>s__14 = 0; <>s__14 < <>s__13.Length; <>s__14++) { <variant>5__15 = <>s__13[<>s__14]; <copy>5__16 = <info>5__12.Clone(); _self.notification = "Registering... [Provider: ANGEL, Pack: " + <copy>5__16.pack + ", Item: " + <copy>5__16.prefab + ", Variant: " + <variant>5__15 + "]"; <copy>5__16.prefab = <variant>5__15; <copy>5__16.name = <copy>5__16.name + " (" + <variant>5__15 + ")"; <assets>5__1.Add(<assetBundleName>5__10 + "." + <variant>5__15, <copy>5__16); <copy>5__16 = null; <variant>5__15 = null; } <>s__13 = null; } } <info>5__12 = null; } <assetBundleLocation>5__11 = null; } <assetBundleName>5__10 = null; <pa>5__9++; break; } if (<pa>5__9 < <potentialAssets>5__2.Count) { <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 1; return true; } _self.notification = null; ((MonoBehaviour)_self).StartCoroutine(callback(<assets>5__1, "ANGEL")); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [IteratorStateMachine(typeof(<GetAngelAssets>d__0))] public static IEnumerator GetAngelAssets(ReadOnlyDictionary<string, AssetInfo> existingAssets, Func<Dictionary<string, AssetInfo>, string, IEnumerator> callback) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GetAngelAssets>d__0(0) { existingAssets = existingAssets, callback = callback }; } private static AssetInfo GetAngelAssetInfo(string assetBundleName, string assetLocation, string cacheFolder) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown LoggingPlugin.LogDebug("Asset Bundle " + assetBundleName + " Lookup..."); AssetBundle val = AssetBundle.LoadFromFile(assetLocation); AssetInfo val2 = new AssetInfo(); TextAsset val3 = null; if ((Object)(object)val != (Object)null) { try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Reading Info.txt JSON Object"); val3 = val.LoadAsset<TextAsset>("info.txt"); } catch (Exception ex) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable to read info.txt file. File is missing or corrupt."); LoggingPlugin.LogWarning("Details: " + ex.Message); } try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Deserializing Info.txt Object"); val2 = JsonConvert.DeserializeObject<AssetInfo>(val3.text); } catch (Exception ex2) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable to deserialize info.txt file. File contains invalid JSON."); LoggingPlugin.LogWarning("Details: " + ex2.Message); } try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Adjusting Info"); val2.provider = "ANGEL"; val2.filename = assetLocation; if (val2.kind != "" && (val2.category == "" || val2.category == null)) { val2.category = val2.kind; } if (val2.category != "" && (val2.kind == "" || val2.kind == null)) { val2.kind = val2.category; } val2.pack = val2.filename.Substring(Paths.PluginPath.Length); val2.pack = val2.pack.Substring(0, val2.pack.Length - assetBundleName.Length); val2.pack = val2.pack.Replace("/", "").Replace("\\", ""); if (val2.blendshapes != null && val2.blendshapes.Length != 0) { val2.hasBlendshapes = true; } } catch (Exception ex3) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable to adjust info settings."); LoggingPlugin.LogWarning("Details: " + ex3.Message); } try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Getting Bundle Names"); string[] allAssetNames = val.GetAllAssetNames(); LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Seeking File Types In Names"); if (allAssetNames != null && allAssetNames.Length != 0) { string[] array = allAssetNames; foreach (string text in array) { if (text.ToLower().EndsWith(".prefab") && val2.prefab == "") { val2.prefab = Path.GetFileNameWithoutExtension(text); } if (text.ToLower().EndsWith(".anim")) { val2.hasAnimations = true; } if (text.ToLower().EndsWith(".mp3")) { val2.hasAudio = true; } if (text.ToLower().EndsWith(".wav")) { val2.hasAudio = true; } } } else { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable To Read Names Of Contents"); } } catch (Exception ex4) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable to read pack contents."); LoggingPlugin.LogWarning("Details: " + ex4.Message); } try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Getting Portrait"); Texture2D val4 = val.LoadAsset<Texture2D>("portrait.png"); try { LoggingPlugin.LogTrace("Asset " + assetBundleName + ": Saving Portrait"); byte[] array2 = ImageConversion.EncodeToPNG(val4); File.WriteAllBytes(cacheFolder + "/Portrait." + val2.prefab + ".png", array2, (CacheType)999); string[] variants = val2.variants; foreach (string text2 in variants) { File.WriteAllBytes(cacheFolder + "/Portrait." + text2 + ".png", array2, (CacheType)999); } } catch (Exception ex5) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Unable to write Portrait to " + cacheFolder + " as Portrait." + val2.prefab + ".png"); LoggingPlugin.LogWarning("Details: " + ex5.Message); } } catch (Exception ex6) { LoggingPlugin.LogWarning("Asset " + assetBundleName + ": Missing an Portrait.png file or it is corrupt."); LoggingPlugin.LogWarning("Details: " + ex6.Message); } val.Unload(true); } return val2; } } public class Sequencer { [CompilerGenerated] private sealed class <processSequence>d__2 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CreatureBoardAsset target; public string name; public Element sequence; public Sequencer <>4__this; private AnimationStyle <animStyle>5__1; private bool <animLoop>5__2; private bool <animPingPong>5__3; private string <animClamp>5__4; private float <pace>5__5; private float <pace>5__6; private float <pace>5__7; private float <pace>5__8; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <processSequence>d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <animClamp>5__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0093: 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_00d1: 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) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_057f: Unknown result type (might be due to invalid IL or missing references) //IL_063b: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: 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_0198: 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_02d3: Expected O, but got Unknown //IL_0385: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Expected O, but got Unknown //IL_0537: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Expected O, but got Unknown //IL_05f3: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Expected O, but got Unknown //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_069f: Unknown result type (might be due to invalid IL or missing references) //IL_06c5: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Invalid comparison between Unknown and I4 //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_04da: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_07bf: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07e8: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) AnimationStyle style; string text3; CreatureGuid creatureId; switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(sequence.delay); <>1__state = 1; return true; case 1: <>1__state = -1; <animStyle>5__1 = (AnimationStyle)(sequence.style & 0xFF); <animLoop>5__2 = <>4__this.isSet(sequence.style, (AnimationStyle)128); <animPingPong>5__3 = <>4__this.isSet(sequence.style, (AnimationStyle)2); <animClamp>5__4 = (<>4__this.isSet(sequence.style, (AnimationStyle)256) ? "Start" : (<>4__this.isSet(sequence.style, (AnimationStyle)1024) ? "End" : "None")); LoggingPlugin.LogDebug("Animation: " + name + ", Animation Style: " + ((object)(AnimationStyle)(ref <animStyle>5__1)).ToString() + ", Loop: " + <animLoop>5__2 + ", Clamp: " + <animClamp>5__4); goto IL_017c; case 2: <>1__state = -1; <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, <pace>5__5); if (!sequencers.Contains(target.CreatureId)) { goto IL_0425; } <pace>5__5 += Math.Abs(sequence.step); goto IL_0345; case 3: <>1__state = -1; <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, <pace>5__6); if (!sequencers.Contains(target.CreatureId)) { goto IL_0425; } <pace>5__6 += -1f * Math.Abs(sequence.step); goto IL_0407; case 4: <>1__state = -1; <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, <pace>5__7); if (!sequencers.Contains(target.CreatureId)) { goto IL_0693; } <pace>5__7 += Math.Abs(sequence.step); goto IL_05b3; case 5: { <>1__state = -1; <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, <pace>5__8); if (!sequencers.Contains(target.CreatureId)) { goto IL_0693; } <pace>5__8 += -1f * Math.Abs(sequence.step); goto IL_0675; } IL_0675: if (<pace>5__8 > sequence.start) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 5; return true; } goto IL_0693; IL_0407: if (<pace>5__6 > sequence.end) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 3; return true; } goto IL_0425; IL_05b3: if (<pace>5__7 < sequence.start) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 4; return true; } goto IL_0693; IL_0271: if ((int)sequence.style > 0) { if (sequence.start < sequence.end) { <pace>5__5 = sequence.start; goto IL_0345; } <pace>5__6 = sequence.start; goto IL_0407; } goto IL_0425; IL_0345: if (<pace>5__5 < sequence.end) { <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 2; return true; } goto IL_0425; IL_0693: if (!(sequencers.Contains(target.CreatureId) & <animLoop>5__2)) { if (<>4__this.isSet(sequence.style, (AnimationStyle)256)) { LoggingPlugin.LogTrace("Ending Sequencer " + name + " Sequence With Starting Sequence Values"); <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, sequence.start); } else if (<>4__this.isSet(sequence.style, (AnimationStyle)1024)) { LoggingPlugin.LogTrace("Ending Sequencer " + name + " Sequence With Ending Sequence Values"); <>4__this.HandleBlendshape(target, sequence.blendShapeIndex, sequence.end); } else { LoggingPlugin.LogTrace("Ending Sequencer " + name + " Sequence With Current Sequence Values"); } string text = name; style = sequence.style; LoggingPlugin.LogDebug("Removing Sequencer " + text + " With Style " + ((object)(AnimationStyle)(ref style)).ToString()); if (sequencers.Contains(target.CreatureId)) { sequencers.Remove(target.CreatureId); } return false; } goto IL_017c; IL_0425: if (sequencers.Contains(target.CreatureId) && (!<animPingPong>5__3 & <animLoop>5__2)) { goto IL_0271; } LoggingPlugin.LogDebug("Reverse Animation Condition: " + sequencers.Contains(target.CreatureId) + " && " + <animPingPong>5__3); if (sequencers.Contains(target.CreatureId) & <animPingPong>5__3) { string text2 = name; style = sequence.style; LoggingPlugin.LogDebug("Starting Reverse Sequence Of Sequencer " + text2 + " With Style " + ((object)(AnimationStyle)(ref style)).ToString()); if (sequence.end < sequence.start) { <pace>5__7 = sequence.end; goto IL_05b3; } <pace>5__8 = sequence.end; goto IL_0675; } goto IL_0693; IL_017c: text3 = name; style = sequence.style; LoggingPlugin.LogDebug("Starting Forward Sequence Of Sequencer " + text3 + " With Style " + ((object)(AnimationStyle)(ref style)).ToString()); if (sequence.audio != null && sequence.audio.Trim() != "") { int selection = int.Parse(sequence.audio); creatureId = target.CreatureId; Audio(selection, ((object)(CreatureGuid)(ref creatureId)).ToString()); } if (sequence.animation != null && sequence.animation.Trim() != "") { int selection2 = int.Parse(sequence.animation); creatureId = target.CreatureId; Animation(selection2, ((object)(CreatureGuid)(ref creatureId)).ToString()); } goto IL_0271; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private string name = ""; public Sequencer(Elements sequence) { //IL_0051: Unknown result type (might be due to invalid IL or missing references) name = sequence.name; Element[] elements = sequence.elements; foreach (Element sequence2 in elements) { LoggingPlugin.LogDebug("Starting Sequencer " + sequence.name); sequencers.Add(sequence.target.CreatureId); ((MonoBehaviour)_self).StartCoroutine(processSequence(sequence.target, sequence.name, sequence2)); } } [IteratorStateMachine(typeof(<processSequence>d__2))] private IEnumerator processSequence(CreatureBoardAsset target, string name, Element sequence) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <processSequence>d__2(0) { <>4__this = this, target = target, name = name, sequence = sequence }; } private void HandleBlendshape(CreatureBoardAsset target, int blendShapeIndex, float blendShapeValue) { //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) string[] obj = new string[9] { "Requesting BlendShape ", (blendShapeIndex - 1).ToString(), " To ", blendShapeValue.ToString(), " On ", target.Name, " (", null, null }; CreatureGuid creatureId = target.CreatureId; obj[7] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[8] = ")"; LoggingPlugin.LogDebug(string.Concat(obj)); SkinnedMeshRenderer componentInChildren = ((Component)target).GetComponentInChildren<SkinnedMeshRenderer>(); if ((Object)(object)componentInChildren != (Object)null) { LoggingPlugin.LogTrace(componentInChildren.sharedMesh.blendShapeCount + " Blendshapes Available"); LoggingPlugin.LogTrace("Setting BlendShape " + (blendShapeIndex - 1) + " (" + componentInChildren.sharedMesh.GetBlendShapeName(blendShapeIndex - 1) + ") To " + blendShapeValue); try { componentInChildren.SetBlendShapeWeight(blendShapeIndex - 1, (float)(int)blendShapeValue); } catch (Exception ex) { LoggingPlugin.LogWarning(ex.Message); } } } private bool isSet(AnimationStyle value, AnimationStyle mask) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) return (AnimationStyle)(value & mask) == mask; } } public static class Utility { public static bool isBoardLoaded() { return SimpleSingletonBehaviour<CameraController>.HasInstance && SingletonStateMBehaviour<BoardSessionManager, State<BoardSessionManager>>.HasInstance && !BoardSessionManager.IsLoading; } public static float ParseFloat(string value) { return float.Parse(value, CultureInfo.InvariantCulture); } public static GameObject FindInHierarchy(GameObject start, string seekName) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, seekName, null, single: true, ref results, ref done); return (results.Count > 0) ? results.ElementAt(0) : null; } public static GameObject FindInHierarchyViaPartialName(GameObject start, string seekName) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, seekName, null, single: true, ref results, ref done, partial: true); return (results.Count > 0) ? results.ElementAt(0) : null; } public static GameObject[] FindAllInHierarchy(GameObject start, string seekName) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, seekName, null, single: false, ref results, ref done); return results.ToArray(); } public static GameObject[] FindAllInHierarchyViaPartialName(GameObject start, string seekName) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, seekName, null, single: false, ref results, ref done, partial: true); return results.ToArray(); } public static GameObject FindWithComponentInHierarchy(GameObject start, string seekType) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, null, seekType, single: true, ref results, ref done); return (results.Count > 0) ? results.ElementAt(0) : null; } public static GameObject[] FindAllWithComponentInHierarchy<T>(GameObject start, string seekType) { List<GameObject> results = new List<GameObject>(); bool done = false; Traverse(start.transform, null, seekType, single: false, ref results, ref done); return results.ToArray(); } public static void Traverse(Transform root, string seekName, string seekType, bool single, ref List<GameObject> results, ref bool done, bool partial = false) { try { if ((seekName == null || seekName == ((Object)((Component)root).gameObject).name || (partial && ((Object)((Component)root).gameObject).name.Contains(seekName))) && (seekType == null || (Object)(object)((Component)root).GetComponent(seekType) != (Object)null)) { LoggingPlugin.LogTrace("Matched '" + ((Object)((Component)root).gameObject).name + "'"); results.Add(((Component)root).gameObject); if (single) { done = true; return; } } foreach (Transform item in ExtensionMethods.Children(root)) { if (!done) { Traverse(item, seekName, seekType, single, ref results, ref done, partial); } } } catch { } } public static object LookUp(in Dictionary<string, object> dictionary, string key) { foreach (KeyValuePair<string, object> item in dictionary) { if (item.Key.ToUpper() == key.ToUpper()) { return item.Value; } } return null; } public static bool ScrollLock() { return Control.IsKeyLocked((Keys)145); } public static void PostOnMainPage(BaseUnityPlugin plugin) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown string text = "Lord Ashes" + ("Lord Ashes".ToUpper().EndsWith("S") ? "'" : "'s"); ModdingUtils.Initialize(plugin, new ManualLogSource("Asset Navigation and General Execution Library Plugin (CCM)"), text, false); } } [CompilerGenerated] private sealed class <WarnAboutLogLevel>d__69 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public AssetNavigationGeneralExecutionLibraryPlugin <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <WarnAboutLogLevel>d__69(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Expected O, but got Unknown //IL_0029: 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) switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } try { DiagnosticLevel logLevel = LoggingPlugin.GetLogLevel(); SystemMessage.DisplayInfoText("Asset Navigation and General Execution Library Plugin (CCM): Using '" + ((object)(DiagnosticLevel)(ref logLevel)).ToString() + "' diagnostics.\r\nUse 'Info' for better performance", 10f, 0f); SystemMessage.DisplayInfoText("Asset Navigation and General Execution Library Plugin (CCM): Use 'Debug' or 'Trace' for\r\ntroubleshooting only.", 10f, 0f); } catch { goto IL_0072; } return false; IL_0072: <>2__current = (object)new WaitForSeconds(1f); <>1__state = 1; return true; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <setPortraitBadge>d__46 : IEnumerator<object>, IDisposable, IEnumerator { private int <>1__state; private object <>2__current; public CreatureBoardAsset __instance; private Image[] <panels>5__1; private Image <panel>5__2; private string <prefab>5__3; private string[] <parts>5__4; private string[] <>s__5; private int <>s__6; private string <part>5__7; private string[] <specs>5__8; private Texture2D <tex>5__9; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <setPortraitBadge>d__46(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <panels>5__1 = null; <panel>5__2 = null; <prefab>5__3 = null; <parts>5__4 = null; <>s__5 = null; <part>5__7 = null; <specs>5__8 = null; <tex>5__9 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_028d: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 1; return true; case 1: <>1__state = -1; <panels>5__1 = (from i in Object.FindObjectsOfType<Image>() where ((Object)i).name == "IMG_CreatureAvatar" select i).ToArray(); if (<panels>5__1.Length != 0) { <panel>5__2 = <panels>5__1[0]; <prefab>5__3 = ""; <parts>5__4 = new string[0]; try { <parts>5__4 = GetAngelInfo(__instance.Link).ToArray(); } catch { } <>s__5 = <parts>5__4; for (<>s__6 = 0; <>s__6 < <>s__5.Length; <>s__6++) { <part>5__7 = <>s__5[<>s__6]; <specs>5__8 = <part>5__7.Split(new char[1] { '@' }); if (<specs>5__8[0].ToUpper() != "AURA" && <specs>5__8[0].ToUpper() != "MORPH") { <prefab>5__3 = <specs>5__8[1]; break; } <specs>5__8 = null; <part>5__7 = null; } <>s__5 = null; if (<prefab>5__3 != "") { ((Component)<panel>5__2).transform.position = new Vector3(112f, 908.45f, 0f); <tex>5__9 = Helpers.GetTexture("Portrait." + <prefab>5__3 + ".png"); LoggingPlugin.LogDebug("Displaying Creature Portrait 'Portrait." + <prefab>5__3 + ".png'"); <panel>5__2.sprite = Sprite.Create(<tex>5__9, new Rect(0f, 0f, (float)((Texture)<tex>5__9).width, (float)((Texture)<tex>5__9).height), new Vector2(0f, 0.5f)); <tex>5__9 = null; } else { LoggingPlugin.LogTrace("Restoring Core Talespire Portrait Position"); ((Component)<panel>5__2).transform.position = new Vector3(118.07f, 908.45f, 0f); } <panel>5__2 = null; <prefab>5__3 = null; <parts>5__4 = null; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static bool spawnAsMorph = false; private Dictionary<string, KeyboardBinding> bindings = new Dictionary<string, KeyboardBinding>(); private string notification = null; private Rect registrationMessagePos = Rect.zero; private GUIStyle registrationMessageStyle = new GUIStyle(); private static Vector3 flyingOffset = Vector3.zero; private static Vector3 flyingScale = new Vector3(1f, 1f, 1f); private static Vector3 nonflyingOffset = Vector3.zero; private static Vector3 nonflyingScale = new Vector3(1f, 1f, 1f); private static List<CreatureGuid> sequencers = new List<CreatureGuid>(); public static Dictionary<string, KeyboardShortcut> modifiers = new Dictionary<string, KeyboardShortcut> { { "Creature", new KeyboardShortcut((KeyCode)306, Array.Empty<KeyCode>()) }, { "Prop", new KeyboardShortcut((KeyCode)305, Array.Empty<KeyCode>()) }, { "Aura", new KeyboardShortcut((KeyCode)308, Array.Empty<KeyCode>()) }, { "Effect", new KeyboardShortcut((KeyCode)307, Array.Empty<KeyCode>()) }, { "Filter", new KeyboardShortcut((KeyCode)304, Array.Empty<KeyCode>()) }, { "Morph", new KeyboardShortcut((KeyCode)303, Array.Empty<KeyCode>()) } }; private static List<Action<CreatureBoardAsset>> _subscriptionsAssetAdd = new List<Action<CreatureBoardAsset>>(); private static List<Action<CreatureGuid>> _subscriptionsAssetRemove = new List<Action<CreatureGuid>>(); public const string Name = "Asset Navigation and General Execution Library Plugin (CCM)"; public const string Guid = "org.lordashes.plugins.angel.ccm"; public const string Version = "2.2.2.0"; public const string Author = "Lord Ashes"; public static AssetNavigationGeneralExecutionLibraryPlugin _self = null; private bool boardLoaded = true; private static bool closeMenuOnSpawn = false; public static void RequestAnimation(int selection) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) object[] array = new object[4]; CreatureGuid selectedCreatureId = LocalClient.SelectedCreatureId; array[0] = ((object)(CreatureGuid)(ref selectedCreatureId)).ToString(); array[1] = "org.lordashes.plugins.angel.ccm.animate"; array[2] = selection; array[3] = false; SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SetInfo", array, (object)null); } public static void RemoteRequestAnimation(object action, object source, object key, object previous, object current) { Animation(int.Parse(current.ToString()), source.ToString()); } public static void Animation(int selection, string target) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0463: Unknown result type (might be due to invalid IL or missing references) //IL_0468: Unknown result type (might be due to invalid IL or missing references) LoggingPlugin.LogDebug("Animate: Start"); CreatureGuid val = (CreatureGuid)((target == null) ? LocalClient.SelectedCreatureId : new CreatureGuid(target)); LoggingPlugin.LogTrace("Animate: Cid = " + ((object)(CreatureGuid)(ref val)).ToString()); CreatureBoardAsset val2 = null; CreaturePresenter.TryGetAsset(val, ref val2); if ((Object)(object)val2 != (Object)null) { LoggingPlugin.LogTrace("Animate: Obtained Asset Reference"); Animation animation = ((Component)((MovableBoardAsset)val2).Rotator).GetComponentInChildren<Animation>(); List<AnimationState> anims = (((Object)(object)animation == (Object)null) ? null : new List<AnimationState>(((IEnumerable)animation).Cast<AnimationState>())); if ((Object)(object)animation != (Object)null && anims != null) { switch (selection) { case 0: LoggingPlugin.LogDebug("Animate: Stopping All Animations"); animation.Stop(); return; case 8: LoggingPlugin.LogDebug("Animate: Toggling Named Animation"); SystemMessage.AskForTextInput("Play Animation", "Animation Name:", "Play", (Action<string>)delegate(string an) { LoggingPlugin.LogDebug("Animate: Seeking Animation '" + an + "'"); foreach (AnimationState item in anims) { if (item.name.Contains(an)) { LoggingPlugin.LogTrace("Animate: Playing Animation '" + item.name + "'"); animation.Stop(); animation.Play(item.name); break; } } }, (Action)null, "Cancel", (Action)null, ""); return; } LoggingPlugin.LogDebug("Animate: Playing Animation By Index (" + selection + ")"); string currentPrefab = GetAngelInfo(val2.Link).ElementAt(0).Substring(GetAngelInfo(val2.Link).ElementAt(0).IndexOf("@") + 1); AssetInfo val3 = (from registeredAsset in CommonCustomsMenuPlugin.GetAssets() where registeredAsset.prefab == currentPrefab select registeredAsset).FirstOrDefault(); if (val3 == null) { foreach (AssetInfo asset in CommonCustomsMenuPlugin.GetAssets()) { LoggingPlugin.LogWarning("Found Registered Asset Prefab '" + asset.prefab + "' While Seeking '" + currentPrefab + "'"); } val3 = null; } LoggingPlugin.LogTrace("Animate: Asset Info = " + ((val3 != null) ? JsonConvert.SerializeObject((object)val3) : "Null")); LoggingPlugin.LogTrace("Animate: AnimationOrder = " + ((val3 != null && val3.animationOrder != null) ? JsonConvert.SerializeObject((object)val3.animationOrder) : "Default")); if (val3 != null && val3.animationOrder != null) { LoggingPlugin.LogTrace("Animate: Selection " + selection + " vs " + val3.animationOrder.Length + " Ordered Animations"); if (selection - 1 < val3.animationOrder.Length) { LoggingPlugin.LogTrace("Animate: Playing Animation '" + val3.animationOrder[selection - 1] + "' (Asset Animation Order)"); animation.Play(val3.animationOrder[selection - 1]); return; } } LoggingPlugin.LogTrace("Animate: Selection " + selection + " vs " + anims.Count + " Available Animations"); if (selection <= anims.Count) { LoggingPlugin.LogTrace("Animate: Playing Animation '" + anims[selection - 1].name + "' (Unity Animation Order)"); animation.Stop(); animation.Play(anims[selection - 1].name); } else { LoggingPlugin.LogWarning("Animate: Asset " + val2.Name + " Does Not Have Animation " + selection); SystemMessage.DisplayInfoText("Asset " + val2.Name + " Does Not Have Animation " + selection, 2.5f, 0f); } } else { string[] obj = new string[5] { "Animate: Asset ", val2.Name, " (", null, null }; CreatureGuid creatureId = val2.CreatureId; obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[4] = ") Does Not Have Any Animations"; SystemMessage.DisplayInfoText(string.Concat(obj), 2.5f, 0f); } } else { SystemMessage.DisplayInfoText("Animate: No Asset Selected For Animation Activation", 2.5f, 0f); } } public static void RequestAudio(int selection) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) object[] array = new object[4]; CreatureGuid selectedCreatureId = LocalClient.SelectedCreatureId; array[0] = ((object)(CreatureGuid)(ref selectedCreatureId)).ToString(); array[1] = "org.lordashes.plugins.angel.ccm.audio"; array[2] = selection; array[3] = false; SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SetInfo", array, (object)null); } public static void RemoteRequestAudio(object action, object source, object key, object previous, object current) { Audio(int.Parse(current.ToString()), source.ToString()); } public static void Audio(int selection, string target) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0011: 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_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: 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) CreatureGuid val = (CreatureGuid)((target == null) ? LocalClient.SelectedCreatureId : new CreatureGuid(target)); CreatureBoardAsset val2 = null; CreaturePresenter.TryGetAsset(val, ref val2); if (!((Object)(object)val2 != (Object)null)) { return; } AudioSource[] audios = ((Component)((MovableBoardAsset)val2).Rotator).GetComponentsInChildren<AudioSource>(); CreatureGuid creatureId; if (audios != null) { switch (selection) { case 0: { LoggingPlugin.LogDebug("Audio: Stopping All Audio"); AudioSource[] array = audios; foreach (AudioSource val3 in array) { val3.Stop(); } return; } case 8: LoggingPlugin.LogDebug("Audio: Playing Named Audio"); SystemMessage.AskForTextInput("Play Audio", "Audio Name:", "Play", (Action<string>)delegate(string an) { LoggingPlugin.LogDebug("Audio: Seeking Audio '" + an + "'"); AudioSource[] array3 = audios; foreach (AudioSource val5 in array3) { if (((Object)val5.clip).name.Contains(an)) { LoggingPlugin.LogTrace("Audio: Playing Audio '" + ((Object)val5.clip).name + "'"); AudioSource[] array4 = audios; foreach (AudioSource val6 in array4) { val6.Stop(); } val5.Play(); break; } } }, (Action)null, "Cancel", (Action)null, ""); return; } LoggingPlugin.LogDebug("Audio: Playing Audio " + selection); if (selection <= audios.Length) { LoggingPlugin.LogTrace("Audio: Playing Audio '" + ((Object)audios[selection - 1].clip).name + "'"); AudioSource[] array2 = audios; foreach (AudioSource val4 in array2) { val4.Stop(); } audios[selection - 1].Play(); } else { string[] obj = new string[6] { "Asset ", val2.Name, " (", null, null, null }; creatureId = val2.CreatureId; obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[4] = ") Does Not Have Audio "; obj[5] = selection.ToString(); SystemMessage.DisplayInfoText(string.Concat(obj), 2.5f, 0f); } } else { string[] obj2 = new string[5] { "Audio: Asset ", val2.Name, " (", null, null }; creatureId = val2.CreatureId; obj2[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj2[4] = ") Does Not Have Any Audio"; LoggingPlugin.LogTrace(string.Concat(obj2)); } } public static void RequestSequence(int selection) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) object[] array = new object[4]; CreatureGuid selectedCreatureId = LocalClient.SelectedCreatureId; array[0] = ((object)(CreatureGuid)(ref selectedCreatureId)).ToString(); array[1] = "org.lordashes.plugins.angel.ccm.sequence"; array[2] = selection; array[3] = false; SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SetInfo", array, (object)null); } public static void RemoteRequestSequence(object action, object source, object key, object previous, object current) { Sequence(int.Parse(current.ToString()), source.ToString()); } public static void Sequence(int selection, string target) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_020e: Unknown result type (might be due to invalid IL or missing references) //IL_0201: Unknown result type (might be due to invalid IL or missing references) LoggingPlugin.LogDebug("HandleBlendsahpe Entry"); CreatureGuid val = (CreatureGuid)((target == null) ? LocalClient.SelectedCreatureId : new CreatureGuid(target)); LoggingPlugin.LogDebug("Cid = " + ((object)(CreatureGuid)(ref val)).ToString() + ", Selection = " + selection); if (selection < 10 && !sequencers.Contains(val)) { LoggingPlugin.LogDebug("Getting Reference To Asset With Cid " + ((object)(CreatureGuid)(ref val)).ToString()); CreatureBoardAsset val2 = null; CreaturePresenter.TryGetAsset(val, ref val2); LoggingPlugin.LogDebug("Getting AssetInfo For Asset With Cid " + ((object)(CreatureGuid)(ref val)).ToString()); AssetInfo assetInfo = GetAssetInfo(val2.Link); LoggingPlugin.LogDebug("Info is null? " + (assetInfo == null)); LoggingPlugin.LogDebug("Requesting Sequence " + selection + " (Of " + assetInfo.blendshapes.Length + " Sequences)"); if (assetInfo.blendshapes != null && selection <= assetInfo.blendshapes.Length) { Elements val3 = assetInfo.blendshapes.ElementAt(selection - 1); val3.target = val2; new Sequencer(val3); } else { LoggingPlugin.LogWarning("Sequence: Asset " + val2.Name + " Does Not Have Sequence " + selection); SystemMessage.DisplayInfoText("Asset " + val2.Name + " Does Not Have Sequence " + selection, 2.5f, 0f); } } else { LoggingPlugin.LogDebug("Requesting Sequence Stop (blendShapeIndex=" + selection + ", AnimatingAssetsCount=" + sequencers.Count + ")"); while (sequencers.Contains(val)) { sequencers.Remove(val); } } } public static void AddMorphs(object unused) { LoggingPlugin.LogDebug("Add Morph Started"); SystemMessage.DisplayInfoText("Select Morph...", 2.5f, 0f); CommonCustomsMenuPlugin._self.Open(); spawnAsMorph = true; } public static void CycleMorphs(object unused) { //IL_000e: 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_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) LoggingPlugin.LogDebug("Cycle Morphs"); CreatureBoardAsset val = null; CreaturePresenter.TryGetAsset(LocalClient.SelectedCreatureId, ref val); if ((Object)(object)val != (Object)null) { List<string> angelInfo = GetAngelInfo(val.Link); if (angelInfo.Count() > 1) { for (int i = 0; i < angelInfo.Count; i++) { LoggingPlugin.LogTrace("Looking For Current Morph. Found '" + angelInfo[i] + "'"); if (!angelInfo[i].ToUpper().StartsWith("CREATURE") && !angelInfo[i].ToUpper().StartsWith("PROP")) { continue; } LoggingPlugin.LogTrace("Found Current Moprh '" + angelInfo[i] + "'"); int num = i + 1; if (num >= angelInfo.Count) { num = 0; } while (num != i && !angelInfo[num].ToUpper().StartsWith("MORPH")) { LoggingPlugin.LogTrace("Looking For Next Morph. Found '" + angelInfo[num] + "'"); num++; if (num >= angelInfo.Count) { num = 0; } } if (num == i) { string[] obj = new string[5] { "Asset ", val.Name, " (", null, null }; CreatureGuid creatureId = val.CreatureId; obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[4] = ")\r\nDoes Not Have Any Morphs"; SystemMessage.DisplayInfoText(string.Concat(obj), 2.5f, 0f); } else { LoggingPlugin.LogTrace("Applying Morph Swap"); angelInfo[i] = "Morph@" + angelInfo[i].Substring(angelInfo[i].IndexOf("@") + 1); angelInfo[num] = "Creature@" + angelInfo[num].Substring(angelInfo[num].IndexOf("@") + 1); string text = BuildFullLink(val.Link, angelInfo); CreatureManager.SetLink(val.CreatureId, text); } break; } } else { SystemMessage.DisplayInfoText("Selected Asset Has No Morphs", 2.5f, 0f); } } else { SystemMessage.DisplayInfoText("Cycle Morphs Requires A Selected Mini", 2.5f, 0f); } } public static void Rename(object unused) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) CreatureBoardAsset asset = null; CreaturePresenter.TryGetAsset(LocalClient.SelectedCreatureId, ref asset); if ((Object)(object)asset != (Object)null) { SystemMessage.AskForTextInput("Rename Mini...", "Name:", "OK", (Action<string>)delegate(string newName) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) CreatureManager.SetCreatureName(asset.CreatureId, newName); }, (Action)null, "Cancel", (Action)null, asset.Name); } else { SystemMessage.DisplayInfoText("No Selected Mini To Rename", 2.5f, 0f); } } public static void Edit(object unused) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) CreatureBoardAsset asset = null; CreaturePresenter.TryGetAsset(LocalClient.SelectedCreatureId, ref asset); if ((Object)(object)asset != (Object)null) { SystemMessage.AskForTextInput("Set Link...", "Link:", "OK", (Action<string>)delegate(string newLink) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) CreatureManager.SetLink(asset.CreatureId, newLink); }, (Action)null, "Cancel", (Action)null, asset.Link); } else { SystemMessage.DisplayInfoText("No Selected Mini To Rename", 2.5f, 0f); } } public static void Analyze(object unused) { //IL_0003: 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_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_0199: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Expected O, but got Unknown //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Unknown result type (might be due to invalid IL or missing references) //IL_06cd: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Unknown result type (might be due to invalid IL or missing references) //IL_07ae: Unknown result type (might be due to invalid IL or missing references) //IL_088f: Unknown result type (might be due to invalid IL or missing references) CreatureBoardAsset val = null; CreaturePresenter.TryGetAsset(LocalClient.SelectedCreatureId, ref val); List<Tuple<Transform, int>> list = new List<Tuple<Transform, int>>(); list.Add(new Tuple<Transform, int>(((Component)val).gameObject.transform, 0)); if (!((Object)(object)val != (Object)null)) { return; } try { string[] obj = new string[5] { val.Name, ", Cid: ", null, null, null }; CreatureGuid creatureId = val.CreatureId; obj[2] = ((object)(CreatureGuid)(ref creatureId)).ToString(); obj[3] = ", Type: "; InternedContentAddress activeMorphAddress = val.ActiveMorphAddress; obj[4] = ((object)(InternedContentAddress)(ref activeMorphAddress)).ToString(); LoggingPlugin.LogInfo(string.Concat(obj)); } catch { } try { LoggingPlugin.LogInfo(val.Name + ", Hide: " + (val.IsExplicitlyHidden ? "Hidden" : "Not Hidden")); } catch { } try { LoggingPlugin.LogInfo(val.Name + ", Flying: " + (((MovableBoardAsset)val).IsFlying ? "Flying" : "Not Flying")); } catch { } try { LoggingPlugin.LogInfo(val.Name + ", Visible: " + (((MovableBoardAsset)val).IsVisible ? "Visible" : "Not Visible")); } catch { } ShaderStateRef shaderStateRef; ShaderState state; try { string name = val.Name; shaderStateRef = val.ShaderStateRef; state = ((ShaderStateRef)(ref shaderStateRef)).State; LoggingPlugin.LogInfo(name + ", In Hide Volume: " + (((ShaderState)(ref state)).IsCreatureHiddenByVolume ? "In Hide Volume" : "Not In Hide Volume")); } catch { } try { string name2 = val.Name; shaderStateRef = val.ShaderStateRef; state = ((ShaderStateRef)(ref shaderStateRef)).State; LoggingPlugin.LogInfo(name2 + ", LOS: " + (((ShaderState)(ref state)).InActiveLineOfSight ? "In LOS" : "Out Of LOS")); } catch { } try { GameObject val2 = Utility.FindWithComponentInHierarchy(((Component)val).gameObject, "Animation"); LoggingPlugin.LogInfo(val.Name + ", Animations? " + ((Object)(object)val2 != (Object)null)); if ((Object)(object)val2 != (Object)null) { Animation component = val2.GetComponent<Animation>(); if ((Object)(object)component != (Object)null) { int num = 0; foreach (AnimationState item in component) { AnimationState val3 = item; try { string[] obj8 = new string[12] { "Animation ", num.ToString(), ": ", val3.name, ", Time: ", val3.time.ToString(), ", Length: ", val3.length.ToString(), ", Speed: ", val3.speed.ToString(), ", Mode: ", null }; WrapMode wrapMode = val3.wrapMode; obj8[11] = ((object)(WrapMode)(ref wrapMode)).ToString(); LoggingPlugin.LogInfo(string.Concat(obj8)); } catch { } num++; } } } } catch { } try { SkinnedMeshRenderer componentInChildren = ((Component)val).gameObject.GetComponentInChildren<SkinnedMeshRenderer>(); Mesh val4 = (((Object)(object)componentInChildren != (Object)null && (Object)(object)componentInChildren.sharedMesh != (Object)null) ? componentInChildren.sharedMesh : null); LoggingPlugin.LogInfo(val.Name + ", Blendshapes? " + ((Object)(object)val4 != (Object)null && val4.blendShapeCount > 0)); if ((Object)(object)val4 != (Object)null && val4.blendShapeCount > 0) { int num2; for (num2 = 0; num2 < val4.blendShapeCount; num2++) { try { LoggingPlugin.LogInfo("Blendshape " + num2 + ": " + val4.GetBlendShapeName(num2)); } catch { } num2++; } } } catch { } try { AudioSource[] componentsInChildren = ((Component)val).gameObject.GetComponentsInChildren<AudioSource>(); LoggingPlugin.LogInfo(val.Name + ", Audio? " + (componentsInChildren != null && componentsInChildren.Length != 0)); if (componentsInChildren != null && componentsInChildren.Length != 0) { int num3 = 0; AudioSource[] array = componentsInChildren; foreach (AudioSource val5 in array) { try { LoggingPlugin.LogInfo("Sound " + num3 + ": " + ((Object)val5.clip).name + ", Volume: " + val5.volume + ", Loop: " + val5.loop + ", Time: " + val5.time + ", Length: " + val5.clip.length); } catch { } num3++; } } } catch { } try { list.Add(new Tuple<Transform, int>(((Component)val).gameObject.transform, 0)); while (list.Count > 0) { Tuple<Transform, int> tuple = list.ElementAt(0); list.RemoveAt(0); LoggingPlugin.LogInfo("[Level " + tuple.Item2 + ": Name = " + ((Object)((Component)tuple.Item1).gameObject).name + "]"); Component[] components = ((Component)tuple.Item1).gameObject.GetComponents<Component>(); foreach (Component val6 in components) { if (((object)val6).GetType() == typeof(CreatureBoardAsset)) { try { LoggingPlugin.LogInfo("Level " + tuple.Item2 + " Component: Type = " + ((object)val6).GetType().ToString() + ", Name = " + ((CreatureBoardAsset)val6).Name + ", name = " + ((Object)val6).name); } catch { } } else if (((object)val6).GetType() == typeof(MeshRenderer)) { Material[] materials = ((Renderer)(MeshRenderer)val6).materials; foreach (Material val7 in materials) { try { LoggingPlugin.LogInfo("Level " + tuple.Item2 + " Component: Type = " + ((object)val6).GetType().ToString() + ", Name = " + ((Object)val6).name + ", Material = " + ((Object)val7).name + ", Shader=" + ((Object)val7.shader).name); } catch { } } } else if (((object)val6).GetType() == typeof(SkinnedMeshRenderer)) { Material[] materials2 = ((Renderer)(SkinnedMeshRenderer)val6).materials; foreach (Material val8 in materials2) { try { LoggingPlugin.LogInfo("Level " + tuple.Item2 + " Component: Type = " + ((object)val6).GetType().ToString() + ", Name = " + ((Object)val6).name + ", Material = " + ((Object)val8).name + ", Shader=" + ((Object)val8.shader).name); } catch { } } } else if (((object)val6).GetType() == typeof(ParticleSystemRenderer)) { Material[] materials3 = ((Renderer)(SkinnedMeshRenderer)val6).materials; foreach (Material val9 in materials3) { try { LoggingPlugin.LogInfo("Level " + tuple.Item2 + " Component: Type = " + ((object)val6).GetType().ToString() + ", Name = " + ((Object)val6).name + ", Material = " + ((Object)val9).name + ", Shader=" + ((Object)val9.shader).name); } catch { } } } else { try { LoggingPlugin.LogInfo("Level " + tuple.Item2 + " Component: Type = " + ((object)val6).GetType().ToString() + ", Name = " + ((Object)val6).name); } catch { } } } foreach (Transform item2 in ExtensionMethods.Children(tuple.Item1)) { list.Add(new Tuple<Transform, int>(item2, tuple.Item2 + 1)); } } } catch { } } public static void CancelSpawnTool() { try { Type type = Type.GetType("BoardToolManager, Bouncyrock.TaleSpire.Runtime"); if (type == null) { LoggingPlugin.LogWarning("BoardToolManager type not found."); return; } Type type2 = typeof(SingletonBehaviour<>).MakeGenericType(type); object obj = type2.GetProperty("Instance", BindingFlags.Static | BindingFlags.Public)?.GetValue(null); if (obj == null) { LoggingPlugin.LogWarning("BoardToolManager instance not found."); return; } Type type3 = Type.GetType("CreatureSpawnerBoardTool, Bouncyrock.TaleSpire.Runtime"); if (type3 == null) { LoggingPlugin.LogWarning("CreatureSpawnerBoardTool type not found."); return; } Type type4 = Type.GetType("DefaultBoardTool, Bouncyrock.TaleSpire.Runtime"); if (type4 == null) { LoggingPlugin.LogWarning("DefaultBoardTool type not found."); return; } object obj2 = type.GetProperty("CurrentTool", BindingFlags.Instance | BindingFlags.Public)?.GetValue(obj); if (obj2 != null && obj2.GetType() == type3) { LoggingPlugin.LogWarning("Current tool is not CreatureSpawnerBoardTool."); return; } MethodInfo methodInfo = type.GetMethods().FirstOrDefault((MethodInfo m) => m.Name == "SwitchToTool" && m.IsGenericMethod); if (methodInfo == null) { LoggingPlugin.LogWarning("SwitchToTool method not found."); return; } MethodInfo methodInfo2 = methodInfo.MakeGenericMethod(type4); object[] parameters = new object[1] { Enum.Parse(Type.GetType("BoardToolManager+Type, Bouncyrock.TaleSpire.Runtime"), "Normal") }; methodInfo2.Invoke(obj, parameters); } catch (Exception ex) { LoggingPlugin.LogWarning("Exception calling SwitchToTool: " + ex.Message); } } public static bool IsAngelAsset(string fullLink) { if (fullLink.IndexOf("?ANGEL=") > -1) { return true; } if (fullLink.IndexOf("&ANGEL=") > -1) { return true; } return false; } public static string GetLink(string fullLink) { if (fullLink.IndexOf("?ANGEL=") > -1) { return fullLink.Substring(0, fullLink.IndexOf("?ANGEL=")); } if (fullLink.IndexOf("&ANGEL=") > -1) { return fullLink.Substring(0, fullLink.IndexOf("&ANGEL=")); } return fullLink; } public static List<string> GetAngelInfo(string fullLink) { fullLink = ((fullLink != null) ? fullLink : ""); if (fullLink.IndexOf("?ANGEL=") > -1) { return fullLink.Substring(fullLink.IndexOf("?ANGEL=") + "?ANGEL=".Length).Split(new char[1] { ';' }).ToList(); } if (fullLink.IndexOf("&ANGEL=") > -1) { return fullLink.Substring(fullLink.IndexOf("&ANGEL=") + "&ANGEL=".Length).Split(new char[1] { ';' }).ToList(); } return new List<string>(); } public static string AddAngelInfo(string fullLink, string newInfo) { List<string> angelInfo = GetAngelInfo(fullLink); angelInfo.Add(newInfo); return BuildFullLink(fullLink, angelInfo); } public static string RemoveAngelInfo(string fullLink, string removeInfo) { List<string> angelInfo = GetAngelInfo(fullLink); angelInfo.Remove(removeInfo); return BuildFullLink(fullLink, angelInfo); } public static string BuildFullLink(string fullLink, List<string> info) { string link = GetLink(fullLink); if (info.Count > 0) { string text = "ANGEL=" + string.Join(";", info); return link.Contains("?") ? (fullLink + "&" + text) : (link + "?" + text); } return link; } public static bool IsAssetAnAngelFilter(string input) { if (string.IsNullOrEmpty(input)) { return false; } string pattern = "^[{(]?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}[)}]?\\..+$"; return Regex.IsMatch(input, pattern); } public static AssetInfo GetAssetInfo(string fullLink) { LoggingPlugin.LogTrace("Link='" + fullLink + "'"); List<string> angelInfo = GetAngelInfo(fullLink); LoggingPlugin.LogTrace("Angel Info='" + string.Join(";", angelInfo) + "'"); string corePrefab = ""; string text = ""; LoggingPlugin.LogTrace("Seeking Prefab..."); foreach (string item in angelInfo) { LoggingPlugin.LogTrace("Found '" + item + "'"); if (!item.ToUpper().StartsWith("TYPE") && !item.ToUpper().StartsWith("MORPH") && !item.ToUpper().StartsWith("AURA")) { corePrefab = item.Substring(item.IndexOf("@") + 1); LoggingPlugin.LogTrace("Prefab='" + corePrefab + "'"); break; } if (item.ToUpper().StartsWith("AURA")) { text = item.Substring(item.IndexOf("@") + 1); LoggingPlugin.LogTrace("Fallback Prefab='" + text + "'"); } } if (corePrefab == "" && text != "") { LoggingPlugin.LogTrace("No Core Prefab But Found Fallback Prefab. This Looks Like An Aura On A Core Mini."); corePrefab = text; } AssetInfo[] array = (from item in CommonCustomsMenuPlugin.GetAssets() where item.prefab == corePrefab select item).ToArray(); if (array.Length != 0) { LoggingPlugin.LogTrace("Prefab Info='" + JsonConvert.SerializeObject((object)array[0]) + "'"); return array[0]; } LoggingPlugin.LogWarning("Prefab='" + corePrefab + "', Prefab Info='Null'"); return null; } public void Initialize() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_007d: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_021d: Unknown result type (might be due to invalid IL or missing references) //IL_0263: 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_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Unknown result type (might be due to invalid IL or missing references) //IL_0361: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03b2: Unknown result type (might be due to invalid IL or missing references) //IL_03f8: 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) //IL_0449: Unknown result type (might be due to invalid IL or missing references) //IL_0454: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Unknown result type (might be due to invalid IL or missing references) //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04eb: Unknown result type (might be due to invalid IL or missing references) //IL_04f6: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_058d: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05de: Unknown result type (might be due to invalid IL or missing references) //IL_05e9: Unknown result type (might be due to invalid IL or missing references) //IL_062f: Unknown result type (might be due to invalid IL or missing references) //IL_063a: Unknown result type (might be due to invalid IL or missing references) //IL_0680: Unknown result type (might be due to invalid IL or missing references) //IL_068b: Unknown result type (might be due to invalid IL or missing references) //IL_06d1: Unknown result type (might be due to invalid IL or missing references) //IL_06dc: Unknown result type (might be due to invalid IL or missing references) //IL_0722: Unknown result type (might be due to invalid IL or missing references) //IL_072d: Unknown result type (might be due to invalid IL or missing references) //IL_0773: Unknown result type (might be due to invalid IL or missing references) //IL_077e: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07cf: Unknown result type (might be due to invalid IL or missing references) //IL_0815: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0866: Unknown result type (might be due to invalid IL or missing references) //IL_0871: Unknown result type (might be due to invalid IL or missing references) //IL_08b7: Unknown result type (might be due to invalid IL or missing references) //IL_08c2: Unknown result type (might be due to invalid IL or missing references) //IL_0908: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_09aa: Unknown result type (might be due to invalid IL or missing references) //IL_09b5: Unknown result type (might be due to invalid IL or missing references) //IL_09fb: Unknown result type (might be due to invalid IL or missing references) //IL_0a06: Unknown result type (might be due to invalid IL or missing references) //IL_0a4c: Unknown result type (might be due to invalid IL or missing references) //IL_0a57: Unknown result type (might be due to invalid IL or missing references) //IL_0a98: Unknown result type (might be due to invalid IL or missing references) //IL_0aa3: Unknown result type (might be due to invalid IL or missing references) //IL_0ae4: Unknown result type (might be due to invalid IL or missing references) //IL_0aef: Unknown result type (might be due to invalid IL or missing references) //IL_0b8d: Unknown result type (might be due to invalid IL or missing references) //IL_0b92: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0bd9: Unknown result type (might be due to invalid IL or missing references) bindings.Add("Animation01", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 01", new KeyboardShortcut((KeyCode)49, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 1)); bindings.Add("Animation02", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 02", new KeyboardShortcut((KeyCode)50, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 2)); bindings.Add("Animation03", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 03", new KeyboardShortcut((KeyCode)51, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 3)); bindings.Add("Animation04", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 04", new KeyboardShortcut((KeyCode)52, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 4)); bindings.Add("Animation05", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 05", new KeyboardShortcut((KeyCode)53, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 5)); bindings.Add("Animation06", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 06", new KeyboardShortcut((KeyCode)54, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 6)); bindings.Add("Animation07", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation 07", new KeyboardShortcut((KeyCode)55, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 7)); bindings.Add("AnimationByName", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation From Prompt", new KeyboardShortcut((KeyCode)56, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 8)); bindings.Add("AnimationStop", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Animation Stop", new KeyboardShortcut((KeyCode)57, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 0)); bindings.Add("Audio01", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 01", new KeyboardShortcut((KeyCode)49, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 1)); bindings.Add("Audio02", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 02", new KeyboardShortcut((KeyCode)50, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 2)); bindings.Add("Audio03", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 03", new KeyboardShortcut((KeyCode)51, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 3)); bindings.Add("Audio04", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 04", new KeyboardShortcut((KeyCode)52, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 4)); bindings.Add("Audio05", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 05", new KeyboardShortcut((KeyCode)53, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 5)); bindings.Add("Audio06", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 06", new KeyboardShortcut((KeyCode)54, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 6)); bindings.Add("Audio07", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio 07", new KeyboardShortcut((KeyCode)55, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 7)); bindings.Add("AudioByName", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio From Prompt", new KeyboardShortcut((KeyCode)56, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 8)); bindings.Add("AudioStop", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Audio Stop", new KeyboardShortcut((KeyCode)57, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 0)); bindings.Add("Sequence01", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 01", new KeyboardShortcut((KeyCode)49, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 1)); bindings.Add("Sequence02", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 02", new KeyboardShortcut((KeyCode)50, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 2)); bindings.Add("Sequence03", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 03", new KeyboardShortcut((KeyCode)51, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 3)); bindings.Add("Sequence04", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 04", new KeyboardShortcut((KeyCode)52, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 4)); bindings.Add("Sequence05", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 05", new KeyboardShortcut((KeyCode)53, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 5)); bindings.Add("Sequence06", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 06", new KeyboardShortcut((KeyCode)54, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 6)); bindings.Add("Sequence07", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence 07", new KeyboardShortcut((KeyCode)55, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 7)); bindings.Add("SequenceByName", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence From Prompt", new KeyboardShortcut((KeyCode)56, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 8)); bindings.Add("SequenceStop", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Trigger Sequence Stop", new KeyboardShortcut((KeyCode)57, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 0)); bindings.Add("AllStop01", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "All Stop Animation Trigger", new KeyboardShortcut((KeyCode)48, (KeyCode[])(object)new KeyCode[1] { (KeyCode)308 }), (ConfigDescription)null).Value, "RequestAnimation", 0)); bindings.Add("AllStop02", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "All Stop Audio Trigger", new KeyboardShortcut((KeyCode)48, (KeyCode[])(object)new KeyCode[1] { (KeyCode)306 }), (ConfigDescription)null).Value, "RequestAudio", 0)); bindings.Add("AllStop03", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "All Stop Sequence Trigger", new KeyboardShortcut((KeyCode)48, (KeyCode[])(object)new KeyCode[1] { (KeyCode)304 }), (ConfigDescription)null).Value, "RequestSequence", 0)); bindings.Add("AddMorph", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Add Morph Trigger", new KeyboardShortcut((KeyCode)56, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null).Value, "AddMorphs", 0)); bindings.Add("CycleMorphs", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Cycle Morphs Trigger", new KeyboardShortcut((KeyCode)57, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null).Value, "CycleMorphs", 0)); bindings.Add("Analyze", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Analyze Selected Trigger", new KeyboardShortcut((KeyCode)49, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null).Value, "Analyze", null)); bindings.Add("Rename", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Rename Selected Trigger", new KeyboardShortcut((KeyCode)50, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null).Value, "Rename", null)); bindings.Add("EditLink", new KeyboardBinding(((BaseUnityPlugin)this).Config.Bind<KeyboardShortcut>("Hotkeys", "Edit Selected Link Trigger", new KeyboardShortcut((KeyCode)51, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }), (ConfigDescription)null).Value, "Edit", null)); string text = CommonCustomsMenuPlugin.RegisterProviderV2("ANGEL", "Custom minis, auras, effects, mini based props, and filters", Application.version.ToString(), (Func<ReadOnlyDictionary<string, AssetInfo>, Func<Dictionary<string, AssetInfo>, string, IEnumerator>, IEnumerator>)Provider.GetAngelAssets, (Action<AssetInfo>)delegate(AssetInfo selectedAsset) { SpawnRequest(selectedAsset); }); string[] array = text.Split(new char[1] { ',' }); registrationMessagePos = new Rect((float)int.Parse(array[0]), (float)int.Parse(array[1]), (float)(Screen.width - int.Parse(array[0])), (float)(Screen.height - int.Parse(array[1]))); registrationMessageStyle.fontSize = int.Parse(array[2]); registrationMessageStyle.fontStyle = (FontStyle)1; registrationMessageStyle.active.textColor = Color.white; registrationMessageStyle.normal.textColor = Color.white; SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SubscribeViaReflection", new object[3] { "org.lordashes.plugins.angel.ccm.animate", ((object)_self).GetType().AssemblyQualifiedName, "RemoteRequestAnimation" }, (object)null); SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SubscribeViaReflection", new object[3] { "org.lordashes.plugins.angel.ccm.audio", ((object)_self).GetType().AssemblyQualifiedName, "RemoteRequestAudio" }, (object)null); SafeCalls.Invoke("LordAshes.AssetDataPlugin, AssetDataPlugin", "SubscribeViaReflection", new object[3] { "org.lordashes.plugins.angel.ccm.sequence", ((object)_self).GetType().AssemblyQualifiedName, "RemoteRequestSequence" }, (object)null); } private void Update() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_02ec: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02b3: Unknown result type (might be due to invalid IL or missing references) //IL_044e: Unknown result type (might be due to invalid IL or missing references) //IL_0453: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_04ff: Unknown result type (might be due to invalid IL or missing references) //IL_0504: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f1: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_03fa: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Unknown result type (might be due to invalid IL or missing references) //IL_0415: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_049d: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) //IL_04a6: Unknown result type (might be due to invalid IL or missing references) //IL_04ab: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c6: Unknown result type (might be due to invalid IL or missing references) //IL_054e: Unknown result type (might be due to invalid IL or missing references) //IL_0553: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0575: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Unknown result type (might be due to invalid IL or missing references) //IL_0608: Unknown result type (might be due to invalid IL or missing references) //IL_060d: Unknown result type (might be due to invalid IL or missing references) //IL_0626: Unknown result type (might be due to invalid IL or missing references) //IL_0628: Unknown result type (might be due to invalid IL or missing references) if (!boardLoaded && Utility.isBoardLoaded() && BoardSessionManager.CurrentBoardInfo.Id != BoardGuid.Empty) { boardLoaded = true; LoggingPlugin.LogTrace("Campaign/Board Loaded"); } else if (boardLoaded && (!Utility.isBoardLoaded() || BoardSessionManager.CurrentBoardInfo.Id == BoardGuid.Empty)) { boardLoaded = false; LoggingPlugin.LogTrace("Campaign/Board Unloaded"); if ((Object)(object)Camera.main != (Object)null) { LoggingPlugin.LogTrace("Checking Camera Children (" + ((Component)Camera.main).transform.childCount + ")..."); foreach (Transform item in ExtensionMethods.Children(((Component)Camera.main).transform)) { if (IsAssetAnAngelFilter(((Object)item).name)) { LoggingPlugin.LogTrace("Destroying Filter " + ((Object)item).name); Object.DestroyImmediate((Object)(object)((Component)item).gameObject); } } } else { LoggingPlugin.LogWarning("Main Camera Is Null"); } } KeyboardShortcut val; foreach (KeyValuePair<string, KeyboardBinding> action in bindings) { val = action.Value.binding; if (((KeyboardShortcut)(ref val)).IsUp()) { LoggingPlugin.LogDebug("Keyboard Selection: " + action.Key); MethodInfo methodInfo = (from mi in typeof(AssetNavigationGeneralExecutionLibraryPlugin).GetRuntimeMethods() where mi.Name == action.Value.handler select mi).First(); if (methodInfo != null) { methodInfo.Invoke(null, new object[1] { action.Value.parameter }); } } } val = new KeyboardShortcut((KeyCode)52, (KeyCode[])(object)new KeyCode[1] { (KeyCode)305 }); Quaternion val3; if (((KeyboardShortcut)(ref val)).IsUp()) { GameObject val2 = (from a in Object.FindObjectsOfType<GameObject>() where ((Object)a).name.EndsWith("lasword01") select a).FirstOrDefault(); val3 = val2.transform.rotation; Vector3 eulerAngles = ((Quaternion)(ref val3)).eulerAngles; eulerAngles.x += 5f; val2.transform.rotation = Quaternion.Euler(eulerAngles); SystemMessage.DisplayInfoText(((object)(Vector3)(ref eulerAngles)).ToString(), 2.