Decompiled source of FreeItemFriday v1.7.0
FreeSkillSaturday.dll
Decompiled 10 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 EntityStates; using EntityStates.Croco; using EntityStates.Railgunner.Scope; using EntityStates.Railgunner.Weapon; using EntityStates.Toolbot; using FreeItemFriday; using FreeItemFriday.Achievements; using HG; using HG.Reflection; using IL.EntityStates; using IL.RoR2; using IvyLibrary; using JetBrains.Annotations; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates.Croco; using On.EntityStates.Railgunner.Scope; using On.EntityStates.Railgunner.Weapon; using On.RoR2; using On.RoR2.PostProcessing; using On.RoR2.Projectile; using R2API; using RoR2; using RoR2.Achievements; using RoR2.Achievements.Artifacts; using RoR2.ConVar; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.HudOverlay; using RoR2.Items; using RoR2.PostProcessing; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using ShaderSwapper; using TMPro; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.ResourceManagement.AsyncOperations; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")] [assembly: AssemblyCompany("FreeSkillSaturday")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FreeSkillSaturday")] [assembly: AssemblyTitle("FreeSkillSaturday")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsReadOnlyAttribute : Attribute { } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [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 EntityStates.Croco { public class SuperBite : BasicMeleeAttack { public static AnimationCurve _forwardVelocityCurve; public const int attackResetCount = 2; public const float baseAttackResetDelay = 0.1f; public const float baseDurationBeforeInterruptable = 0.55f; public const float bloom = 0.25f; public const float recoilAmplitude = -1f; private float attackResetDelay; private float attackResetTimer; private float durationBeforeInterruptable; private float currentResetAttackCount; private GameObject secondSwingEffectInstance; public override bool allowExitFire => false; public SuperBite() { //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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: 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_00f2: Expected O, but got Unknown base.baseDuration = 1.2f; base.damageCoefficient = FreeSkillSaturday.Disembowel.damageCoefficient; base.hitBoxGroupName = "Slash"; base.hitEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Treebot/OmniImpactVFXSlashSyringe.prefab").WaitForCompletion(); base.procCoefficient = 1f; base.hitPauseDuration = 0.1f; base.mecanimHitboxActiveParameter = "Bite.hitBoxActive"; base.shorthopVelocityFromHit = 6f; base.beginStateSoundString = "Play_acrid_m2_bite_shoot"; base.impactSound = Addressables.LoadAssetAsync<NetworkSoundEventDef>((object)"RoR2/Base/Croco/nseAcridM1Hit.asset").WaitForCompletion(); base.forceForwardVelocity = true; object obj = _forwardVelocityCurve; if (obj == null) { AnimationCurve val = new AnimationCurve((Keyframe[])(object)new Keyframe[3] { new Keyframe(0.17f, 0f), new Keyframe(0.21f, 0.5f), new Keyframe(0.3f, 0f) }); _forwardVelocityCurve = val; obj = (object)val; } base.forwardVelocityCurve = (AnimationCurve)obj; base.swingEffectMuzzleString = "Slash3"; base.swingEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Croco/CrocoComboFinisherSlash.prefab").WaitForCompletion(); } public override void OnEnter() { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).OnEnter(); attackResetDelay = 0.1f / ((BaseState)this).attackSpeedStat; durationBeforeInterruptable = 0.55f / ((BaseState)this).attackSpeedStat; CharacterDirection characterDirection = ((EntityState)this).characterDirection; Ray aimRay = ((BaseState)this).GetAimRay(); characterDirection.forward = ((Ray)(ref aimRay)).direction; } public override void OnExit() { if (Object.op_Implicit((Object)(object)secondSwingEffectInstance)) { EntityState.Destroy((Object)(object)secondSwingEffectInstance); } ((BasicMeleeAttack)this).OnExit(); } public override void PlayAnimation() { ((BasicMeleeAttack)this).PlayAnimation(); ((EntityState)this).PlayCrossfade("Gesture, Override", "Bite", "Bite.playbackRate", base.duration, 0.05f); ((EntityState)this).PlayCrossfade("Gesture, Additive", "Slash3", "Slash.playbackRate", base.duration, 0.05f); Util.PlaySound("Play_acrid_m1_bigSlash", ((EntityState)this).gameObject); } public override void AuthorityModifyOverlapAttack(OverlapAttack overlapAttack) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) ((BasicMeleeAttack)this).AuthorityModifyOverlapAttack(overlapAttack); overlapAttack.damageType = (DamageType)(overlapAttack.damageType | 0x80400); CrocoDamageTypeController val = default(CrocoDamageTypeController); if (((Component)((EntityState)this).outer).TryGetComponent<CrocoDamageTypeController>(ref val)) { overlapAttack.damageType |= val.GetDamageType(); } } public override void OnMeleeHitAuthority() { ((EntityState)this).characterBody.AddSpreadBloom(0.25f); ((BasicMeleeAttack)this).OnMeleeHitAuthority(); } public override void AuthorityFixedUpdate() { ScaleParticleSystemDuration val = default(ScaleParticleSystemDuration); if (base.authorityHitThisFixedUpdate && ((BasicMeleeAttack)this).authorityInHitPause && Object.op_Implicit((Object)(object)secondSwingEffectInstance) && secondSwingEffectInstance.TryGetComponent<ScaleParticleSystemDuration>(ref val)) { val.newDuration = 20f; } ((BasicMeleeAttack)this).AuthorityFixedUpdate(); if (((BasicMeleeAttack)this).authorityHasFiredAtAll) { attackResetTimer += Time.fixedDeltaTime; if ((attackResetTimer >= attackResetDelay || base.forceFire) && currentResetAttackCount < 2f) { attackResetTimer -= attackResetDelay; ResetOverlapAttack(); } } } public void ResetOverlapAttack() { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) currentResetAttackCount += 1f; if (currentResetAttackCount >= 2f) { base.overlapAttack.impactSound = Addressables.LoadAssetAsync<NetworkSoundEventDef>((object)"RoR2/Base/Croco/nseAcridBiteHit.asset").WaitForCompletion().index; DamageAPI.AddModdedDamageType(base.overlapAttack, FreeSkillSaturday.Disembowel.SuperBleedOnHit); } base.overlapAttack.ResetIgnoredHealthComponents(); } public override void BeginMeleeAttackEffect() { //IL_004b: Unknown result type (might be due to invalid IL or missing references) if (!((BasicMeleeAttack)this).meleeAttackHasBegun) { Transform val = ((BaseState)this).FindModelChild("MouthMuzzle"); if (Object.op_Implicit((Object)(object)val) && !Object.op_Implicit((Object)(object)secondSwingEffectInstance)) { secondSwingEffectInstance = Object.Instantiate<GameObject>(FreeSkillSaturday.Disembowel.CrocoSuperBiteEffect, val); secondSwingEffectInstance.transform.forward = ((EntityState)this).characterDirection.forward; ScaleParticleSystemDuration val2 = default(ScaleParticleSystemDuration); if (secondSwingEffectInstance.TryGetComponent<ScaleParticleSystemDuration>(ref val2)) { val2.newDuration = val2.initialDuration; } } } ((BaseState)this).AddRecoil(-0.9f, -1.1f, 0.1f, -0.1f); ((BasicMeleeAttack)this).BeginMeleeAttackEffect(); } public override void AuthorityExitHitPause() { ((BasicMeleeAttack)this).AuthorityExitHitPause(); ScaleParticleSystemDuration val = default(ScaleParticleSystemDuration); if (Object.op_Implicit((Object)(object)secondSwingEffectInstance) && secondSwingEffectInstance.TryGetComponent<ScaleParticleSystemDuration>(ref val)) { val.newDuration = val.initialDuration; } } public override InterruptPriority GetMinimumInterruptPriority() { if (((EntityState)this).fixedAge >= durationBeforeInterruptable) { return (InterruptPriority)1; } return (InterruptPriority)3; } } } namespace EntityStates.Toolbot { public class Reboot : BaseCharacterMain { private const float entryDuration = 0.4f; private const int stepCount = 3; private float duration; private GameObject stunVfxInstance; private OverlayController overlayController; private List<ImageFillController> fillUiList = new List<ImageFillController>(); private FixedTimeStamp startTime; private bool didChangeMusic; private bool didPauseAnimations; private bool didRestoreAnimations; private bool didCleanseBody; private bool didResetSkills; public override void OnEnter() { //IL_004b: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_014a: 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_01b6: Expected O, but got Unknown //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f5: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Expected O, but got Unknown //IL_008e: Unknown result type (might be due to invalid IL or missing references) ((BaseCharacterMain)this).OnEnter(); duration = FreeSkillSaturday.Reboot.duration / ((BaseState)this).attackSpeedStat + 0.4f; stunVfxInstance = Object.Instantiate<GameObject>(StunState.stunVfxPrefab, ((EntityState)this).transform); stunVfxInstance.GetComponent<ScaleParticleSystemDuration>().newDuration = duration; startTime = FixedTimeStamp.now; if (((EntityState)this).isAuthority) { EntityStateMachine[] components = ((EntityState)this).gameObject.GetComponents<EntityStateMachine>(); foreach (EntityStateMachine val in components) { if (val.state != this && val.customName != "Stance") { val.SetState(EntityStateCatalog.InstantiateState(val.mainStateType)); val.nextState = null; } } } ((EntityState)this).PlayCrossfade("Body", "BoxModeEnter", 0.1f); ((EntityState)this).PlayCrossfade("Stance, Override", "PutAwayGun", 0.1f); Animator modelAnimator = ((BaseCharacterMain)this).modelAnimator; if (modelAnimator != null) { modelAnimator.SetFloat("aimWeight", 0f); } base.characterAnimParamAvailability.turnAngle = false; base.characterAnimParamAvailability.rightSpeed = false; ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).characterBody.isSprinting = false; overlayController = HudOverlayManager.AddOverlay(((EntityState)this).gameObject, new OverlayCreationParams { prefab = FreeSkillSaturday.Reboot.RebootOverlay, childLocatorEntry = "CrosshairExtras" }); overlayController.onInstanceAdded += OnOverlayInstanceAdded; overlayController.onInstanceRemove += OnOverlayInstanceRemoved; Util.PlaySound("Play_engi_R_turret_death", ((EntityState)this).gameObject); Util.PlaySound("Play_env_hiddenLab_laptop_active_loop", ((EntityState)this).gameObject); ScreenDamage.OnRenderImage += new hook_OnRenderImage(ScreenDamage_OnRenderImage); if (didChangeMusic = LocalUserManager.readOnlyLocalUsersList.Any((LocalUser x) => (Object)(object)x.cachedBodyObject == (Object)(object)((EntityState)this).gameObject)) { AkSoundEngine.SetRTPCValue(AudioManager.cvVolumeMsx.rtpcName, 0f); VolumeConVar.SetString += new hook_SetString(VolumeConVar_SetString); VolumeConVar.GetString += new hook_GetString(VolumeConVar_GetString); } } public override void FixedUpdate() { ((BaseCharacterMain)this).FixedUpdate(); if (!didPauseAnimations && Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator) && ((EntityState)this).fixedAge >= 0.4f) { ((BaseCharacterMain)this).modelAnimator.speed = 0f; didPauseAnimations = true; } foreach (ImageFillController fillUi in fillUiList) { fillUi.SetTValue(((EntityState)this).fixedAge / duration); } if (HasStepPassed(1)) { CleanseBodyStep(); } if (HasStepPassed(2)) { ResetSkillsStep(); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Expected O, but got Unknown //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Expected O, but got Unknown //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Expected O, but got Unknown if (Object.op_Implicit((Object)(object)stunVfxInstance)) { EntityState.Destroy((Object)(object)stunVfxInstance); } ((EntityState)this).PlayAnimation("Body", "BoxModeExit"); ((EntityState)this).PlayCrossfade("Stance, Override", "Empty", 0.1f); Animator modelAnimator = ((BaseCharacterMain)this).modelAnimator; if (modelAnimator != null) { modelAnimator.SetFloat("aimWeight", 1f); } if (overlayController != null) { overlayController.onInstanceAdded -= OnOverlayInstanceAdded; overlayController.onInstanceRemove -= OnOverlayInstanceRemoved; fillUiList.Clear(); HudOverlayManager.RemoveOverlay(overlayController); } ((EntityState)this).characterBody.hideCrosshair = false; CleanseBodyStep(); ResetSkillsStep(); if (NetworkServer.active && ((EntityState)this).healthComponent.alive) { ((EntityState)this).healthComponent.Networkhealth = ((EntityState)this).healthComponent.fullHealth; ((EntityState)this).healthComponent.ForceShieldRegen(); } RestoreAnimator(); Util.PlaySound("Stop_drone_active_loop", ((EntityState)this).gameObject); Util.PlaySound("Stop_env_hiddenLab_laptop_active_loop", ((EntityState)this).gameObject); Util.PlaySound("Play_MULT_shift_end", ((EntityState)this).gameObject); Util.PlaySound("Play_captain_R_aim", ((EntityState)this).gameObject); Util.PlaySound("Play_captain_R_turret_build", ((EntityState)this).gameObject); ScreenDamage.OnRenderImage -= new hook_OnRenderImage(ScreenDamage_OnRenderImage); if (didChangeMusic) { VolumeConVar.SetString -= new hook_SetString(VolumeConVar_SetString); VolumeConVar.GetString -= new hook_GetString(VolumeConVar_GetString); ((BaseConVar)AudioManager.cvVolumeMsx).SetString(AudioManager.cvVolumeMsx.fallbackString); } ((BaseCharacterMain)this).OnExit(); } public bool HasStepPassed(int step) { return ((EntityState)this).fixedAge - 0.4f >= duration * (float)step / 3f; } public void CleanseBodyStep() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Expected O, but got Unknown if (!didCleanseBody) { EffectManager.SpawnEffect(FreeSkillSaturday.Reboot.VentEffect, new EffectData { rotation = Quaternion.identity, origin = ((EntityState)this).characterBody.corePosition }, false); Util.PlaySound("Play_drone_active_loop", ((EntityState)this).gameObject); if (NetworkServer.active) { Util.CleanseBody(((EntityState)this).characterBody, true, false, true, true, true, false); } didCleanseBody = true; } } public void ResetSkillsStep() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Invalid comparison between Unknown and I4 //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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_00c6: Unknown result type (might be due to invalid IL or missing references) RestoreAnimator(); if (didResetSkills) { return; } Util.PlaySound("Play_MULT_R_variant_end", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator)) { GenericSkill[] allSkills = ((EntityState)this).skillLocator.allSkills; foreach (GenericSkill val in allSkills) { if ((Object)(object)val != (Object)(object)((EntityState)this).skillLocator.utility) { val.Reset(); } } } if (NetworkServer.active && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { for (uint num = 0u; num < ((EntityState)this).characterBody.inventory.GetEquipmentSlotCount(); num++) { EquipmentState equipment = ((EntityState)this).characterBody.inventory.GetEquipment(num); if ((int)equipment.equipmentIndex != -1 && equipment.charges <= 0) { ((EntityState)this).characterBody.inventory.SetEquipment(new EquipmentState(equipment.equipmentIndex, FixedTimeStamp.now, equipment.charges), num); } } } didResetSkills = true; } public void RestoreAnimator() { if (didPauseAnimations && !didRestoreAnimations && Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { ((BaseCharacterMain)this).modelAnimator.speed = 1f; didRestoreAnimations = true; } } public void OnOverlayInstanceAdded(OverlayController controller, GameObject instance) { fillUiList.Add(instance.GetComponent<ImageFillController>()); } public void OnOverlayInstanceRemoved(OverlayController controller, GameObject instance) { fillUiList.Remove(instance.GetComponent<ImageFillController>()); } private void ScreenDamage_OnRenderImage(orig_OnRenderImage orig, ScreenDamage self, RenderTexture source, RenderTexture destination) { //IL_0072: 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_0038: 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) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) CameraRigController cameraRigController = self.cameraRigController; if ((Object)(object)((cameraRigController != null) ? cameraRigController.target : null) == (Object)(object)((EntityState)this).gameObject && Object.op_Implicit((Object)(object)((EntityState)this).healthComponent) && ((EntityState)this).healthComponent.lastHitTime > startTime) { FixedTimeStamp lastHitTime = ((EntityState)this).healthComponent.lastHitTime; ((EntityState)this).healthComponent.lastHitTime = FixedTimeStamp.negativeInfinity; try { orig.Invoke(self, source, destination); return; } finally { ((EntityState)this).healthComponent.lastHitTime = lastHitTime; } } orig.Invoke(self, source, destination); } private void VolumeConVar_SetString(orig_SetString orig, BaseConVar self, string newValue) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, newValue); if (self == AudioManager.cvVolumeMsx) { AkSoundEngine.SetRTPCValue(AudioManager.cvVolumeMsx.rtpcName, 0f); } } private string VolumeConVar_GetString(orig_GetString orig, BaseConVar self) { if (self == AudioManager.cvVolumeMsx) { return AudioManager.cvVolumeMsx.fallbackString; } return orig.Invoke(self); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)6; } } } namespace EntityStates.Railgunner.Weapon { public class FireElectricGrenade : GenericProjectileBaseState, IBaseWeaponState { public FireElectricGrenade() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) base.effectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/MuzzleflashSmokeRing.prefab").WaitForCompletion(); base.projectilePrefab = FreeSkillSaturday.PulseGrenade.GrenadeProjectile; base.damageCoefficient = FreeSkillSaturday.PulseGrenade.damageCoefficient; base.force = 600f; base.minSpread = 0f; base.maxSpread = 0f; base.baseDuration = FreeSkillSaturday.PulseGrenade.duration; base.recoilAmplitude = 1f; base.attackSoundString = "Play_MULT_m1_grenade_launcher_shoot"; base.projectilePitchBonus = -5f; base.baseDelayBeforeFiringProjectile = FreeSkillSaturday.PulseGrenade.firingDelay; base.targetMuzzle = "MuzzlePistol"; base.bloom = 1f; } public override void PlayAnimation(float duration) { ((GenericProjectileBaseState)this).PlayAnimation(duration); Util.PlayAttackSpeedSound("Play_MULT_R_variant_end", ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); ((EntityState)this).PlayAnimation("Gesture, Override", "FirePistol", "FirePistol.playbackRate", base.delayBeforeFiringProjectile); } public override void DoFireEffects() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0028: 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) ((GenericProjectileBaseState)this).DoFireEffects(); if (((EntityState)this).isAuthority) { CharacterMotor characterMotor = ((EntityState)this).characterMotor; if (characterMotor != null) { Ray aimRay = ((BaseState)this).GetAimRay(); characterMotor.ApplyForce(-1000f * ((Ray)(ref aimRay)).direction, false, false); } } ((EntityState)this).PlayAnimation("Gesture, Override", "FireSniper", "FireSniper.playbackRate", base.duration - ((EntityState)this).fixedAge); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public bool CanScope() { return true; } } } namespace FreeItemFriday { [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("groovesalad.FreeItemFriday", "FreeItemFriday", "1.7.0")] public class FreeSkillSaturday : BaseContentPlugin { public static class Entropy { public class FreezeRotationWhenArtifactEnabled : MonoBehaviour { private Quaternion rotation; public void Start() { //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) rotation = ((Component)this).transform.rotation; if (!Object.op_Implicit((Object)(object)RunArtifactManager.instance) || !RunArtifactManager.instance.IsArtifactEnabled(Artifacts.SlipperyTerrain)) { ((Behaviour)this).enabled = false; } } public void Update() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.rotation = rotation; } } [CompilerGenerated] private static class <>O { public static LoadStaticContentAsyncDelegate <0>__LoadStaticContentAsync; public static UnityAction<Scene, Scene> <1>__SceneManager_activeSceneChanged; public static Action <2>__OnArtifactEnabled; public static Action <3>__OnArtifactDisabled; public static hook_OnGroundHit <4>__CharacterMotor_OnGroundHit; public static Manipulator <5>__GenericCharacterMain_ApplyJumpVelocity; public static Manipulator <6>__CharacterMotor_PreMove; public static hook_UpdateSticking <7>__ProjectileStickOnImpact_UpdateSticking; public static hook_Awake <8>__ProjectileStickOnImpact_Awake; } public static bool enabled = true; public static float baseAccelerationMultiplier = 0.05f; public static float airAccelerationCoefficient = 2f; public static float positiveAccelerationCoefficient = 10f; public static float horizontalJumpBoostCoefficient = 0.5f; public static Dictionary<Material, Material> slipperyMaterialInstances; public static bool didUpdateSceneVisuals; public static PhysicMaterial SlidingProjectile { get; private set; } public static GameObject SlipperyTerrainFormulaDisplay { get; private set; } public static void Init() { //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Expected O, but got Unknown Ivyl.Bind<bool>(FreeSkillSaturday.instance.ArtifactsConfig, ref enabled, "Artifact of Entropy", string.Format("Enable {0}?", "Artifact of Entropy"), (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ArtifactsConfig, ref baseAccelerationMultiplier, "Artifact of Entropy", "Base Acceleration Multiplier", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ArtifactsConfig, ref airAccelerationCoefficient, "Artifact of Entropy", "Air Acceleration Coefficient", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ArtifactsConfig, ref positiveAccelerationCoefficient, "Artifact of Entropy", "Positive Acceleration Coefficient", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ArtifactsConfig, ref horizontalJumpBoostCoefficient, "Artifact of Entropy", "Horizontal Jump Boost Coefficient", (ConfigDescription)null); if (enabled) { FreeSkillSaturday instance = FreeSkillSaturday.instance; object obj = <>O.<0>__LoadStaticContentAsync; if (obj == null) { LoadStaticContentAsyncDelegate val = LoadStaticContentAsync; <>O.<0>__LoadStaticContentAsync = val; obj = (object)val; } ((BaseContentPlugin)instance).loadStaticContentAsync += (LoadStaticContentAsyncDelegate)obj; SceneManager.activeSceneChanged += SceneManager_activeSceneChanged; } } private static IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { ArtifactCode artifactCode = new ArtifactCode(((ArtifactCompound)1, (ArtifactCompound)1, (ArtifactCompound)1), ((ArtifactCompound)7, (ArtifactCompound)7, (ArtifactCompound)7), ((ArtifactCompound)3, (ArtifactCompound)5, (ArtifactCompound)3)); AssetBundleRequest<Sprite> texArtifactSlipperyTerrainEnabled = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texArtifactSlipperyTerrainEnabled", ref texArtifactSlipperyTerrainEnabled); AssetBundleRequest<Sprite> texArtifactSlipperyTerrainDisabled = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texArtifactSlipperyTerrainDisabled", ref texArtifactSlipperyTerrainDisabled); AssetBundleRequest<GameObject> PickupSlipperyTerrain = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "PickupSlipperyTerrain", ref PickupSlipperyTerrain); Artifacts.SlipperyTerrain = ArtifactExtensions.SetEnabledActions<ArtifactDef>(ArtifactExtensions.SetArtifactCode<ArtifactDef>(ArtifactExtensions.SetPickupModelPrefab<ArtifactDef>(ArtifactExtensions.SetIconSprites<ArtifactDef>(ContentPackExtensions.DefineArtifact(((BaseContentPlugin)instance).Content, "SlipperyTerrain"), texArtifactSlipperyTerrainEnabled.asset, texArtifactSlipperyTerrainDisabled.asset), PickupSlipperyTerrain.asset), (ArtifactCode?)artifactCode), (Action)OnArtifactEnabled, (Action)OnArtifactDisabled); AssetBundleRequest<Sprite> texObtainArtifactSlipperyTerrainIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texObtainArtifactSlipperyTerrainIcon", ref texObtainArtifactSlipperyTerrainIcon); Achievements.ObtainArtifactSlipperyTerrain = ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)ContentPackExtensions.DefineAchievementForArtifact(((BaseContentPlugin)instance).Content, "ObtainArtifactSlipperyTerrain", Artifacts.SlipperyTerrain)).SetIconSprite(texObtainArtifactSlipperyTerrainIcon.asset)).SetTrackerTypes(typeof(ObtainArtifactSlipperyTerrainAchievement), (Type)null); ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)Achievements.ObtainArtifactSlipperyTerrain).AchievementDef.identifier = "ObtainArtifactSlipperyTerrain"; Transform val = default(Transform); MeshRenderer renderer = default(MeshRenderer); if (Ivyl.TryFind(Artifacts.SlipperyTerrain.pickupModelPrefab.transform, "mdlSlipperyTerrainArtifact", ref val) && ((Component)val).TryGetComponent<MeshRenderer>(ref renderer)) { AsyncOperationHandle<Material> matArtifact = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/artifactworld/matArtifact.mat", ref matArtifact); ((Renderer)renderer).sharedMaterial = matArtifact.Result; } AsyncOperationHandle<GameObject> EngiBubbleShield = default(AsyncOperationHandle<GameObject>); yield return Ivyl.LoadAddressableAssetAsync<GameObject>((object)"RoR2/Base/Engi/EngiBubbleShield.prefab", ref EngiBubbleShield); Transform val2 = default(Transform); if (Ivyl.TryFind(EngiBubbleShield.Result.transform, "Collision/ActiveVisual", ref val2)) { ((Component)val2).gameObject.AddComponent<FreezeRotationWhenArtifactEnabled>(); } AssetBundleRequest<PhysicMaterial> physmatSlidingProjectile = default(AssetBundleRequest<PhysicMaterial>); yield return Ivyl.LoadAssetAsync<PhysicMaterial>(instance.Assets, "physmatSlidingProjectile", ref physmatSlidingProjectile); SlidingProjectile = physmatSlidingProjectile.asset; yield return CreateSlipperyTerrainFormulaDisplayAsync(artifactCode); } public static IEnumerator CreateSlipperyTerrainFormulaDisplayAsync(ArtifactCode artifactCode) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) AsyncOperationHandle<GameObject> ArtifactFormulaDisplay = default(AsyncOperationHandle<GameObject>); yield return Ivyl.LoadAddressableAssetAsync<GameObject>((object)"RoR2/Base/artifactworld/ArtifactFormulaDisplay.prefab", ref ArtifactFormulaDisplay); SlipperyTerrainFormulaDisplay = Ivyl.ClonePrefab(ArtifactFormulaDisplay.Result, "SlipperyTerrainFormulaDisplay"); yield return Ivyl.SetupArtifactFormulaDisplayAsync(SlipperyTerrainFormulaDisplay.GetComponent<ArtifactFormulaDisplay>(), artifactCode); Decal[] componentsInChildren = SlipperyTerrainFormulaDisplay.GetComponentsInChildren<Decal>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].Fade = 0.15f; } Transform val = default(Transform); if (Ivyl.TryFind(SlipperyTerrainFormulaDisplay.transform, "Frame", ref val)) { ((Component)val).gameObject.SetActive(false); } Transform val2 = default(Transform); if (Ivyl.TryFind(SlipperyTerrainFormulaDisplay.transform, "ArtifactFormulaHolderMesh", ref val2)) { ((Component)val2).gameObject.SetActive(false); } } private static void SceneManager_activeSceneChanged(Scene oldScene, Scene newScene) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) if (((Scene)(ref newScene)).name == "snowyforest" && Object.op_Implicit((Object)(object)SlipperyTerrainFormulaDisplay)) { Object.Instantiate<GameObject>(SlipperyTerrainFormulaDisplay, new Vector3(150f, 67f, 237f), Quaternion.Euler(new Vector3(276f, 10f, 190f))).transform.localScale = Vector3.one * 12f; } if (didUpdateSceneVisuals = Object.op_Implicit((Object)(object)RunArtifactManager.instance) && RunArtifactManager.instance.IsArtifactEnabled(Artifacts.SlipperyTerrain)) { ((MonoBehaviour)instance).StartCoroutine(UpdateSceneVisuals()); } } public static IEnumerator UpdateSceneVisuals() { yield return (object)new WaitForEndOfFrame(); if (slipperyMaterialInstances != null) { foreach (Material value2 in slipperyMaterialInstances.Values) { Object.Destroy((Object)(object)value2); } slipperyMaterialInstances.Clear(); } else { slipperyMaterialInstances = new Dictionary<Material, Material>(); } Shader val = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); Shader val2 = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGSnowTopped.shader").WaitForCompletion(); Shader val3 = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGTriplanarTerrainBlend.shader").WaitForCompletion(); MeshRenderer[] array = Object.FindObjectsOfType<MeshRenderer>(); for (int i = 0; i < array.Length; i++) { MeshRenderer val4 = array[i]; if (((Component)val4).gameObject.layer != LayerIndex.world.intVal || !((Component)val4).gameObject.activeInHierarchy || Object.op_Implicit((Object)(object)((Component)val4).GetComponent<Decal>())) { continue; } Material sharedMaterial = ((Renderer)val4).sharedMaterial; if (!Object.op_Implicit((Object)(object)sharedMaterial)) { continue; } if (!slipperyMaterialInstances.TryGetValue(sharedMaterial, out var value)) { if ((Object)(object)sharedMaterial.shader == (Object)(object)val) { value = new Material(sharedMaterial); value.SetFloat("_SpecularStrength", 0.6f); value.SetFloat("_SpecularExponent ", 10f); } else if ((Object)(object)sharedMaterial.shader == (Object)(object)val2) { value = new Material(sharedMaterial); if (Object.op_Implicit((Object)(object)value.GetTexture("_SnowNormalTex"))) { value.SetFloat("_SpecularStrength", 0.1f); value.SetFloat("_SpecularExponent", 20f); value.SetFloat("_SnowSpecularStrength", 0.4f); value.SetFloat("_SnowSpecularExponent", 8f); } else { value.SetFloat("_SpecularStrength", 0.4f); value.SetFloat("_SpecularExponent", 3f); } } else if ((Object)(object)sharedMaterial.shader == (Object)(object)val3) { value = new Material(sharedMaterial); value.SetFloat("_GreenChannelSpecularStrength", 0.15f); value.SetFloat("_GreenChannelSpecularExponent", 8f); } if (Object.op_Implicit((Object)(object)value)) { value.SetInt("_RampInfo", 1); slipperyMaterialInstances.Add(sharedMaterial, value); } } if (Object.op_Implicit((Object)(object)value)) { ((Renderer)array[i]).sharedMaterial = value; } } } public static void OnArtifactEnabled() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Expected O, but got Unknown //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Expected O, but got Unknown if (!didUpdateSceneVisuals) { ((MonoBehaviour)instance).StartCoroutine(UpdateSceneVisuals()); } object obj = <>O.<4>__CharacterMotor_OnGroundHit; if (obj == null) { hook_OnGroundHit val = CharacterMotor_OnGroundHit; <>O.<4>__CharacterMotor_OnGroundHit = val; obj = (object)val; } CharacterMotor.OnGroundHit += (hook_OnGroundHit)obj; object obj2 = <>O.<5>__GenericCharacterMain_ApplyJumpVelocity; if (obj2 == null) { Manipulator val2 = GenericCharacterMain_ApplyJumpVelocity; <>O.<5>__GenericCharacterMain_ApplyJumpVelocity = val2; obj2 = (object)val2; } GenericCharacterMain.ApplyJumpVelocity += (Manipulator)obj2; object obj3 = <>O.<6>__CharacterMotor_PreMove; if (obj3 == null) { Manipulator val3 = CharacterMotor_PreMove; <>O.<6>__CharacterMotor_PreMove = val3; obj3 = (object)val3; } CharacterMotor.PreMove += (Manipulator)obj3; object obj4 = <>O.<7>__ProjectileStickOnImpact_UpdateSticking; if (obj4 == null) { hook_UpdateSticking val4 = ProjectileStickOnImpact_UpdateSticking; <>O.<7>__ProjectileStickOnImpact_UpdateSticking = val4; obj4 = (object)val4; } ProjectileStickOnImpact.UpdateSticking += (hook_UpdateSticking)obj4; object obj5 = <>O.<8>__ProjectileStickOnImpact_Awake; if (obj5 == null) { hook_Awake val5 = ProjectileStickOnImpact_Awake; <>O.<8>__ProjectileStickOnImpact_Awake = val5; obj5 = (object)val5; } ProjectileStickOnImpact.Awake += (hook_Awake)obj5; } public static void OnArtifactDisabled() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Expected O, but got Unknown //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_005b: Expected O, but got Unknown //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Expected O, but got Unknown //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Expected O, but got Unknown object obj = <>O.<8>__ProjectileStickOnImpact_Awake; if (obj == null) { hook_Awake val = ProjectileStickOnImpact_Awake; <>O.<8>__ProjectileStickOnImpact_Awake = val; obj = (object)val; } ProjectileStickOnImpact.Awake -= (hook_Awake)obj; object obj2 = <>O.<7>__ProjectileStickOnImpact_UpdateSticking; if (obj2 == null) { hook_UpdateSticking val2 = ProjectileStickOnImpact_UpdateSticking; <>O.<7>__ProjectileStickOnImpact_UpdateSticking = val2; obj2 = (object)val2; } ProjectileStickOnImpact.UpdateSticking -= (hook_UpdateSticking)obj2; object obj3 = <>O.<6>__CharacterMotor_PreMove; if (obj3 == null) { Manipulator val3 = CharacterMotor_PreMove; <>O.<6>__CharacterMotor_PreMove = val3; obj3 = (object)val3; } CharacterMotor.PreMove -= (Manipulator)obj3; object obj4 = <>O.<5>__GenericCharacterMain_ApplyJumpVelocity; if (obj4 == null) { Manipulator val4 = GenericCharacterMain_ApplyJumpVelocity; <>O.<5>__GenericCharacterMain_ApplyJumpVelocity = val4; obj4 = (object)val4; } GenericCharacterMain.ApplyJumpVelocity -= (Manipulator)obj4; object obj5 = <>O.<4>__CharacterMotor_OnGroundHit; if (obj5 == null) { hook_OnGroundHit val5 = CharacterMotor_OnGroundHit; <>O.<4>__CharacterMotor_OnGroundHit = val5; obj5 = (object)val5; } CharacterMotor.OnGroundHit -= (hook_OnGroundHit)obj5; } private static void ProjectileStickOnImpact_Awake(orig_Awake orig, ProjectileStickOnImpact self) { orig.Invoke(self); Collider val = default(Collider); if (((Component)self).TryGetComponent<Collider>(ref val)) { val.sharedMaterial = SlidingProjectile; } ProjectileSimple val2 = default(ProjectileSimple); if (((Component)self).TryGetComponent<ProjectileSimple>(ref val2)) { val2.updateAfterFiring = false; self.rigidbody.useGravity = true; } } private static void ProjectileStickOnImpact_UpdateSticking(orig_UpdateSticking orig, ProjectileStickOnImpact self) { if (self.hitHurtboxIndex == -2 && !Object.op_Implicit((Object)(object)((Component)self).GetComponent<ProjectileGrappleController>())) { if (self.rigidbody.isKinematic) { self.rigidbody.isKinematic = false; self.rigidbody.collisionDetectionMode = (CollisionDetectionMode)1; } } else { orig.Invoke(self); } } private static void CharacterMotor_OnGroundHit(orig_OnGroundHit orig, CharacterMotor self, Collider hitCollider, Vector3 hitNormal, Vector3 hitPoint, ref HitStabilityReport hitStabilityReport) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0004: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self, hitCollider, hitNormal, hitPoint, ref hitStabilityReport); self.isAirControlForced = true; } private static void GenericCharacterMain_ApplyJumpVelocity(ILContext il) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_006d: 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) ILCursor val = new ILCursor(il); if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<KinematicCharacterMotor>(x, "ForceUnground") }) && val.TryGotoPrev((MoveType)0, new Func<Instruction, bool>[1] { (Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMotor>(x, "velocity") })) { val.Emit(OpCodes.Ldarg, 0); val.Emit(OpCodes.Ldarg, 2); val.EmitDelegate<Func<Vector3, CharacterMotor, float, Vector3>>((Func<Vector3, CharacterMotor, float, Vector3>)delegate(Vector3 newVelocity, CharacterMotor motor, float horizontalMultiplier) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) float num = (horizontalMultiplier - 1f) / horizontalMultiplier * horizontalJumpBoostCoefficient; return new Vector3(motor.velocity.x + newVelocity.x * num, newVelocity.y, motor.velocity.z + newVelocity.z * num); }); } else { ((BaseUnityPlugin)instance).Logger.LogError((object)"Entropy.GenericCharacterMain_ApplyJumpVelocity IL hook failed!"); } } private static void CharacterMotor_PreMove(ILContext il) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); int locTargetIndex = -1; int locAcclerationIndex = -1; if (val.TryGotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt(x, (MethodBase)typeof(Vector3).GetMethod("MoveTowards")), (Instruction x) => ILPatternMatchingExt.MatchStfld<CharacterMotor>(x, "velocity") }) && val.TryGotoPrev((MoveType)0, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdfld<CharacterMotor>(x, "velocity"), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locTargetIndex), (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, ref locAcclerationIndex) })) { val.Emit(OpCodes.Ldloc, locTargetIndex); val.Emit(OpCodes.Ldloc, locAcclerationIndex); val.Emit(OpCodes.Ldarg, 0); val.EmitDelegate<Func<Vector3, float, CharacterMotor, float>>((Func<Vector3, float, CharacterMotor, float>)delegate(Vector3 target, float acceleration, CharacterMotor motor) { float num = baseAccelerationMultiplier; if (((Vector3)(ref target)).sqrMagnitude > ((Vector3)(ref motor.velocity)).sqrMagnitude) { num *= positiveAccelerationCoefficient; } else if (!motor.isGrounded) { num *= airAccelerationCoefficient; } acceleration = ((Object.op_Implicit((Object)(object)motor.body) && !(motor.body.moveSpeed * motor.body.moveSpeed >= ((Vector3)(ref motor.velocity)).sqrMagnitude)) ? (acceleration * (1f - (1f - num) * Mathf.Sqrt(motor.body.moveSpeed / ((Vector3)(ref motor.velocity)).magnitude))) : (acceleration * num)); return acceleration; }); val.Emit(OpCodes.Stloc, locAcclerationIndex); } else { ((BaseUnityPlugin)instance).Logger.LogError((object)"Entropy.CharacterMotor_PreMove IL hook failed!"); } } } public static class GodlessEye { public class DelayedDeathEye : MonoBehaviour { public struct DeathGroup { public FixedTimeStamp time; public List<CharacterBody> victimBodies; } public Queue<DeathGroup> deathQueue = new Queue<DeathGroup>(); public TeamMask cleanupTeams = TeamMask.none; private bool hasRunCleanup; private GameObject destroyEffectPrefab; public void EnqueueDeath(DeathGroup death) { deathQueue.Enqueue(death); } public void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) destroyEffectPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/BrittleDeath.prefab").WaitForCompletion(); } public void Start() { Util.PlaySound("Play_vagrant_R_explode", ((Component)this).gameObject); } public void FixedUpdate() { if (!NetworkServer.active) { return; } if (deathQueue.Count <= 0) { RunCleanup(); ((Behaviour)this).enabled = false; return; } DeathGroup deathGroup = deathQueue.Peek(); if (!((FixedTimeStamp)(ref deathGroup.time)).hasPassed) { return; } foreach (CharacterBody victimBody in deathQueue.Dequeue().victimBodies) { DestroyVictim(victimBody); } } public void RunCleanup() { //IL_004a: 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_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) if (hasRunCleanup) { return; } if (CharacterBody.readOnlyInstancesList.Count > 0) { for (int num = CharacterBody.readOnlyInstancesList.Count - 1; num >= 0; num--) { CharacterBody val = CharacterBody.readOnlyInstancesList[num]; if (Object.op_Implicit((Object)(object)val.teamComponent) && ((TeamMask)(ref cleanupTeams)).HasTeam(val.teamComponent.teamIndex)) { Vector3 val2 = val.corePosition - ((Component)this).transform.position; if (((Vector3)(ref val2)).sqrMagnitude <= range * range) { DestroyVictim(val); } } } } hasRunCleanup = true; } public void DestroyVictim(CharacterBody victim) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown if (!Object.op_Implicit((Object)(object)victim)) { return; } if (Object.op_Implicit((Object)(object)victim.master)) { if (victim.master.destroyOnBodyDeath) { Object.Destroy((Object)(object)((Component)victim.master).gameObject, 1f); } victim.master.preventGameOver = false; } EffectManager.SpawnEffect(destroyEffectPrefab, new EffectData { origin = victim.corePosition, scale = victim.radius }, true); Object.Destroy((Object)(object)((Component)victim).gameObject); } } [CompilerGenerated] private static class <>O { public static LoadStaticContentAsyncDelegate <0>__LoadStaticContentAsync; public static Func<EquipmentSlot, bool> <1>__FireDeathEye; } public static bool enabled = true; public static float range = 200f; public static float duration = 2f; public static int maxConsecutiveEnemies = 10; public static GameObject DelayedDeathHandler { get; private set; } public static void Init() { //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown Ivyl.Bind<bool>(FreeSkillSaturday.instance.EquipmentConfig, ref enabled, "Godless Eye", string.Format("Enable {0}?", "Godless Eye"), (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.EquipmentConfig, ref range, "Godless Eye", "Range", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.EquipmentConfig, ref duration, "Godless Eye", "Duration", (ConfigDescription)null); Ivyl.Bind<int>(FreeSkillSaturday.instance.EquipmentConfig, ref maxConsecutiveEnemies, "Godless Eye", "Maximum Consecutive Enemies", (ConfigDescription)null); if (enabled) { FreeSkillSaturday instance = FreeSkillSaturday.instance; object obj = <>O.<0>__LoadStaticContentAsync; if (obj == null) { LoadStaticContentAsyncDelegate val = LoadStaticContentAsync; <>O.<0>__LoadStaticContentAsync = val; obj = (object)val; } ((BaseContentPlugin)instance).loadStaticContentAsync += (LoadStaticContentAsyncDelegate)obj; } } private static IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { AsyncOperationHandle<Material> matMSObeliskLightning = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/mysteryspace/matMSObeliskLightning.mat", ref matMSObeliskLightning); AsyncOperationHandle<Material> matMSObeliskHeart = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/mysteryspace/matMSObeliskHeart.mat", ref matMSObeliskHeart); AsyncOperationHandle<Material> matMSStarsLink = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/mysteryspace/matMSStarsLink.mat", ref matMSStarsLink); AsyncOperationHandle<Material> matJellyfishLightning = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/Common/VFX/matJellyfishLightning.mat", ref matJellyfishLightning); AssetBundleRequest<GameObject> PickupDeathEye = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "PickupDeathEye", ref PickupDeathEye); GameObject pickupModelPrefab = PickupDeathEye.asset; MeshRenderer component = ((Component)pickupModelPrefab.transform.Find("mdlDeathEye")).GetComponent<MeshRenderer>(); Material[] sharedMaterials = ((Renderer)component).sharedMaterials; sharedMaterials[1] = matMSObeliskLightning.Result; ((Renderer)component).sharedMaterials = sharedMaterials; GameObject consumedPickupModelPrefab = Ivyl.ClonePrefab(pickupModelPrefab, "PickupDeathEyeConsumed"); Object.DestroyImmediate((Object)(object)((Component)consumedPickupModelPrefab.transform.Find("EyeBallFX")).gameObject); ((Renderer)((Component)pickupModelPrefab.transform.Find("EyeBallFX/Weird Sphere")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = matMSObeliskHeart.Result; ((Component)pickupModelPrefab.transform.Find("EyeBallFX/LongLifeNoiseTrails, Bright")).GetComponent<ParticleSystemRenderer>().trailMaterial = matMSStarsLink.Result; ((Renderer)((Component)pickupModelPrefab.transform.Find("EyeBallFX/Lightning")).GetComponent<ParticleSystemRenderer>()).sharedMaterial = matJellyfishLightning.Result; AssetBundleRequest<Sprite> texDeathEyeIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texDeathEyeIcon", ref texDeathEyeIcon); Equipment.DeathEye = EquipmentExtensions.SetActivationFunction<EquipmentDef>(EquipmentExtensions.SetPickupModelPrefab<EquipmentDef>(EquipmentExtensions.SetFlags<EquipmentDef>(EquipmentExtensions.SetAvailability<EquipmentDef>(EquipmentExtensions.SetCooldown<EquipmentDef>(EquipmentExtensions.SetEquipmentType<EquipmentDef>(EquipmentExtensions.SetIconSprite<EquipmentDef>(ContentPackExtensions.DefineEquipment(((BaseContentPlugin)instance).Content, "DeathEye"), texDeathEyeIcon.asset), (EquipmentType)1), 60f), (EquipmentAvailability)2), (EquipmentFlags)3), pickupModelPrefab, new ModelPanelParams(Vector3.zero, 3f, 10f, (Transform)null, (Transform)null)), (Func<EquipmentSlot, bool>)FireDeathEye); AssetBundleRequest<Sprite> texDeathEyeConsumedIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texDeathEyeConsumedIcon", ref texDeathEyeConsumedIcon); Equipment.DeathEyeConsumed = EquipmentExtensions.SetPickupModelPrefab<EquipmentDef>(EquipmentExtensions.SetFlags<EquipmentDef>(EquipmentExtensions.SetAvailability<EquipmentDef>(EquipmentExtensions.SetEquipmentType<EquipmentDef>(EquipmentExtensions.SetIconSprite<EquipmentDef>(ContentPackExtensions.DefineEquipment(((BaseContentPlugin)instance).Content, "DeathEyeConsumed"), texDeathEyeConsumedIcon.asset), (EquipmentType)1), (EquipmentAvailability)3), (EquipmentFlags)3), consumedPickupModelPrefab); Equipment.DeathEyeConsumed.colorIndex = (ColorIndex)10; AssetBundleRequest<Sprite> texCompleteMultiplayerUnknownEndingIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texCompleteMultiplayerUnknownEndingIcon", ref texCompleteMultiplayerUnknownEndingIcon); Achievements.CompleteMultiplayerUnknownEnding = ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)ContentPackExtensions.DefineAchievementForEquipment(((BaseContentPlugin)instance).Content, "CompleteMultiplayerUnknownEnding", Equipment.DeathEye)).SetIconSprite(texCompleteMultiplayerUnknownEndingIcon.asset)).SetTrackerTypes(typeof(CompleteMultiplayerUnknownEndingAchievement), typeof(CompleteMultiplayerUnknownEndingAchievement.ServerAchievement)); ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)Achievements.CompleteMultiplayerUnknownEnding).AchievementDef.identifier = "CompleteMultiplayerUnknownEnding"; GameObject val = Ivyl.CreatePrefab("DisplayDeathEye"); val.AddComponent<ItemDisplay>(); ItemFollower obj = val.AddComponent<ItemFollower>(); obj.targetObject = val; obj.followerPrefab = pickupModelPrefab; obj.distanceDampTime = 0.005f; obj.distanceMaxSpeed = 200f; GameObject val2 = Ivyl.ClonePrefab(val, "DisplayDeathEyeConsumed"); ItemFollower component2 = val2.GetComponent<ItemFollower>(); component2.targetObject = val2; component2.followerPrefab = consumedPickupModelPrefab; AddDisplayRules(new ItemDisplaySpec(Equipment.DeathEye, val, (LimbFlags)0)); AddDisplayRules(new ItemDisplaySpec(Equipment.DeathEyeConsumed, val2, (LimbFlags)0)); yield return CreateDelayedDeathHandlerAsync(); static void AddDisplayRules(ItemDisplaySpec itemDisplay) { //IL_0015: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_018a: 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_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0283: Unknown result type (might be due to invalid IL or missing references) //IL_0297: Unknown result type (might be due to invalid IL or missing references) //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02d6: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0315: 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_033d: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03cf: Unknown result type (might be due to invalid IL or missing references) //IL_03e3: Unknown result type (might be due to invalid IL or missing references) //IL_03f9: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) //IL_0422: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Unknown result type (might be due to invalid IL or missing references) //IL_0474: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) IDictionary<string, ItemDisplayRuleSet> itemDisplayRuleSets = instance.itemDisplayRuleSets; _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCommando"], itemDisplay, "Head", new Vector3(0.001f, 0.545f, -0.061f), new Vector3(0f, 90f, 0f), new Vector3(0.069f, 0.069f, 0.069f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsHuntress"], itemDisplay, "Head", new Vector3(-0.002f, 0.486f, -0.158f), new Vector3(359.97f, 89.949f, 345.155f), new Vector3(0.067f, 0.067f, 0.067f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsBandit2"], itemDisplay, "Head", new Vector3(-0.001f, 0.367f, -0.002f), new Vector3(0f, 89.995f, 0.001f), new Vector3(0.066f, 0.066f, 0.066f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsToolbot"], itemDisplay, "Head", new Vector3(-0.002f, 4.049f, 3.237f), new Vector3(0.708f, 89.264f, 50.748f), new Vector3(0.111f, 0.111f, 0.111f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsEngi"], itemDisplay, "Chest", new Vector3(-0.001f, 1.049f, 0.174f), new Vector3(0f, 90f, 0f), new Vector3(0.089f, 0.089f, 0.089f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsMage"], itemDisplay, "Head", new Vector3(-0.002f, 0.328f, 0.003f), new Vector3(0f, 90f, 0f), new Vector3(0.055f, 0.055f, 0.055f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsMerc"], itemDisplay, "Head", new Vector3(-0.002f, 0.452f, -0.01f), new Vector3(0f, 90f, 0f), new Vector3(0.06f, 0.06f, 0.06f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsTreebot"], itemDisplay, "Chest", new Vector3(0.157f, 3.44f, 0f), new Vector3(0f, 90f, 0f), new Vector3(0.148f, 0.148f, 0.148f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsLoader"], itemDisplay, "Head", new Vector3(-0.002f, 0.442f, 0f), new Vector3(0f, 90f, 0f), new Vector3(0.089f, 0.089f, 0.089f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCroco"], itemDisplay, "Head", new Vector3(-0.036f, -0.134f, 3.731f), new Vector3(0.141f, 89.889f, 298.828f), new Vector3(0.152f, 0.152f, 0.152f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCaptain"], itemDisplay, "Base", new Vector3(-0.03f, 0.199f, -1.281f), new Vector3(0f, 90f, 90f), new Vector3(0.062f, 0.062f, 0.062f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsRailGunner"], itemDisplay, "Head", new Vector3(-0.001f, 0.363f, -0.089f), new Vector3(0f, 90f, 0f), new Vector3(0.056f, 0.056f, 0.056f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsVoidSurvivor"], itemDisplay, "Head", new Vector3(-0.006f, 0.322f, -0.217f), new Vector3(357.745f, 91.815f, 321.156f), new Vector3(0.069f, 0.069f, 0.069f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsEquipmentDrone"], itemDisplay, "HeadCenter", new Vector3(0f, 0f, 1.987f), new Vector3(0f, 90f, 90f), new Vector3(0.351f, 0.351f, 0.351f)); } } public static IEnumerator CreateDelayedDeathHandlerAsync() { AsyncOperationHandle<GameObject> MSObelisk = default(AsyncOperationHandle<GameObject>); yield return Ivyl.LoadAddressableAssetAsync<GameObject>((object)"RoR2/Base/mysteryspace/MSObelisk.prefab", ref MSObelisk); DelayedDeathHandler = Ivyl.ClonePrefab(((Component)MSObelisk.Result.transform.Find("Stage1FX")).gameObject, "DelayedDeathHandler"); DelayedDeathHandler.SetActive(true); DelayedDeathHandler.AddComponent<NetworkIdentity>(); DelayedDeathHandler.AddComponent<DelayedDeathEye>(); DelayedDeathHandler.AddComponent<DestroyOnTimer>().duration = duration; Object.DestroyImmediate((Object)(object)((Component)DelayedDeathHandler.transform.Find("LongLifeNoiseTrails, Bright")).gameObject); Object.DestroyImmediate((Object)(object)((Component)DelayedDeathHandler.transform.Find("PersistentLight")).gameObject); Ivyl.Add<GameObject>(((BaseContentPlugin)instance).Content.networkedObjectPrefabs, DelayedDeathHandler); } public static bool FireDeathEye(EquipmentSlot equipmentSlot) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e6: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)equipmentSlot.healthComponent) || !equipmentSlot.healthComponent.alive) { return false; } CharacterBody characterBody = equipmentSlot.characterBody; Vector3 val = ((characterBody != null) ? characterBody.corePosition : ((Component)equipmentSlot).transform.position); DelayedDeathEye component = Object.Instantiate<GameObject>(DelayedDeathHandler, val, Quaternion.identity).GetComponent<DelayedDeathEye>(); TeamMask allButNeutral = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)equipmentSlot.teamComponent)) { ((TeamMask)(ref allButNeutral)).RemoveTeam(equipmentSlot.teamComponent.teamIndex); } component.cleanupTeams = allButNeutral; List<DelayedDeathEye.DeathGroup> list = new List<DelayedDeathEye.DeathGroup>(); int num = 0; BodyIndex val2 = (BodyIndex)(-1); List<CharacterBody> list2 = new List<CharacterBody>(); foreach (CharacterBody readOnlyInstances in CharacterBody.readOnlyInstancesList) { if (!((TeamMask)(ref allButNeutral)).HasTeam(readOnlyInstances.teamComponent.teamIndex)) { continue; } Vector3 val3 = readOnlyInstances.corePosition - val; if (!(((Vector3)(ref val3)).sqrMagnitude <= range * range)) { continue; } if (readOnlyInstances.bodyIndex != val2 || num >= maxConsecutiveEnemies) { val2 = readOnlyInstances.bodyIndex; num = 0; if (list2.Count > 0) { list.Add(new DelayedDeathEye.DeathGroup { victimBodies = new List<CharacterBody>(list2) }); } list2.Clear(); } list2.Add(readOnlyInstances); num++; } if (list2.Count > 0) { list.Add(new DelayedDeathEye.DeathGroup { victimBodies = new List<CharacterBody>(list2) }); } list2.Clear(); list.Add(new DelayedDeathEye.DeathGroup { victimBodies = new List<CharacterBody> { equipmentSlot.characterBody } }); if (list.Count > 0) { float num2 = duration / (float)list.Count; for (int i = 0; i < list.Count; i++) { DelayedDeathEye.DeathGroup death = list[i]; death.time = FixedTimeStamp.now + num2 * (float)i; component.EnqueueDeath(death); } } NetworkServer.Spawn(((Component)component).gameObject); CharacterBody characterBody2 = equipmentSlot.characterBody; if (Object.op_Implicit((Object)(object)((characterBody2 != null) ? characterBody2.inventory : null))) { CharacterMasterNotificationQueue.SendTransformNotification(equipmentSlot.characterBody.master, equipmentSlot.characterBody.inventory.currentEquipmentIndex, Equipment.DeathEyeConsumed.equipmentIndex, (TransformationType)0); equipmentSlot.characterBody.inventory.SetEquipmentIndex(Equipment.DeathEyeConsumed.equipmentIndex); } return true; } } public static class Items { [CanBeNull] public static ItemDef Theremin; [CanBeNull] public static ItemDef Arrowhead; } public static class Equipment { [CanBeNull] public static EquipmentDef DeathEye; [CanBeNull] public static EquipmentDef DeathEyeConsumed; } public static class Buffs { [CanBeNull] public static BuffDef Toxin; [CanBeNull] public static BuffDef ToxinSlow; } public static class Elites { [CanBeNull] public static EliteWrapper Magnetic; [CanBeNull] public static EliteWrapper Water; [CanBeNull] public static EliteWrapper Barrier; } public static class Artifacts { [CanBeNull] public static ArtifactDef SlipperyTerrain; } public static class Skills { [CanBeNull] public static Venom.ToxinSkillDef CrocoPassiveToxin; [CanBeNull] public static SkillDef CrocoSuperBite; [CanBeNull] public static RailgunSkillDef RailgunnerElectricGrenade; [CanBeNull] public static SkillDef ToolbotRepair; [CanBeNull] public static XQRChip.BouncingBulletsSkillDef RailgunnerPassiveBouncingBullets; [CanBeNull] public static SkillDef ToolbotReboot; } public static class Achievements { [CanBeNull] public static AchievementWrapper BurnMultipleEnemies; [CanBeNull] public static AchievementWrapper ObtainArtifactSlipperyTerrain; [CanBeNull] public static AchievementWrapper CompleteMultiplayerUnknownEnding; [CanBeNull] public static AchievementWrapper CrocoKillBossCloaked; [CanBeNull] public static AchievementWrapper CrocoBeatArenaFast; [CanBeNull] public static AchievementWrapper RailgunnerTravelDistance; [CanBeNull] public static AchievementWrapper RailgunnerHipster; [CanBeNull] public static AchievementWrapper RailgunnerEliteSniper; [CanBeNull] public static AchievementWrapper ToolbotOverclocked; } public static class FlintArrowhead { [CompilerGenerated] private static class <>O { public static LoadStaticContentAsyncDelegate <0>__LoadStaticContentAsync; public static hook_InitDotCatalog <1>__DotController_InitDotCatalog; public static HitEnemyAcceptedDelegate <2>__GlobalEventManager_onHitEnemyAcceptedServer; } public static bool enabled = true; public static float damage = 3f; public static float damagePerStack = 3f; public static DamageColorIndex StrongerBurn { get; private set; } public static GameObject ImpactArrowhead { get; private set; } public static GameObject ImpactArrowheadStronger { get; private set; } public static void Init() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown Ivyl.Bind<bool>(FreeSkillSaturday.instance.ItemsConfig, ref enabled, "Flint Arrowhead", string.Format("Enable {0}?", "Flint Arrowhead"), (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ItemsConfig, ref damage, "Flint Arrowhead", "Flat Damage", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ItemsConfig, ref damagePerStack, "Flint Arrowhead", "Flat Damage Per Stack", (ConfigDescription)null); if (enabled) { StrongerBurn = ColorsAPI.RegisterDamageColor(Color32.op_Implicit(new Color32((byte)244, (byte)113, (byte)80, byte.MaxValue))); FreeSkillSaturday instance = FreeSkillSaturday.instance; object obj = <>O.<0>__LoadStaticContentAsync; if (obj == null) { LoadStaticContentAsyncDelegate val = LoadStaticContentAsync; <>O.<0>__LoadStaticContentAsync = val; obj = (object)val; } ((BaseContentPlugin)instance).loadStaticContentAsync += (LoadStaticContentAsyncDelegate)obj; object obj2 = <>O.<1>__DotController_InitDotCatalog; if (obj2 == null) { hook_InitDotCatalog val2 = DotController_InitDotCatalog; <>O.<1>__DotController_InitDotCatalog = val2; obj2 = (object)val2; } DotController.InitDotCatalog += (hook_InitDotCatalog)obj2; object obj3 = <>O.<2>__GlobalEventManager_onHitEnemyAcceptedServer; if (obj3 == null) { HitEnemyAcceptedDelegate val3 = GlobalEventManager_onHitEnemyAcceptedServer; <>O.<2>__GlobalEventManager_onHitEnemyAcceptedServer = val3; obj3 = (object)val3; } GlobalEventManager.onHitEnemyAcceptedServer += (HitEnemyAcceptedDelegate)obj3; } } private static IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { AssetBundleRequest<Sprite> texArrowheadIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texArrowheadIcon", ref texArrowheadIcon); AssetBundleRequest<GameObject> PickupArrowhead = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "PickupArrowhead", ref PickupArrowhead); Items.Arrowhead = ItemExtensions.SetTags<ItemDef>(ItemExtensions.SetPickupModelPrefab<ItemDef>(ItemExtensions.SetItemTier<ItemDef>(ItemExtensions.SetIconSprite<ItemDef>(ContentPackExtensions.DefineItem(((BaseContentPlugin)instance).Content, "Arrowhead"), texArrowheadIcon.asset), (ItemTier)0), PickupArrowhead.asset, new ModelPanelParams(Vector3.zero, 1f, 8f, (Transform)null, (Transform)null)), (ItemTag[])(object)new ItemTag[1] { (ItemTag)1 }); AssetBundleRequest<Sprite> texBurnMultipleEnemiesIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texBurnMultipleEnemiesIcon", ref texBurnMultipleEnemiesIcon); Achievements.BurnMultipleEnemies = ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)ContentPackExtensions.DefineAchievementForItem(((BaseContentPlugin)instance).Content, "BurnMultipleEnemies", Items.Arrowhead)).SetIconSprite(texBurnMultipleEnemiesIcon.asset)).SetTrackerTypes(typeof(BurnMultipleEnemiesAchievement), typeof(BurnMultipleEnemiesAchievement.ServerAchievement)); ((AchievementWrapper<AchievementWrapper, AchievementDef, UnlockableDef>)(object)Achievements.BurnMultipleEnemies).AchievementDef.identifier = "BurnMultipleEnemies"; AssetBundleRequest<GameObject> DisplayArrowhead = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "DisplayArrowhead", ref DisplayArrowhead); Ivyl.SetupItemDisplay(DisplayArrowhead.asset); ItemDisplaySpec val = default(ItemDisplaySpec); ((ItemDisplaySpec)(ref val))..ctor(Items.Arrowhead, DisplayArrowhead.asset, (LimbFlags)0); IDictionary<string, ItemDisplayRuleSet> itemDisplayRuleSets = instance.itemDisplayRuleSets; _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCommando"], val, "Pelvis", new Vector3(-0.162f, -0.09f, -0.053f), new Vector3(7.522f, 244.056f, 358.818f), new Vector3(0.469f, 0.469f, 0.469f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsHuntress"], val, "Arrow", new Vector3(0.343f, 0f, 0f), new Vector3(87.415f, 144.866f, 55.112f), new Vector3(0.388f, 0.388f, 0.388f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsBandit2"], val, "Chest", new Vector3(0.153f, -0.144f, 0.066f), new Vector3(355.538f, 89.398f, 170.59f), new Vector3(0.507f, 0.507f, 0.507f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsToolbot"], val, "Head", new Vector3(-0.925f, 2.842f, 1.601f), new Vector3(45.327f, 331.491f, 198.947f), new Vector3(3.118f, 3.118f, 3.118f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsEngi"], val, "Pelvis", new Vector3(0.205f, 0.05f, -0.102f), new Vector3(0f, 114.381f, 354.036f), new Vector3(0.523f, 0.523f, 0.523f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsEngiTurret"], val, "Head", new Vector3(0.681f, 1.016f, -0.988f), new Vector3(0.775f, 180f, 202.127f), new Vector3(1.588f, 1.588f, 1.588f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsEngiWalkerTurret"], val, "Head", new Vector3(0.566f, 1.491f, -0.94f), new Vector3(7.103f, 180f, 204.769f), new Vector3(1.588f, 1.588f, 1.588f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsMage"], val, "Pelvis", new Vector3(-0.159f, -0.085f, -0.09f), new Vector3(356.235f, 252.299f, 344.311f), new Vector3(0.46f, 0.46f, 0.46f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsMerc"], val, "UpperArmL", new Vector3(0.161f, -0.006f, 0.001f), new Vector3(29.587f, 212.128f, 321.824f), new Vector3(0.493f, 0.493f, 0.493f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsTreebot"], val, "PlatformBase", new Vector3(1.062f, 0.782f, 0.174f), new Vector3(337.728f, 201.301f, 224.188f), new Vector3(1.056f, 1.056f, 1.056f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsLoader"], val, "MechUpperArmL", new Vector3(0.037f, 0.053f, -0.154f), new Vector3(335.055f, 244.872f, 293.27f), new Vector3(0.547f, 0.547f, 0.547f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCroco"], val, "Head", new Vector3(1.926f, -0.053f, -0.112f), new Vector3(45.85f, 17.71f, 113.992f), new Vector3(5.36f, 5.36f, 5.36f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCaptain"], val, "ClavicleL", new Vector3(0.021f, 0.136f, -0.226f), new Vector3(52.975f, 287.284f, 287.388f), new Vector3(0.587f, 0.587f, 0.587f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsRailGunner"], val, "Pelvis", new Vector3(0.155f, 0.079f, -0.029f), new Vector3(10.264f, 100.904f, 358.845f), new Vector3(0.434f, 0.434f, 0.434f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsVoidSurvivor"], val, "ShoulderL", new Vector3(0.063f, 0.289f, 0.052f), new Vector3(13.815f, 321.452f, 169.227f), new Vector3(0.597f, 0.597f, 0.597f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsScav"], val, "Weapon", new Vector3(3.037f, 8.08f, 2.629f), new Vector3(45.304f, 318.616f, 106.156f), new Vector3(5.5f, 5.5f, 5.5f)); yield return CreateImpactArrowheadAsync(); yield return CreateImpactArrowheadStrongerAsync(); } public static IEnumerator CreateImpactArrowheadAsync() { AsyncOperationHandle<GameObject> OmniExplosionVFXQuick = default(AsyncOperationHandle<GameObject>); yield return Ivyl.LoadAddressableAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniExplosionVFXQuick.prefab", ref OmniExplosionVFXQuick); ImpactArrowhead = Ivyl.ClonePrefab(OmniExplosionVFXQuick.Result, "ImpactArrowhead"); EffectComponent val = default(EffectComponent); if (ImpactArrowhead.TryGetComponent<EffectComponent>(ref val)) { val.soundName = "Play_item_proc_strengthenBurn"; } VFXAttributes val2 = default(VFXAttributes); if (ImpactArrowhead.TryGetComponent<VFXAttributes>(ref val2)) { val2.vfxPriority = (VFXPriority)0; } OmniEffect val3 = default(OmniEffect); if (ImpactArrowhead.TryGetComponent<OmniEffect>(ref val3)) { for (int num = val3.omniEffectGroups.Length - 1; num >= 0; num--) { switch (val3.omniEffectGroups[num].name) { case "Scaled Smoke": case "Smoke Ring": case "Area Indicator Ring": case "Unscaled Smoke": case "Flames": ArrayUtils.ArrayRemoveAtAndResize<OmniEffectGroup>(ref val3.omniEffectGroups, num, 1); break; } } } ContentPackExtensions.AddEffectPrefab(((BaseContentPlugin)instance).Content, ImpactArrowhead); } public static IEnumerator CreateImpactArrowheadStrongerAsync() { AsyncOperationHandle<Material> matOmniHitspark3Gasoline = default(AsyncOperationHandle<Material>); yield return Ivyl.LoadAddressableAssetAsync<Material>((object)"RoR2/Base/IgniteOnKill/matOmniHitspark3Gasoline.mat", ref matOmniHitspark3Gasoline); ImpactArrowheadStronger = Ivyl.ClonePrefab(ImpactArrowhead, "ImpactArrowHeadStronger"); ((Component)ImpactArrowheadStronger.transform.GetChild(0)).GetComponent<Renderer>().sharedMaterial = matOmniHitspark3Gasoline.Result; ContentPackExtensions.AddEffectPrefab(((BaseContentPlugin)instance).Content, ImpactArrowheadStronger); } private static void DotController_InitDotCatalog(orig_InitDotCatalog orig) { //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) orig.Invoke(); DotController.dotDefs[7].damageColorIndex = StrongerBurn; } private static void GlobalEventManager_onHitEnemyAcceptedServer(DamageInfo damageInfo, GameObject victim, uint? dotMaxStacksFromAttacker) { //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_0091: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Invalid comparison between Unknown and I4 //IL_018b: 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_0192: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_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_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Invalid comparison between Unknown and I4 //IL_01d3: Expected O, but got Unknown CharacterBody val = default(CharacterBody); int num = default(int); if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) || !Ivyl.HasItem(val, Items.Arrowhead, ref num) || !Util.CheckRoll(100f * damageInfo.procCoefficient, val.master)) { return; } InflictDotInfo val2 = default(InflictDotInfo); val2.attackerObject = damageInfo.attacker; val2.dotIndex = (DotIndex)1; val2.victimObject = victim; val2.totalDamage = Ivyl.StackScaling(damage, damagePerStack, num); InflictDotInfo val3 = val2; StrengthenBurnUtils.CheckDotForUpgrade(val.inventory, ref val3); DotDef dotDef = DotController.GetDotDef(val3.dotIndex); if (dotDef != null) { DamageInfo val4 = new DamageInfo(); val4.attacker = val3.attackerObject; val4.crit = false; val4.damage = val3.totalDamage.Value; val4.force = Vector3.zero; val4.inflictor = val3.attackerObject; val4.position = damageInfo.position; val4.procCoefficient = 0f; val4.damageColorIndex = dotDef.damageColorIndex; val4.damageType = (DamageType)67110912; val4.dotIndex = val3.dotIndex; CharacterBody val5 = default(CharacterBody); if (Object.op_Implicit((Object)(object)val3.victimObject) && val3.victimObject.TryGetComponent<CharacterBody>(ref val5) && Object.op_Implicit((Object)(object)val5.healthComponent)) { val5.healthComponent.TakeDamage(val4); EffectManager.SpawnEffect(((int)val3.dotIndex == 1) ? ImpactArrowhead : ImpactArrowheadStronger, new EffectData { origin = damageInfo.position, rotation = Util.QuaternionSafeLookRotation(-damageInfo.force), scale = (((int)val3.dotIndex == 1) ? 1.5f : 2.5f) }, true); } } } } public static class Theremin { public class ThereminBehaviour : BaseItemBodyBehavior { public float currentBonus; public float currentBonusCoefficient; public int lastPercentBonus; [ItemDefAssociation(useOnServer = true, useOnClient = true)] public static ItemDef GetItemDef() { return Items.Theremin; } public void FixedUpdate() { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_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) if (TeleporterUtil.TryLocateTeleporter(out var location)) { Vector3 val = ((BaseItemBodyBehavior)this).body.corePosition - location; currentBonusCoefficient = 1000f / (1000f + ((Vector3)(ref val)).sqrMagnitude); currentBonus = currentBonusCoefficient * Ivyl.StackScaling(attackSpeedBonus, attackSpeedBonusPerStack, base.stack); } else { currentBonusCoefficient = 0f; currentBonus = 0f; } int num = (int)(currentBonus * 100f); if (num != lastPercentBonus) { lastPercentBonus = num; ((BaseItemBodyBehavior)this).body.MarkAllStatsDirty(); } } public void OnEnable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } public void OnDisable() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients -= new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender) && (Object)(object)sender == (Object)(object)((BaseItemBodyBehavior)this).body) { args.attackSpeedMultAdd += currentBonus; } } } [CompilerGenerated] private static class <>O { public static LoadStaticContentAsyncDelegate <0>__LoadStaticContentAsync; public static hook_UpdateTeleporterParameters <1>__MusicController_UpdateTeleporterParameters; } public static bool enabled = true; public static float attackSpeedBonus = 0.45f; public static float attackSpeedBonusPerStack = 0.35f; public static void Init() { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown Ivyl.Bind<bool>(FreeSkillSaturday.instance.ItemsConfig, ref enabled, "Theremin", string.Format("Enable {0}?", "Theremin"), (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ItemsConfig, ref attackSpeedBonus, "Theremin", "Attack Speed Bonus", (ConfigDescription)null); Ivyl.Bind<float>(FreeSkillSaturday.instance.ItemsConfig, ref attackSpeedBonusPerStack, "Theremin", "Attack Speed Bonus Per Stack", (ConfigDescription)null); if (enabled) { FreeSkillSaturday instance = FreeSkillSaturday.instance; object obj = <>O.<0>__LoadStaticContentAsync; if (obj == null) { LoadStaticContentAsyncDelegate val = LoadStaticContentAsync; <>O.<0>__LoadStaticContentAsync = val; obj = (object)val; } ((BaseContentPlugin)instance).loadStaticContentAsync += (LoadStaticContentAsyncDelegate)obj; object obj2 = <>O.<1>__MusicController_UpdateTeleporterParameters; if (obj2 == null) { hook_UpdateTeleporterParameters val2 = MusicController_UpdateTeleporterParameters; <>O.<1>__MusicController_UpdateTeleporterParameters = val2; obj2 = (object)val2; } MusicController.UpdateTeleporterParameters += (hook_UpdateTeleporterParameters)obj2; } } private static IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { AssetBundleRequest<Sprite> texThereminIcon = default(AssetBundleRequest<Sprite>); yield return Ivyl.LoadAssetAsync<Sprite>(instance.Assets, "texThereminIcon", ref texThereminIcon); AssetBundleRequest<GameObject> PickupTheremin = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "PickupTheremin", ref PickupTheremin); ItemDef obj = ItemExtensions.SetPickupModelPrefab<ItemDef>(ItemExtensions.SetItemTier<ItemDef>(ItemExtensions.SetIconSprite<ItemDef>(ContentPackExtensions.DefineItem(((BaseContentPlugin)instance).Content, "Theremin"), texThereminIcon.asset), (ItemTier)1), PickupTheremin.asset, new ModelPanelParams(new Vector3(56f, 180f, 0f), 1f, 5f, (Transform)null, (Transform)null)); ItemTag[] array = new ItemTag[3]; RuntimeHelpers.InitializeArray(array, (RuntimeFieldHandle)/*OpCode not supported: LdMemberToken*/); Items.Theremin = ItemExtensions.SetTags<ItemDef>(obj, (ItemTag[])(object)array); AssetBundleRequest<GameObject> DisplayTheremin = default(AssetBundleRequest<GameObject>); yield return Ivyl.LoadAssetAsync<GameObject>(instance.Assets, "DisplayTheremin", ref DisplayTheremin); Ivyl.SetupItemDisplay(DisplayTheremin.asset); ItemDisplaySpec val = default(ItemDisplaySpec); ((ItemDisplaySpec)(ref val))..ctor(Items.Theremin, DisplayTheremin.asset, (LimbFlags)0); IDictionary<string, ItemDisplayRuleSet> itemDisplayRuleSets = instance.itemDisplayRuleSets; _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsCommando"], val, "Stomach", new Vector3(0.13491f, -0.05978f, -0.126f), new Vector3(285.9316f, 354.6909f, 343.4794f), new Vector3(1.05089f, 1.06357f, 1.05089f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsHuntress"], val, "Pelvis", new Vector3(0.14773f, 0.04592f, 0.14647f), new Vector3(55.92511f, 189.9159f, 157.5366f), new Vector3(1.06336f, 1.06336f, 1.06336f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsBandit2"], val, "Stomach", new Vector3(0.03759f, -0.13868f, -0.20006f), new Vector3(293.316f, 358.5328f, 352.6877f), new Vector3(1.16451f, 1.16451f, 1.16451f)); _ = ref Ivyl.AddDisplayRule(itemDisplayRuleSets["idrsToolbot"], val, "Pelvis", new Vector3(2.16572f, 1.92139f, 0.36732f), new Vector3(85.40151f, 186.2415f, 189.3237f), new Vector3(11.436