Please disclose if your mod was created primarily using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Shawesomes Infinite Multiverse v2.3.1
Shawesomes_Infinite_Multiverse.dll
Decompiled a month 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.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Managers; using Jotunn.Utils; using Microsoft.CodeAnalysis; 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("Shawesomes_Infinte_Multiverse")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Shawesomes_Infinte_Multiverse")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e0e26f8d-a8f0-41a7-a502-951624fa6f31")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace Shawesomes_Infinite_Multiverse { public class Ascend : MonoBehaviour { private static Ascend instance; public static readonly List<string> FLIGHT_ITEM_PREFABS = new List<string> { "", "TurtleHermitQloud", "sflightkipower" }; public static readonly float ASCEND_SPEED = 10f; public static readonly float HORIZONTAL_SPEED = 20f; public static readonly float RUN_ASCEND_SPEED = 25f; public static readonly float RUN_HORIZONTAL_SPEED = 25f; public static readonly float HOVER_ASCEND_SPEED = 0f; public static readonly float HOVER_HORIZONTAL_SPEED = 0f; public static readonly float DESCENT_SPEED = 40f; public static readonly float STAMINA_USAGE = 5f; public static readonly bool REQUIRE_EQUIPPED = true; public static readonly bool SIMULATE_GROUND = false; public static Ascend Instance { get { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown if ((Object)(object)instance == (Object)null) { GameObject val = new GameObject("Ascend"); instance = val.AddComponent<Ascend>(); Object.DontDestroyOnLoad((Object)(object)val); } return instance; } } private void Awake() { if ((Object)(object)instance != (Object)null && (Object)(object)instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); } else { instance = this; } } public static void InitConfig(ConfigFile config) { if ((Object)(object)instance != (Object)null) { instance.ApplyConfig(); } } public void ApplyConfig() { } } [HarmonyPatch(typeof(Character), "UpdateMotion")] public static class SimpleAscend_Character_UpdateMotion_Patch { [HarmonyPostfix] public static void Postfix(Character __instance, float dt) { //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01bf: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: 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_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance != (Object)(object)Player.m_localPlayer) { return; } Player val = (Player)(object)((__instance is Player) ? __instance : null); if ((Object)(object)val == (Object)null || !HasRequiredItem(val) || val.GetStamina() <= 0f) { return; } Rigidbody component = ((Component)__instance).GetComponent<Rigidbody>(); if ((Object)(object)component == (Object)null) { return; } bool key = Input.GetKey((KeyCode)304); bool key2 = Input.GetKey((KeyCode)32); bool key3 = Input.GetKey((KeyCode)308); bool key4 = Input.GetKey((KeyCode)306); bool flag = false; float num = 0f; float num2 = 0f; if (Input.GetKey((KeyCode)97) || Input.GetKey((KeyCode)276)) { num -= 1f; } if (Input.GetKey((KeyCode)100) || Input.GetKey((KeyCode)275)) { num += 1f; } if (Input.GetKey((KeyCode)119) || Input.GetKey((KeyCode)273)) { num2 += 1f; } if (Input.GetKey((KeyCode)115) || Input.GetKey((KeyCode)274)) { num2 -= 1f; } Vector3 val2 = default(Vector3); ((Vector3)(ref val2))..ctor(num, 0f, num2); bool flag2 = ((Vector3)(ref val2)).magnitude > 0.1f; if (flag2) { ((Vector3)(ref val2)).Normalize(); } Camera component2 = ((Component)((Component)GameCamera.instance).transform).GetComponent<Camera>(); Vector3 forward = ((Component)component2).transform.forward; Vector3 right = ((Component)component2).transform.right; Vector3 val3 = new Vector3(forward.x, 0f, forward.z); Vector3 normalized = ((Vector3)(ref val3)).normalized; val3 = new Vector3(right.x, 0f, right.z); Vector3 normalized2 = ((Vector3)(ref val3)).normalized; Vector3 val4 = normalized * num2 + normalized2 * num; if (flag2) { ((Vector3)(ref val4)).Normalize(); } Vector3 velocity = component.velocity; float y = Ascend.ASCEND_SPEED; float num3 = Ascend.HORIZONTAL_SPEED; if (key4) { y = 0f - Ascend.DESCENT_SPEED; flag = true; } else if (key3) { y = Ascend.HOVER_ASCEND_SPEED; num3 = Ascend.HOVER_HORIZONTAL_SPEED; flag = true; } else if (key) { y = Ascend.RUN_ASCEND_SPEED; num3 = Ascend.RUN_HORIZONTAL_SPEED; flag = true; } else { if (!key2) { return; } flag = true; } if (key2 || key3 || key4) { velocity.y = y; } if (flag2) { Vector3 val5 = val4 * num3; velocity.x = val5.x; velocity.z = val5.z; } if (flag) { ((Character)val).UseStamina(Ascend.STAMINA_USAGE * dt); component.velocity = velocity; } } private static bool HasRequiredItem(Player player) { if ((Object)(object)player == (Object)null || ((Humanoid)player).GetInventory() == null) { return false; } if (Ascend.REQUIRE_EQUIPPED) { foreach (ItemData equippedItem in ((Humanoid)player).GetInventory().GetEquippedItems()) { if (!((Object)(object)equippedItem.m_dropPrefab != (Object)null)) { continue; } foreach (string fLIGHT_ITEM_PREFAB in Ascend.FLIGHT_ITEM_PREFABS) { if (((Object)equippedItem.m_dropPrefab).name.Equals(fLIGHT_ITEM_PREFAB, StringComparison.OrdinalIgnoreCase)) { return true; } } } } else { foreach (ItemData allItem in ((Humanoid)player).GetInventory().GetAllItems()) { if (!((Object)(object)allItem.m_dropPrefab != (Object)null)) { continue; } foreach (string fLIGHT_ITEM_PREFAB2 in Ascend.FLIGHT_ITEM_PREFABS) { if (((Object)allItem.m_dropPrefab).name.Equals(fLIGHT_ITEM_PREFAB2, StringComparison.OrdinalIgnoreCase)) { return true; } } } } return false; } } [HarmonyPatch(typeof(Character), "IsOnGround")] public static class SimpleAscend_Character_IsOnGround_Patch { [HarmonyPostfix] public static void Postfix(Character __instance, ref bool __result) { if (!((Object)(object)__instance != (Object)(object)Player.m_localPlayer) && ZInput.GetButton("Jump") && Ascend.SIMULATE_GROUND) { __result = true; } } } [HarmonyPatch(typeof(Player), "Update")] public static class Player_Update_Patch { static Player_Update_Patch() { } [HarmonyPostfix] public static void Postfix(Player __instance) { if ((Object)(object)__instance != (Object)(object)Player.m_localPlayer) { return; } try { ControllerSwapperSystem.HandleControllerSwap(__instance); } catch { } } } [HarmonyPatch(typeof(Animator), "set_runtimeAnimatorController")] public static class Animator_runtimeAnimatorController_Patch { static Animator_runtimeAnimatorController_Patch() { } [HarmonyPrefix] public static bool Prefix(Animator __instance, RuntimeAnimatorController value) { try { if (ControllerSwapperSystem.IsUsingCustomController() && (Object)(object)__instance == (Object)(object)((Character)(Player.m_localPlayer?)).m_animator) { if ((Object)(object)value == (Object)(object)ControllerSwapperSystem.GetOriginalController() || (Object)(object)value == (Object)(object)ControllerSwapperSystem.GetCustomController()) { return true; } return false; } } catch { } return true; } } public class ItemSetComparer : IEqualityComparer<List<string>> { public bool Equals(List<string> x, List<string> y) { if (x == null && y == null) { return true; } if (x == null || y == null) { return false; } if (x.Count != y.Count) { return false; } return new HashSet<string>(x).SetEquals(new HashSet<string>(y)); } public int GetHashCode(List<string> obj) { if (obj == null) { return 0; } int num = 0; foreach (string item in obj) { num ^= item.GetHashCode(); } return num; } } public static class ControllerSwapperSystem { private static ManualLogSource logger; private const bool ENABLE_CONTROLLER_SWAPPER = true; private const string ITEM_CONTROLLER_MAPPINGS = "TurtleHermitQloud:nimbus_animator,sflightkipower:ascend_animator"; private const bool CHECK_RIGHT_HAND = true; private const bool CHECK_LEFT_HAND = true; private const bool CHECK_UTILITY = true; private const bool CHECK_HELMET = true; private const bool CHECK_CHEST = true; private const bool CHECK_LEGS = true; private const bool CHECK_SHOULDER = true; private static RuntimeAnimatorController originalController; private static Dictionary<string, RuntimeAnimatorController> controllerCache = new Dictionary<string, RuntimeAnimatorController>(); private static string currentControllerName = null; private static bool isUsingCustomController = false; private const string ASCEND_PARAM = "IsAscending"; private const string HOVER_PARAM = "IsHovering"; private const string DESCEND_PARAM = "IsDescending"; private const string RUN_PARAM = "IsRunning"; private static bool wasAscending = false; private static bool wasHovering = false; private static bool wasDescending = false; private static bool wasRunning = false; private static readonly string ASCEND_SFX = "sfx_flyascend"; private static readonly string HOVER_SFX = ""; private static readonly string DESCEND_SFX = "sfx_flydescend"; private static readonly string RUN_SFX = "sfx_flyfast"; private static readonly string ASCEND_VFX = ""; private static readonly string HOVER_VFX = ""; private static readonly string DESCEND_VFX = ""; private static readonly string RUN_VFX = "vfx_flyfast"; private static GameObject activeAscendSfx = null; private static GameObject activeHoverSfx = null; private static GameObject activeDescendSfx = null; private static GameObject activeRunSfx = null; private static GameObject activeAscendVfx = null; private static GameObject activeHoverVfx = null; private static GameObject activeDescendVfx = null; private static GameObject activeRunVfx = null; private static readonly bool ASCEND_CONTINUOUS_SFX = false; private static readonly bool HOVER_CONTINUOUS_SFX = false; private static readonly bool DESCEND_CONTINUOUS_SFX = false; private static readonly bool RUN_CONTINUOUS_SFX = false; private static readonly bool ASCEND_CONTINUOUS_VFX = false; private static readonly bool HOVER_CONTINUOUS_VFX = false; private static readonly bool DESCEND_CONTINUOUS_VFX = false; private static readonly bool RUN_CONTINUOUS_VFX = false; private static string currentSingleItemTrigger = null; private static List<string> currentSetTrigger = null; private static Dictionary<List<string>, string> itemSetControllerMap = new Dictionary<List<string>, string>(new ItemSetComparer()); private static Dictionary<string, string> itemControllerMap = new Dictionary<string, string>(); private static float lastItemCheckTime = 0f; private static float itemCheckInterval = 0.2f; private static bool wasItemEquippedLastCheck = false; private static void ParseItemControllerMappings() { itemControllerMap.Clear(); itemSetControllerMap.Clear(); string text = "TurtleHermitQloud:nimbus_animator,sflightkipower:ascend_animator"; if (!string.IsNullOrEmpty(text)) { string[] array = text.Split(new char[1] { ',' }); string[] array2 = array; foreach (string text2 in array2) { if (string.IsNullOrEmpty(text2)) { continue; } string[] array3 = text2.Split(new char[1] { ':' }); if (array3.Length < 2) { continue; } string value = array3[^1].Trim(); if (array3.Length == 2) { string key = array3[0].Trim().ToLower(); itemControllerMap[key] = value; continue; } List<string> list = new List<string>(); for (int j = 0; j < array3.Length - 1; j++) { string text3 = array3[j].Trim().ToLower(); if (!string.IsNullOrEmpty(text3)) { list.Add(text3); } } if (list.Count > 0) { itemSetControllerMap[list] = value; } } } int num = itemControllerMap.Count + itemSetControllerMap.Count; } public static bool IsUsingCustomController() { return isUsingCustomController; } public static RuntimeAnimatorController GetCustomController() { if (!string.IsNullOrEmpty(currentControllerName) && controllerCache.ContainsKey(currentControllerName)) { return controllerCache[currentControllerName]; } return null; } public static RuntimeAnimatorController GetOriginalController() { return originalController; } public static void Initialize() { logger = Shawesomes_Infinite_Multiverse.logger; lastItemCheckTime = 0f; wasItemEquippedLastCheck = false; ParseItemControllerMappings(); try { AssetBundle val = AssetUtils.LoadAssetBundleFromResources("animators", Assembly.GetExecutingAssembly()); if (!((Object)(object)val != (Object)null)) { return; } HashSet<string> hashSet = new HashSet<string>(); foreach (string value in itemControllerMap.Values) { hashSet.Add(value); } foreach (string value2 in itemSetControllerMap.Values) { hashSet.Add(value2); } foreach (string item in hashSet) { try { RuntimeAnimatorController val2 = null; val2 = val.LoadAsset<RuntimeAnimatorController>(item); if ((Object)(object)val2 == (Object)null && !item.EndsWith(".controller")) { val2 = val.LoadAsset<RuntimeAnimatorController>(item + ".controller"); } if ((Object)(object)val2 == (Object)null && !item.StartsWith("Assets/")) { val2 = val.LoadAsset<RuntimeAnimatorController>("Assets/" + item); } if ((Object)(object)val2 == (Object)null && !item.StartsWith("Assets/") && !item.EndsWith(".controller")) { val2 = val.LoadAsset<RuntimeAnimatorController>("Assets/" + item + ".controller"); } if ((Object)(object)val2 != (Object)null) { controllerCache[item] = val2; } } catch (Exception) { } } } catch (Exception) { } } private static bool HasRequiredItemEquipped(Player player, out string controllerName) { controllerName = null; if ((Object)(object)player == (Object)null) { return false; } lastItemCheckTime = Time.time; if (currentSetTrigger != null && isUsingCustomController) { if (HasAllRequiredItems(player, currentSetTrigger)) { controllerName = currentControllerName; wasItemEquippedLastCheck = true; return true; } wasItemEquippedLastCheck = false; return false; } if (currentSingleItemTrigger != null && isUsingCustomController) { if (IsItemEquipped(player, currentSingleItemTrigger)) { controllerName = currentControllerName; wasItemEquippedLastCheck = true; return true; } wasItemEquippedLastCheck = false; return false; } foreach (List<string> key in itemSetControllerMap.Keys) { if (HasAllRequiredItems(player, key)) { controllerName = itemSetControllerMap[key]; currentSetTrigger = new List<string>(key); currentSingleItemTrigger = null; wasItemEquippedLastCheck = true; return true; } } bool flag = true; ItemData rightItem = ((Humanoid)player).GetRightItem(); if (rightItem != null && MatchesItem(rightItem, out controllerName, out string itemName)) { currentSingleItemTrigger = itemName; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } bool flag2 = true; ItemData leftItem = ((Humanoid)player).GetLeftItem(); if (leftItem != null && MatchesItem(leftItem, out controllerName, out string itemName2)) { currentSingleItemTrigger = itemName2; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } if (((Humanoid)player).m_utilityItem != null && MatchesItem(((Humanoid)player).m_utilityItem, out controllerName, out string itemName3)) { currentSingleItemTrigger = itemName3; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } if (((Humanoid)player).m_helmetItem != null && MatchesItem(((Humanoid)player).m_helmetItem, out controllerName, out string itemName4)) { currentSingleItemTrigger = itemName4; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } if (((Humanoid)player).m_chestItem != null && MatchesItem(((Humanoid)player).m_chestItem, out controllerName, out string itemName5)) { currentSingleItemTrigger = itemName5; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } if (((Humanoid)player).m_legItem != null && MatchesItem(((Humanoid)player).m_legItem, out controllerName, out string itemName6)) { currentSingleItemTrigger = itemName6; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } if (((Humanoid)player).m_shoulderItem != null && MatchesItem(((Humanoid)player).m_shoulderItem, out controllerName, out string itemName7)) { currentSingleItemTrigger = itemName7; currentSetTrigger = null; wasItemEquippedLastCheck = true; return true; } currentSingleItemTrigger = null; currentSetTrigger = null; wasItemEquippedLastCheck = false; return false; } private static bool HasAllRequiredItems(Player player, List<string> requiredItems) { foreach (string requiredItem in requiredItems) { if (!IsItemEquipped(player, requiredItem)) { return false; } } return true; } private static bool IsItemEquipped(Player player, string requiredItemName) { bool flag = true; ItemData rightItem = ((Humanoid)player).GetRightItem(); if (rightItem != null && ItemMatchesName(rightItem, requiredItemName)) { return true; } bool flag2 = true; ItemData leftItem = ((Humanoid)player).GetLeftItem(); if (leftItem != null && ItemMatchesName(leftItem, requiredItemName)) { return true; } if (((Humanoid)player).m_utilityItem != null && ItemMatchesName(((Humanoid)player).m_utilityItem, requiredItemName)) { return true; } if (((Humanoid)player).m_helmetItem != null && ItemMatchesName(((Humanoid)player).m_helmetItem, requiredItemName)) { return true; } if (((Humanoid)player).m_chestItem != null && ItemMatchesName(((Humanoid)player).m_chestItem, requiredItemName)) { return true; } if (((Humanoid)player).m_legItem != null && ItemMatchesName(((Humanoid)player).m_legItem, requiredItemName)) { return true; } if (((Humanoid)player).m_shoulderItem != null && ItemMatchesName(((Humanoid)player).m_shoulderItem, requiredItemName)) { return true; } return false; } private static bool MatchesItem(ItemData item, out string controllerName) { string itemName; return MatchesItem(item, out controllerName, out itemName); } private static bool MatchesItem(ItemData item, out string controllerName, out string itemName) { controllerName = null; itemName = null; if (item == null) { return false; } string text = (Object.op_Implicit((Object)(object)item.m_dropPrefab) ? ((Object)item.m_dropPrefab).name.ToLower() : ""); if (!string.IsNullOrEmpty(text) && itemControllerMap.ContainsKey(text)) { controllerName = itemControllerMap[text]; itemName = text; return true; } if (item.m_shared != null && !string.IsNullOrEmpty(item.m_shared.m_name)) { string text2 = item.m_shared.m_name.ToLower(); if (itemControllerMap.ContainsKey(text2)) { controllerName = itemControllerMap[text2]; itemName = text2; return true; } } return false; } private static bool ItemMatchesName(ItemData item, string requiredItemName) { if (item == null || string.IsNullOrEmpty(requiredItemName)) { return false; } string text = (Object.op_Implicit((Object)(object)item.m_dropPrefab) ? ((Object)item.m_dropPrefab).name.ToLower() : ""); if (!string.IsNullOrEmpty(text) && text == requiredItemName) { return true; } if (item.m_shared != null && !string.IsNullOrEmpty(item.m_shared.m_name)) { string text2 = item.m_shared.m_name.ToLower(); if (text2 == requiredItemName) { return true; } } return false; } public static void ApplyCustomController(Player player, string controllerName) { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) if (string.IsNullOrEmpty(controllerName) || (Object)(object)player == (Object)null) { return; } string text = "unknown"; if (currentSingleItemTrigger != null) { text = "single item '" + currentSingleItemTrigger + "'"; } else if (currentSetTrigger != null) { text = $"item set with {currentSetTrigger.Count} items"; } RuntimeAnimatorController value = null; if (!controllerCache.TryGetValue(controllerName, out value) || (Object)(object)value == (Object)null) { return; } try { if ((Object)(object)originalController == (Object)null && (Object)(object)((Character)player).m_animator != (Object)null) { originalController = ((Character)player).m_animator.runtimeAnimatorController; } Vector3 velocity = ((Character)player).GetVelocity(); SetMovementAnimationParameters(((Character)player).m_animator); currentControllerName = controllerName; ((Character)player).m_animator.runtimeAnimatorController = value; SetMovementAnimationParameters(((Character)player).m_animator); ((Character)player).m_animator.Update(0f); ((Character)player).m_animator.Update(0.1f); ((Character)player).m_animator.Update(0.1f); if ((Object)(object)((Character)player).m_body != (Object)null) { ((Character)player).m_body.velocity = velocity; } isUsingCustomController = true; } catch (Exception) { } } private static void RestoreOriginalController(Player player) { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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) if (!isUsingCustomController || (Object)(object)originalController == (Object)null) { return; } try { CleanupAllVfx(); wasAscending = false; wasHovering = false; wasDescending = false; wasRunning = false; if ((Object)(object)((Character)player).m_animator != (Object)null) { Vector3 velocity = ((Character)player).GetVelocity(); SetMovementAnimationParameters(((Character)player).m_animator); ((Character)player).m_animator.runtimeAnimatorController = originalController; SetMovementAnimationParameters(((Character)player).m_animator); ((Character)player).m_animator.Update(0f); ((Character)player).m_animator.Update(0.1f); ((Character)player).m_animator.Update(0.1f); if ((Object)(object)((Character)player).m_body != (Object)null) { ((Character)player).m_body.velocity = velocity; } isUsingCustomController = false; currentControllerName = null; currentSingleItemTrigger = null; currentSetTrigger = null; } } catch (Exception) { } } private static void SetMovementAnimationParameters(Animator animator) { if (!((Object)(object)animator == (Object)null)) { animator.SetBool("wakeup", false); animator.SetBool("sleeping", false); animator.SetFloat("forward_speed", 1f); } } public static void UpdateFlightAnimationTriggers(Player player) { if ((Object)(object)player == (Object)null || (Object)(object)((Character)player).m_animator == (Object)null || !isUsingCustomController) { return; } bool key = Input.GetKey((KeyCode)32); bool key2 = Input.GetKey((KeyCode)308); bool key3 = Input.GetKey((KeyCode)306); bool key4 = Input.GetKey((KeyCode)304); ((Character)player).m_animator.SetBool("IsAscending", key); ((Character)player).m_animator.SetBool("IsHovering", key2); ((Character)player).m_animator.SetBool("IsDescending", key3); ((Character)player).m_animator.SetBool("IsRunning", key4); if (key != wasAscending) { if (key) { if (!string.IsNullOrEmpty(ASCEND_SFX)) { if (ASCEND_CONTINUOUS_SFX) { activeAscendSfx = PlayContinuousSoundEffect(player, ASCEND_SFX, activeAscendSfx); } else { PlaySoundEffect(player, ASCEND_SFX); } } if (!string.IsNullOrEmpty(ASCEND_VFX)) { if (ASCEND_CONTINUOUS_VFX) { activeAscendVfx = SpawnVisualEffect(player, ASCEND_VFX, activeAscendVfx); } else { SpawnVisualEffect(player, ASCEND_VFX, null); } } } else { if ((Object)(object)activeAscendVfx != (Object)null) { Object.Destroy((Object)(object)activeAscendVfx); activeAscendVfx = null; } if ((Object)(object)activeAscendSfx != (Object)null) { Object.Destroy((Object)(object)activeAscendSfx); activeAscendSfx = null; } } wasAscending = key; } if (key2 != wasHovering) { if (key2) { if (!string.IsNullOrEmpty(HOVER_SFX)) { if (HOVER_CONTINUOUS_SFX) { activeHoverSfx = PlayContinuousSoundEffect(player, HOVER_SFX, activeHoverSfx); } else { PlaySoundEffect(player, HOVER_SFX); } } if (!string.IsNullOrEmpty(HOVER_VFX)) { if (HOVER_CONTINUOUS_VFX) { activeHoverVfx = SpawnVisualEffect(player, HOVER_VFX, activeHoverVfx); } else { SpawnVisualEffect(player, HOVER_VFX, null); } } } else { if ((Object)(object)activeHoverVfx != (Object)null) { Object.Destroy((Object)(object)activeHoverVfx); activeHoverVfx = null; } if ((Object)(object)activeHoverSfx != (Object)null) { Object.Destroy((Object)(object)activeHoverSfx); activeHoverSfx = null; } } wasHovering = key2; } if (key3 != wasDescending) { if (key3) { if (!string.IsNullOrEmpty(DESCEND_SFX)) { if (DESCEND_CONTINUOUS_SFX) { activeDescendSfx = PlayContinuousSoundEffect(player, DESCEND_SFX, activeDescendSfx); } else { PlaySoundEffect(player, DESCEND_SFX); } } if (!string.IsNullOrEmpty(DESCEND_VFX)) { if (DESCEND_CONTINUOUS_VFX) { activeDescendVfx = SpawnVisualEffect(player, DESCEND_VFX, activeDescendVfx); } else { SpawnVisualEffect(player, DESCEND_VFX, null); } } } else { if ((Object)(object)activeDescendVfx != (Object)null) { Object.Destroy((Object)(object)activeDescendVfx); activeDescendVfx = null; } if ((Object)(object)activeDescendSfx != (Object)null) { Object.Destroy((Object)(object)activeDescendSfx); activeDescendSfx = null; } } wasDescending = key3; } if (key4 == wasRunning) { return; } if (key4) { if (!string.IsNullOrEmpty(RUN_SFX)) { if (RUN_CONTINUOUS_SFX) { activeRunSfx = PlayContinuousSoundEffect(player, RUN_SFX, activeRunSfx); } else { PlaySoundEffect(player, RUN_SFX); } } if (!string.IsNullOrEmpty(RUN_VFX)) { if (RUN_CONTINUOUS_VFX) { activeRunVfx = SpawnVisualEffect(player, RUN_VFX, activeRunVfx); } else { SpawnVisualEffect(player, RUN_VFX, null); } } } else { if ((Object)(object)activeRunVfx != (Object)null) { Object.Destroy((Object)(object)activeRunVfx); activeRunVfx = null; } if ((Object)(object)activeRunSfx != (Object)null) { Object.Destroy((Object)(object)activeRunSfx); activeRunSfx = null; } } wasRunning = key4; } private static void ResetFlightTriggers(Animator animator) { if (!((Object)(object)animator == (Object)null)) { animator.SetBool("IsAscending", false); animator.SetBool("IsHovering", false); animator.SetBool("IsDescending", false); animator.SetBool("IsRunning", false); } } private static void PlaySoundEffect(Player player, string prefabName) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName)) { return; } try { ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null); if ((Object)(object)val != (Object)null) { GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity); } } catch (Exception) { } } private static GameObject PlayContinuousSoundEffect(Player player, string prefabName, GameObject currentSfx) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName)) { return null; } try { if ((Object)(object)currentSfx != (Object)null) { Object.Destroy((Object)(object)currentSfx); } ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null); if ((Object)(object)val != (Object)null) { GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity); val2.transform.SetParent(((Component)player).transform); val2.transform.localPosition = Vector3.zero; if (ASCEND_CONTINUOUS_SFX || HOVER_CONTINUOUS_SFX || DESCEND_CONTINUOUS_SFX || RUN_CONTINUOUS_SFX) { RemoveDestructionComponents(val2); AudioSource[] componentsInChildren = val2.GetComponentsInChildren<AudioSource>(); AudioSource[] array = componentsInChildren; foreach (AudioSource val3 in array) { if ((Object)(object)val3 != (Object)null) { val3.loop = true; } } } return val2; } } catch (Exception) { } return null; } private static void RemoveDestructionComponents(GameObject gameObject) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown if ((Object)(object)gameObject == (Object)null) { return; } try { TimedDestruction component = gameObject.GetComponent<TimedDestruction>(); if ((Object)(object)component != (Object)null) { Object.Destroy((Object)(object)component); } foreach (Transform item in gameObject.transform) { Transform val = item; TimedDestruction component2 = ((Component)val).GetComponent<TimedDestruction>(); if ((Object)(object)component2 != (Object)null) { Object.Destroy((Object)(object)component2); } } } catch (Exception) { } } private static GameObject SpawnVisualEffect(Player player, string prefabName, GameObject currentVfx) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)player == (Object)null || string.IsNullOrEmpty(prefabName)) { return null; } try { if ((Object)(object)currentVfx != (Object)null) { Object.Destroy((Object)(object)currentVfx); } ZNetScene instance = ZNetScene.instance; GameObject val = ((instance != null) ? instance.GetPrefab(prefabName) : null); if ((Object)(object)val != (Object)null) { GameObject val2 = Object.Instantiate<GameObject>(val, ((Component)player).transform.position, Quaternion.identity); val2.transform.SetParent(((Component)player).transform); val2.transform.localPosition = Vector3.zero; if (ASCEND_CONTINUOUS_VFX || HOVER_CONTINUOUS_VFX || DESCEND_CONTINUOUS_VFX || RUN_CONTINUOUS_VFX) { RemoveDestructionComponents(val2); } return val2; } } catch (Exception) { } return null; } private static void CleanupAllVfx() { if ((Object)(object)activeAscendVfx != (Object)null) { Object.Destroy((Object)(object)activeAscendVfx); } if ((Object)(object)activeHoverVfx != (Object)null) { Object.Destroy((Object)(object)activeHoverVfx); } if ((Object)(object)activeDescendVfx != (Object)null) { Object.Destroy((Object)(object)activeDescendVfx); } if ((Object)(object)activeRunVfx != (Object)null) { Object.Destroy((Object)(object)activeRunVfx); } activeAscendVfx = null; activeHoverVfx = null; activeDescendVfx = null; activeRunVfx = null; if ((Object)(object)activeAscendSfx != (Object)null) { Object.Destroy((Object)(object)activeAscendSfx); } if ((Object)(object)activeHoverSfx != (Object)null) { Object.Destroy((Object)(object)activeHoverSfx); } if ((Object)(object)activeDescendSfx != (Object)null) { Object.Destroy((Object)(object)activeDescendSfx); } if ((Object)(object)activeRunSfx != (Object)null) { Object.Destroy((Object)(object)activeRunSfx); } activeAscendSfx = null; activeHoverSfx = null; activeDescendSfx = null; activeRunSfx = null; } public static void HandleControllerSwap(Player player) { if ((Object)(object)player == (Object)null) { return; } if (HasRequiredItemEquipped(player, out string controllerName)) { if (!isUsingCustomController) { ApplyCustomController(player, controllerName); } else if (currentControllerName != controllerName) { RestoreOriginalController(player); ApplyCustomController(player, controllerName); } if (isUsingCustomController) { UpdateFlightAnimationTriggers(player); } } else if (isUsingCustomController) { RestoreOriginalController(player); } } } [HarmonyPatch] public static class HealthVisualManager { private class HealthEffect { public float HealthPercentage { get; set; } public string VisualChildName { get; set; } public bool AllowStacking { get; set; } public List<string> MeshesToHide { get; set; } public bool HideOriginalMeshes { get; set; } public HealthEffect(float healthPercentage, string visualChildName, bool allowStacking = false, List<string> meshesToHide = null, bool hideOriginalMeshes = false) { HealthPercentage = healthPercentage; VisualChildName = visualChildName; AllowStacking = allowStacking; MeshesToHide = meshesToHide ?? new List<string>(); HideOriginalMeshes = hideOriginalMeshes; } } private class HealthMapping { public string PrefabName { get; set; } public List<HealthEffect> Effects { get; set; } public HealthMapping(string prefabName, List<HealthEffect> effects) { PrefabName = prefabName; Effects = effects; Effects.Sort((HealthEffect a, HealthEffect b) => b.HealthPercentage.CompareTo(a.HealthPercentage)); } } private static Dictionary<ZDOID, List<string>> activeEffects; private static Dictionary<ZDOID, HashSet<float>> triggeredThresholds; private static readonly Dictionary<string, HealthMapping> HealthMappings; static HealthVisualManager() { activeEffects = new Dictionary<ZDOID, List<string>>(); triggeredThresholds = new Dictionary<ZDOID, HashSet<float>>(); HealthMappings = new Dictionary<string, HealthMapping> { { "sGundamExia", new HealthMapping("sGundamExia", new List<HealthEffect> { new HealthEffect(80f, "Sparcs80", allowStacking: true, new List<string>()), new HealthEffect(70f, "Sparcs70", allowStacking: true, new List<string>()), new HealthEffect(50f, "Sparcs50", allowStacking: true, new List<string>()), new HealthEffect(40f, "Sparcs40", allowStacking: true, new List<string>()), new HealthEffect(20f, "majordmgchest20", allowStacking: true, new List<string>()) }) }, { "sGundamBarbatos", new HealthMapping("sGundamBarbatos", new List<HealthEffect> { new HealthEffect(80f, "Sparcs80", allowStacking: true, new List<string>()), new HealthEffect(70f, "Sparcs70", allowStacking: true, new List<string>()), new HealthEffect(50f, "Sparcs50", allowStacking: true, new List<string>()), new HealthEffect(40f, "Sparcs40", allowStacking: true, new List<string>()), new HealthEffect(20f, "majordmgchest20", allowStacking: true, new List<string>()) }) } }; ValidateHealthMappings(); } private static void ValidateHealthMappings() { foreach (HealthMapping value in HealthMappings.Values) { value.Effects.Sort((HealthEffect a, HealthEffect b) => b.HealthPercentage.CompareTo(a.HealthPercentage)); } } private static string GetCleanPrefabName(string prefabName) { if (string.IsNullOrEmpty(prefabName)) { return string.Empty; } if (prefabName.EndsWith("(Clone)")) { return prefabName.Substring(0, prefabName.Length - 7); } return prefabName; } [HarmonyPatch(typeof(Character), "SetHealth")] [HarmonyPostfix] public static void Character_SetHealth_Postfix(Character __instance) { UpdateVisualEffects(__instance); } [HarmonyPatch(typeof(Character), "Damage")] [HarmonyPostfix] public static void Character_Damage_Postfix(Character __instance) { UpdateVisualEffects(__instance); } private static void UpdateVisualEffects(Character __instance) { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)__instance == (Object)null || !__instance.m_nview.IsValid()) { return; } string cleanPrefabName = GetCleanPrefabName(((Object)((Component)__instance).gameObject).name); if (!HealthMappings.TryGetValue(cleanPrefabName, out HealthMapping value)) { return; } float maxHealth = __instance.GetMaxHealth(); float health = __instance.GetHealth(); float num = health / maxHealth * 100f; ZDOID uid = __instance.m_nview.GetZDO().m_uid; if (!activeEffects.ContainsKey(uid)) { activeEffects[uid] = new List<string>(); } if (!triggeredThresholds.ContainsKey(uid)) { triggeredThresholds[uid] = new HashSet<float>(); } List<HealthEffect> list = new List<HealthEffect>(); HashSet<string> hashSet = new HashSet<string>(); foreach (HealthEffect effect in value.Effects) { if (num <= effect.HealthPercentage) { if (effect.AllowStacking || !triggeredThresholds[uid].Contains(effect.HealthPercentage)) { list.Add(effect); if (!triggeredThresholds[uid].Contains(effect.HealthPercentage)) { triggeredThresholds[uid].Add(effect.HealthPercentage); } } if (!effect.AllowStacking) { break; } } else { triggeredThresholds[uid].Remove(effect.HealthPercentage); } } foreach (HealthEffect item in list) { hashSet.Add(item.VisualChildName); } List<string> list2 = new List<string>(); foreach (string item2 in activeEffects[uid]) { if (!hashSet.Contains(item2)) { Transform val = Utils.FindChild(((Component)__instance).transform, item2, (IterativeSearchType)0); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } list2.Add(item2); } } foreach (string item3 in list2) { activeEffects[uid].Remove(item3); } foreach (HealthEffect item4 in list) { ApplyHealthEffect(__instance, item4); } } private static void ApplyHealthEffect(Character character, HealthEffect effect) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: 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_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) if (effect == null || string.IsNullOrEmpty(effect.VisualChildName)) { return; } Transform val = Utils.FindChild(((Component)character).transform, effect.VisualChildName, (IterativeSearchType)0); if ((Object)(object)val == (Object)null) { return; } ((Component)val).gameObject.SetActive(true); if (character.m_nview.IsValid()) { ZDOID uid = character.m_nview.GetZDO().m_uid; if (!activeEffects.ContainsKey(uid)) { activeEffects[uid] = new List<string>(); } if (!activeEffects[uid].Contains(effect.VisualChildName)) { activeEffects[uid].Add(effect.VisualChildName); } } if (effect.MeshesToHide != null && effect.MeshesToHide.Count > 0) { foreach (string item in effect.MeshesToHide) { Transform val2 = Utils.FindChild(((Component)character).transform, item, (IterativeSearchType)0); if ((Object)(object)val2 != (Object)null) { MeshRenderer component = ((Component)val2).GetComponent<MeshRenderer>(); if ((Object)(object)component != (Object)null) { ((Renderer)component).enabled = false; } SkinnedMeshRenderer component2 = ((Component)val2).GetComponent<SkinnedMeshRenderer>(); if ((Object)(object)component2 != (Object)null) { ((Renderer)component2).enabled = false; } if ((Object)(object)component == (Object)null && (Object)(object)component2 == (Object)null) { ((Component)val2).gameObject.SetActive(false); } } } } if (!effect.HideOriginalMeshes) { return; } MeshRenderer[] componentsInChildren = ((Component)character).GetComponentsInChildren<MeshRenderer>(true); SkinnedMeshRenderer[] componentsInChildren2 = ((Component)character).GetComponentsInChildren<SkinnedMeshRenderer>(true); MeshRenderer[] array = componentsInChildren; foreach (MeshRenderer val3 in array) { if (!IsPartOfVisualEffect(((Component)val3).transform, effect.VisualChildName)) { ((Renderer)val3).enabled = false; } } SkinnedMeshRenderer[] array2 = componentsInChildren2; foreach (SkinnedMeshRenderer val4 in array2) { if (!IsPartOfVisualEffect(((Component)val4).transform, effect.VisualChildName)) { ((Renderer)val4).enabled = false; } } } private static void DisableAllEffects(Character character) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: 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_00e4: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)character == (Object)null || !character.m_nview.IsValid()) { return; } ZDOID uid = character.m_nview.GetZDO().m_uid; if (!activeEffects.ContainsKey(uid)) { return; } string cleanPrefabName = GetCleanPrefabName(((Object)((Component)character).gameObject).name); if (!HealthMappings.TryGetValue(cleanPrefabName, out HealthMapping value)) { return; } foreach (HealthEffect effect in value.Effects) { Transform val = Utils.FindChild(((Component)character).transform, effect.VisualChildName, (IterativeSearchType)0); if ((Object)(object)val != (Object)null) { ((Component)val).gameObject.SetActive(false); } } activeEffects[uid].Clear(); } private static bool IsPartOfVisualEffect(Transform transform, string visualEffectName) { if ((Object)(object)transform == (Object)null || string.IsNullOrEmpty(visualEffectName)) { return false; } Transform val = transform; while ((Object)(object)val != (Object)null) { if (((Object)val).name == visualEffectName) { return true; } val = val.parent; } return false; } [HarmonyPatch(typeof(Character), "OnDestroy")] [HarmonyPostfix] public static void Character_OnDestroy_Postfix(Character __instance) { //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) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) ZNetView component = ((Component)__instance).GetComponent<ZNetView>(); if (!((Object)(object)component == (Object)null) && component.GetZDO() != null) { ZDOID uid = component.GetZDO().m_uid; activeEffects.Remove(uid); triggeredThresholds.Remove(uid); } } } public class HomingProjectile : MonoBehaviour { private const float INITIAL_STRAIGHT_DURATION = 0.1f; private const float TURN_RATE = 5f; private const float ACCELERATION_RATE = 1.5f; private const float MAX_SPEED_MULTIPLIER = 2f; private const float TARGET_SEARCH_RADIUS = 100f; private static readonly bool DISTRIBUTE_TARGETS = true; private Character? _target = null; private Projectile? _projectile = null; private Character? _owner = null; private bool _isInitialized = false; private float _elapsedTime = 0f; private float _baseSpeed = 0f; private float _currentSpeedMultiplier = 1f; private bool _isHoming = false; private int _projectileId = 0; private static Dictionary<Character, List<Character>> _ownerTargetAssignments = new Dictionary<Character, List<Character>>(); private static Dictionary<Character, float> _lastBurstTime = new Dictionary<Character, float>(); private static Dictionary<Character, int> _burstProjectileCounter = new Dictionary<Character, int>(); private const float BURST_WINDOW = 0.5f; public void Initialize(Character projectileOwner) { //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) _owner = projectileOwner; _projectile = ((Component)this).GetComponent<Projectile>(); _isInitialized = true; float time = Time.time; if (!_lastBurstTime.ContainsKey(_owner) || time - _lastBurstTime[_owner] > 0.5f) { if (!_burstProjectileCounter.ContainsKey(_owner)) { _burstProjectileCounter[_owner] = 0; } else { _burstProjectileCounter[_owner] = 0; } } _projectileId = (_burstProjectileCounter.ContainsKey(_owner) ? _burstProjectileCounter[_owner] : 0); if (_burstProjectileCounter.ContainsKey(_owner)) { _burstProjectileCounter[_owner] = _projectileId + 1; } else { _burstProjectileCounter[_owner] = 1; } FieldInfo field = typeof(Projectile).GetField("m_vel", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null && (Object)(object)_projectile != (Object)null) { Vector3 val = (Vector3)field.GetValue(_projectile); _baseSpeed = ((Vector3)(ref val)).magnitude; } FindTarget(); } private void FixedUpdate() { if (!_isInitialized || (Object)(object)_projectile == (Object)null || (Object)(object)_owner == (Object)null) { Object.Destroy((Object)(object)this); return; } _elapsedTime += Time.fixedDeltaTime; if (_elapsedTime < 0.1f) { return; } if (!_isHoming) { _isHoming = true; if ((Object)(object)_target == (Object)null || _target.IsDead()) { FindTarget(); } } if (!((Object)(object)_target == (Object)null) && !_target.IsDead()) { ApplyHoming(); } } private void ApplyHoming() { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_projectile == (Object)null || (Object)(object)_target == (Object)null) { return; } try { FieldInfo field = typeof(Projectile).GetField("m_vel", BindingFlags.Instance | BindingFlags.NonPublic); if (!(field == null)) { Vector3 val = (Vector3)field.GetValue(_projectile); Vector3 val2 = _target.GetCenterPoint() - ((Component)this).transform.position; Vector3 normalized = ((Vector3)(ref val2)).normalized; Vector3 val3 = Vector3.Slerp(((Vector3)(ref val)).normalized, normalized, 5f * Time.fixedDeltaTime); float num = Vector3.Dot(((Vector3)(ref val)).normalized, normalized); if (num > 0.7f) { _currentSpeedMultiplier += 1.5f * Time.fixedDeltaTime; _currentSpeedMultiplier = Mathf.Min(_currentSpeedMultiplier, 2f); } float num2 = _baseSpeed * _currentSpeedMultiplier; Vector3 val4 = val3 * num2; field.SetValue(_projectile, val4); if (((Vector3)(ref val4)).magnitude > 0.01f) { ((Component)this).transform.rotation = Quaternion.LookRotation(val4); } } } catch (Exception ex) { Debug.LogError((object)("[HomingProjectile] Error in ApplyHoming: " + ex.Message)); Object.Destroy((Object)(object)this); } } private void FindTarget() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)_owner == (Object)null) { return; } List<Character> list = new List<Character>(); Character.GetCharactersInRange(((Component)_owner).transform.position, 100f, list); list = list.Where((Character c) => (Object)(object)c != (Object)(object)_owner && !c.IsDead() && !c.IsTamed() && (Object)(object)c.GetBaseAI() != (Object)null && c.GetBaseAI().IsEnemy(_owner)).ToList(); if (list.Count != 0) { list = list.OrderBy((Character e) => Vector3.Distance(((Component)_owner).transform.position, ((Component)e).transform.position)).ToList(); if (DISTRIBUTE_TARGETS) { int index = _projectileId % list.Count; _target = list[index]; } else { _target = list[0]; } _lastBurstTime[_owner] = Time.time; } } } [HarmonyPatch(typeof(Projectile), "Setup")] public static class HomingProjectilePatch { private static readonly string[] HomingProjectileWhitelist = new string[2] { "gundam_misile_projectile", "shwsmbatmissile_projectile" }; private static readonly bool HomingEnabled = true; [HarmonyPostfix] private static void Projectile_Setup_Postfix(Projectile __instance, Character owner) { if (HomingEnabled && !((Object)(object)__instance == (Object)null) && !((Object)(object)((Component)__instance).gameObject == (Object)null) && !((Object)(object)owner == (Object)null)) { string value = ((Object)((Component)__instance).gameObject).name.Replace("(Clone)", "").Trim(); if (HomingProjectileWhitelist.Contains(value)) { HomingProjectile homingProjectile = ((Component)__instance).gameObject.AddComponent<HomingProjectile>(); homingProjectile.Initialize(owner); } } } } public class Patches : MonoBehaviour { [HarmonyPatch(typeof(Player), "SetControls")] [HarmonyPrefix] private static void PrefixSetControlsforShip(Player __instance, ref bool jump, ref bool crouch, ref bool attack, ref bool secondaryAttack, ref bool block) { Ship controlledShip = __instance.GetControlledShip(); ShipFlyIM shipFlyIM = default(ShipFlyIM); if (!((Object)(object)controlledShip == (Object)null) && ((Component)controlledShip).gameObject.TryGetComponent<ShipFlyIM>(ref shipFlyIM)) { shipFlyIM.flyship(ref jump, ref crouch, ref attack, ref secondaryAttack, ref block); } } } public class SaddleArmorHUD : MonoBehaviour { private static SaddleArmorHUD? _instance; private GameObject? _hudRoot; private Text? _armorText; private Character? _currentMount; private float _updateTimer; private const float UPDATE_INTERVAL = 0.1f; public static SaddleArmorHUD? Instance => _instance; private void Awake() { if ((Object)(object)_instance != (Object)null && (Object)(object)_instance != (Object)(object)this) { Object.Destroy((Object)(object)((Component)this).gameObject); return; } _instance = this; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } private void Update() { if ((Object)(object)Player.m_localPlayer == (Object)null) { HideHUD(); return; } UpdateCurrentMount(); if ((Object)(object)_currentMount == (Object)null || !ShouldShowHUD()) { HideHUD(); return; } _updateTimer += Time.deltaTime; if (_updateTimer >= 0.1f) { _updateTimer = 0f; UpdateHUD(); } } private void UpdateCurrentMount() { if (!((Character)Player.m_localPlayer).IsRiding()) { _currentMount = null; return; } IDoodadController doodadController = Player.m_localPlayer.m_doodadController; Sadle val = (Sadle)(object)((doodadController is Sadle) ? doodadController : null); if ((Object)(object)val != (Object)null && (Object)(object)val.m_character != (Object)null) { _currentMount = val.m_character; } else { _currentMount = null; } } private bool ShouldShowHUD() { if ((Object)(object)_currentMount == (Object)null) { return false; } Tameable component = ((Component)_currentMount).GetComponent<Tameable>(); if ((Object)(object)component == (Object)null || !component.HaveSaddle()) { return false; } float maxArmorHP = SaddleArmorSystem.GetMaxArmorHP(_currentMount); return maxArmorHP > 0f; } private void UpdateHUD() { if ((Object)(object)_hudRoot == (Object)null) { CreateHUD(); } if (!((Object)(object)_hudRoot == (Object)null) && !((Object)(object)_armorText == (Object)null) && !((Object)(object)_currentMount == (Object)null)) { float armorHP = SaddleArmorSystem.GetArmorHP(_currentMount); float maxArmorHP = SaddleArmorSystem.GetMaxArmorHP(_currentMount); if (maxArmorHP <= 0f) { HideHUD(); return; } float percent = armorHP / maxArmorHP; string arg = GenerateArmorBar(percent); _armorText.text = $"<color=#00BFFF>Gundam Shield</color> {arg} <color=white>{Mathf.CeilToInt(armorHP)}/{Mathf.CeilToInt(maxArmorHP)}</color>"; _hudRoot.SetActive(true); } } private string GenerateArmorBar(float percent) { int num = Mathf.RoundToInt(percent * 20f); string text = "["; for (int i = 0; i < 20; i++) { text = ((i >= num) ? (text + "<color=#404040>█</color>") : (text + "<color=#00BFFF>█</color>")); } return text + "]"; } private void CreateHUD() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) Hud instance = Hud.instance; Transform val = ((instance != null) ? ((Component)instance).transform : null); if (!((Object)(object)val == (Object)null)) { _hudRoot = new GameObject("SaddleArmorHUD"); _hudRoot.transform.SetParent(val, false); RectTransform val2 = _hudRoot.AddComponent<RectTransform>(); val2.anchorMin = new Vector2(0.5f, 0f); val2.anchorMax = new Vector2(0.5f, 0f); val2.pivot = new Vector2(0.5f, 0f); val2.anchoredPosition = new Vector2(0f, 120f); val2.sizeDelta = new Vector2(600f, 40f); _armorText = _hudRoot.AddComponent<Text>(); _armorText.font = Resources.GetBuiltinResource<Font>("Arial.ttf"); _armorText.fontSize = 16; _armorText.alignment = (TextAnchor)4; _armorText.horizontalOverflow = (HorizontalWrapMode)1; _armorText.verticalOverflow = (VerticalWrapMode)1; ((Graphic)_armorText).color = Color.white; _armorText.supportRichText = true; Outline val3 = _hudRoot.AddComponent<Outline>(); ((Shadow)val3).effectColor = Color.black; ((Shadow)val3).effectDistance = new Vector2(1f, -1f); _hudRoot.SetActive(false); } } private void HideHUD() { if ((Object)(object)_hudRoot != (Object)null) { _hudRoot.SetActive(false); } } private void OnDestroy() { if ((Object)(object)_hudRoot != (Object)null) { Object.Destroy((Object)(object)_hudRoot); } } } [HarmonyPatch(typeof(Character))] public static class SaddleArmorSystem { public class ArmorConfig { public float MaxArmor { get; set; } public float ArmorPerLevel { get; set; } public float RegenDelay { get; set; } public float RegenRate { get; set; } public string? EffectGameObjectPrefix { get; set; } = ""; } private static readonly Dictionary<string, ArmorConfig> CreatureArmorConfigs = new Dictionary<string, ArmorConfig> { { "sGundamBarbatos", new ArmorConfig { MaxArmor = 2500f, ArmorPerLevel = 600f, RegenDelay = 25f, RegenRate = 25f, EffectGameObjectPrefix = "Shield" } }, { "sGundamExia", new ArmorConfig { MaxArmor = 2200f, ArmorPerLevel = 550f, RegenDelay = 20f, RegenRate = 25f, EffectGameObjectPrefix = "Shield" } }, { "ShawUltimateDragon", new ArmorConfig { MaxArmor = 2500f, ArmorPerLevel = 550f, RegenDelay = 20f, RegenRate = 25f, EffectGameObjectPrefix = "Shield" } } }; private const string ARMOR_HP_KEY = "SaddleArmorHP"; private const string LAST_DAMAGE_TIME_KEY = "SaddleArmorLastDamage"; [HarmonyPatch("ApplyDamage")] [HarmonyPrefix] private static void ApplyDamage_Prefix(Character __instance, ref HitData hit) { if ((Object)(object)__instance == (Object)null || hit == null) { return; } Tameable component = ((Component)__instance).GetComponent<Tameable>(); if ((Object)(object)component == (Object)null || !component.HaveSaddle()) { return; } string key = ((Object)((Component)__instance).gameObject).name.Replace("(Clone)", "").Trim(); if (!CreatureArmorConfigs.ContainsKey(key)) { return; } ZNetView component2 = ((Component)__instance).GetComponent<ZNetView>(); if ((Object)(object)component2 == (Object)null || !component2.IsValid()) { return; } float maxArmorHP = GetMaxArmorHP(__instance); float @float = component2.GetZDO().GetFloat("SaddleArmorHP", maxArmorHP); if (@float > 0f) { float totalDamage = hit.GetTotalDamage(); if (totalDamage <= @float) { @float -= totalDamage; ((DamageTypes)(ref hit.m_damage)).Modify(0f); } else { float num = totalDamage - @float; @float = 0f; ((DamageTypes)(ref hit.m_damage)).Modify(num / totalDamage); } component2.GetZDO().Set("SaddleArmorHP", @float); component2.GetZDO().Set("SaddleArmorLastDamage", Time.time); } } [HarmonyPatch("Awake")] [HarmonyPostfix] private static void Awake_Postfix(Character __instance) { if ((Object)(object)__instance == (Object)null) { return; } Tameable component = ((Component)__instance).GetComponent<Tameable>(); if ((Object)(object)component == (Object)null) { return; } string key = ((Object)((Component)__instance).gameObject).name.Replace("(Clone)", "").Trim(); if (CreatureArmorConfigs.ContainsKey(key)) { SaddleArmorRegen component2 = ((Component)__instance).gameObject.GetComponent<SaddleArmorRegen>(); if ((Object)(object)component2 == (Object)null) { ((Component)__instance).gameObject.AddComponent<SaddleArmorRegen>(); } } } public static float GetArmorHP(Character character) { if ((Object)(object)character == (Object)null) { return 0f; } Tameable component = ((Component)character).GetComponent<Tameable>(); if ((Object)(object)component == (Object)null || !component.HaveSaddle()) { return 0f; } string key = ((Object)((Component)character).gameObject).name.Replace("(Clone)", "").Trim(); if (!CreatureArmorConfigs.ContainsKey(key)) { return 0f; } ZNetView component2 = ((Component)character).GetComponent<ZNetView>(); if ((Object)(object)component2 == (Object)null || !component2.IsValid()) { return 0f; } float maxArmorHP = GetMaxArmorHP(character); return component2.GetZDO().GetFloat("SaddleArmorHP", maxArmorHP); } public static float GetMaxArmorHP(Character character) { if ((Object)(object)character == (Object)null) { return 0f; } string key = ((Object)((Component)character).gameObject).name.Replace("(Clone)", "").Trim(); if (!CreatureArmorConfigs.ContainsKey(key)) { return 0f; } ArmorConfig armorConfig = CreatureArmorConfigs[key]; int saddleQuality = GetSaddleQuality(character); return armorConfig.MaxArmor + armorConfig.ArmorPerLevel * (float)(saddleQuality - 1); } private static int GetSaddleQuality(Character character) { Tameable component = ((Component)character).GetComponent<Tameable>(); if ((Object)(object)component == (Object)null || (Object)(object)component.m_saddleItem == (Object)null) { return 1; } return component.m_saddleItem.m_itemData.m_quality; } public static ArmorConfig? GetArmorConfig(string prefabName) { if (CreatureArmorConfigs.ContainsKey(prefabName)) { return CreatureArmorConfigs[prefabName]; } return null; } } public class SaddleArmorRegen : MonoBehaviour { private Character? _character = null; private Tameable? _tameable = null; private ZNetView? _nview = null; private string? _prefabName = null; private List<GameObject> _effectObjects = new List<GameObject>(); private bool _lastArmorState = true; private void Awake() { _character = ((Component)this).GetComponent<Character>(); _tameable = ((Component)this).GetComponent<Tameable>(); _nview = ((Component)this).GetComponent<ZNetView>(); _prefabName = ((Object)((Component)this).gameObject).name.Replace("(Clone)", "").Trim(); } private void Start() { if (_prefabName == null) { return; } SaddleArmorSystem.ArmorConfig armorConfig = SaddleArmorSystem.GetArmorConfig(_prefabName); if (armorConfig != null && !string.IsNullOrEmpty(armorConfig.EffectGameObjectPrefix)) { FindAllChildrenWithPrefix(((Component)this).transform, armorConfig.EffectGameObjectPrefix, _effectObjects); if (_effectObjects.Count > 0) { UpdateEffectState(active: true); } } } private void FixedUpdate() { if ((Object)(object)_character == (Object)null || (Object)(object)_tameable == (Object)null || !_tameable.HaveSaddle()) { UpdateEffectState(active: false); } else { if ((Object)(object)_nview == (Object)null || !_nview.IsValid() || !_nview.IsOwner() || _prefabName == null) { return; } SaddleArmorSystem.ArmorConfig armorConfig = SaddleArmorSystem.GetArmorConfig(_prefabName); if (armorConfig == null) { return; } float maxArmorHP = SaddleArmorSystem.GetMaxArmorHP(_character); float @float = _nview.GetZDO().GetFloat("SaddleArmorHP", maxArmorHP); bool active = @float > 0f; UpdateEffectState(active); if (!(@float < maxArmorHP)) { return; } float float2 = _nview.GetZDO().GetFloat("SaddleArmorLastDamage", 0f); float num = Time.time - float2; if (num >= armorConfig.RegenDelay) { @float += armorConfig.RegenRate * Time.fixedDeltaTime; if (@float > maxArmorHP) { @float = maxArmorHP; } _nview.GetZDO().Set("SaddleArmorHP", @float); } } } private void UpdateEffectState(bool active) { if (_effectObjects.Count <= 0 || _lastArmorState == active) { return; } foreach (GameObject effectObject in _effectObjects) { if ((Object)(object)effectObject != (Object)null) { effectObject.SetActive(active); } } _lastArmorState = active; } private void FindAllChildrenWithPrefix(Transform parent, string prefix, List<GameObject> results) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown foreach (Transform item in parent) { Transform val = item; if (((Object)val).name.StartsWith(prefix)) { results.Add(((Component)val).gameObject); } FindAllChildrenWithPrefix(val, prefix, results); } } } public class ShipFlyIM : MonoBehaviour { private Ship ship; private Rigidbody rb; public float drop_reduction = 10f; public Vector3 forcepos = new Vector3(0f, 0f, 0f); public float forwardReduction = 0.5f; public float hoverlift_modifier = 0.1f; public float hoverheight_modifier = 0.15f; public float hovertilt_modifier = 2f; public float jump_lift_mod = 0.1f; private float lift = 110f; public float LR_StabilityForce = 100f; public Vector3 LRpos = new Vector3(0f, 4f, -5f); public float maxangle = 0.35f; public float R_multi = 10f; public float rightingForce = -45f; public float rollForce = -25000f; public float rotationForce = 70f; public float slowDown_multi = 3f; public float thrust = 15f; public float turningForce = 0.05f; public float yawForce = 30000f; private float waterlvl = 30f; private Vector3[] projectileForce = (Vector3[])(object)new Vector3[2] { new Vector3(0f, 0f, 100f), new Vector3(0f, 0f, 50f) }; private Vector3[] projectileLoc = (Vector3[])(object)new Vector3[2] { new Vector3(0f, 0f, 0f), new Vector3(5f, 0f, -6f) }; private float[] projectileCooldown = new float[2] { 10f, 16f }; private float[] lastProjectile = new float[2]; private int[] AmtBeforeRecharge = new int[2] { 15, 4 }; private int[] AmtInChamber = new int[2] { 15, 4 }; private float manouverForce = 600f; public void Awake() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) ship = ((Component)this).gameObject.GetComponent<Ship>(); if (Object.op_Implicit((Object)(object)ship)) { rb = ship.m_body; waterlvl = (Object.op_Implicit((Object)(object)ship.m_previousCenter) ? ((Component)ship.m_previousCenter).transform.position.y : 30f); } } private bool hasShip() { //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ship) && Object.op_Implicit((Object)(object)rb)) { return true; } ship = ((Component)this).gameObject.GetComponent<Ship>(); if (Object.op_Implicit((Object)(object)ship)) { rb = ship.m_body; waterlvl = (Object.op_Implicit((Object)(object)ship.m_previousCenter) ? ((Component)ship.m_previousCenter).transform.position.y : 30f); if (Object.op_Implicit((Object)(object)rb)) { return true; } return false; } return false; } public void flyship(ref bool jump, ref bool crouch, ref bool attack, ref bool secondaryattack, ref bool block) { //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ac: 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_02b6: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02cc: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_0317: Unknown result type (might be due to invalid IL or missing references) //IL_031c: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Unknown result type (might be due to invalid IL or missing references) //IL_07c1: Unknown result type (might be due to invalid IL or missing references) //IL_07c6: Unknown result type (might be due to invalid IL or missing references) //IL_07cb: Unknown result type (might be due to invalid IL or missing references) //IL_07dd: 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_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: Unknown result type (might be due to invalid IL or missing references) //IL_0869: Unknown result type (might be due to invalid IL or missing references) //IL_0897: Unknown result type (might be due to invalid IL or missing references) //IL_089c: Unknown result type (might be due to invalid IL or missing references) //IL_082d: Unknown result type (might be due to invalid IL or missing references) //IL_0850: Unknown result type (might be due to invalid IL or missing references) //IL_0387: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Unknown result type (might be due to invalid IL or missing references) //IL_03a1: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_04d9: Unknown result type (might be due to invalid IL or missing references) //IL_04de: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Unknown result type (might be due to invalid IL or missing references) //IL_03dc: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: 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_0175: 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_0554: Unknown result type (might be due to invalid IL or missing references) //IL_0568: Unknown result type (might be due to invalid IL or missing references) //IL_056d: Unknown result type (might be due to invalid IL or missing references) //IL_058b: Unknown result type (might be due to invalid IL or missing references) //IL_059d: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05ac: Unknown result type (might be due to invalid IL or missing references) //IL_05be: Unknown result type (might be due to invalid IL or missing references) //IL_05d2: Unknown result type (might be due to invalid IL or missing references) //IL_05d7: Unknown result type (might be due to invalid IL or missing references) //IL_05dc: Unknown result type (might be due to invalid IL or missing references) //IL_05e1: Unknown result type (might be due to invalid IL or missing references) //IL_05e6: Unknown result type (might be due to invalid IL or missing references) //IL_05f1: Unknown result type (might be due to invalid IL or missing references) //IL_05f7: Unknown result type (might be due to invalid IL or missing references) //IL_05fc: Unknown result type (might be due to invalid IL or missing references) //IL_0601: Unknown result type (might be due to invalid IL or missing references) //IL_0606: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0412: Unknown result type (might be due to invalid IL or missing references) //IL_0418: Unknown result type (might be due to invalid IL or missing references) //IL_0646: Unknown result type (might be due to invalid IL or missing references) //IL_064c: Invalid comparison between Unknown and I4 //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Unknown result type (might be due to invalid IL or missing references) //IL_06d0: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e8: Unknown result type (might be due to invalid IL or missing references) //IL_06ee: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0692: Unknown result type (might be due to invalid IL or missing references) //IL_069a: Unknown result type (might be due to invalid IL or missing references) //IL_06a1: Unknown result type (might be due to invalid IL or missing references) //IL_06a7: Unknown result type (might be due to invalid IL or missing references) //IL_06b2: Unknown result type (might be due to invalid IL or missing references) //IL_0724: Unknown result type (might be due to invalid IL or missing references) //IL_072f: Unknown result type (might be due to invalid IL or missing references) //IL_0747: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_0760: Unknown result type (might be due to invalid IL or missing references) //IL_0782: Unknown result type (might be due to invalid IL or missing references) if (!hasShip()) { Shawesomes_Infinite_Multiverse.logger.LogWarning((object)"Does not have ship"); return; } float time = Time.time; if (attack | secondaryattack | block) { Container component = ((Component)this).gameObject.GetComponent<Container>(); if ((Object)(object)component != (Object)null) { int num = (block ? 1 : 0); if (time > lastProjectile[num] + projectileCooldown[num]) { List<DropData> drops = component.m_defaultItems.m_drops; GameObject item = drops[num].m_item; if ((Object)(object)item != (Object)null) { if (AmtBeforeRecharge[num] > 0) { if (--AmtInChamber[num] <= 0) { AmtInChamber[num] = AmtBeforeRecharge[num]; lastProjectile[num] = time; } } else { lastProjectile[num] = time; } for (int i = 0; i <= num; i++) { GameObject val = Object.Instantiate<GameObject>(item, ((Component)this).gameObject.transform.position + ((Component)this).gameObject.transform.rotation * Vector3.Scale(projectileLoc[num], new Vector3((float)(1 - 2 * i), 1f, 1f)), ((Component)this).gameObject.transform.rotation); Projectile component2 = val.GetComponent<Projectile>(); if (Object.op_Implicit((Object)(object)component2)) { Shawesomes_Infinite_Multiverse.logger.LogWarning((object)((!block) ? "attempt to attack primary1" : "attempt to attack secondary2")); component2.m_vel = ((Component)this).gameObject.transform.rotation * projectileForce[num]; } } } } } attack = false; secondaryattack = false; } if (jump) { jump = false; } float num2 = 1f + 0.25f * Math.Min(Math.Max(rb.position.y - waterlvl, 0f), 6f); float num3 = Math.Max(Math.Min(1.25f - 0.25f * Math.Min(rb.position.y - waterlvl, 4f), 1f), 0f) * rotationForce; Vector3 val2 = rb.position + forcepos; Vector3 val3 = rb.rotation * Vector3.forward; float num4 = Vector3.Dot(val3, Vector3.up); if (num4 > maxangle) { num3 *= -1f; } float num5 = (maxangle - num4) * (maxangle - num4) * 100f; float num6 = Vector3.Dot(rb.velocity, val3); int num7 = 1; if (ZInput.GetButton("Jump") || ZInput.GetButtonDown("JoyJump")) { if (ZInput.GetButton("Run") || ZInput.GetButtonDown("JoyRun")) { Shawesomes_Infinite_Multiverse.logger.LogWarning((object)"shiftjump"); rb.AddForceAtPosition(rb.rotation * new Vector3(0f, manouverForce, 0f), rb.position, (ForceMode)1); num7 = 0; } if (num7 > 0) { rb.AddForceAtPosition(new Vector3(0f, num3 * num5, 0f), rb.position, (ForceMode)1); } if (num6 < 30f) { rb.AddForce(val3 * thrust * num2, (ForceMode)1); } rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * jump_lift_mod * num4 * num6, 2400f), (ForceMode)1); } float num8 = Math.Max(num2 - 1.5f, 0f); if (num7 > 0) { if (ZInput.GetButton("Crouch") || ZInput.GetButtonDown("JoyCrouch")) { num7 = 5; } rb.AddForceAtPosition(new Vector3(0f, rightingForce * (float)num7, 0f), val2, (ForceMode)1); float num9 = 1f; if (rb.position.y > waterlvl + 20f) { num9 = 1f - Math.Min(0.01f * (rb.position.y - waterlvl - 20f), 0.3f); } rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * num9 * num4 * num6, 2400f), (ForceMode)1); float num10 = Vector3.Dot(rb.rotation * Vector3.left, Vector3.up); Vector3 val4 = rb.position + R_multi * num10 * (rb.rotation * Vector3.right) + rb.rotation * LRpos; rb.AddForceAtPosition(new Vector3(0f, LR_StabilityForce, 0f), val4, (ForceMode)1); if (num2 < 2f) { return; } if ((int)ship.m_speed == 4) { float num11 = Math.Max(Math.Min(10f / num6 - 27f, 2f), 0.1f); if (num6 < 30f) { rb.AddForce(val3 * thrust * num11 * num2 * hoverheight_modifier, (ForceMode)1); } else { rb.AddForce(val3 * thrust * slowDown_multi * (30f - num6) * num2 * hoverheight_modifier, (ForceMode)1); } rb.AddForceAtPosition(new Vector3(0f, num3 * hovertilt_modifier * num11 * num5, 0f), rb.position, (ForceMode)1); rb.AddForce(rb.rotation * new Vector3(0f, 1f, 0.1f) * Math.Min(lift * num4 * num6 * hoverlift_modifier, 2400f), (ForceMode)1); } } if (num8 > 0f) { float rudderValue = ship.m_rudderValue; float num12 = Vector3.Dot(rb.velocity, rb.rotation * Vector3.left); float num13 = Vector3.Dot(rb.velocity, rb.rotation * Vector3.up); if (num13 < 0f && num6 > 15f) { rb.AddForce(new Vector3(0f, 1f, 0f) * Math.Min(lift * (0f - num13) * drop_reduction * num8, 2400f), (ForceMode)1); } rb.AddForce(rb.rotation * new Vector3(num12 * turningForce * num8, 0f, forwardReduction * Math.Abs(num12) * turningForce * num8), (ForceMode)2); rb.AddRelativeTorque(0f, rudderValue * yawForce * num8, rudderValue * rollForce * num8); ship.m_rudderValue += 0.02f * (num8 * (float)((!(ship.m_rudderValue > 0f)) ? 1 : (-1))); } } } [BepInPlugin("IDshawesome4u1", "Shawesomes_Infinite_Multiverse", "2.3.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Shawesomes_Infinite_Multiverse : BaseUnityPlugin { [HarmonyPriority(0)] [HarmonyPatch(typeof(Player), "OnSpawned")] private static class Player_OnSpawned_Patch { private static void Postfix() { if (m_initialized || !Object.op_Implicit((Object)(object)ZNetScene.instance)) { return; } Dictionary<string, string> dictionary = new Dictionary<string, string> { ["sGundamBarbatos"] = "Troll", ["sGundamExia"] = "Troll", ["shawesomesurtrboss"] = "Troll" }; Humanoid val = default(Humanoid); Humanoid val2 = default(Humanoid); foreach (KeyValuePair<string, string> item in dictionary) { GameObject prefab = ZNetScene.instance.GetPrefab(item.Value); GameObject prefab2 = ZNetScene.instance.GetPrefab(item.Key); if (Object.op_Implicit((Object)(object)prefab) && Object.op_Implicit((Object)(object)prefab2) && prefab.TryGetComponent<Humanoid>(ref val) && prefab2.TryGetComponent<Humanoid>(ref val2)) { ((Character)val2).m_waterEffects = ((Character)val).m_waterEffects; } } m_initialized = true; } } public Harmony harmony; public static GameObject Root; public string version = "1.0.0"; private static int i = 0; public static ManualLogSource logger; public static ManualLogSource harmonyLog; private static AssetBundle Shawcassets; public static List<GameObject> EffectList = new List<GameObject>(); private static bool m_initialized; public void Awake() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown logger = ((BaseUnityPlugin)this).Logger; VanillaShaders.InitLogFilter(); VanillaShaders.RegisterAssetBundle("shaw_im"); harmony = new Harmony("IDshawesome4u1"); Root = new GameObject("Shaw Root"); Object.DontDestroyOnLoad((Object)(object)Root); harmony.PatchAll(typeof(HealthVisualManager)); harmony.PatchAll(typeof(ControllerSwapperSystem)); harmony.PatchAll(typeof(Player_Update_Patch)); harmony.PatchAll(typeof(Animator_runtimeAnimatorController_Patch)); ControllerSwapperSystem.Initialize(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"HealthVisualManager initialized"); ((BaseUnityPlugin)this).Logger.LogInfo((object)"ControllerSwapperSystem initialized"); harmony.PatchAll(typeof(Patches)); Ascend.InitConfig(((BaseUnityPlugin)this).Config); harmony.PatchAll(typeof(SimpleAscend_Character_UpdateMotion_Patch)); harmony.PatchAll(typeof(SimpleAscend_Character_IsOnGround_Patch)); Ascend.Instance.ApplyConfig(); harmony.PatchAll(typeof(SimpleMountController.MountControlsPatch)); harmony.PatchAll(typeof(SimpleMountController.FlightControlPatch)); harmony.PatchAll(typeof(SimpleMountController.EnableFlightOnMount)); harmony.PatchAll(typeof(SimpleMountController.DisableFlightOnDismount)); harmony.PatchAll(typeof(SimpleMountController.InputUpdatePatch)); harmony.PatchAll(typeof(SimpleMountController.DisableGravityWhileFlying)); harmony.PatchAll(typeof(SimpleMountController.FlyingPhysicsPatch)); harmony.PatchAll(typeof(SaddleArmorSystem)); harmony.PatchAll(typeof(HomingProjectilePatch)); Root.AddComponent<SaddleArmorHUD>(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Mount System initialized (SimpleMountController, SaddleArmorSystem, HomingProjectile, SaddleArmorHUD)"); harmonyLog = ((BaseUnityPlugin)this).Logger; IEnumerable<MethodBase> patchedMethods = harmony.GetPatchedMethods(); foreach (MethodBase item in patchedMethods) { harmonyLog.LogWarning((object)(item.ReflectedType?.ToString() + ":" + item.Name + " is patched")); } harmonyLog.LogMessage((object)"[BOOT SEQUENCE COMPLETE] :: Multiversal anomalies online. Unique Combat parameters unlocked. Dragonballs scattered...Awaiting Hero of Legend..."); Shawcassets = AssetUtils.LoadAssetBundleFromResources("shaw_im", Assembly.GetExecutingAssembly()); LoadAssets(); PrefabManager.OnVanillaPrefabsAvailable += additems; PrefabManager.OnPrefabsRegistered += delegate { harmonyLog.LogMessage((object)"Registering VFX via PrefabManager (safe, ZNetScene ready)..."); AddEffectsToZNet(); }; } public static void LoadAssets() { EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shwsmbatmissile_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shwsmbow_projectile1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/batmobile_boost_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawbathookprojectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/vfx_shawtechdmg_impact1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/vfx_shawtechdmg_impact.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/cryobatarang_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/batarang_freeze_bomb_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/pyrobatarang_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/pyrobatarang_projectile_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_arrowhit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeArmor/fx_shawarmorset.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/yu-gi-oh-winged-dragon-of-ra/RA_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/fx_eikthyr_stomp.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/SandBC.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/fx_shield_startGAARA.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/gaara/sand_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/vfx_HitSparks1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/vfx_YGOBLOCK.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/sfx_lifepointsdrop.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/fx_SageMode_Activation.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sclone_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/sclone_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/RS_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/naruto-uzumaki-running-animation/Rasensh_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/icedragon_hyorinmaru_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/IceBlocker1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/vfx_icedragon_hyorinmaru_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/Shunsui projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/shunsui_attack_aoe.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/nozarashi/fx_nozarashi_attack.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/nozarashi/sfx_Nozarashi.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/shunsui/sfx_shunsui.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/toshiro-hitsugaya/sfx_hyorinmaru.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/Senbonzakura_aoe.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/Byakuya/zakura_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/Mugetsu_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/fx_mugetsu_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-kurosaki/sfx_Mugetsu.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/Getsugatensho_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/fx_gt_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeBleach/ichigo-sword-the-second-mode/textures/sfx_getsugatensho.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/sfx_firework_explode1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_Burning1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/Surtr_groundslam.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/troll_groundslam_aoe1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/relicswordspecial_aoe_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_meteor_throw.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surtspwan_meteorthrow_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_h1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/surt_swing_v1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/beamsaber_swing_v.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/beamsaber_swing_h.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawesomeexplosion.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/PrefabInstance/vfx_Place_VikingShip1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGOW/shawesomeexplosion1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/barbatos_swing_v.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/barbatos_swing_h.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/vfx_troll_footstep_water1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/projectile_Gungnir1.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/custom attacks/gungprojhitnew.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeGundam/warpgung_spawn.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawAura/Effects/Hovl Studio/8 KI levels/Prefabs/Ki aura grand.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/fx_Lightning_green.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/fx_Lightning_purp.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/skitetsu_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sfx_kitetsu.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/sfx_enma.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/ShawesomeOnePiece/enma_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/Shawesome1/ddstuff/sfx_ra_summon.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/beud_projectile_card.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_roar.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_beam_start.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/nbexplosion_hit.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/fx_beud_stomp.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/neutronblast_start_vfx.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/neutronblast_projectile.prefab")); EffectList.Add(Shawcassets.LoadAsset<GameObject>("Assets/shawesomeygo/sfx_beud_atklong_beamfire.prefab")); Eff