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 UltitemsCyan v0.14.2
plugins/UltitemsCyan.dll
Decompiled 3 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.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; using EntityStates.Scrapper; using EntityStates.VoidCamp; using HG; using IL.RoR2; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.RoR2; using On.RoR2.Items; using R2API; using RoR2; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Orbs; using RoR2.Projectile; using UltitemsCyan.Buffs; using UltitemsCyan.Equipment; using UltitemsCyan.Items; using UltitemsCyan.Items.Food; using UltitemsCyan.Items.Lunar; using UltitemsCyan.Items.Tier1; using UltitemsCyan.Items.Tier2; using UltitemsCyan.Items.Tier3; using UltitemsCyan.Items.Untiered; using UltitemsCyan.Items.Void; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("UltitemsCyan")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+cf8bdaf40557034dbf08fd02d41bcc9919021999")] [assembly: AssemblyProduct("UltitemsCyan")] [assembly: AssemblyTitle("UltitemsCyan")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace UltitemsCyan { public class GenericGameEvents { public delegate void DamageAttackerVictimEventHandler(DamageInfo damageInfo, GenericCharacterInfo attackerInfo, GenericCharacterInfo victimInfo); public class GenericDamageEvent : MonoBehaviour, IOnIncomingDamageServerReceiver { public HealthComponent healthComponent; public CharacterBody victimBody; public void Start() { healthComponent = ((Component)this).GetComponent<HealthComponent>(); if (!Object.op_Implicit((Object)(object)healthComponent)) { Object.Destroy((Object)(object)this); } else { victimBody = healthComponent.body; } } public void OnIncomingDamageServer(DamageInfo damageInfo) { GenericCharacterInfo attackerInfo = default(GenericCharacterInfo); if (Object.op_Implicit((Object)(object)damageInfo.attacker)) { attackerInfo = new GenericCharacterInfo(damageInfo.attacker.GetComponent<CharacterBody>()); } GenericCharacterInfo victimInfo = new GenericCharacterInfo(victimBody); GenericGameEvents.BeforeTakeDamage?.Invoke(damageInfo, attackerInfo, victimInfo); } } [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static hook_Awake <>9__4_0; internal void <Init>b__4_0(orig_Awake orig, HealthComponent self) { ((Component)self).gameObject.AddComponent<GenericDamageEvent>(); orig.Invoke(self); } } public static event DamageAttackerVictimEventHandler BeforeTakeDamage; internal static void Init() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown object obj = <>c.<>9__4_0; if (obj == null) { hook_Awake val = delegate(orig_Awake orig, HealthComponent self) { ((Component)self).gameObject.AddComponent<GenericDamageEvent>(); orig.Invoke(self); }; <>c.<>9__4_0 = val; obj = (object)val; } HealthComponent.Awake += (hook_Awake)obj; } } public struct GenericCharacterInfo { public GameObject gameObject; public CharacterBody body; public CharacterMaster master; public TeamComponent teamComponent; public HealthComponent healthComponent; public Inventory inventory; public TeamIndex teamIndex; public Vector3 aimOrigin; public unsafe GenericCharacterInfo(CharacterBody body) { //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_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00a1->IL00a1: Incompatible stack types: Ref vs I4 //IL_0096->IL00a1: Incompatible stack types: I4 vs Ref //IL_0096->IL00a1: Incompatible stack types: Ref vs I4 this.body = body; gameObject = (Object.op_Implicit((Object)(object)body) ? ((Component)body).gameObject : null); master = (Object.op_Implicit((Object)(object)body) ? body.master : null); teamComponent = (Object.op_Implicit((Object)(object)body) ? body.teamComponent : null); healthComponent = (Object.op_Implicit((Object)(object)body) ? body.healthComponent : null); inventory = (Object.op_Implicit((Object)(object)master) ? master.inventory : null); ref GenericCharacterInfo reference = ref this; int num; if (Object.op_Implicit((Object)(object)teamComponent)) { reference = ref *(GenericCharacterInfo*)teamComponent.teamIndex; num = (int)(ref reference); } else { num = 0; reference = ref *(GenericCharacterInfo*)num; num = (int)(ref reference); } Unsafe.Write(&((GenericCharacterInfo*)num)->teamIndex, (TeamIndex)(ref reference)); Vector3 normalized; if (!Object.op_Implicit((Object)(object)body)) { Vector3 insideUnitSphere = Random.insideUnitSphere; normalized = ((Vector3)(ref insideUnitSphere)).normalized; } else { normalized = body.aimOrigin; } aimOrigin = normalized; } } 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); } } public static class UltAssets { public static AssetBundle mainBundle; public static Sprite CremeBruleeSprite; public static Sprite FleaBagSprite; public static Sprite FrisbeeSprite; public static Sprite KoalaStickerSprite; public static Sprite ToyRobotSprite; public static GameObject CremeBruleePrefab; public static GameObject FleaBagPrefab; public static GameObject FrisbeePrefab; public static GameObject KoalaStickerPrefab; public static GameObject ToyRobotPrefab; public static Sprite BirthdayCandleSprite; public static Sprite DegreeScissorsSprite; public static Sprite HMTSprite; public static Sprite OverclockedGPUSprite; public static Sprite TinyIglooSprite; public static Sprite XenonAmpouleSprite; public static GameObject BirthdayCandlePrefab; public static GameObject DegreeScissorsPrefab; public static GameObject HMTPrefab; public static GameObject OverclockedGPUPrefab; public static GameObject TinyIglooPrefab; public static GameObject XenonAmpoulePrefab; public static Sprite CorrodingVaultSprite; public static Sprite GrapevineSprite; public static Sprite PigsSporkSprite; public static Sprite RockyTaffySprite; public static Sprite SuesMandiblesSprite; public static Sprite ViralSmogSprite; public static GameObject CorrodingVaultPrefab; public static GameObject GrapevinePrefab; public static GameObject PigsSporkPrefab; public static GameObject RockyTaffyPrefab; public static GameObject SuesMandiblesPrefab; public static GameObject ViralSmogPrefab; public static Sprite CrysotopeSprite; public static Sprite DownloadedRAMSprite; public static Sprite DriedHamSprite; public static Sprite InhabitedCoffinSprite; public static Sprite JubilantFoeSprite; public static Sprite ResinWhirlpoolSprite; public static Sprite RottenBonesSprite; public static Sprite WormHolesSprite; public static Sprite ZorsePillSprite; public static GameObject DownloadedRAMPrefab; public static GameObject CrysotopePrefab; public static GameObject DriedHamPrefab; public static GameObject InhabitedCoffinPrefab; public static GameObject JubilantFoePrefab; public static GameObject ResinWhirlpoolPrefab; public static GameObject RottenBonesPrefab; public static GameObject WormHolesPrefab; public static GameObject ZorsePillPrefab; public static Sprite DreamFuelSprite; public static Sprite UltravioletBulbSprite; public static Sprite SandPailSprite; public static Sprite SilverThreadSprite; public static GameObject UltravioletBulbPrefab; public static GameObject DreamFuelPrefab; public static GameObject SandPailPrefab; public static GameObject SilverThreadPrefab; public static Sprite CorrodingVaultConsumedSprite; public static Sprite InhabitedCoffinConsumedSprite; public static Sprite SuesMandiblesConsumedSprite; public static Sprite SilverThreadConsumedSprite; public static Sprite UniversalSolventSprite; public static GameObject CorrodingVaultConsumedPrefab; public static GameObject InhabitedCoffinConsumedPrefab; public static GameObject SuesMandiblesConsumedPrefab; public static GameObject SilverThreadConsumedPrefab; public static GameObject UniversalSolventPrefab; public static Sprite IceCubesSprite; public static Sprite OrbitalQuarkSprite; public static Sprite YieldSignSprite; public static Sprite YieldSignStopSprite; public static GameObject IceCubesPrefab; public static GameObject OrbitalQuarkPrefab; public static GameObject YieldSignPrefab; public static GameObject YieldSignStopPrefab; public static Sprite MacroseismographSprite; public static Sprite MacroseismographConsumedSprite; public static Sprite PotOfRegolithSprite; public static Sprite ObsoluteSprite; public static GameObject MacroseismographPrefab; public static GameObject MacroseismographConsumedPrefab; public static GameObject PotOfRegolithPrefab; public static GameObject ObsolutePrefab; public static Sprite BirthdaySprite; public static Sprite CrysotopeFlySprite; public static Sprite DownloadedSprite; public static Sprite DreamSpeedSprite; public static Sprite EyeAwakeSprite; public static Sprite EyeDrowsySprite; public static Sprite EyeSleepySprite; public static Sprite FrisbeeGlideSprite; public static Sprite GrapeSprite; public static Sprite OverclockedSprite; public static Sprite QuarkGravitySprite; public static Sprite ResinBounceSprite; public static Sprite RottingSprite; public static Sprite SporkBleedSprite; public static Sprite SuesTeethSprite; public static Sprite TaffyChewSprite; public static Sprite TickCritSprite; public static Sprite ZorseStarveSprite; public static GameObject PetRockPrefab; public static Sprite PetRockSprite; public static void Init() { string text = Path.Combine(Path.GetDirectoryName(Ultitems.PInfo.Location), "ultitembundle"); Log.Debug("Path of bundle: " + text); mainBundle = AssetBundle.LoadFromFile(text); if ((Object)(object)mainBundle == (Object)null) { Log.Warning("Null Bundle... getting for Debug"); text = Path.Combine(Path.GetDirectoryName(Path.GetDirectoryName(Ultitems.PInfo.Location)), "assetbundle", "ultitembundle"); mainBundle = AssetBundle.LoadFromFile(text); } CremeBruleeSprite = mainBundle.LoadAsset<Sprite>("CremeBrulee.png"); FleaBagSprite = mainBundle.LoadAsset<Sprite>("FleaBag.png"); FrisbeeSprite = mainBundle.LoadAsset<Sprite>("Frisbee.png"); KoalaStickerSprite = mainBundle.LoadAsset<Sprite>("KoalaSticker.png"); ToyRobotSprite = mainBundle.LoadAsset<Sprite>("ToyRobot.png"); CremeBruleePrefab = mainBundle.LoadAsset<GameObject>("CremeBrulee.prefab"); FleaBagPrefab = mainBundle.LoadAsset<GameObject>("FleaBag.prefab"); FrisbeePrefab = mainBundle.LoadAsset<GameObject>("Frisbee.prefab"); KoalaStickerPrefab = mainBundle.LoadAsset<GameObject>("KoalaSticker.prefab"); ToyRobotPrefab = mainBundle.LoadAsset<GameObject>("ToyRobot.prefab"); BirthdayCandleSprite = mainBundle.LoadAsset<Sprite>("BirthdayCandles.png"); DegreeScissorsSprite = mainBundle.LoadAsset<Sprite>("DegreeScissors.png"); HMTSprite = mainBundle.LoadAsset<Sprite>("HMT.png"); OverclockedGPUSprite = mainBundle.LoadAsset<Sprite>("OverclockedGPU.png"); TinyIglooSprite = mainBundle.LoadAsset<Sprite>("TinyIgloo.png"); XenonAmpouleSprite = mainBundle.LoadAsset<Sprite>("XenonAmpoule.png"); BirthdayCandlePrefab = mainBundle.LoadAsset<GameObject>("BirthdayCandle.prefab"); DegreeScissorsPrefab = mainBundle.LoadAsset<GameObject>("DegreeScissors.prefab"); HMTPrefab = mainBundle.LoadAsset<GameObject>("HMT.prefab"); OverclockedGPUPrefab = mainBundle.LoadAsset<GameObject>("OverclockedGPU.prefab"); TinyIglooPrefab = mainBundle.LoadAsset<GameObject>("TinyIgloo.prefab"); XenonAmpoulePrefab = mainBundle.LoadAsset<GameObject>("XenonAmpoule.prefab"); CorrodingVaultSprite = mainBundle.LoadAsset<Sprite>("CorrodingVault.png"); GrapevineSprite = mainBundle.LoadAsset<Sprite>("Grapevine.png"); PigsSporkSprite = mainBundle.LoadAsset<Sprite>("PigsSpork.png"); RockyTaffySprite = mainBundle.LoadAsset<Sprite>("RockyTaffy.png"); SuesMandiblesSprite = mainBundle.LoadAsset<Sprite>("SuesMandibles.png"); ViralSmogSprite = mainBundle.LoadAsset<Sprite>("ViralSmog.png"); CorrodingVaultPrefab = mainBundle.LoadAsset<GameObject>("CorrodingVault.prefab"); GrapevinePrefab = mainBundle.LoadAsset<GameObject>("Grapevine.prefab"); PigsSporkPrefab = mainBundle.LoadAsset<GameObject>("PigsSpork.prefab"); RockyTaffyPrefab = mainBundle.LoadAsset<GameObject>("RockyTaffy.prefab"); SuesMandiblesPrefab = mainBundle.LoadAsset<GameObject>("SuesMandibles.prefab"); ViralSmogPrefab = mainBundle.LoadAsset<GameObject>("ViralSmog.prefab"); CrysotopeSprite = mainBundle.LoadAsset<Sprite>("Chrysotope.png"); DownloadedRAMSprite = mainBundle.LoadAsset<Sprite>("DownloadedRAM.png"); DriedHamSprite = mainBundle.LoadAsset<Sprite>("DriedHam.png"); InhabitedCoffinSprite = mainBundle.LoadAsset<Sprite>("InhabitedCoffin.png"); JubilantFoeSprite = mainBundle.LoadAsset<Sprite>("JubilantFoe.png"); ResinWhirlpoolSprite = mainBundle.LoadAsset<Sprite>("ResinWhirlpool.png"); RottenBonesSprite = mainBundle.LoadAsset<Sprite>("RottenBones.png"); WormHolesSprite = mainBundle.LoadAsset<Sprite>("WormHoles.png"); ZorsePillSprite = mainBundle.LoadAsset<Sprite>("ZorsePill.png"); CrysotopePrefab = mainBundle.LoadAsset<GameObject>("Chrysotope.prefab"); DownloadedRAMPrefab = mainBundle.LoadAsset<GameObject>("DownloadedRAM.prefab"); DriedHamPrefab = mainBundle.LoadAsset<GameObject>("DriedHam.prefab"); InhabitedCoffinPrefab = mainBundle.LoadAsset<GameObject>("InhabitedCoffin.prefab"); JubilantFoePrefab = mainBundle.LoadAsset<GameObject>("JubilantFoe.prefab"); ResinWhirlpoolPrefab = mainBundle.LoadAsset<GameObject>("ResinWhirlpool.prefab"); RottenBonesPrefab = mainBundle.LoadAsset<GameObject>("RottenBones.prefab"); WormHolesPrefab = mainBundle.LoadAsset<GameObject>("WormHoles.prefab"); ZorsePillPrefab = mainBundle.LoadAsset<GameObject>("ZorsePill.prefab"); DreamFuelSprite = mainBundle.LoadAsset<Sprite>("DreamFuel.png"); UltravioletBulbSprite = mainBundle.LoadAsset<Sprite>("UltravioletBulb.png"); SandPailSprite = mainBundle.LoadAsset<Sprite>("SandPail.png"); SilverThreadSprite = mainBundle.LoadAsset<Sprite>("SilverThread.png"); DreamFuelPrefab = mainBundle.LoadAsset<GameObject>("DreamFuel.prefab"); UltravioletBulbPrefab = mainBundle.LoadAsset<GameObject>("UltravioletBulb.prefab"); SandPailPrefab = mainBundle.LoadAsset<GameObject>("SandPail.prefab"); SilverThreadPrefab = mainBundle.LoadAsset<GameObject>("SilverThread.prefab"); CorrodingVaultConsumedSprite = mainBundle.LoadAsset<Sprite>("CorrodingVaultConsumed.png"); InhabitedCoffinConsumedSprite = mainBundle.LoadAsset<Sprite>("InhabitedCoffinConsumed.png"); SilverThreadConsumedSprite = mainBundle.LoadAsset<Sprite>("SilverThreadConsumed.png"); SuesMandiblesConsumedSprite = mainBundle.LoadAsset<Sprite>("SuesMandiblesConsumed.png"); UniversalSolventSprite = mainBundle.LoadAsset<Sprite>("UniversalSolvent.png"); CorrodingVaultConsumedPrefab = mainBundle.LoadAsset<GameObject>("CorrodingVaultConsumed.prefab"); InhabitedCoffinConsumedPrefab = mainBundle.LoadAsset<GameObject>("InhabitedCoffinConsumed.prefab"); SilverThreadConsumedPrefab = mainBundle.LoadAsset<GameObject>("SilverThreadConsumed.prefab"); SuesMandiblesConsumedPrefab = mainBundle.LoadAsset<GameObject>("SuesMandiblesConsumed.prefab"); UniversalSolventPrefab = mainBundle.LoadAsset<GameObject>("UniversalSolvent.prefab"); IceCubesSprite = mainBundle.LoadAsset<Sprite>("IceCubes.png"); OrbitalQuarkSprite = mainBundle.LoadAsset<Sprite>("OrbitalQuark.png"); YieldSignSprite = mainBundle.LoadAsset<Sprite>("YieldSign.png"); YieldSignStopSprite = mainBundle.LoadAsset<Sprite>("YieldSignStop.png"); IceCubesPrefab = mainBundle.LoadAsset<GameObject>("IceCubes.prefab"); OrbitalQuarkPrefab = mainBundle.LoadAsset<GameObject>("OrbitalQuark.prefab"); YieldSignPrefab = mainBundle.LoadAsset<GameObject>("YieldSign.prefab"); YieldSignStopPrefab = mainBundle.LoadAsset<GameObject>("YieldSignStop.prefab"); MacroseismographSprite = mainBundle.LoadAsset<Sprite>("Macroseismograph.png"); MacroseismographConsumedSprite = mainBundle.LoadAsset<Sprite>("MacroseismographConsumed.png"); PotOfRegolithSprite = mainBundle.LoadAsset<Sprite>("PotOfRegolith.png"); ObsoluteSprite = mainBundle.LoadAsset<Sprite>("UniversalSolute.png"); MacroseismographPrefab = mainBundle.LoadAsset<GameObject>("Macroseismograph.prefab"); MacroseismographConsumedPrefab = mainBundle.LoadAsset<GameObject>("MacroseismographConsumed.prefab"); PotOfRegolithPrefab = mainBundle.LoadAsset<GameObject>("PotOfRegolith.prefab"); ObsolutePrefab = mainBundle.LoadAsset<GameObject>("UniversalSolute.prefab"); BirthdaySprite = mainBundle.LoadAsset<Sprite>("Birthday"); CrysotopeFlySprite = mainBundle.LoadAsset<Sprite>("CrysotopeFly"); DownloadedSprite = mainBundle.LoadAsset<Sprite>("Downloaded"); DreamSpeedSprite = mainBundle.LoadAsset<Sprite>("DreamSpeed"); EyeDrowsySprite = mainBundle.LoadAsset<Sprite>("EyeDrowsy"); EyeAwakeSprite = mainBundle.LoadAsset<Sprite>("EyeAwake"); EyeSleepySprite = mainBundle.LoadAsset<Sprite>("EyeSleepy"); FrisbeeGlideSprite = mainBundle.LoadAsset<Sprite>("FrisbeeGlide"); GrapeSprite = mainBundle.LoadAsset<Sprite>("Grape"); OverclockedSprite = mainBundle.LoadAsset<Sprite>("Overclocked"); QuarkGravitySprite = mainBundle.LoadAsset<Sprite>("QuarkGravity"); ResinBounceSprite = mainBundle.LoadAsset<Sprite>("ResinBounce"); RottingSprite = mainBundle.LoadAsset<Sprite>("Rotting"); SporkBleedSprite = mainBundle.LoadAsset<Sprite>("SporkBleed"); SuesTeethSprite = mainBundle.LoadAsset<Sprite>("SuesTeeth"); TaffyChewSprite = mainBundle.LoadAsset<Sprite>("TaffyChew"); TickCritSprite = mainBundle.LoadAsset<Sprite>("TickCrit"); ZorseStarveSprite = mainBundle.LoadAsset<Sprite>("ZorseStarve"); PetRockPrefab = mainBundle.LoadAsset<GameObject>("PetRock"); PetRockSprite = mainBundle.LoadAsset<Sprite>("PetRock"); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("SporkySpig.UltitemsCyan", "UltitemsCyan", "0.14.2")] public class Ultitems : BaseUnityPlugin { public struct Ingredient { public int index; public bool isEquipment; public Ingredient(ItemIndex item) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected I4, but got Unknown index = (int)item; isEquipment = false; } public Ingredient(EquipmentIndex equip) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected I4, but got Unknown index = (int)equip; isEquipment = true; } public static implicit operator Ingredient(ItemIndex item) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return new Ingredient(item); } public static implicit operator Ingredient(EquipmentIndex equip) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return new Ingredient(equip); } public readonly int GetInt() { return index; } public readonly Object GetObject() { if (isEquipment) { return (Object)(object)(EquipmentCatalog.GetEquipmentDef((EquipmentIndex)index) ?? null); } return (Object)(object)(ItemCatalog.GetItemDef((ItemIndex)index) ?? null); } } public class MyUltRecipes : IContentPackProvider { [CompilerGenerated] private sealed class <FinalizeAsync>d__8 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public FinalizeAsyncArgs args; public MyUltRecipes <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <FinalizeAsync>d__8(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Warning("-JY Finalize"); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <GenerateContentPackAsync>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GetContentPackAsyncArgs args; public MyUltRecipes <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <GenerateContentPackAsync>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Warning("-JY Generate"); ContentPack.Copy(<>4__this.contentPack, args.output); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class <LoadStaticContentAsync>d__6 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public LoadStaticContentAsyncArgs args; public MyUltRecipes <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <LoadStaticContentAsync>d__6(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { if (<>1__state != 0) { return false; } <>1__state = -1; Log.Warning("-JY Load Static"); <>4__this.contentPack.identifier = <>4__this.identifier; <>4__this.contentPack.craftableDefs.Add(Recipies.ToArray()); args.ReportProgress(1f); return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal ContentPack contentPack = new ContentPack(); public static List<CraftableDef> Recipies = new List<CraftableDef>(); public string identifier => "Bluefishracer.UltitemsCyanRecipes"; public void Initialise() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(AddSelf); } private void AddSelf(AddContentPackProviderDelegate add) { add.Invoke((IContentPackProvider)(object)this); } [IteratorStateMachine(typeof(<LoadStaticContentAsync>d__6))] public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <LoadStaticContentAsync>d__6(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<GenerateContentPackAsync>d__7))] public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <GenerateContentPackAsync>d__7(0) { <>4__this = this, args = args }; } [IteratorStateMachine(typeof(<FinalizeAsync>d__8))] public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <FinalizeAsync>d__8(0) { <>4__this = this, args = args }; } } public static float stageStartTime; public const string PluginGUID = "SporkySpig.UltitemsCyan"; public const string PluginAuthor = "SporkySpig"; public const string PluginName = "UltitemsCyan"; public const string PluginVersion = "0.14.2"; public const string PluginSuffix = "Deluged Printers?!?!"; public static List<Pair> CorruptionPairs = new List<Pair>(); public int ultRecipesIndex = 0; public const int numRecipies = 20; public static Sprite mysterySprite = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Common/MiscIcons/texMysteryIcon.png").WaitForCompletion(); public static GameObject mysteryPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Mystery/PickupMystery.prefab").WaitForCompletion(); private static ConfigFile UltitemsConfig { get; set; } public static PluginInfo PInfo { get; private set; } public void Awake() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_03af: Unknown result type (might be due to invalid IL or missing references) //IL_03ec: Unknown result type (might be due to invalid IL or missing references) //IL_03f6: Expected O, but got Unknown Log.Init(((BaseUnityPlugin)this).Logger); PInfo = ((BaseUnityPlugin)this).Info; UltitemsConfig = new ConfigFile(Paths.ConfigPath + "\\Ultitems_ConfigFile.cfg", true); UltAssets.Init(); GenericGameEvents.Init(); List<BuffBase> list = new List<BuffBase>(); list.Add(new BirthdayBuff()); list.Add(new CrysotopeFlyingBuff()); list.Add(new EyeAwakeBuff()); list.Add(new EyeDrowsyBuff()); list.Add(new EyeSleepyBuff()); list.Add(new DreamSpeedBuff()); list.Add(new DownloadedBuff()); list.Add(new FrisbeeGlidingBuff()); list.Add(new OverclockedBuff()); list.Add(new RottingBuff()); list.Add(new SlipperyGrapeBuff()); list.Add(new QuarkGravityBuff()); list.Add(new SuesTeethBuff()); list.Add(new SporkBleedBuff()); list.Add(new TaffyChewBuff()); list.Add(new TickCritBuff()); list.Add(new ZorseStarvingBuff()); foreach (BuffBase item in list) { item.Init(); } List<ItemBase> list2 = new List<ItemBase>(); list2.Add(new CorrodingVaultConsumed()); list2.Add(new InhabitedCoffinConsumed()); list2.Add(new SuesMandiblesConsumed()); list2.Add(new SilverThreadConsumed()); list2.Add(new GreySolvent()); list2.Add(new CremeBrulee()); list2.Add(new KoalaSticker()); list2.Add(new ToyRobot()); list2.Add(new FleaBag()); list2.Add(new Frisbee()); list2.Add(new BirthdayCandles()); list2.Add(new HMT()); list2.Add(new OverclockedGPU()); list2.Add(new TinyIgloo()); list2.Add(new XenonAmpoule()); list2.Add(new CorrodingVault()); list2.Add(new Grapevine()); list2.Add(new PigsSpork()); list2.Add(new RockyTaffy()); list2.Add(new SuesMandibles()); list2.Add(new ViralEssence()); list2.Add(new DreamFuel()); list2.Add(new UltravioletBulb()); list2.Add(new SilverThread()); list2.Add(new DelugedPail()); list2.Add(new IceCubes()); list2.Add(new OrbitalQuark()); list2.Add(new YieldSign()); list2.Add(new YieldSignStop()); list2.Add(new Macroseismograph()); list2.Add(new MacroseismographConsumed()); list2.Add(new PotOfRegolith()); list2.Add(new Obsolute()); list2.Add(new Crysotope()); list2.Add(new DriedHam()); list2.Add(new JealousFoe()); list2.Add(new RottenBones()); list2.Add(new DownloadedRAM()); list2.Add(new ZorsePill()); list2.Add(new InhabitedCoffin()); list2.Add(new WormHoles()); list2.Add(new Permaglaze()); list2.Add(new DegreeScissors()); foreach (ItemBase item2 in list2) { item2.Init(UltitemsConfig); if (Object.op_Implicit((Object)(object)item2.GetTransformItem)) { CorruptionPairs.Add(new Pair { itemDef1 = item2.GetTransformItem, itemDef2 = item2.GetItemDef }); } } Stage.onStageStartGlobal += Stage_onStageStartGlobal; ContagiousItemManager.Init += new hook_Init(ContagiousItemManager_Init); for (int i = 0; i < 20; i++) { CraftableDef val = ScriptableObject.CreateInstance<CraftableDef>(); ((Object)val).name = "Ultitems Cyan Recipe #" + (i + 1); MyUltRecipes.Recipies.Add(val); } new MyUltRecipes().Initialise(); ((ResourceAvailability)(ref PickupCatalog.availability)).CallWhenAvailable((Action)DefineRecipes); Log.Warning("Ultitems Cyan Done: 0.14.2 <- Deluged Printers?!?!"); } private void DefineRecipes() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0048: 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_0084: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0190: 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_01cc: 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_01fe: 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_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_02a5: Unknown result type (might be due to invalid IL or missing references) //IL_02bb: Unknown result type (might be due to invalid IL or missing references) //IL_02d7: Unknown result type (might be due to invalid IL or missing references) //IL_02f7: Unknown result type (might be due to invalid IL or missing references) //IL_030d: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_0349: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03cd: Unknown result type (might be due to invalid IL or missing references) //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_0403: Unknown result type (might be due to invalid IL or missing references) //IL_041f: Unknown result type (might be due to invalid IL or missing references) //IL_043f: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0471: Unknown result type (might be due to invalid IL or missing references) //IL_0491: Unknown result type (might be due to invalid IL or missing references) //IL_04a7: Unknown result type (might be due to invalid IL or missing references) //IL_04c3: Unknown result type (might be due to invalid IL or missing references) //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0535: Unknown result type (might be due to invalid IL or missing references) //IL_054b: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) //IL_0587: 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_05bc: 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_05ee: Unknown result type (might be due to invalid IL or missing references) //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0624: Unknown result type (might be due to invalid IL or missing references) //IL_0643: Unknown result type (might be due to invalid IL or missing references) //IL_0659: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_0695: Unknown result type (might be due to invalid IL or missing references) //IL_06ab: Unknown result type (might be due to invalid IL or missing references) //IL_06ca: Unknown result type (might be due to invalid IL or missing references) //IL_06e0: Unknown result type (might be due to invalid IL or missing references) //IL_06fc: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Unknown result type (might be due to invalid IL or missing references) //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) Log.Warning(":: ~~ Define Recipes ~~ ::"); FillRecipes(Items.WardOnLevel.itemIndex, 2, new Ingredient[1][] { new Ingredient[2] { Items.ScrapWhite.itemIndex, TinyIgloo.item.itemIndex } }); FillRecipes(Items.SecondarySkillMagazine.itemIndex, 4, new Ingredient[1][] { new Ingredient[2] { Items.ScrapWhite.itemIndex, UltravioletBulb.item.itemIndex } }); FillRecipes(Frisbee.item.itemIndex, 2, new Ingredient[1][] { new Ingredient[2] { Items.ScrapWhite.itemIndex, Items.JumpBoost.itemIndex } }); FillRecipes(ToyRobot.item.itemIndex, 2, new Ingredient[1][] { new Ingredient[2] { Items.ScrapWhite.itemIndex, Items.SpeedOnPickup.itemIndex } }); FillRecipes(ToyRobot.item.itemIndex, 4, new Ingredient[1][] { new Ingredient[2] { Items.ScrapWhite.itemIndex, Items.DroneWeapons.itemIndex } }); FillRecipes(Items.Feather.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { Frisbee.item.itemIndex, Items.JumpDamageStrike.itemIndex } }); FillRecipes(Items.EquipmentMagazine.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { XenonAmpoule.item.itemIndex, Items.SecondarySkillMagazine.itemIndex } }); FillRecipes(Items.SpeedOnPickup.itemIndex, 1, new Ingredient[2][] { new Ingredient[2] { FleaBag.item.itemIndex, Items.BonusGoldPackOnKill.itemIndex }, new Ingredient[2] { FleaBag.item.itemIndex, Items.Bandolier.itemIndex } }); FillRecipes(TinyIgloo.item.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { Items.AttackSpeedPerNearbyAllyOrEnemy.itemIndex, Items.IceRing.itemIndex } }); FillRecipes(DegreeScissors.item.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { Items.TreasureCache.itemIndex, BirthdayCandles.item.itemIndex } }); FillRecipes(HMT.item.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { Items.IgniteOnKill.itemIndex, Items.BonusGoldPackOnKill.itemIndex } }); FillRecipes(HMT.item.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { Items.ScrapGreen.itemIndex, Items.LaserTurbine.itemIndex } }); FillRecipes(Items.NovaOnHeal.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { TinyIgloo.item.itemIndex, Items.Squid.itemIndex } }); FillRecipes(Items.Talisman.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { OverclockedGPU.item.itemIndex, Items.DeathMark.itemIndex } }); FillRecipes(Items.ImmuneToDebuff.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { IceCubes.equipment.equipmentIndex, Items.Phasing.itemIndex } }); FillRecipes(Items.Duplicator.itemIndex, 1, new Ingredient[1][] { new Ingredient[2] { DegreeScissors.item.itemIndex, DegreeScissors.item.itemIndex } }); FillRecipes(SuesMandibles.item.itemIndex, 1, new Ingredient[2][] { new Ingredient[2] { SuesMandiblesConsumed.item.itemIndex, Items.ShinyPearl.itemIndex }, new Ingredient[2] { SuesMandiblesConsumed.item.itemIndex, Equipment.FireBallDash.equipmentIndex } }); FillRecipes(PigsSpork.item.itemIndex, 1, new Ingredient[2][] { new Ingredient[2] { Items.TeleportOnLowHealth.itemIndex, Items.TriggerEnemyDebuffs.itemIndex }, new Ingredient[2] { Items.TeleportOnLowHealth.itemIndex, Items.ExplodeOnDeath.itemIndex } }); FillRecipes(YieldSign.equipment.equipmentIndex, 1, new Ingredient[2][] { new Ingredient[2] { Items.Crowbar.itemIndex, Items.MoveSpeedOnKill.itemIndex }, new Ingredient[2] { Items.Crowbar.itemIndex, Items.SprintOutOfCombat.itemIndex } }); FillRecipes(Permaglaze.item.itemIndex, 1, new Ingredient[2][] { new Ingredient[2] { IceCubes.equipment.equipmentIndex, RockyTaffy.item.itemIndex }, new Ingredient[2] { IceCubes.equipment.equipmentIndex, Items.Icicle.itemIndex } }); } private void FillRecipes(Ingredient product, int quantity, Ingredient[][] ingrediantList) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Expected O, but got Unknown //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown CraftableDef val = MyUltRecipes.Recipies[ultRecipesIndex]; ultRecipesIndex++; int num = ingrediantList.Length; Recipe[] array = (Recipe[])(object)new Recipe[num]; for (int i = 0; i < num; i++) { Recipe val2 = new Recipe(); val2.amountToDrop = quantity; val2.ingredients = (RecipeIngredient[])(object)new RecipeIngredient[2] { new RecipeIngredient { pickup = (ingrediantList[i][0].GetObject() ?? null) }, new RecipeIngredient { pickup = (ingrediantList[i][1].GetObject() ?? null) } }; Recipe val3 = val2; array[i] = val3; } val.pickup = product.GetObject() ?? null; val.recipes = array; } private void Stage_onStageStartGlobal(Stage obj) { stageStartTime = Run.instance.time; } public void ContagiousItemManager_Init(orig_Init orig) { List<Pair> first = ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem].ToList(); PrintPairList(CorruptionPairs); ItemCatalog.itemRelationships[ItemRelationshipTypes.ContagiousItem] = first.Union(CorruptionPairs).ToArray(); Log.Debug("End of Ultitems init"); orig.Invoke(); } private void PrintPairList(List<Pair> list) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) foreach (Pair item in list) { Log.Debug(". " + ((Object)item.itemDef1).name + " -> " + ((Object)item.itemDef2).name); } } } } namespace UltitemsCyan.Text { internal class ArchivedCode { } } namespace UltitemsCyan.Items { public abstract class ItemBase { private readonly ExpansionDef Sovt = ((IEnumerable<ExpansionDef>)(object)ExpansionCatalog.expansionDefs).FirstOrDefault((Func<ExpansionDef, bool>)((ExpansionDef expansion) => expansion.nameToken == "DLC1_NAME")); public ItemDef GetItemDef { get; set; } public EquipmentDef GetEquipmentDef { get; set; } public ItemDef GetTransformItem { get; set; } public abstract void Init(ConfigFile configs); public ItemDef CreateItemDef(string tokenPrefix, string name, string pick, string desc, string lore, ItemTier tier, Sprite sprite, GameObject prefab, ItemTag[] tags, ItemDef transformItem = null, bool isConsumed = false) { //IL_00b6: 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) //IL_00c9: Invalid comparison between Unknown and I4 //IL_00f3: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Expected O, but got Unknown //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown ItemDef val = ScriptableObject.CreateInstance<ItemDef>(); LanguageAPI.Add(tokenPrefix + "_NAME", name); LanguageAPI.Add(tokenPrefix + "_PICK", pick); LanguageAPI.Add(tokenPrefix + "_DESC", desc); LanguageAPI.Add(tokenPrefix + "_LORE", lore); ((Object)val).name = tokenPrefix + "_NAME"; val.nameToken = tokenPrefix + "_NAME"; val.pickupToken = tokenPrefix + "_PICK"; val.descriptionToken = tokenPrefix + "_DESC"; val.loreToken = tokenPrefix + "_LORE"; val.isConsumed = isConsumed; ItemTierDef val2 = ScriptableObject.CreateInstance<ItemTierDef>(); val2.tier = tier; val._itemTierDef = val2; val.canRemove = (int)tier != 5; val.hidden = false; val.pickupIconSprite = sprite; val.pickupModelPrefab = prefab; val.tags = tags; ItemDisplayRuleDict val3 = new ItemDisplayRuleDict((ItemDisplayRule[])null); ItemAPI.Add(new CustomItem(val, val3)); Hooks(); GetItemDef = val; if (Object.op_Implicit((Object)(object)transformItem)) { GetTransformItem = transformItem; val.requiredExpansion = Sovt; } return val; } public bool CheckItemEnabledConfig(string name, string tier, ConfigFile configs) { return configs.Bind<bool>("Enable " + tier + " Items", "Enable " + name + "?", true, (ConfigDescription)null).Value; } protected abstract void Hooks(); } public class PowerChips : ItemBase { public static ItemDef item; private const float dontResetFraction = 0.5f; public override void Init(ConfigFile configs) { string name = "Power Chips"; if (CheckItemEnabledConfig(name, "Lunar", configs)) { item = CreateItemDef("POWERCHIPS", name, "a", "b", "c", (ItemTier)3, Ultitems.mysterySprite, Ultitems.mysteryPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }); } } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown ChestBehavior.ItemDrop += new hook_ItemDrop(ChestBehavior_ItemDrop); } private void ChestBehavior_ItemDrop(orig_ItemDrop orig, ChestBehavior self) { } } } namespace UltitemsCyan.Items.Void { public class Crysotope : ItemBase { public class CrysotopeBehavior : ItemBehavior { private CharacterMotor characterMotor; private const float baseDuration = 0.6f; private const float durationPerStack = 0.4f; public float flyingStopwatch = 0f; private bool _canHaveBuff = false; public bool CanHaveBuff { get { return _canHaveBuff; } set { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (_canHaveBuff != value) { _canHaveBuff = value; if (!_canHaveBuff) { base.body.SetBuffCount(CrysotopeFlyingBuff.buff.buffIndex, 0); } } } } public void UpdateStopwatch(float newTime) { flyingStopwatch = newTime; } public void FixedUpdate() { if (Object.op_Implicit((Object)(object)characterMotor)) { CanHaveBuff = !characterMotor.isGrounded && base.body.inputBank.jump.down && Run.instance.time <= flyingStopwatch + 0.6f + 0.4f * (float)(base.stack - 1); if (base.body.HasBuff(CrysotopeFlyingBuff.buff) && base.body.characterMotor.velocity.y < 18f) { base.body.characterMotor.velocity.y = (base.body.characterMotor.velocity.y - 18f) * 0.9f + 18f; } } } public void Start() { characterMotor = base.body.characterMotor; ((Behaviour)this).enabled = false; } private void OnDisable() { flyingStopwatch = 0f; CanHaveBuff = false; } public void OnDestroy() { flyingStopwatch = 0f; CanHaveBuff = false; } } public static ItemDef item; public static ItemDef transformItem; public const float dampeningForce = 0.9f; public const float riseSpeed = 18f; public const float baseDuration = 0.6f; public const float durationPerStack = 0.4f; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Crysotope", "Void", configs)) { item = CreateItemDef("CRYSOTOPE", "Crysotope", "Rise after jumping. Hold jump to continue flying. <style=cIsVoid>Corrupts all Frisbees</style>.", "Rise after jumping for <style=cIsUtility>0.6</style> <style=cStack>(+0.4 per stack)</style> seconds. Hold jump to keep flying. <style=cIsVoid>Corrupts all Frisbees</style>.", "An eyeless crystal snake capbable of flying 100 meters", (ItemTier)6, UltAssets.CrysotopeSprite, UltAssets.CrysotopePrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, Frisbee.item); } } protected override void Hooks() { //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 CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); GenericCharacterMain.ProcessJump += new hook_ProcessJump(GenericCharacterMain_ProcessJump); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { self.AddItemBehavior<CrysotopeBehavior>(self.inventory.GetItemCountEffective(item)); } } private void GenericCharacterMain_ProcessJump(orig_ProcessJump orig, GenericCharacterMain self) { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody) && Object.op_Implicit((Object)(object)((EntityState)self).characterBody.inventory)) { CharacterBody characterBody = ((EntityState)self).characterBody; int itemCountEffective = characterBody.inventory.GetItemCountEffective(item); if (itemCountEffective > 0 && ((BaseCharacterMain)self).hasCharacterMotor && self.jumpInputReceived && ((EntityState)self).characterMotor.jumpCount < ((EntityState)self).characterBody.maxJumpCount) { CrysotopeBehavior component = ((Component)((EntityState)self).characterBody).GetComponent<CrysotopeBehavior>(); ((Behaviour)component).enabled = true; component.UpdateStopwatch(Run.instance.time); characterBody.SetBuffCount(CrysotopeFlyingBuff.buff.buffIndex, 1); } } orig.Invoke(self); } } public class DownloadedRAM : ItemBase { public class DownloadedVoidBehavior : ItemBehavior { public float attackingStopwatch = 0f; private bool _attacking = false; public bool DealingDamage { get { return _attacking; } set { //IL_0032: Unknown result type (might be due to invalid IL or missing references) if (_attacking != value) { _attacking = value; if (!_attacking) { base.body.SetBuffCount(DownloadedBuff.buff.buffIndex, 0); ((Behaviour)this).enabled = false; } } } } public void UpdateStopwatch(float newTime) { attackingStopwatch = newTime; } private void OnAwake() { ((Behaviour)this).enabled = false; } private void OnDisable() { attackingStopwatch = 0f; DealingDamage = false; } private void FixedUpdate() { DealingDamage = Run.instance.time <= attackingStopwatch + 4f; } } public readonly GameObject ImpEffect = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/EliteVoid/VoidInfestorLeapEffect.prefab").WaitForCompletion(); public static ItemDef item; public static ItemDef transformItem; public const float downloadedBuffMultiplier = 20f; public const int downloadsPerItem = 4; public const float plugeSpeed = 8f; public const float plugeSpeedDivisor = 2f; private const float downloadChance = 12f; public const float notAttackingDelay = 4f; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Downloaded RAM", "Void", configs)) { item = CreateItemDef("DOWNLOADEDRAM", "Downloaded RAM", "Chance on hit to temporarily increase damage. Dealing damage refreshes the timer. <style=cIsVoid>Corrupts all Overclocked GPUs</style>.", "<style=cIsDamage>12%</style> chance on hit to increase your damage by <style=cIsDamage>8%</style>, up to <style=cIsDamage>4</style> <style=cStack>(+4 per stack)</style>, for 4s. Dealing damage refreshes the timer. <style=cIsVoid>Corrupts all Overclocked GPUs</style>.", "Wow I can't belive it worked! I thought for sure it was a scam!", (ItemTier)7, UltAssets.DownloadedRAMSprite, UltAssets.DownloadedRAMPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, OverclockedGPU.item); } } protected override void Hooks() { //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 CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { self.AddItemBehavior<DownloadedVoidBehavior>(self.inventory.GetItemCountEffective(item)); } } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Invalid comparison between Unknown and I4 //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown orig.Invoke(self, damageInfo, victim); try { if (!NetworkServer.active || !Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)victim) || !Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) || !Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) || damageInfo.rejected || (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) == 67108864) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); int itemCountEffective = component.inventory.GetItemCountEffective(item); if (itemCountEffective <= 0) { return; } DownloadedVoidBehavior component2 = ((Component)component).GetComponent<DownloadedVoidBehavior>(); ((Behaviour)component2).enabled = true; component2.UpdateStopwatch(Run.instance.time); if (Util.CheckRoll(12f, component.master.luck, (CharacterMaster)null)) { CharacterBody component3 = victim.GetComponent<CharacterBody>(); if (!((Object)(object)component3 != (Object)null) || Object.op_Implicit((Object)(object)component3.characterMotor)) { } EffectManager.SpawnEffect(ImpEffect, new EffectData { origin = component3.corePosition }, true); if (component.GetBuffCount(DownloadedBuff.buff) < itemCountEffective * 4) { component.AddBuff(DownloadedBuff.buff); } } } catch (NullReferenceException) { } } } public class DriedHam : ItemBase { public static ItemDef item; public static ItemDef transformItem; private const float threshold = 35f; private const float flatHealing = 4f; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Dried Ham", "Void", configs)) { item = CreateItemDef("DRIEDHAM", "Dried Ham", "Heal when hitting enemies below 35% health. <style=cIsVoid>Corrupts all Crème Brûlées</style>.", "<style=cIsHealing>Heal</style> for <style=cIsHealing>4</style> <style=cStack>(+5 per stack)</style> when dealing damage to enemies below <style=cIsDamage>35% health</style>. <style=cIsVoid>Corrupts all Crème Brûlées</style>.", "The bitter aftertaste is just the spoilage", (ItemTier)6, UltAssets.DriedHamSprite, UltAssets.DriedHamPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)2 }, CremeBrulee.item); } } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Invalid comparison between Unknown and I4 //IL_00a4: Unknown result type (might be due to invalid IL or missing references) try { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) && !damageInfo.rejected && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) != 67108864) { CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); int itemCountEffective = component.inventory.GetItemCountEffective(item); if (itemCountEffective > 0 && self.combinedHealthFraction <= 0.35f) { component.healthComponent.Heal(4f * (float)itemCountEffective, damageInfo.procChainMask, true); Util.PlaySound("Play_item_proc_thorns", ((Component)component).gameObject); } } } catch (NullReferenceException) { } orig.Invoke(self, damageInfo); } } public class InhabitedCoffin : ItemBase { public static ItemDef item; public static ItemDef transformItem; private const float freeCoffinChance = 20f; private const int minimumInCoffin = 5; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Inhabited Coffin", "Void", configs)) { Sprite inhabitedCoffinSprite = UltAssets.InhabitedCoffinSprite; GameObject inhabitedCoffinPrefab = UltAssets.InhabitedCoffinPrefab; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); item = CreateItemDef("INHABITEDCOFFIN", "Inhabited Coffin", "Breaks at the start of the next stage. Contains void items. <style=cIsVoid>Corrupts all Corroding Vaults</style>.", "At the start of each stage, this item will <style=cIsUtility>break</style> and gives <style=cIsUtility>5</style> random void items. <style=cIsUtility>Bad luck</style> grants more Coffins. <style=cIsVoid>Corrupts all Corroding Vaults</style>.", "Something lives inside this coffin. That coffin is deeper than you think.", (ItemTier)8, inhabitedCoffinSprite, inhabitedCoffinPrefab, (ItemTag[])(object)array, CorrodingVault.item); } } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Stage.BeginServer += new hook_BeginServer(Stage_BeginServer); } private void Stage_BeginServer(orig_BeginServer orig, Stage self) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_008e: 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_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Expected O, but got Unknown //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: 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) orig.Invoke(self); if (!NetworkServer.active) { return; } TryTransformResult val2 = default(TryTransformResult); foreach (CharacterMaster readOnlyInstances in CharacterMaster.readOnlyInstancesList) { if (!Object.op_Implicit((Object)(object)readOnlyInstances.inventory)) { continue; } int itemCountEffective = readOnlyInstances.inventory.GetItemCountEffective(item.itemIndex); if (itemCountEffective <= 0) { continue; } ItemTransformation val = default(ItemTransformation); ((ItemTransformation)(ref val)).originalItemIndex = item.itemIndex; ((ItemTransformation)(ref val)).newItemIndex = InhabitedCoffinConsumed.item.itemIndex; ((ItemTransformation)(ref val)).maxToTransform = 1; val.transformationType = (ItemTransformationTypeIndex)0; if (((ItemTransformation)(ref val)).TryTransform(readOnlyInstances.inventory, ref val2)) { List<PickupIndex>[] array = new List<PickupIndex>[4] { Run.instance.availableVoidTier1DropList, Run.instance.availableVoidTier2DropList, Run.instance.availableVoidTier3DropList, Run.instance.availableVoidBossDropList }; int num = array[0].Count + array[1].Count + array[2].Count + array[3].Count; int num2; if (Util.CheckRoll(80f, readOnlyInstances.luck, (CharacterMaster)null)) { num2 = 5; } else { readOnlyInstances.inventory.GiveItemPermanent(item, 1); GenericPickupController.SendPickupMessage(readOnlyInstances, new UniquePickup(PickupCatalog.itemIndexToPickupIndex[item.itemIndex])); num2 = 4; } Xoroshiro128Plus val3 = new Xoroshiro128Plus(Run.instance.stageRng.nextUlong); for (int i = 0; i < num2; i++) { int index = val3.RangeInt(0, num); PickupIndex voidItem = GetVoidItem(array, index); readOnlyInstances.inventory.GiveItemPermanent(PickupCatalog.GetPickupDef(voidItem).itemIndex, 1); GenericPickupController.SendPickupMessage(readOnlyInstances, new UniquePickup(voidItem)); } } } } private PickupIndex GetVoidItem(List<PickupIndex>[] items, int index) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < items.Length; i++) { if (index >= items[i].Count) { index -= items[i].Count; continue; } return items[i][index]; } return PickupIndex.none; } } public class JealousFoe : ItemBase { public enum EyePhase { collecting, consuming, cooldown } public class JealousFoeBehaviour : ItemBehavior { private EyePhase _currentPhase = EyePhase.collecting; public float eyePhaseStopwatch = float.PositiveInfinity; public float currentTimer = 6f; private GameObject FakeFoe; public void SetCollectingPhase() { if (_currentPhase == EyePhase.cooldown) { Log.Debug(" ! ! ! ! ! ! Phase Set ! ! Coll Lecting"); _currentPhase = EyePhase.collecting; } } public void SetConsumingPhase() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (_currentPhase == EyePhase.collecting) { Log.Debug(" ! ! ! ! ! ! Phase Set ! ! conSUME"); _currentPhase = EyePhase.consuming; int buffCount = base.body.GetBuffCount(EyeDrowsyBuff.buff); base.body.SetBuffCount(EyeDrowsyBuff.buff.buffIndex, 0); base.body.SetBuffCount(EyeAwakeBuff.buff.buffIndex, buffCount); Util.PlaySound("Play_affix_void_bug_infect", ((Component)base.body).gameObject); } } public void SetCooldownPhase() { if (_currentPhase == EyePhase.consuming) { Log.Debug(" ! ! ! ! ! ! Phase Set ! ! c o o l down"); _currentPhase = EyePhase.cooldown; eyePhaseStopwatch = float.PositiveInfinity; base.body.AddTimedBuff(EyeSleepyBuff.buff, 6f); } } public void GotPickup() { //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_008d: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_0099: Expected O, but got Unknown if (_currentPhase == EyePhase.collecting) { if (eyePhaseStopwatch == float.PositiveInfinity) { eyePhaseStopwatch = Run.instance.time; currentTimer = 6f; } if ((float)base.body.GetBuffCount(EyeDrowsyBuff.buff) < (float)base.stack * 3f) { base.body.AddBuff(EyeDrowsyBuff.buff); EffectData val = new EffectData { origin = base.body.corePosition, rotation = Quaternion.identity }; EffectManager.SpawnEffect(fmpEffectPrefab, val, false); Util.PlaySound("Play_UI_arenaMode_voidCollapse_select", ((Component)base.body).gameObject); } } } public void FixedUpdate() { if (Run.instance.time > eyePhaseStopwatch + currentTimer) { CheckTimer(); } } private void CheckTimer() { if (_currentPhase == EyePhase.collecting) { eyePhaseStopwatch = Run.instance.time; currentTimer = 8f / (float)(base.stack + 1); SetConsumingPhase(); base.body.RemoveBuff(EyeAwakeBuff.buff); ActivateDeath(); } else if (_currentPhase == EyePhase.consuming) { eyePhaseStopwatch = Run.instance.time; base.body.RemoveBuff(EyeAwakeBuff.buff); ActivateDeath(); } else { Log.Warning("########## Uh oh, Jealous Foe is not supposed to be here..."); } } private void ActivateDeath() { //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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_0142: 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_0152: 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) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0186: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019d: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a9: Expected O, but got Unknown //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)FakeFoe)) { FakeFoe = Object.Instantiate<GameObject>(fmpPrefab, base.body.footPosition, Quaternion.identity); FakeFoe.transform.localScale = new Vector3(0f, 0f, 0f); Object.Destroy((Object)(object)FakeFoe.GetComponent<DestroyOnTimer>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<DeathProjectile>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<ApplyTorqueOnStart>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<ProjectileDeployToOwner>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<Deployable>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<ProjectileStickOnImpact>()); Object.Destroy((Object)(object)FakeFoe.GetComponent<ProjectileController>()); } FakeFoe.transform.position = base.body.footPosition; HealthComponent component = FakeFoe.GetComponent<HealthComponent>(); DamageInfo val = new DamageInfo { attacker = ((Component)base.body).gameObject, crit = base.body.RollCrit(), damage = base.body.baseDamage, position = base.body.footPosition, procCoefficient = 0f, damageType = DamageTypeCombo.op_Implicit((DamageType)0), damageColorIndex = (DamageColorIndex)3 }; DamageReport val2 = new DamageReport(val, component, val.damage, component.combinedHealth); GlobalEventManager.instance.OnCharacterDeath(val2); EffectData val3 = new EffectData { origin = base.body.corePosition, rotation = Quaternion.identity }; EffectManager.SpawnEffect(fmpEffectPrefab, val3, false); Util.PlaySound("Play_voidman_idle_twitch", ((Component)base.body).gameObject); } public void OnAwake() { } public void OnDisable() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)base.body)) { base.body.SetBuffCount(EyeDrowsyBuff.buff.buffIndex, 0); base.body.SetBuffCount(EyeAwakeBuff.buff.buffIndex, 0); base.body.ClearTimedBuffs(EyeSleepyBuff.buff.buffIndex); } } public void OnDestroy() { Object.Destroy((Object)(object)FakeFoe); } } public static ItemDef item; public static ItemDef transformItem; public const float collectTime = 6f; public const float consumeBaseTime = 4f; public const float cooldownTime = 6f; public const float maxBuffsPerStack = 3f; public static readonly GameObject fmpEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/DeathProjectile/DeathProjectileTickEffect.prefab").WaitForCompletion(); public static readonly GameObject fmpPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/DeathProjectile/DeathProjectile.prefab").WaitForCompletion(); public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Jealous Foe", "Void", configs)) { item = CreateItemDef("JEALOUSFOE", "Jealous Foe", "Trigger On-Kill effects after grabbing pickups. <style=cIsVoid>Corrupts all Toy Robots</style>.", "Gain stacks upon grabbing pickups</style>. Maximum cap of 3</style> <style=cStack>(+3 per stack)</style>. Trigger an <style=cIsDamage>On-Kill</style> effect per stack every <style=cIsUtility>4s</style> <style=cStack>(-30% per stack)</style>. Recharges every <style=cIsUtility>6</style> seconds. <style=cIsVoid>Corrupts all Toy Robots</style>.", "Look at it Jubilat. It just jubilant like some jealous jello jelly.", (ItemTier)6, UltAssets.JubilantFoeSprite, UltAssets.JubilantFoePrefab, (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)6 }, ToyRobot.item); } } protected override void Hooks() { //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 //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown HealthPickup.OnTriggerStay += new hook_OnTriggerStay(HealthPickup_OnTriggerStay); ElusiveAntlersPickup.OnTriggerStay += new hook_OnTriggerStay(ElusiveAntlersPickup_OnTriggerStay); AmmoPickup.OnTriggerStay += new hook_OnTriggerStay(AmmoPickup_OnTriggerStay); BuffPickup.OnTriggerStay += new hook_OnTriggerStay(BuffPickup_OnTriggerStay); MoneyPickup.OnTriggerStay += new hook_OnTriggerStay(MoneyPickup_OnTriggerStay); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private void HealthPickup_OnTriggerStay(orig_OnTriggerStay orig, HealthPickup self, Collider other) { orig.Invoke(self, other); GotPickup(other); } private void ElusiveAntlersPickup_OnTriggerStay(orig_OnTriggerStay orig, ElusiveAntlersPickup self, Collider other) { orig.Invoke(self, other); GotPickup(other); } private void AmmoPickup_OnTriggerStay(orig_OnTriggerStay orig, AmmoPickup self, Collider other) { orig.Invoke(self, other); GotPickup(other); } private void BuffPickup_OnTriggerStay(orig_OnTriggerStay orig, BuffPickup self, Collider other) { orig.Invoke(self, other); GotPickup(other); } private void MoneyPickup_OnTriggerStay(orig_OnTriggerStay orig, MoneyPickup self, Collider other) { orig.Invoke(self, other); GotPickup(other); } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { self.AddItemBehavior<JealousFoeBehaviour>(self.inventory.GetItemCountEffective(item)); } } private void GotPickup(Collider other) { CharacterBody component = ((Component)other).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.inventory)) { int itemCountEffective = component.inventory.GetItemCountEffective(item); if (itemCountEffective > 0 && NetworkServer.active) { ((Component)component).GetComponent<JealousFoeBehaviour>().GotPickup(); } } } } public class ResinWhirlpool : ItemBase { public static ItemDef item; public static ItemDef transformItem; public const float bounceJumpPowMult = 15f; public const int maxBouncePerItem = 8; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Resin Whirlpool", "Void", configs)) { item = CreateItemDef("RESINWHIRLPOOL", "Resin Whirlpool", "Gain extra jumps and jump power on kill. <style=cIsVoid>Corrupts all Viral Smogs</style>.", "Gain <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> jumps and +20% jump power on kill until you land. Store up to <style=cIsUtility>10</style> <style=cStack>(+10 per stack)</style> extra jumps. <style=cIsVoid>Corrupts all Viral Smogs</style>.", "This Tape is so bouncy! And it just seems endless...\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nWait did you name it Quantum Peel because you wanted a banana item but you added too many food items?\nShhh! They'll never know as long as they never read the description...\n\nand also I changed the item so now it's more aboue bounces instead of speed...\n\nso yeah...", (ItemTier)8, UltAssets.ResinBounceSprite, UltAssets.ResinWhirlpoolPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)3 }, ViralEssence.item); } } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown GlobalEventManager.OnCharacterDeath += new hook_OnCharacterDeath(GlobalEventManager_OnCharacterDeath); } private void GlobalEventManager_OnCharacterDeath(orig_OnCharacterDeath orig, GlobalEventManager self, DamageReport damageReport) { if (Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)damageReport.attacker) && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory)) { CharacterBody attackerBody = damageReport.attackerBody; int itemCountEffective = attackerBody.inventory.GetItemCountEffective(item); int buffCount = attackerBody.GetBuffCount(ResinBounceBuff.buff); if (itemCountEffective > 0 && buffCount < 8 * itemCountEffective) { Util.PlaySound("Play_item_proc_crowbar", ((Component)attackerBody).gameObject); attackerBody.AddBuff(ResinBounceBuff.buff); } } orig.Invoke(self, damageReport); } } public class RottenBones : ItemBase { public class RottenBonesVoidBehavior : ItemBehavior { private int _intervalsPassed = 0; public int IntervalsPassed { get { return _intervalsPassed; } set { _intervalsPassed = value; if (_intervalsPassed > 0) { ApplyRot(base.body, _intervalsPassed); if (_intervalsPassed >= 3) { ((Behaviour)this).enabled = false; } } } } private void FixedUpdate() { float time = Run.instance.time; while (time > Ultitems.stageStartTime + 150f * (float)(_intervalsPassed + 1) && _intervalsPassed < 3) { IntervalsPassed++; } } } public static ItemDef item; public static ItemDef transformItem; public const int rotsPerItem = 3; public const float rottingBuffMultiplier = 15f; public const float rotTimeInterval = 150f; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("Rotten Bones", "Void", configs)) { item = CreateItemDef("ROTTENBONES", "Rotten Bones", "Deal more damage over time. <style=cIsVoid>Corrupts all Birthday Candles</style>.", "Increase damage by <style=cIsDamage>15%</style> <style=cStack>(+15% per stack)</style> damage for every 2.5 minutes</style> passed in a stage, up to a max of <style=cIsDamage>3</style> stacks. <style=cIsVoid>Corrupts all Birthday Candles</style>.", "The bitter aftertaste is just the spoilage", (ItemTier)7, UltAssets.RottenBonesSprite, UltAssets.RottenBonesPrefab, (ItemTag[])(object)new ItemTag[2] { (ItemTag)3, (ItemTag)20 }, BirthdayCandles.item); } } protected override void Hooks() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown CharacterBody.onBodyStartGlobal += CharacterBody_onBodyStartGlobal; CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(CharacterBody_OnInventoryChanged); } private void CharacterBody_onBodyStartGlobal(CharacterBody self) { if (NetworkServer.active && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)self.inventory)) { self.AddItemBehavior<RottenBonesVoidBehavior>(self.inventory.GetItemCountEffective(item)); } } private void CharacterBody_OnInventoryChanged(orig_OnInventoryChanged orig, CharacterBody self) { //IL_00a1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (!Object.op_Implicit((Object)(object)self) || !Object.op_Implicit((Object)(object)self.inventory)) { return; } if (self.inventory.GetItemCountEffective(item) > 0) { Log.Warning("Give Rotting Bones"); if (Run.instance.time < Ultitems.stageStartTime + 450f) { RottenBonesVoidBehavior rottenBonesVoidBehavior = self.AddItemBehavior<RottenBonesVoidBehavior>(self.inventory.GetItemCountEffective(item)); ApplyRot(self, rottenBonesVoidBehavior.IntervalsPassed); } else { ApplyRot(self, 3); } } else { self.SetBuffCount(RottingBuff.buff.buffIndex, 0); } } private static void ApplyRot(CharacterBody player, int intervals) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) int itemCountEffective = player.inventory.GetItemCountEffective(item); int num = itemCountEffective * intervals; if (player.GetBuffCount(RottingBuff.buff) < num) { player.SetBuffCount(RottingBuff.buff.buffIndex, num); } } } public class WormHoles : ItemBase { public class WormHoleToken : MonoBehaviour { private readonly float summonWormCooldown = 0.12f; private float summonWormStopwatch = 0f; public Queue<GameObject> ownedVoidHoles = new Queue<GameObject>(); public void EnqueueWorm(GameObject worm) { summonWormStopwatch = Run.instance.time; ownedVoidHoles.Enqueue(worm); } public int GetCleanCount() { while (ownedVoidHoles.Count > 0 && ownedVoidHoles.Peek().GetComponent<EntityStateMachine>().state is Idle) { GameObject val = ownedVoidHoles.Dequeue(); Object.Destroy((Object)(object)val); NetworkServer.Destroy(val); } return ownedVoidHoles.Count; } public bool GetCooldownReady() { return Run.instance.time > summonWormStopwatch + summonWormCooldown; } public void Destory() { while (ownedVoidHoles.Count > 0) { GameObject val = ownedVoidHoles.Dequeue(); Object.Destroy((Object)(object)val); NetworkServer.Destroy(val); } } } public class IdleWorm : Idle { private float wormStopwatch = float.PositiveInfinity; public override void OnEnter() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) LoopSoundDef val = ScriptableObject.CreateInstance<LoopSoundDef>(); val.startSoundName = "Play_voidBarnacle_idle_loop"; val.stopSoundName = "Stop_voidBarnacle_idle_loop"; base.loopPtr = LoopSoundManager.PlaySoundLoopLocal(((EntityState)this).gameObject, val); base.indicatedNetIds = new HashSet<NetworkInstanceId>(); wormStopwatch = Run.instance.time; } public override void FixedUpdate() { if (Run.instance.time > wormStopwatch + 8f) { DeactivateWorm(); } } public override void OnExit() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) LoopSoundManager.StopSoundLoopLocal(base.loopPtr); } public void DeactivateWorm() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown ((EntityState)this).outer.SetNextState((EntityState)new Deactivate { completeObjectiveChatMessageToken = null }); } } public class WormHoleSync : NetworkBehaviour { [SyncVar] public float syncedRadius; [Server] public void OnRadiusChanged(float newRadius) { syncedRadius = newRadius; Transform val = ((Component)this).transform.Find("Camp 1 - Void Monsters & Interactables"); if (Object.op_Implicit((Object)(object)val)) { SphereZone component = ((Component)val).GetComponent<SphereZone>(); if (Object.op_Implicit((Object)(object)component)) { component.radius = newRadius; component.Networkradius = newRadius; ((Component)val).gameObject.GetComponent<FogDamageController>().safeZones = new List<IZone>(1) { (IZone)(object)component }; } } } } public static ItemDef item; public static ItemDef transformItem; private readonly GameObject voidCamp = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/DLC1/VoidCamp/VoidCamp.prefab").WaitForCompletion(); private GameObject wormZone; public const int wormInitialRadius = 15; public const int wormBaseRadius = 12; public const int wormRadiusPerItem = 3; public const int wormDuration = 8; public const float emitterOrbVerticalOffset = -2.15f; public const float wormFogTickPeriod = 0.3f; public const float wormFogDamage = 0.056f; public const float wormFogDamageRamp = -0.51f; public const float wormFogRampCooldown = 1f; public const float wormCooldown = 0.12f; public const int wormsHolesPerStack = 1; public override void Init(ConfigFile configs) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) if (CheckItemEnabledConfig("Worm Holes", "Void", configs)) { item = CreateItemDef("WORMHOLES", "Worm Holes", "High damage hits also create a void bubble. <style=cIsVoid>Corrupts all Grapevine</style>.", "Hits that deal <style=cIsDamage>more than 400% damage</style> also create a <style=cIsVoid>void bubble</style> of <style=cIsUtility>15m</style> <style=cStack>(+3m per stack)</style> that last for <style=cIsUtility>8</style> seconds. Can have <style=cIsUtility>1</style> <style=cStack>(+1 per stack)</style> bubble at a time. <style=cIsVoid>Corrupts all Grapevine</style>.", "Get it? It's a worm with holes!", (ItemTier)8, UltAssets.WormHolesSprite, UltAssets.WormHolesPrefab, (ItemTag[])(object)new ItemTag[2] { (ItemTag)1, (ItemTag)3 }, Grapevine.item); CreateWormZoneGameObject(); bool flag = default(bool); ContentAddition.AddEntityState<IdleWorm>(ref flag); } } protected override void Hooks() { //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 Chat.SendBroadcastChat_ChatMessageBase += new hook_SendBroadcastChat_ChatMessageBase(Chat_SendBroadcastChat_ChatMessageBase); GlobalEventManager.OnHitEnemy += new hook_OnHitEnemy(GlobalEventManager_OnHitEnemy); } private void Chat_SendBroadcastChat_ChatMessageBase(orig_SendBroadcastChat_ChatMessageBase orig, ChatMessageBase message) { if (message != null) { SimpleChatMessage val = (SimpleChatMessage)(object)((message is SimpleChatMessage) ? message : null); if (val != null && val.baseToken == null) { return; } } orig.Invoke(message); } private void GlobalEventManager_OnHitEnemy(orig_OnHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Invalid comparison between Unknown and I4 orig.Invoke(self, damageInfo, victim); try { if (NetworkServer.active && Object.op_Implicit((Object)(object)self) && Object.op_Implicit((Object)(object)victim) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>()) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<CharacterBody>().inventory) && !damageInfo.rejected && (int)DamageTypeCombo.op_Implicit(damageInfo.damageType) != 67108864) { CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); int itemCountEffective = component.inventory.GetItemCountEffective(item); if (itemCountEffective > 0 && damageInfo.damage / component.damage >= 4f) { TrySpawnHole(component, itemCountEffective, damageInfo.position); } } } catch (NullReferenceException) { } } private void TrySpawnHole(CharacterBody attacker, int grabCount, Vector3 position) { //IL_0072: 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) WormHoleToken wormHoleToken = ((Component)attacker).gameObject.GetComponent<WormHoleToken>(); if (!Object.op_Implicit((Object)(object)wormHoleToken)) { wormHoleToken = ((Component)attacker).gameObject.AddComponent<WormHoleToken>(); } if (wormHoleToken.GetCleanCount() + 1 > grabCount) { Log.Debug(" worm worm --- Too many worms DO NOT Spawn"); return; } if (!wormHoleToken.GetCooldownReady()) { Log.Debug(" worm worm --- Too fast! There's a worm cooldown"); return; } GameObject val = Object.Instantiate<GameObject>(wormZone, position, Quaternion.identity); val.SetActive(true); Log.Warning(" | | | server set radius | | |"); WormHoleSync component = val.GetComponent<WormHoleSync>(); SphereZone component2 = ((Component)val.transform.Find("Camp 1 - Void Monsters & Interactables")).GetComponent<SphereZone>(); Log.Warning(" | | | sync: " + component.syncedRadius + " old radius: " + component2.radius + " | | |"); component.syncedRadius = 12 + 3 * grabCount; component.OnRadiusChanged(component.syncedRadius); Log.Warning(" | | | sync: " + component.syncedRadius + " NEW radius: " + component2.radius + " | | |"); wormHoleToken.EnqueueWorm(val); NetworkServer.Spawn(val); } private void CreateWormZoneGameObject() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: 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_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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) wormZone = PrefabAPI.InstantiateClone(voidCamp, "UltitemsWormHoleZone", false); wormZone.SetActive(false); wormZone.transform.localScale = new Vector3(1f, 1f, 1f); wormZone.transform.rotation = Quaternion.identity; wormZone.transform.position = new Vector3(0f, 0f, 0f); Object.Destroy((Object)(object)wormZone.GetComponent<OutsideInteractableLocker>()); EntityStateMachine component = wormZone.GetComponent<EntityStateMachine>(); component.initialStateType = new SerializableEntityStateType(typeof(IdleWorm)); component.mainStateType = new SerializableEntityStateType(typeof(IdleWorm)); Transform val = wormZone.transform.Find("mdlVoidFogEmitter"); if (Object.op_Implicit((Object)(object)val)) { Animator component2 = ((Component)val).GetComponent<Animator>(); if (Object.op_Implicit((Object)(object)component2)) { component2.bodyPosition = new Vector3(0f, -2.15f, 0f); } Transform val2 = ((Component)val).transform.Find("mdlVoidFogEmitterBase"); if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.SetActive(false); } } Transform val3 = wormZone.transform.Find("Decal"); if (Object.op_Implicit((Object)(object)val3)) { ((Component)val3).gameObject.SetActive(false); } Transform val4 = wormZone.transform.Find("Camp 1 - Void Monsters & Interactables"); if (Object.op_Implicit((Object)(object)val4)) { Log.Debug(" worm worm --- Found and deactivate Camp One Director"); Object.Destroy((Object)(object)((Component)val4).gameObject.GetComponent<CampDirector>()); Object.Destroy((Object)(object)((Component)val4).gameObject.GetComponent<CombatDirector>()); Log.Debug(" worm worm --- SphereZone"); SphereZone component3 = ((Component)val4).gameObject.GetComponent<SphereZone>(); component3.radius = 15f; component3.Networkradius = 15f; TeamFilter component4 = ((Component)val4).gameObject.GetComponent<TeamFilter>(); component4.teamIndexInternal = -1; component4.defaultTeam = (TeamIndex)(-1); FogDamageController component5 = ((Component)val4).gameObject.GetComponent<FogDamageController>(); component5.teamFilter = component4; component5.invertTeamFilter = true; component5.tickPeriodSeconds = 0.3f; component5.dangerBuffDuration = 0.4f; component5.healthFractionPerSecond = 0.056f; component5.healthFractionRampCoefficientPerSecond = -0.51f; component5.healthFractionRampIncreaseCooldown = 1f; component5.initialSafeZones = (BaseZoneBehavior[])(object)new BaseZoneBehavior[1] { (BaseZoneBehavior)component3 }; } wormZone.AddComponent<WormHoleSync>(); Transform val5 = wormZone.transform.Find("Camp 2 - Flavor Props & Void Elites"); if (Object.op_Implicit((Object)(object)val5)) { Log.Debug(" worm worm --- Found and deactivate Camp Two Director"); ((Component)val5).gameObject.SetActive(false); } PrefabAPI.RegisterNetworkPrefab(wormZone); } } public class ZorsePill : ItemBase { public static ItemDef item; public static ItemDef transformItem; private const float percentPerStack = 25f; public const float duration = 3f; public override void Init(ConfigFile configs) { if (CheckItemEnabledConfig("ZorsePill", "Void", configs)) { item = CreateItemDef("ZORSEPILL", "ZorsePill", "Starve enemies on hit to deal delayed damage. <style=cIsVoid>Corrupts all HMTs</style>.", "Starve an enemy for <style=cIsDamage>25%</style> <style=cStack>(+25% per stack)</style> of TOTAL damage. Status duration <style=cIsDamage>resets</style> when reapplied. <style=cIsVoid>Corrupts all HMTs</style>.", "Get this diet pill now! Eat one and it cut's your weight down. Disclaimer: the microbes inside are definitly not eating you from the inside out.", (ItemTier)7, UltAssets.ZorsePillSprite, UltAssets.ZorsePillPrefab, (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }, HMT.item); } } protected override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HealthComponent.SendDamageDealt += new hook_SendDamageDealt(HealthComponent_SendDamageDealt); } private void HealthComponent_SendDamageDealt(orig_SendDamageDealt orig, DamageReport damageReport) { //IL_00ac: 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Invalid comparison between Unknown and I4 //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(damageReport); try { GameObject gameObject = ((Component)damageReport.victimBody).gameObject; if (Object.op_Implicit((Object)(object)gameObject) && Object.op_Implicit((Object)(object)damageReport.attackerBody) && Object.op_Implicit((Object)(object)damageReport.attackerBody.inventory) && !damageReport.damageInfo.rejected && (int)DamageTypeCombo.op_Implicit(damageReport.damageInfo.damageType) != 67108864 && damageReport.damageDealt > 0f) { CharacterBody attackerBody = damageReport.attackerBody; int itemCountEffective = attackerBody.inventory.GetItemCountEffective(item); if (itemCountEffective > 0) { Log.Debug(" ...Starving enemy with reports..."); InflictDotInfo val = default(InflictDotInfo); val.victimObject = gameObject; val.attackerObject = ((Component)attackerBody).gameObject; val.dotIndex = ZorseStarvingBuff.index; val.duration = 3f; val.damageMultiplier = damageReport.damageInfo.damage / attackerBody.damage * (float)((!damageReport.damageInfo.crit) ? 1 : 2) * (float)itemCountEffective * 25f / 100f; val.hitHurtBox = null; val.maxStacksFromAttacker = null; InflictDotInfo val2 = val; DotController.InflictDot(ref val2); } } } catch (NullReferenceException) { Log.Debug(" oh... Zorse Pill had an expected null error"); } } } } namespace UltitemsCyan.Items.Untiered { public class CorrodingVaultConsumed : ItemBase { public static ItemDef item; public override void Init(ConfigFile configs) { Sprite corrodingVaultConsumedSprite = UltAssets.CorrodingVaultConsumedSprite; GameObject corrodingVaultConsumedPrefab = UltAssets.CorrodingVaultConsumedPrefab; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); item = CreateItemDef("CORRODINGVAULTCONSUMED", "Corroding Vault (Corroded)", "It can't protect anything anymore...", "DESCRIPTION It can't protect anything anymore...", "Rusted Rusted Rusted", (ItemTier)5, corrodingVaultConsumedSprite, corrodingVaultConsumedPrefab, (ItemTag[])(object)array, null, isConsumed: true); } protected override void Hooks() { } } public class GreySolvent : ItemBase { public static ItemDef item; public override void Init(ConfigFile configs) { Sprite universalSolventSprite = UltAssets.UniversalSolventSprite; GameObject universalSolventPrefab = UltAssets.UniversalSolventPrefab; ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); item = CreateItemDef("GREYSOLVENT", "Grey Solvent", "Everything returns...", "DESCRIPTION Everything returns...", "So a Universal Solute just turns other things into Universal Solvents?\nI guess that makes sense... becasue if there is a universal solute, then everything else desolves it.\nSo then everything else is a universal solvent for the universal solute", (ItemTier)5, universalSolventSprite, universalSolventPrefab, (ItemTag[])(object)array, null, isConsumed: true); } protected override void Hooks() { } } public class InhabitedCoffinConsumed : ItemBase { public static ItemDef item;