Please disclose if any significant portion of your mod was created 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 Heart of the Collective v1.0.0
SolusHeartReward.dll
Decompiled 4 months agousing System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates.SolusHeart.Death; using HG.Reflection; using IL.EntityStates.SolusHeart.Death; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.CharacterSpeech; using R2API; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.CharacterSpeech; using RoR2.Items; using RoR2BepInExPack.GameAssetPathsBetter; using ShaderSwapper; using SolusHeartReward; using UnityEngine; using UnityEngine.AddressableAssets; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("SolusHeartReward")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+e4bb00535d9a9219a05a6f5352da38832dcb3c9b")] [assembly: AssemblyProduct("SolusHeartReward")] [assembly: AssemblyTitle("SolusHeartReward")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class SolusHeartRewardHelper : MonoBehaviour { public void Awake() { Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } public void OnEnable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown DirectorCard.IsAvailable += new hook_IsAvailable(DirectorCardOnIsAvailable); Run.Start += new hook_Start(RunOnStart); SolusVendorShrineSpeechDriver.SendReponseFromPool += new hook_SendReponseFromPool(SolusVendorShrineSpeechDriverOnSendReponseFromPool); } private void SolusVendorShrineSpeechDriverOnSendReponseFromPool(orig_SendReponseFromPool orig, SolusVendorShrineSpeechDriver self, SpeechInfo[] responsePool) { if (!global::SolusHeartReward.SolusHeartReward.silenceSPEX.Value) { orig.Invoke(self, responsePool); } } private void RunOnStart(orig_Start orig, Run self) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (Util.GetItemCountForTeam((TeamIndex)1, global::SolusHeartReward.SolusHeartReward.nullHeart.itemIndex, false, true) == 0) { Log.Debug("killed solus heart reward helper"); Object.Destroy((Object)(object)((Component)this).gameObject); } } public void OnDisable() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown DirectorCard.IsAvailable -= new hook_IsAvailable(DirectorCardOnIsAvailable); Run.Start -= new hook_Start(RunOnStart); SolusVendorShrineSpeechDriver.SendReponseFromPool -= new hook_SendReponseFromPool(SolusVendorShrineSpeechDriverOnSendReponseFromPool); } private bool DirectorCardOnIsAvailable(orig_IsAvailable orig, DirectorCard self) { if (Object.op_Implicit((Object)(object)self.spawnCard) && Object.op_Implicit((Object)(object)self.spawnCard.prefab) && IsCharacterSpawnCard(self.spawnCard)) { if (global::SolusHeartReward.SolusHeartReward.blacklistArray.Contains(((Object)self.spawnCard).name.Replace("csc", ""))) { if (global::SolusHeartReward.SolusHeartReward.logDebug.Value) { Log.Debug("disabling spawn card " + ((Object)self.spawnCard).name.Replace("csc", "")); } return false; } if (global::SolusHeartReward.SolusHeartReward.logDebug.Value) { Log.Debug("character spawn card = " + ((Object)self.spawnCard).name.Replace("csc", "")); } } return orig.Invoke(self); } private static bool IsCharacterSpawnCard(SpawnCard spawnCard) { if ((Object)(object)spawnCard == (Object)null) { return false; } CharacterMaster component = spawnCard.prefab.GetComponent<CharacterMaster>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.bodyPrefab)) { CharacterBody component2 = component.bodyPrefab.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component2)) { return true; } } return false; } } namespace SolusHeartReward { internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("icebro.heartofthecollective", "heartofthecollective", "1.0.0")] public class SolusHeartReward : BaseUnityPlugin { public sealed class Behavior : BaseItemBodyBehavior, IOnDamageDealtServerReceiver { [ItemDefAssociation] private static ItemDef GetItemDef() { return nullHeart; } public void OnEnable() { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown ((BaseItemBodyBehavior)this).body.onInventoryChanged += BodyOnonInventoryChanged; if (!Object.op_Implicit((Object)(object)GameObject.Find("watcher"))) { GameObject val = new GameObject(); val.AddComponent<SolusHeartRewardHelper>(); Object.DontDestroyOnLoad((Object)(object)val); ((Object)val).name = "watcher"; Log.Debug("spawned solus heart reward helper"); } } private void BodyOnonInventoryChanged() { if (((BaseItemBodyBehavior)this).body.inventory.GetItemCountEffective(nullHeart) == 0) { Object.Destroy((Object)(object)GameObject.Find("watcher")); Log.Debug("killed solus heart reward helper"); } } public void OnDisable() { ((BaseItemBodyBehavior)this).body.onInventoryChanged -= BodyOnonInventoryChanged; } public void OnDamageDealtServer(DamageReport damageReport) { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Invalid comparison between Unknown and I4 //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: 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_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Expected O, but got Unknown //IL_0208: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Expected O, but got Unknown if (!enableProc.Value || !Object.op_Implicit((Object)(object)damageReport.victimBody) || !Object.op_Implicit((Object)(object)damageReport.victimBody.master)) { return; } if (!useMechFlag.Value) { if (!solusFamilyBodyNames.Contains(((Object)damageReport.victimBody.master).name.Replace("(Clone)", "")) && !((Object)damageReport.victimBody.master).name.Contains("Solus") && !((Object)damageReport.victimBody.master).name.Contains("RoboBallMini") && ((Object)damageReport.victimBody.master).name != "SolusVendorMaster") { return; } } else if ((damageReport.victimBody.bodyFlags & 2) == 0) { return; } if (Util.CheckRoll((float)procChance.Value * damageReport.damageInfo.procCoefficient, damageReport.attackerBody.master)) { DamageInfo val = new DamageInfo { damage = damageReport.damageInfo.damage * (float)procDamage.Value / 100f, attacker = (Object.op_Implicit((Object)(object)damageReport.attackerBody) ? ((Component)damageReport.attackerBody).gameObject : null), inflictor = (Object.op_Implicit((Object)(object)damageReport.attackerBody) ? ((Component)damageReport.attackerBody).gameObject : null), position = damageReport.victimBody.corePosition, force = Vector3.zero, crit = damageReport.attackerBody.RollCrit(), damageColorIndex = (DamageColorIndex)13, damageType = DamageTypeCombo.op_Implicit((DamageType)0), procCoefficient = 0f }; damageReport.victimBody.healthComponent.TakeDamage(val); EffectData val2 = new EffectData { origin = damageReport.victimBody.corePosition, start = damageReport.victimBody.corePosition, rotation = Quaternion.identity, scale = damageReport.victimBody.radius }; EffectManager.SpawnEffect(impactEffectPrefab, val2, true); } } } public const string PluginGUID = "icebro.heartofthecollective"; public const string PluginAuthor = "icebro"; public const string PluginName = "heartofthecollective"; public const string PluginVersion = "1.0.0"; private static ConfigEntry<string> blacklist; public static ConfigEntry<bool> logDebug; public static ConfigEntry<bool> silenceSPEX; public static ConfigEntry<bool> enableProc; public static ConfigEntry<bool> useMechFlag; public static ConfigEntry<int> procChance; public static ConfigEntry<int> procDamage; private static ConfigEntry<string> descFormat; private static ConfigEntry<string> procFormat; public static GameObject impactEffectPrefab; public static ItemDef nullHeart; public static List<string> solusFamilyBodyNames = new List<string>(); public static string[] blacklistArray; private string assetbundledir; public void Awake() { //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_0084: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_02d1: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0346: Expected O, but got Unknown //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0356: Expected O, but got Unknown //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_016d: 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_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) Log.Init(((BaseUnityPlugin)this).Logger); assetbundledir = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "solusheartrewardassets"); AssetBundle assetBundle = AssetBundle.LoadFromFileAsync(assetbundledir).assetBundle; ((MonoBehaviour)this).StartCoroutine(ShaderSwapper.UpgradeStubbedShadersAsync(assetBundle)); Material[] array = assetBundle.LoadAllAssets<Material>(); foreach (Material val in array) { if (((Object)val).name == "matTransparentChip") { val.shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/DLC3/TransparentTextureScrolling.shader").WaitForCompletion(); val.SetTexture("_MainTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC3/texSolusWireGridBoss.tga").WaitForCompletion()); val.SetTexture("_RemapTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC3/texBossWire.png").WaitForCompletion()); val.SetTexture("_ScrollTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/TiledTextures/texDepth2.jpg").WaitForCompletion()); Log.Debug("swapped chip material shader"); } if (((Object)val).name == "matSolusHeart") { val.SetTexture("_Cloud1Tex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC3/Drone Tech/texNanoPistolAOE_1c.png").WaitForCompletion()); val.SetTexture("_Cloud2Tex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/DLC3/Drone Tech/texNanoPistolAOE_1d.png").WaitForCompletion()); val.SetTexture("_RemapTex", (Texture)(object)Addressables.LoadAssetAsync<Texture2D>((object)"RoR2/Base/Common/ColorRamps/texRampTritone3.png").WaitForCompletion()); Log.Debug("swapped solus heart reward material shader"); } } FamilyDirectorCardCategorySelection val2 = Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/DLC3/dccsSuperRoboBallpitFamily.asset").WaitForCompletion(); if (Object.op_Implicit((Object)(object)val2)) { Category[] categories = ((DirectorCardCategorySelection)val2).categories; foreach (Category val3 in categories) { DirectorCard[] cards = val3.cards; foreach (DirectorCard val4 in cards) { if (Object.op_Implicit((Object)(object)val4.spawnCard) && Object.op_Implicit((Object)(object)val4.spawnCard.prefab)) { solusFamilyBodyNames.Add(((Object)val4.spawnCard.prefab).name); } } } } impactEffectPrefab = assetBundle.LoadAsset<GameObject>("SolusHeartRewardImpactEffect"); ContentAddition.AddEffect(impactEffectPrefab); nullHeart = ScriptableObject.CreateInstance<ItemDef>(); ((Object)nullHeart).name = "ITEM_SOLUSHEARTREWARD_NAME"; nullHeart.nameToken = "ITEM_SOLUSHEARTREWARD_NAME"; nullHeart.pickupToken = "ITEM_SOLUSHEARTREWARD_PICKUP"; nullHeart.descriptionToken = "ITEM_SOLUSHEARTREWARD_DESC"; nullHeart.loreToken = "ITEM_SOLUSHEARTREWARD_LORE"; nullHeart._itemTierDef = Addressables.LoadAssetAsync<ItemTierDef>((object)RoR2_Base_Common.BossTierDef_asset).WaitForCompletion(); nullHeart.pickupIconSprite = assetBundle.LoadAsset<Sprite>("SolusHeartPickup"); nullHeart.pickupModelPrefab = assetBundle.LoadAsset<GameObject>("SolusHeartReward"); ItemDef obj = nullHeart; ItemTag[] array2 = new ItemTag[6]; RuntimeHelpers.InitializeArray(array2, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); obj.tags = (ItemTag[])(object)array2; nullHeart.hidden = false; nullHeart.canRemove = true; ItemDisplayRuleDict val5 = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(nullHeart, val5)); Configs(); Death.OnEnter += new Manipulator(DeathOnOnEnter); BodyCatalog.SetBodyPrefabs += (hook_SetBodyPrefabs)delegate(orig_SetBodyPrefabs orig, GameObject[] prefabs) { orig.Invoke(prefabs); updateEnemyList(); }; } private void Configs() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Expected O, but got Unknown //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018f: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e3: Expected O, but got Unknown //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Expected O, but got Unknown blacklist = ((BaseUnityPlugin)this).Config.Bind<string>("Solus Heart Reward", "enemy blacklist", "MinePod,ExtractorUnit,DefectiveUnit", "internal enemy body names (can be found on wiki !!( seperated by comma to disable when have solus heart reward !!!"); blacklist.SettingChanged += delegate { updateEnemyList(); }; ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(blacklist)); logDebug = ((BaseUnityPlugin)this).Config.Bind<bool>("Solus Heart Reward", "log debug", false, "log names of spawn cards that arent in enabled config when attempted to spawn !!"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(logDebug)); silenceSPEX = ((BaseUnityPlugin)this).Config.Bind<bool>("Solus Heart Reward", "silence spex !!!!", true, "makes spex silent post defeating solus heart !!"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(silenceSPEX)); enableProc = ((BaseUnityPlugin)this).Config.Bind<bool>("Solus Heart Reward", "Solus family on hit proc", true, "gives null heart a on hit chance to deal extra damage to solus family enemies !!"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(enableProc)); useMechFlag = ((BaseUnityPlugin)this).Config.Bind<bool>("Solus Heart Reward", "proc on mechanical enemies", false, "have null heart proc on any mechanical enemy instead of just solus !!! !!"); ModSettingsManager.AddOption((BaseOption)new CheckBoxOption(useMechFlag)); procChance = ((BaseUnityPlugin)this).Config.Bind<int>("Solus Heart Reward", "On hit proc chance", 25, "chance for null heart to proc against enemies !!"); IntSliderConfig val = new IntSliderConfig { formatString = "{0}%", min = 1, max = 100 }; ModSettingsManager.AddOption((BaseOption)new IntSliderOption(procChance, val)); procDamage = ((BaseUnityPlugin)this).Config.Bind<int>("Solus Heart Reward", "Null heart damage", 50, "percent of damage null heart should give extra on proc !!"); IntSliderConfig val2 = new IntSliderConfig { formatString = "{0}%", min = 1, max = 100 }; ModSettingsManager.AddOption((BaseOption)new IntSliderOption(procDamage, val2)); descFormat = ((BaseUnityPlugin)this).Config.Bind<string>("Solus Heart Reward", "description format", "Prevent <style=\"cIsUtility\">{0}</style> from spawning{1}.", "like evil version of lang file for description .,.,., {0} is the list of enemies prevented from spawning and {1} is the proc description !!!!"); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(descFormat)); procFormat = ((BaseUnityPlugin)this).Config.Bind<string>("Solus Heart Reward", "proc format", "and gain a <style=\"cIsUtility\">{0}%</style> chance to deal <style=\"cIsDamage\">{1}%</style> TOTAL damage against {2} enemies", "like evil version of lang file for proc .,.,., {0} is the chance and {1} is the damage !!!! {2} is for if mechanical flag is used instead of solus .,,."); ModSettingsManager.AddOption((BaseOption)new StringInputFieldOption(procFormat)); } private void updateEnemyList() { blacklistArray = blacklist.Value.Replace(" ", "").Replace("body", "").Split(','); string text = ""; string[] array = blacklistArray; foreach (string text2 in array) { GameObject[] bodyPrefabs = BodyCatalog.bodyPrefabs; foreach (GameObject val in bodyPrefabs) { if (string.Equals(((Object)val).name, text2 + "Body", StringComparison.CurrentCultureIgnoreCase) && !((Object)(object)val.GetComponent<CharacterBody>() == (Object)null)) { text = text + Language.GetString(val.GetComponent<CharacterBody>().baseNameToken) + "s</style>, <style=\"cIsUtility\">"; } } } string text3 = text; text = text3.Substring(0, text3.Length - 30); int num = text.LastIndexOf(", ", StringComparison.Ordinal); if (num != -1) { text = text.Remove(num, 2).Insert(num, " and "); } string arg = "solus"; if (useMechFlag.Value) { arg = "mechanical"; } string arg2 = ""; if (enableProc.Value) { arg2 = " " + string.Format(procFormat.Value, procChance.Value, procDamage.Value, arg); } LanguageAPI.Add("ITEM_SOLUSHEARTREWARD_DESC", string.Format(descFormat.Value, text, arg2)); } private void DeathOnOnEnter(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); if (val.TryGotoNext(new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchStloc(x, 7) })) { val.Emit(OpCodes.Ldarg_0); val.EmitDelegate<Func<Death, Quaternion>>((Func<Death, Quaternion>)((Death _) => Quaternion.AngleAxis(360f / (float)(Run.instance.participatingPlayerCount + 1), Vector3.up))); val.Emit(OpCodes.Stloc_S, (byte)6); val.Emit(OpCodes.Ldarg_0); val.Emit(OpCodes.Ldloc_3); val.Emit(OpCodes.Ldloc_S, (byte)5); val.EmitDelegate<Action<Death, Vector3, Vector3>>((Action<Death, Vector3, Vector3>)delegate(Death death, Vector3 vector, Vector3 corepos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex(nullHeart.itemIndex), vector, corepos); }); val.Emit(OpCodes.Ldloc_S, (byte)6); val.Emit(OpCodes.Ldloc_S, (byte)5); val.Emit(OpCodes.Call, (MethodBase)typeof(Quaternion).GetMethod("op_Multiply", new Type[2] { typeof(Quaternion), typeof(Vector3) })); val.Emit(OpCodes.Stloc_S, (byte)5); } else { Log.Fatal("failed il hook on solus heart finale sequence death on enter !!"); } } private void Update() { } } }