Decompiled source of Aetherium v0.9.0
Aetherium.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using Aetherium; using Aetherium.Achievements; using Aetherium.Artifacts; using Aetherium.Compatability; using Aetherium.CoreModules; using Aetherium.Effect; using Aetherium.EliteEquipment; using Aetherium.Equipment; using Aetherium.Interactables; using Aetherium.Items; using Aetherium.Language; using Aetherium.StandaloneBuffs; using Aetherium.StandaloneBuffs.Tier1; using Aetherium.StandaloneBuffs.Tier3; using Aetherium.States.EliteEquipment.AffixSanguine; using Aetherium.States.Equipment.BellTotem; using Aetherium.States.Interactable.BuffBrazier; using Aetherium.Survivors; using Aetherium.Utils; using Aetherium.Utils.Components; using Aetherium.Utils.Easings; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.BrotherMonster; using EntityStates.ImpMonster; using HG.BlendableTypes; using HarmonyLib; using IL.RoR2; using KinematicCharacterController; using Microsoft.CodeAnalysis; using Mono.Cecil; using Mono.Cecil.Cil; using MonoMod.Cil; using On.RoR2; using On.RoR2.CharacterAI; using On.RoR2.Items; using On.RoR2.Orbs; using On.RoR2.Projectile; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.ExpansionManagement; using RoR2.Hologram; using RoR2.Navigation; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("Aetherium")] [assembly: AssemblyProduct("Aetherium")] [assembly: AssemblyTitle("Aetherium")] [assembly: AssemblyInformationalVersion("1.0.0+6b13d4e756abff352c0590e6c90107d3207d9f95")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [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 { [Microsoft.CodeAnalysis.Embedded] [CompilerGenerated] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class JarOfReshaping : EquipmentBase<JarOfReshaping> { public enum AbsorptionMode { ProjectilesOnly, ProjectilesAndOrbs } public class JarTracker : MonoBehaviour { public List<StoredProjectile> StoredProjectiles = new List<StoredProjectile>(); public CharacterBody Body; public Transform JarTransform; public float reflectionTimer; public float storageDecayTimer; public GameObject reflectionEffect; public bool isReflecting; private bool hasOrbHook; public void Awake() { Body = ((Component)this).GetComponent<CharacterBody>(); } public void OnEnable() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown if ((AbsorptionMode)AbsorptionType == AbsorptionMode.ProjectilesAndOrbs) { OrbManager.AddOrb += new hook_AddOrb(InterceptOrbs); hasOrbHook = true; } } public void OnDisable() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown if (hasOrbHook) { OrbManager.AddOrb -= new hook_AddOrb(InterceptOrbs); hasOrbHook = false; } if (Object.op_Implicit((Object)(object)reflectionEffect)) { Object.Destroy((Object)(object)reflectionEffect); } } public void ActivateReflection() { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) reflectionTimer = ReflectionDuration; isReflecting = true; if (NetworkServer.active) { EffectData val = new EffectData { origin = Body.corePosition, scale = ReflectionRadius, rootObject = ((Component)this).gameObject }; EffectManager.SpawnEffect(ReflectionBubblePrefab, val, true); } if (NetworkServer.active) { NetworkIdentity component = ((Component)this).GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncJarState(component.netId, isReflecting: true, reflectionTimer), (NetworkDestination)1); } } Util.PlaySound("Play_item_proc_armorReduction_shatter", ((Component)Body).gameObject); } public void FixedUpdate() { if (!NetworkServer.active) { return; } if (reflectionTimer > 0f) { reflectionTimer -= Time.fixedDeltaTime; if (reflectionTimer <= 0f) { isReflecting = false; } AbsorbProjectilesInRadius(); } if (StoredProjectiles.Count > 0) { storageDecayTimer += Time.fixedDeltaTime; if (storageDecayTimer >= 1f) { storageDecayTimer = 0f; DecayOldProjectiles(); } } if (StoredProjectiles.Count >= (int)MaxStoredProjectiles) { FireAllProjectiles(); } } private void AbsorbProjectilesInRadius() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //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_0033: 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) List<ProjectileController> list = new List<ProjectileController>(); new SphereSearch { radius = ReflectionRadius, mask = ((LayerIndex)(ref LayerIndex.projectile)).mask, origin = Body.corePosition }.RefreshCandidates().FilterCandidatesByProjectileControllers().GetProjectileControllers(list); foreach (ProjectileController item in list) { if (CanAbsorbProjectile(item)) { AbsorbProjectile(item); } } } private bool CanAbsorbProjectile(ProjectileController proj) { //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)proj.owner)) { return false; } CharacterBody component = proj.owner.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component)) { return false; } if ((Object)(object)component == (Object)(object)Body) { return false; } if (component.teamComponent.teamIndex == Body.teamComponent.teamIndex) { if ((bool)AllowFriendlyFireAbsorption && (int)FriendlyFireManager.friendlyFireMode > 0) { return true; } return false; } return true; } private void AbsorbProjectile(ProjectileController proj) { //IL_0033: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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) ProjectileDamage component = ((Component)proj).GetComponent<ProjectileDamage>(); if (!Object.op_Implicit((Object)(object)component)) { return; } StoredProjectiles.Add(new StoredProjectile { Damage = component.damage, DamageType = DamageTypeCombo.op_Implicit(component.damageType), DamageColorIndex = component.damageColorIndex, ProcCoefficient = proj.procCoefficient, OriginalPrefab = ProjectileCatalog.GetProjectilePrefab(proj.catalogIndex), TimeStored = Time.time, WasOrb = false }); SpawnAbsorbOrb(((Component)proj).transform.position); Util.PlayAttackSpeedSound("Play_item_proc_crit", ((Component)Body).gameObject, (float)StoredProjectiles.Count * 0.1f); if (NetworkServer.active) { NetworkIdentity component2 = ((Component)this).GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component2)) { NetMessageExtensions.Send((INetMessage)(object)new SyncJarAbsorption(component2.netId, ((Component)proj).transform.position, StoredProjectiles.Count), (NetworkDestination)1); } } Object.Destroy((Object)(object)((Component)proj).gameObject); } private void InterceptOrbs(orig_AddOrb orig, OrbManager self, Orb orb) { if (!isReflecting || reflectionTimer <= 0f) { orig.Invoke(self, orb); return; } HurtBox orbTarget = GetOrbTarget(orb); if (!Object.op_Implicit((Object)(object)orbTarget) || !Object.op_Implicit((Object)(object)orbTarget.healthComponent) || !((Object)(object)orbTarget.healthComponent.body == (Object)(object)Body) || !TryAbsorbOrb(orb)) { orig.Invoke(self, orb); } } private HurtBox GetOrbTarget(Orb orb) { DamageOrb val = (DamageOrb)(object)((orb is DamageOrb) ? orb : null); if (val != null) { return ((Orb)val).target; } LightningOrb val2 = (LightningOrb)(object)((orb is LightningOrb) ? orb : null); if (val2 != null) { return ((Orb)val2).target; } return ((orb is GenericDamageOrb) ? orb : null)?.target; } private bool TryAbsorbOrb(Orb orb) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: 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_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) float num = 0f; DamageType damageType = (DamageType)0; DamageColorIndex damageColorIndex = (DamageColorIndex)0; float procCoefficient = 1f; Vector3 val = Vector3.zero; DamageOrb val2 = (DamageOrb)(object)((orb is DamageOrb) ? orb : null); if (val2 != null) { num = val2.damageValue; damageType = DamageTypeCombo.op_Implicit(val2.orbDamageType); damageColorIndex = val2.damageColorIndex; procCoefficient = val2.procCoefficient; val = ((Orb)val2).origin; } else { LightningOrb val3 = (LightningOrb)(object)((orb is LightningOrb) ? orb : null); if (val3 != null) { num = val3.damageValue; damageType = DamageTypeCombo.op_Implicit(val3.damageType); damageColorIndex = val3.damageColorIndex; procCoefficient = val3.procCoefficient; val = ((Orb)val3).origin; } else { GenericDamageOrb val4 = (GenericDamageOrb)(object)((orb is GenericDamageOrb) ? orb : null); if (val4 != null) { num = val4.damageValue; damageType = DamageTypeCombo.op_Implicit(val4.damageType); damageColorIndex = val4.damageColorIndex; procCoefficient = val4.procCoefficient; val = ((Orb)val4).origin; } } } if (num <= 0f) { return false; } StoredProjectiles.Add(new StoredProjectile { Damage = num, DamageType = damageType, DamageColorIndex = damageColorIndex, ProcCoefficient = procCoefficient, OriginalPrefab = DefaultJarProjectile, TimeStored = Time.time, WasOrb = true }); SpawnAbsorbOrb(val); Util.PlayAttackSpeedSound("Play_item_proc_crit", ((Component)Body).gameObject, (float)StoredProjectiles.Count * 0.1f); if (NetworkServer.active) { NetworkIdentity component = ((Component)this).GetComponent<NetworkIdentity>(); if (Object.op_Implicit((Object)(object)component)) { NetMessageExtensions.Send((INetMessage)(object)new SyncJarAbsorption(component.netId, val, StoredProjectiles.Count), (NetworkDestination)1); } } return true; } private void SpawnAbsorbOrb(Vector3 origin) { //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) JarAbsorbOrb jarAbsorbOrb = new JarAbsorbOrb { origin = origin, target = (Object.op_Implicit((Object)(object)JarTransform) ? ((Component)JarTransform).gameObject : ((Component)this).gameObject) }; OrbManager.instance.AddOrb((Orb)(object)jarAbsorbOrb); } public void FireAllProjectiles() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00e4: 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_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a7: Unknown result type (might be due to invalid IL or missing references) if (StoredProjectiles.Count != 0 && Object.op_Implicit((Object)(object)Body.inputBank)) { Vector3 val = (Object.op_Implicit((Object)(object)JarTransform) ? JarTransform.position : Body.corePosition); Vector3 aimDirection = Body.inputBank.aimDirection; int count = StoredProjectiles.Count; float num = Mathf.Min(45f, (float)count * 3f); for (int i = 0; i < count; i++) { StoredProjectile storedProjectile = StoredProjectiles[i]; float num2 = Util.Remap((float)i, 0f, (float)(count - 1), 0f - num, num); float num3 = Mathf.Sin((float)i * 0.5f) * 10f; Quaternion val2 = Quaternion.Euler(num3, num2, 0f); Vector3 val3 = val2 * aimDirection; FireProjectileInfo val4 = default(FireProjectileInfo); val4.projectilePrefab = storedProjectile.OriginalPrefab ?? DefaultJarProjectile; val4.damage = storedProjectile.Damage * (float)DamageMultiplier; val4.damageTypeOverride = DamageTypeCombo.op_Implicit(storedProjectile.DamageType); val4.damageColorIndex = storedProjectile.DamageColorIndex; val4.procChainMask = default(ProcChainMask); val4.owner = ((Component)Body).gameObject; val4.position = val; val4.rotation = Util.QuaternionSafeLookRotation(val3); ((FireProjectileInfo)(ref val4)).speedOverride = 120f; val4.crit = Body.RollCrit(); FireProjectileInfo val5 = val4; ProjectileManager.instance.FireProjectile(val5); } Util.PlaySound("Play_huntress_R_snipe_shoot", ((Component)Body).gameObject); EffectManager.SpawnEffect(MassFireEffect, new EffectData { origin = val, rotation = Util.QuaternionSafeLookRotation(aimDirection), scale = count }, true); StoredProjectiles.Clear(); isReflecting = false; reflectionTimer = 0f; } } private void DecayOldProjectiles() { float cutoffTime = Time.time - (float)StorageDuration; int num = StoredProjectiles.RemoveAll((StoredProjectile p) => p.TimeStored < cutoffTime); if (num > 0) { Util.PlaySound("Play_item_proc_chain_lightning_fade", ((Component)Body).gameObject); } } } public class StoredProjectile { public float Damage; public DamageType DamageType; public DamageColorIndex DamageColorIndex; public float ProcCoefficient; public GameObject OriginalPrefab; public float TimeStored; public bool WasOrb; } public class JarDisplayController : MonoBehaviour { public CharacterBody OwnerBody; public JarTracker Tracker; public ParticleSystem SuctionParticles; public Light GlowLight; private Material jarMaterial; private float glowIntensity; public void Start() { GameObject gameObject = ((Component)((Component)this).gameObject.transform.root).gameObject; CharacterModel component = gameObject.GetComponent<CharacterModel>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.body)) { OwnerBody = component.body; } SuctionParticles = ((Component)this).GetComponentInChildren<ParticleSystem>(); GlowLight = ((Component)this).GetComponentInChildren<Light>(); Renderer component2 = ((Component)this).GetComponent<Renderer>(); if (Object.op_Implicit((Object)(object)component2)) { jarMaterial = component2.material; } } public void Update() { //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_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0210: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)OwnerBody)) { return; } if (!Object.op_Implicit((Object)(object)Tracker)) { Tracker = ((Component)OwnerBody).GetComponent<JarTracker>(); } if (!Object.op_Implicit((Object)(object)Tracker)) { return; } if (Tracker.reflectionTimer > 0f && Object.op_Implicit((Object)(object)OwnerBody.inputBank)) { ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, Util.QuaternionSafeLookRotation(OwnerBody.inputBank.aimDirection), 0.15f); } else { ((Component)this).transform.rotation = Quaternion.Slerp(((Component)this).transform.rotation, Quaternion.identity, 0.1f); } if (Object.op_Implicit((Object)(object)SuctionParticles)) { if (Tracker.reflectionTimer > 0f) { if (!SuctionParticles.isPlaying) { SuctionParticles.Play(); } } else if (SuctionParticles.isPlaying) { SuctionParticles.Stop(); } } int count = Tracker.StoredProjectiles.Count; float num = Mathf.Clamp01((float)count / (float)(int)MaxStoredProjectiles); glowIntensity = Mathf.Lerp(glowIntensity, num, Time.deltaTime * 5f); if (Object.op_Implicit((Object)(object)GlowLight)) { GlowLight.intensity = glowIntensity * 2f; GlowLight.color = Color.Lerp(Color.cyan, Color.red, glowIntensity); } if (Object.op_Implicit((Object)(object)jarMaterial)) { jarMaterial.SetColor("_EmColor", Color.Lerp(Color.cyan, Color.red, glowIntensity) * glowIntensity); } } } public class JarAbsorbOrb : Orb { public GameObject target; public override void Begin() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: 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_0058: Expected O, but got Unknown ((Orb)this).duration = 0.3f; if (Object.op_Implicit((Object)(object)target) && Object.op_Implicit((Object)(object)JarAbsorbOrbEffect)) { EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration, rootObject = target }; EffectManager.SpawnEffect(JarAbsorbOrbEffect, val, true); } } public override void OnArrival() { } } public class SyncJarState : INetMessage, ISerializableObject { private NetworkInstanceId BodyID; private bool IsReflecting; private float Duration; public SyncJarState() { } public SyncJarState(NetworkInstanceId bodyId, bool isReflecting, float duration) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) BodyID = bodyId; IsReflecting = isReflecting; Duration = duration; } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) writer.Write(BodyID); writer.Write(IsReflecting); writer.Write(Duration); } public void Deserialize(NetworkReader reader) { //IL_0003: 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) BodyID = reader.ReadNetworkId(); IsReflecting = reader.ReadBoolean(); Duration = reader.ReadSingle(); } public void OnReceived() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { return; } GameObject val = Util.FindNetworkObject(BodyID); if (Object.op_Implicit((Object)(object)val)) { JarTracker component = val.GetComponent<JarTracker>(); if (Object.op_Implicit((Object)(object)component) && IsReflecting) { component.ActivateReflection(); } } } } public class SyncJarAbsorption : INetMessage, ISerializableObject { private NetworkInstanceId BodyID; private Vector3 AbsorbPosition; private int StoredCount; public SyncJarAbsorption() { } public SyncJarAbsorption(NetworkInstanceId bodyId, Vector3 absorbPosition, int storedCount) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) BodyID = bodyId; AbsorbPosition = absorbPosition; StoredCount = storedCount; } public void Serialize(NetworkWriter writer) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) writer.Write(BodyID); writer.Write(AbsorbPosition); writer.Write(StoredCount); } public void Deserialize(NetworkReader reader) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_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) BodyID = reader.ReadNetworkId(); AbsorbPosition = reader.ReadVector3(); StoredCount = reader.ReadInt32(); } public void OnReceived() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) if (NetworkServer.active) { return; } GameObject val = Util.FindNetworkObject(BodyID); if (Object.op_Implicit((Object)(object)val)) { CharacterBody component = val.GetComponent<CharacterBody>(); JarTracker component2 = val.GetComponent<JarTracker>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component2)) { JarAbsorbOrb jarAbsorbOrb = new JarAbsorbOrb { origin = AbsorbPosition, target = (Object.op_Implicit((Object)(object)component2.JarTransform) ? ((Component)component2.JarTransform).gameObject : val) }; OrbManager.instance.AddOrb((Orb)(object)jarAbsorbOrb); Util.PlayAttackSpeedSound("Play_item_proc_crit", ((Component)component).gameObject, (float)StoredCount * 0.1f); } } } } public class ReflectionBubbleController : MonoBehaviour { public Transform ParentTransform; public Animator Animator; public float Duration; private float stopwatch; public void Start() { Animator = ((Component)this).GetComponent<Animator>(); EffectComponent component = ((Component)this).GetComponent<EffectComponent>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.effectData.rootObject)) { ParentTransform = component.effectData.rootObject.transform; Duration = ReflectionDuration; } if (!Object.op_Implicit((Object)(object)ParentTransform)) { Object.Destroy((Object)(object)((Component)this).gameObject); } } public void Update() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)ParentTransform)) { ((Component)this).transform.position = ParentTransform.position; ((Component)this).transform.localScale = Vector3.one * (float)ReflectionRadius; } stopwatch += Time.deltaTime; if (stopwatch >= Duration) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } public static ConfigOption<float> ReflectionDuration; public static ConfigOption<int> MaxStoredProjectiles; public static ConfigOption<float> StorageDuration; public static ConfigOption<float> ReflectionRadius; public static ConfigOption<float> DamageMultiplier; public static ConfigOption<AbsorptionMode> AbsorptionType; public static ConfigOption<bool> AllowFriendlyFireAbsorption; public static GameObject ItemBodyModelPrefab; public static GameObject ReflectionBubblePrefab; public static GameObject JarAbsorbOrbEffect; public static GameObject MassFireEffect; public static GameObject DefaultJarProjectile; public override string EquipmentName => "Jar Of Reshaping"; public override string EquipmentLangTokenName => "JAR_OF_RESHAPING"; public override string EquipmentPickupDesc => "Activate to <style=cIsUtility>absorb nearby projectiles</style>. Activate again to <style=cIsDamage>unleash them all at once</style>."; public override string EquipmentFullDescription => $"Activate to create a <style=cIsUtility>reflection field</style> for <style=cIsUtility>{ReflectionDuration}s</style> that absorbs projectiles within <style=cIsUtility>{ReflectionRadius}m</style>. " + $"Store up to <style=cIsUtility>{MaxStoredProjectiles}</style> projectiles. " + "Activate again to <style=cIsDamage>fire all stored projectiles</style> in a spread pattern for <style=cIsDamage>" + MathHelpers.FloatToPercentageString(DamageMultiplier) + " damage</style>. " + $"Stored projectiles decay after <style=cIsUtility>{StorageDuration}s</style>."; public override string EquipmentLore => "[INCIDENT NUMBER 421076]\n[VISUAL RECORDING RECOVERED FROM BLACK BOX ON DERELICT 'UES SAFETY FIRST' ENGINEERING VESSEL. TRANSCRIPT TO FOLLOW]\n\nTerry: Hey Phil, did you see what the boys over in Expeditions brought in?\nTerry: Looks like a pretty ordinary jar right?\nPhil: Yeah, just looks like something you'd find at a <b>housewife's</b> art deco yard sale.\nTerry: Yeah, I thought the same thing, but watch and learn.\nTerry: First, you just hit the bottom of the jar with your palm, and ---\nPhil: Woah! It started glowing and what on Terra is that noise? Is that an alien vacuum cleaner?\nTerry: Far better. Now watch.\n[Terry is seen throwing random objects into the jar and Phil joins him with bewilderment on his face.]\nPhil: That's amazing! Can it do anything else, or is it just a weird vacuum pot?\nTerry: Yeah, if I just squeeze the handle here, it'll empty it all out.\n[Terry is seen squeezing the handles of the jar, but his expression turns to horror a moment later.]\nTerry: Oh hell, oh god. Phil, I just realized I may have thrown in a few mining grenades <b>when we were having fun with it earlier.</b>\nTerry: Quickly! Get <b>your suit</b> on before it---\n[The jar activates, shooting its contents around the room. One of the projectiles hits the hull and explodes, ripping a hole through it moments before the feed is lost.]\n\n[END OF FILE] "; public override GameObject EquipmentModel => AetheriumPlugin.MainAssets.LoadAsset<GameObject>("PickupJarOfReshaping.prefab"); public override Sprite EquipmentIcon => AetheriumPlugin.MainAssets.LoadAsset<Sprite>("JarOfReshapingIcon.png"); public override float Cooldown => 20f; public override bool EnigmaCompatible => false; public override void Init(ConfigFile config) { CreateConfig(config); CreateLang(); CreateNetworking(); CreateEffects(); CreateProjectile(); CreateEquipment(); Hooks(); } private void CreateConfig(ConfigFile config) { ReflectionDuration = config.ActiveBind("Equipment: " + EquipmentName, "Reflection Duration", 3f, "How long the reflection field stays active (in seconds)"); ReflectionRadius = config.ActiveBind("Equipment: " + EquipmentName, "Reflection Radius", 15f, "Radius of the reflection field (in meters)"); MaxStoredProjectiles = config.ActiveBind("Equipment: " + EquipmentName, "Max Stored Projectiles", 20, "Maximum projectiles that can be stored before auto-firing"); StorageDuration = config.ActiveBind("Equipment: " + EquipmentName, "Storage Duration", 30f, "How long projectiles stay stored before decaying (in seconds)"); DamageMultiplier = config.ActiveBind("Equipment: " + EquipmentName, "Damage Multiplier", 1.5f, "Damage multiplier for reflected projectiles (1.5 = 150% damage)"); AbsorptionType = config.ActiveBind("Equipment: " + EquipmentName, "Absorption Mode", AbsorptionMode.ProjectilesAndOrbs, "What types of attacks to absorb. ProjectilesOnly = physical projectiles. ProjectilesAndOrbs = projectiles + orb attacks like lightning and vagrant tracking orbs."); AllowFriendlyFireAbsorption = config.ActiveBind("Equipment: " + EquipmentName, "Absorb Friendly Fire (Chaos Mode)", defaultValue: false, "If true, can absorb projectiles from allies when Artifact of Chaos is active"); } private void CreateNetworking() { NetworkingAPI.RegisterMessageType<SyncJarState>(); NetworkingAPI.RegisterMessageType<SyncJarAbsorption>(); } private void CreateEffects() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) ReflectionBubblePrefab = AetheriumPlugin.MainAssets.LoadAsset<GameObject>("JarOfReshapingAbsorbEffect.prefab"); EffectComponent val = ReflectionBubblePrefab.AddComponent<EffectComponent>(); val.parentToReferencedTransform = true; val.positionAtReferencedTransform = true; ReflectionBubbleController reflectionBubbleController = ReflectionBubblePrefab.AddComponent<ReflectionBubbleController>(); VFXAttributes val2 = ReflectionBubblePrefab.AddComponent<VFXAttributes>(); val2.vfxIntensity = (VFXIntensity)1; val2.vfxPriority = (VFXPriority)2; ReflectionBubblePrefab.AddComponent<NetworkIdentity>(); PrefabAPI.RegisterNetworkPrefab(ReflectionBubblePrefab); ContentAddition.AddEffect(ReflectionBubblePrefab); JarAbsorbOrbEffect = AetheriumPlugin.MainAssets.LoadAsset<GameObject>("JarOfReshapingOrb.prefab"); OrbEffect val3 = JarAbsorbOrbEffect.AddComponent<OrbEffect>(); val3.startVelocity1 = new Vector3(-5f, 5f, -5f); val3.startVelocity2 = new Vector3(5f, 8f, 5f); val3.endVelocity1 = new Vector3(0f, 0f, 0f); val3.endVelocity2 = new Vector3(0f, 0f, 0f); val3.movementCurve = AnimationCurve.EaseInOut(0f, 0f, 1f, 1f); JarAbsorbOrbEffect.AddComponent<EffectComponent>(); JarAbsorbOrbEffect.AddComponent<VFXAttributes>(); JarAbsorbOrbEffect.AddComponent<NetworkIdentity>(); PrefabAPI.RegisterNetworkPrefab(JarAbsorbOrbEffect); ContentAddition.AddEffect(JarAbsorbOrbEffect); OrbAPI.AddOrb(typeof(JarAbsorbOrb)); MassFireEffect = LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/MuzzleFlashes/MuzzleflashSmokeRing"); } private void CreateProjectile() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) DefaultJarProjectile = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MageFireboltBasic"), "JarOfReshapingDefaultProjectile", true); ProjectileController component = DefaultJarProjectile.GetComponent<ProjectileController>(); component.procCoefficient = 1f; ProjectileDamage component2 = DefaultJarProjectile.GetComponent<ProjectileDamage>(); component2.damageType = DamageTypeCombo.op_Implicit((DamageType)0); ProjectileSimple component3 = DefaultJarProjectile.GetComponent<ProjectileSimple>(); if (Object.op_Implicit((Object)(object)component3)) { component3.desiredForwardSpeed = 100f; } PrefabAPI.RegisterNetworkPrefab(DefaultJarProjectile); ContentAddition.AddProjectile(DefaultJarProjectile); } public override ItemDisplayRuleDict CreateItemDisplayRules() { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Expected O, but got Unknown //IL_006d: 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_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0172: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_025d: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Unknown result type (might be due to invalid IL or missing references) //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027d: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_029d: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02b9: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032b: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0383: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_039e: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03df: Unknown result type (might be due to invalid IL or missing references) //IL_03e8: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0436: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0456: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_0472: Unknown result type (might be due to invalid IL or missing references) //IL_047b: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Unknown result type (might be due to invalid IL or missing references) //IL_04c4: Unknown result type (might be due to invalid IL or missing references) //IL_04c9: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Unknown result type (might be due to invalid IL or missing references) //IL_04e4: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_0505: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) //IL_053c: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Unknown result type (might be due to invalid IL or missing references) //IL_0557: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Unknown result type (might be due to invalid IL or missing references) //IL_0577: Unknown result type (might be due to invalid IL or missing references) //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0598: Unknown result type (might be due to invalid IL or missing references) //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05cf: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05ea: Unknown result type (might be due to invalid IL or missing references) //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Unknown result type (might be due to invalid IL or missing references) //IL_060a: Unknown result type (might be due to invalid IL or missing references) //IL_060f: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_062b: Unknown result type (might be due to invalid IL or missing references) //IL_0634: Unknown result type (might be due to invalid IL or missing references) //IL_0662: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_067d: Unknown result type (might be due to invalid IL or missing references) //IL_0682: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Unknown result type (might be due to invalid IL or missing references) //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06a2: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06be: Unknown result type (might be due to invalid IL or missing references) //IL_06c7: Unknown result type (might be due to invalid IL or missing references) //IL_06f5: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Unknown result type (might be due to invalid IL or missing references) //IL_0710: Unknown result type (might be due to invalid IL or missing references) //IL_0715: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Unknown result type (might be due to invalid IL or missing references) //IL_0730: Unknown result type (might be due to invalid IL or missing references) //IL_0735: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0751: Unknown result type (might be due to invalid IL or missing references) //IL_075a: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Unknown result type (might be due to invalid IL or missing references) //IL_07a3: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Unknown result type (might be due to invalid IL or missing references) //IL_07c3: Unknown result type (might be due to invalid IL or missing references) //IL_07c8: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07e4: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_081b: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Unknown result type (might be due to invalid IL or missing references) //IL_0836: Unknown result type (might be due to invalid IL or missing references) //IL_083b: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Unknown result type (might be due to invalid IL or missing references) //IL_0856: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_085c: Unknown result type (might be due to invalid IL or missing references) //IL_0877: Unknown result type (might be due to invalid IL or missing references) //IL_0880: Unknown result type (might be due to invalid IL or missing references) //IL_08ae: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Unknown result type (might be due to invalid IL or missing references) //IL_08c9: Unknown result type (might be due to invalid IL or missing references) //IL_08ce: Unknown result type (might be due to invalid IL or missing references) //IL_08e4: Unknown result type (might be due to invalid IL or missing references) //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_090a: Unknown result type (might be due to invalid IL or missing references) //IL_0913: Unknown result type (might be due to invalid IL or missing references) //IL_0941: Unknown result type (might be due to invalid IL or missing references) //IL_0946: Unknown result type (might be due to invalid IL or missing references) //IL_095c: Unknown result type (might be due to invalid IL or missing references) //IL_0961: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_097c: Unknown result type (might be due to invalid IL or missing references) //IL_0981: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_099d: Unknown result type (might be due to invalid IL or missing references) //IL_09a6: Unknown result type (might be due to invalid IL or missing references) //IL_09d4: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Unknown result type (might be due to invalid IL or missing references) //IL_09ef: Unknown result type (might be due to invalid IL or missing references) //IL_09f4: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Unknown result type (might be due to invalid IL or missing references) //IL_0a0f: Unknown result type (might be due to invalid IL or missing references) //IL_0a14: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a30: Unknown result type (might be due to invalid IL or missing references) //IL_0a39: Unknown result type (might be due to invalid IL or missing references) //IL_0a67: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Unknown result type (might be due to invalid IL or missing references) //IL_0a82: Unknown result type (might be due to invalid IL or missing references) //IL_0a87: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Unknown result type (might be due to invalid IL or missing references) //IL_0aa2: Unknown result type (might be due to invalid IL or missing references) //IL_0aa7: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Unknown result type (might be due to invalid IL or missing references) ItemBodyModelPrefab = AetheriumPlugin.MainAssets.LoadAsset<GameObject>("DisplayJarOfReshaping.prefab"); ItemBodyModelPrefab.AddComponent<NetworkIdentity>(); ItemBodyModelPrefab.AddComponent<JarDisplayController>(); ItemDisplay val = ItemBodyModelPrefab.AddComponent<ItemDisplay>(); val.rendererInfos = ItemHelpers.ItemDisplaySetup(ItemBodyModelPrefab); PrefabAPI.RegisterNetworkPrefab(ItemBodyModelPrefab); ItemDisplayRuleDict val2 = new ItemDisplayRuleDict(Array.Empty<ItemDisplayRule>()); val2.Add("mdlCommandoDualies", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlHuntress", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlToolbot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(8f, -4f, 8f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("mdlEngi", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlMage", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlMerc", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlTreebot", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-2f, 0f, -2f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.2f, 0.2f, 0.2f) } }); val2.Add("mdlLoader", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlCroco", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-8f, 0f, 8f), localAngles = new Vector3(0f, 0f, 180f), localScale = new Vector3(0.8f, 0.8f, 0.8f) } }); val2.Add("mdlCaptain", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1f, 0f, -1f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlBandit2", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-0.33104f, -0.4353f, -1.00016f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.1f, 0.1f, 0.1f) } }); val2.Add("mdlEquipmentDrone", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "GunBarrelBase", localPos = new Vector3(-1E-05f, 0f, 0.96976f), localAngles = new Vector3(0f, 0f, 30f), localScale = new Vector3(0.16696f, 0.16696f, 0.16696f) } }); val2.Add("CHEF", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Body", localPos = new Vector3(-0.0308f, 0.0329f, -0.01119f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.00232f, 0.00232f, 0.00232f) } }); val2.Add("RobPaladinBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1.29645f, 1.3155f, -0.30915f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.11874f, 0.11874f, 0.11874f) } }); val2.Add("RedMistBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Root", localPos = new Vector3(-0.67258f, 1.58933f, -0.38069f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.06588f, 0.06588f, 0.06588f) } }); val2.Add("ArbiterBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-0.508f, 0.72586f, -0.32426f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.05863f, 0.05863f, 0.05863f) } }); val2.Add("EnforcerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(-1.44097f, 1.03557f, 1.77019f), localAngles = new Vector3(0f, 0f, 0f), localScale = new Vector3(0.0893f, 0.0893f, 0.0893f) } }); val2.Add("NemesisEnforcerBody", (ItemDisplayRule[])(object)new ItemDisplayRule[1] { new ItemDisplayRule { ruleType = (ItemDisplayRuleType)0, followerPrefab = ItemBodyModelPrefab, childName = "Base", localPos = new Vector3(0.01155f, 0.03353f, -0.02529f), localAngles = new Vector3(0f, 270f, 0f), localScale = new Vector3(0.00192f, 0.00192f, 0.00192f) } }); return val2; } public override void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown CharacterBody.OnEquipmentGained += new hook_OnEquipmentGained(AddJarTracker); CharacterBody.OnEquipmentLost += new hook_OnEquipmentLost(RemoveJarTracker); } private void AddJarTracker(orig_OnEquipmentGained orig, CharacterBody self, EquipmentDef equipmentDef) { orig.Invoke(self, equipmentDef); if ((Object)(object)equipmentDef == (Object)(object)EquipmentDef && Object.op_Implicit((Object)(object)self) && !Object.op_Implicit((Object)(object)((Component)self).GetComponent<JarTracker>())) { ((Component)self).gameObject.AddComponent<JarTracker>(); } } private void RemoveJarTracker(orig_OnEquipmentLost orig, CharacterBody self, EquipmentDef equipmentDef) { orig.Invoke(self, equipmentDef); if ((Object)(object)equipmentDef == (Object)(object)EquipmentDef && Object.op_Implicit((Object)(object)self)) { JarTracker component = ((Component)self).GetComponent<JarTracker>(); if (Object.op_Implicit((Object)(object)component)) { Object.Destroy((Object)(object)component); } } } protected override bool ActivateEquipment(EquipmentSlot slot) { if (!Object.op_Implicit((Object)(object)slot.characterBody)) { return false; } JarTracker jarTracker = ((Component)slot.characterBody).GetComponent<JarTracker>(); if (!Object.op_Implicit((Object)(object)jarTracker)) { jarTracker = ((Component)slot.characterBody).gameObject.AddComponent<JarTracker>(); } Transform val = slot.FindActiveEquipmentDisplay(); if (Object.op_Implicit((Object)(object)val)) { jarTracker.JarTransform = val; } if (jarTracker.StoredProjectiles.Count > 0) { jarTracker.FireAllProjectiles(); return true; } jarTracker.ActivateReflection(); return false; } } public static class EasingFunction { public enum Ease { EaseInQuad, EaseOutQuad, EaseInOutQuad, EaseInCubic, EaseOutCubic, EaseInOutCubic, EaseInQuart, EaseOutQuart, EaseInOutQuart, EaseInQuint, EaseOutQuint, EaseInOutQuint, EaseInSine, EaseOutSine, EaseInOutSine, EaseInExpo, EaseOutExpo, EaseInOutExpo, EaseInCirc, EaseOutCirc, EaseInOutCirc, Linear, Spring, EaseInBounce, EaseOutBounce, EaseInOutBounce, EaseInBack, EaseOutBack, EaseInOutBack, EaseInElastic, EaseOutElastic, EaseInOutElastic } public delegate float Function(float s, float e, float v); private const float NATURAL_LOG_OF_2 = 0.6931472f; public static float Linear(float start, float end, float value) { return Mathf.Lerp(start, end, value); } public static float Spring(float start, float end, float value) { value = Mathf.Clamp01(value); value = (Mathf.Sin(value * MathF.PI * (0.2f + 2.5f * value * value * value)) * Mathf.Pow(1f - value, 2.2f) + value) * (1f + 1.2f * (1f - value)); return start + (end - start) * value; } public static float EaseInQuad(float start, float end, float value) { end -= start; return end * value * value + start; } public static float EaseOutQuad(float start, float end, float value) { end -= start; return (0f - end) * value * (value - 2f) + start; } public static float EaseInOutQuad(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * 0.5f * value * value + start; } value -= 1f; return (0f - end) * 0.5f * (value * (value - 2f) - 1f) + start; } public static float EaseInCubic(float start, float end, float value) { end -= start; return end * value * value * value + start; } public static float EaseOutCubic(float start, float end, float value) { value -= 1f; end -= start; return end * (value * value * value + 1f) + start; } public static float EaseInOutCubic(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * 0.5f * value * value * value + start; } value -= 2f; return end * 0.5f * (value * value * value + 2f) + start; } public static float EaseInQuart(float start, float end, float value) { end -= start; return end * value * value * value * value + start; } public static float EaseOutQuart(float start, float end, float value) { value -= 1f; end -= start; return (0f - end) * (value * value * value * value - 1f) + start; } public static float EaseInOutQuart(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * 0.5f * value * value * value * value + start; } value -= 2f; return (0f - end) * 0.5f * (value * value * value * value - 2f) + start; } public static float EaseInQuint(float start, float end, float value) { end -= start; return end * value * value * value * value * value + start; } public static float EaseOutQuint(float start, float end, float value) { value -= 1f; end -= start; return end * (value * value * value * value * value + 1f) + start; } public static float EaseInOutQuint(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * 0.5f * value * value * value * value * value + start; } value -= 2f; return end * 0.5f * (value * value * value * value * value + 2f) + start; } public static float EaseInSine(float start, float end, float value) { end -= start; return (0f - end) * Mathf.Cos(value * (MathF.PI / 2f)) + end + start; } public static float EaseOutSine(float start, float end, float value) { end -= start; return end * Mathf.Sin(value * (MathF.PI / 2f)) + start; } public static float EaseInOutSine(float start, float end, float value) { end -= start; return (0f - end) * 0.5f * (Mathf.Cos(MathF.PI * value) - 1f) + start; } public static float EaseInExpo(float start, float end, float value) { end -= start; return end * Mathf.Pow(2f, 10f * (value - 1f)) + start; } public static float EaseOutExpo(float start, float end, float value) { end -= start; return end * (0f - Mathf.Pow(2f, -10f * value) + 1f) + start; } public static float EaseInOutExpo(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * 0.5f * Mathf.Pow(2f, 10f * (value - 1f)) + start; } value -= 1f; return end * 0.5f * (0f - Mathf.Pow(2f, -10f * value) + 2f) + start; } public static float EaseInCirc(float start, float end, float value) { end -= start; return (0f - end) * (Mathf.Sqrt(1f - value * value) - 1f) + start; } public static float EaseOutCirc(float start, float end, float value) { value -= 1f; end -= start; return end * Mathf.Sqrt(1f - value * value) + start; } public static float EaseInOutCirc(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return (0f - end) * 0.5f * (Mathf.Sqrt(1f - value * value) - 1f) + start; } value -= 2f; return end * 0.5f * (Mathf.Sqrt(1f - value * value) + 1f) + start; } public static float EaseInBounce(float start, float end, float value) { end -= start; float num = 1f; return end - EaseOutBounce(0f, end, num - value) + start; } public static float EaseOutBounce(float start, float end, float value) { value /= 1f; end -= start; if (value < 0.36363637f) { return end * (7.5625f * value * value) + start; } if (value < 0.72727275f) { value -= 0.54545456f; return end * (7.5625f * value * value + 0.75f) + start; } if ((double)value < 0.9090909090909091) { value -= 0.8181818f; return end * (7.5625f * value * value + 0.9375f) + start; } value -= 21f / 22f; return end * (7.5625f * value * value + 63f / 64f) + start; } public static float EaseInOutBounce(float start, float end, float value) { end -= start; float num = 1f; if (value < num * 0.5f) { return EaseInBounce(0f, end, value * 2f) * 0.5f + start; } return EaseOutBounce(0f, end, value * 2f - num) * 0.5f + end * 0.5f + start; } public static float EaseInBack(float start, float end, float value) { end -= start; value /= 1f; float num = 1.70158f; return end * value * value * ((num + 1f) * value - num) + start; } public static float EaseOutBack(float start, float end, float value) { float num = 1.70158f; end -= start; value -= 1f; return end * (value * value * ((num + 1f) * value + num) + 1f) + start; } public static float EaseInOutBack(float start, float end, float value) { float num = 1.70158f; end -= start; value /= 0.5f; if (value < 1f) { num *= 1.525f; return end * 0.5f * (value * value * ((num + 1f) * value - num)) + start; } value -= 2f; num *= 1.525f; return end * 0.5f * (value * value * ((num + 1f) * value + num) + 2f) + start; } public static float EaseInElastic(float start, float end, float value) { end -= start; float num = 1f; float num2 = num * 0.3f; float num3 = 0f; if (value == 0f) { return start; } if ((value /= num) == 1f) { return start + end; } float num4; if (num3 == 0f || num3 < Mathf.Abs(end)) { num3 = end; num4 = num2 / 4f; } else { num4 = num2 / (MathF.PI * 2f) * Mathf.Asin(end / num3); } return 0f - num3 * Mathf.Pow(2f, 10f * (value -= 1f)) * Mathf.Sin((value * num - num4) * (MathF.PI * 2f) / num2) + start; } public static float EaseOutElastic(float start, float end, float value) { end -= start; float num = 1f; float num2 = num * 0.3f; float num3 = 0f; if (value == 0f) { return start; } if ((value /= num) == 1f) { return start + end; } float num4; if (num3 == 0f || num3 < Mathf.Abs(end)) { num3 = end; num4 = num2 * 0.25f; } else { num4 = num2 / (MathF.PI * 2f) * Mathf.Asin(end / num3); } return num3 * Mathf.Pow(2f, -10f * value) * Mathf.Sin((value * num - num4) * (MathF.PI * 2f) / num2) + end + start; } public static float EaseInOutElastic(float start, float end, float value) { end -= start; float num = 1f; float num2 = num * 0.3f; float num3 = 0f; if (value == 0f) { return start; } if ((value /= num * 0.5f) == 2f) { return start + end; } float num4; if (num3 == 0f || num3 < Mathf.Abs(end)) { num3 = end; num4 = num2 / 4f; } else { num4 = num2 / (MathF.PI * 2f) * Mathf.Asin(end / num3); } if (value < 1f) { return -0.5f * (num3 * Mathf.Pow(2f, 10f * (value -= 1f)) * Mathf.Sin((value * num - num4) * (MathF.PI * 2f) / num2)) + start; } return num3 * Mathf.Pow(2f, -10f * (value -= 1f)) * Mathf.Sin((value * num - num4) * (MathF.PI * 2f) / num2) * 0.5f + end + start; } public static float LinearD(float start, float end, float value) { return end - start; } public static float EaseInQuadD(float start, float end, float value) { return 2f * (end - start) * value; } public static float EaseOutQuadD(float start, float end, float value) { end -= start; return (0f - end) * value - end * (value - 2f); } public static float EaseInOutQuadD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * value; } value -= 1f; return end * (1f - value); } public static float EaseInCubicD(float start, float end, float value) { return 3f * (end - start) * value * value; } public static float EaseOutCubicD(float start, float end, float value) { value -= 1f; end -= start; return 3f * end * value * value; } public static float EaseInOutCubicD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return 1.5f * end * value * value; } value -= 2f; return 1.5f * end * value * value; } public static float EaseInQuartD(float start, float end, float value) { return 4f * (end - start) * value * value * value; } public static float EaseOutQuartD(float start, float end, float value) { value -= 1f; end -= start; return -4f * end * value * value * value; } public static float EaseInOutQuartD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return 2f * end * value * value * value; } value -= 2f; return -2f * end * value * value * value; } public static float EaseInQuintD(float start, float end, float value) { return 5f * (end - start) * value * value * value * value; } public static float EaseOutQuintD(float start, float end, float value) { value -= 1f; end -= start; return 5f * end * value * value * value * value; } public static float EaseInOutQuintD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return 2.5f * end * value * value * value * value; } value -= 2f; return 2.5f * end * value * value * value * value; } public static float EaseInSineD(float start, float end, float value) { return (end - start) * 0.5f * MathF.PI * Mathf.Sin(MathF.PI / 2f * value); } public static float EaseOutSineD(float start, float end, float value) { end -= start; return MathF.PI / 2f * end * Mathf.Cos(value * (MathF.PI / 2f)); } public static float EaseInOutSineD(float start, float end, float value) { end -= start; return end * 0.5f * MathF.PI * Mathf.Sin(MathF.PI * value); } public static float EaseInExpoD(float start, float end, float value) { return 6.931472f * (end - start) * Mathf.Pow(2f, 10f * (value - 1f)); } public static float EaseOutExpoD(float start, float end, float value) { end -= start; return 3.465736f * end * Mathf.Pow(2f, 1f - 10f * value); } public static float EaseInOutExpoD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return 3.465736f * end * Mathf.Pow(2f, 10f * (value - 1f)); } value -= 1f; return 3.465736f * end / Mathf.Pow(2f, 10f * value); } public static float EaseInCircD(float start, float end, float value) { return (end - start) * value / Mathf.Sqrt(1f - value * value); } public static float EaseOutCircD(float start, float end, float value) { value -= 1f; end -= start; return (0f - end) * value / Mathf.Sqrt(1f - value * value); } public static float EaseInOutCircD(float start, float end, float value) { value /= 0.5f; end -= start; if (value < 1f) { return end * value / (2f * Mathf.Sqrt(1f - value * value)); } value -= 2f; return (0f - end) * value / (2f * Mathf.Sqrt(1f - value * value)); } public static float EaseInBounceD(float start, float end, float value) { end -= start; float num = 1f; return EaseOutBounceD(0f, end, num - value); } public static float EaseOutBounceD(float start, float end, float value) { value /= 1f; end -= start; if (value < 0.36363637f) { return 2f * end * 7.5625f * value; } if (value < 0.72727275f) { value -= 0.54545456f; return 2f * end * 7.5625f * value; } if ((double)value < 0.9090909090909091) { value -= 0.8181818f; return 2f * end * 7.5625f * value; } value -= 21f / 22f; return 2f * end * 7.5625f * value; } public static float EaseInOutBounceD(float start, float end, float value) { end -= start; float num = 1f; if (value < num * 0.5f) { return EaseInBounceD(0f, end, value * 2f) * 0.5f; } return EaseOutBounceD(0f, end, value * 2f - num) * 0.5f; } public static float EaseInBackD(float start, float end, float value) { float num = 1.70158f; return 3f * (num + 1f) * (end - start) * value * value - 2f * num * (end - start) * value; } public static float EaseOutBackD(float start, float end, float value) { float num = 1.70158f; end -= start; value -= 1f; return end * ((num + 1f) * value * value + 2f * value * ((num + 1f) * value + num)); } public static float EaseInOutBackD(float start, float end, float value) { float num = 1.70158f; end -= start; value /= 0.5f; if (value < 1f) { num *= 1.525f; return 0.5f * end * (num + 1f) * value * value + end * value * ((num + 1f) * value - num); } value -= 2f; num *= 1.525f; return 0.5f * end * ((num + 1f) * value * value + 2f * value * ((num + 1f) * value + num)); } public static float EaseInElasticD(float start, float end, float value) { return EaseOutElasticD(start, end, 1f - value); } public static float EaseOutElasticD(float start, float end, float value) { end -= start; float num = 1f; float num2 = num * 0.3f; float num3 = 0f; float num4; if (num3 == 0f || num3 < Mathf.Abs(end)) { num3 = end; num4 = num2 * 0.25f; } else { num4 = num2 / (MathF.PI * 2f) * Mathf.Asin(end / num3); } return num3 * MathF.PI * num * Mathf.Pow(2f, 1f - 10f * value) * Mathf.Cos(MathF.PI * 2f * (num * value - num4) / num2) / num2 - 3.465736f * num3 * Mathf.Pow(2f, 1f - 10f * value) * Mathf.Sin(MathF.PI * 2f * (num * value - num4) / num2); } public static float EaseInOutElasticD(float start, float end, float value) { end -= start; float num = 1f; float num2 = num * 0.3f; float num3 = 0f; float num4; if (num3 == 0f || num3 < Mathf.Abs(end)) { num3 = end; num4 = num2 / 4f; } else { num4 = num2 / (MathF.PI * 2f) * Mathf.Asin(end / num3); } if (value < 1f) { value -= 1f; return -3.465736f * num3 * Mathf.Pow(2f, 10f * value) * Mathf.Sin(MathF.PI * 2f * (num * value - 2f) / num2) - num3 * MathF.PI * num * Mathf.Pow(2f, 10f * value) * Mathf.Cos(MathF.PI * 2f * (num * value - num4) / num2) / num2; } value -= 1f; return num3 * MathF.PI * num * Mathf.Cos(MathF.PI * 2f * (num * value - num4) / num2) / (num2 * Mathf.Pow(2f, 10f * value)) - 3.465736f * num3 * Mathf.Sin(MathF.PI * 2f * (num * value - num4) / num2) / Mathf.Pow(2f, 10f * value); } public static float SpringD(float start, float end, float value) { value = Mathf.Clamp01(value); end -= start; return end * (6f * (1f - value) / 5f + 1f) * (-2.2f * Mathf.Pow(1f - value, 1.2f) * Mathf.Sin(MathF.PI * value * (2.5f * value * value * value + 0.2f)) + Mathf.Pow(1f - value, 2.2f) * (MathF.PI * (2.5f * value * value * value + 0.2f) + 23.561945f * value * value * value) * Mathf.Cos(MathF.PI * value * (2.5f * value * value * value + 0.2f)) + 1f) - 6f * end * (Mathf.Pow(1f - value, 2.2f) * Mathf.Sin(MathF.PI * value * (2.5f * value * value * value + 0.2f)) + value / 5f); } public static Function GetEasingFunction(Ease easingFunction) { return easingFunction switch { Ease.EaseInQuad => EaseInQuad, Ease.EaseOutQuad => EaseOutQuad, Ease.EaseInOutQuad => EaseInOutQuad, Ease.EaseInCubic => EaseInCubic, Ease.EaseOutCubic => EaseOutCubic, Ease.EaseInOutCubic => EaseInOutCubic, Ease.EaseInQuart => EaseInQuart, Ease.EaseOutQuart => EaseOutQuart, Ease.EaseInOutQuart => EaseInOutQuart, Ease.EaseInQuint => EaseInQuint, Ease.EaseOutQuint => EaseOutQuint, Ease.EaseInOutQuint => EaseInOutQuint, Ease.EaseInSine => EaseInSine, Ease.EaseOutSine => EaseOutSine, Ease.EaseInOutSine => EaseInOutSine, Ease.EaseInExpo => EaseInExpo, Ease.EaseOutExpo => EaseOutExpo, Ease.EaseInOutExpo => EaseInOutExpo, Ease.EaseInCirc => EaseInCirc, Ease.EaseOutCirc => EaseOutCirc, Ease.EaseInOutCirc => EaseInOutCirc, Ease.Linear => Linear, Ease.Spring => Spring, Ease.EaseInBounce => EaseInBounce, Ease.EaseOutBounce => EaseOutBounce, Ease.EaseInOutBounce => EaseInOutBounce, Ease.EaseInBack => EaseInBack, Ease.EaseOutBack => EaseOutBack, Ease.EaseInOutBack => EaseInOutBack, Ease.EaseInElastic => EaseInElastic, Ease.EaseOutElastic => EaseOutElastic, Ease.EaseInOutElastic => EaseInOutElastic, _ => null, }; } public static Function GetEasingFunctionDerivative(Ease easingFunction) { return easingFunction switch { Ease.EaseInQuad => EaseInQuadD, Ease.EaseOutQuad => EaseOutQuadD, Ease.EaseInOutQuad => EaseInOutQuadD, Ease.EaseInCubic => EaseInCubicD, Ease.EaseOutCubic => EaseOutCubicD, Ease.EaseInOutCubic => EaseInOutCubicD, Ease.EaseInQuart => EaseInQuartD, Ease.EaseOutQuart => EaseOutQuartD, Ease.EaseInOutQuart => EaseInOutQuartD, Ease.EaseInQuint => EaseInQuintD, Ease.EaseOutQuint => EaseOutQuintD, Ease.EaseInOutQuint => EaseInOutQuintD, Ease.EaseInSine => EaseInSineD, Ease.EaseOutSine => EaseOutSineD, Ease.EaseInOutSine => EaseInOutSineD, Ease.EaseInExpo => EaseInExpoD, Ease.EaseOutExpo => EaseOutExpoD, Ease.EaseInOutExpo => EaseInOutExpoD, Ease.EaseInCirc => EaseInCircD, Ease.EaseOutCirc => EaseOutCircD, Ease.EaseInOutCirc => EaseInOutCircD, Ease.Linear => LinearD, Ease.Spring => SpringD, Ease.EaseInBounce => EaseInBounceD, Ease.EaseOutBounce => EaseOutBounceD, Ease.EaseInOutBounce => EaseInOutBounceD, Ease.EaseInBack => EaseInBackD, Ease.EaseOutBack => EaseOutBackD, Ease.EaseInOutBack => EaseInOutBackD, Ease.EaseInElastic => EaseInElasticD, Ease.EaseOutElastic => EaseOutElasticD, Ease.EaseInOutElastic => EaseInOutElasticD, _ => null, }; } } public class BellRingingEffect : NetworkBehaviour { public CharacterBody Attacker; public float Radius; public ParticleSystem BellParticleSystem; public void Start() { BellParticleSystem = ((Component)this).GetComponentInChildren<ParticleSystem>(); } public void RingBell() { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005c: 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_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) BellParticleSystem.Play(); if (NetworkServer.active) { GameObject gameObject = ((Component)((Component)this).gameObject.transform.Find("EffectArea")).gameObject; EntitySoundManager.EmitSoundServer(AkEventIdArg.op_Implicit(BellTotem.BellRingingSound.akId), ((Component)this).gameObject); EffectData val = new EffectData { origin = gameObject.transform.position, rotation = gameObject.transform.rotation, scale = BellTotem.RadiusOfBellRinging }; EffectManager.SpawnEffect(BellTotem.BellSoundwaveEffect, val, true); ? val2 = new BlastAttack { attacker = (Object.op_Implicit((Object)(object)Attacker) ? ((Component)Attacker).gameObject : null), position = gameObject.transform.position, damageType = DamageTypeCombo.op_Implicit((DamageType)32), baseForce = BellTotem.ForceOfBellRinging, radius = BellTotem.RadiusOfBellRinging, inflictor = gameObject }; ? val3 = val2; int num; if (!Object.op_Implicit((Object)(object)Attacker)) { num = 1; val2 = num; num = (int)val2; } else { val2 = Attacker.teamComponent.teamIndex; num = (int)val2; } ((BlastAttack)val3).teamIndex = (TeamIndex)val2; ((BlastAttack)num).Fire(); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class BellTotemDisappearEffect : NetworkBehaviour { public void PlayImpactEffect() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown if (NetworkServer.active) { EffectData val = new EffectData { origin = ((Component)this).gameObject.transform.Find("Base").position, rotation = ((Component)this).gameObject.transform.rotation }; EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("prefabs/effects/impactEffects/SpawnLemurian"), val, true); } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { bool result = default(bool); return result; } public override void OnDeserialize(NetworkReader reader, bool initialState) { } } public class ChildLocatorCustom : MonoBehaviour { [Serializable] public struct NameTransformPair { public string name; public Transform transform; } [SerializeField] public NameTransformPair[] transformPairs; } [AddComponentMenu("Dynamic Bone/Dynamic Bone")] public class DynamicBone : MonoBehaviour { public enum UpdateMode { Normal, AnimatePhysics, UnscaledTime } public enum FreezeAxis { None, X, Y, Z } private class Particle { public Transform m_Transform; public int m_ParentIndex = -1; public float m_Damping; public float m_Elasticity; public float m_Stiffness; public float m_Inert; public float m_Radius; public float m_BoneLength; public Vector3 m_Position = Vector3.zero; public Vector3 m_PrevPosition = Vector3.zero; public Vector3 m_EndOffset = Vector3.zero; public Vector3 m_InitLocalPosition = Vector3.zero; public Quaternion m_InitLocalRotation = Quaternion.identity; } public Transform m_Root; public float m_UpdateRate = 60f; public UpdateMode m_UpdateMode; [Range(0f, 1f)] public float m_Damping = 0.1f; public AnimationCurve m_DampingDistrib; [Range(0f, 1f)] public float m_Elasticity = 0.1f; public AnimationCurve m_ElasticityDistrib; [Range(0f, 1f)] public float m_Stiffness = 0.1f; public AnimationCurve m_StiffnessDistrib; [Range(0f, 1f)] public float m_Inert; public AnimationCurve m_InertDistrib; public float m_Radius; public AnimationCurve m_RadiusDistrib; public float m_EndLength; public Vector3 m_EndOffset = Vector3.zero; public Vector3 m_Gravity = Vector3.zero; public Vector3 m_Force = Vector3.zero; public List<DynamicBoneCollider> m_Colliders; public List<Transform> m_Exclusions; public FreezeAxis m_FreezeAxis; public bool m_DistantDisable; public Transform m_ReferenceObject; public float m_DistanceToObject = 20f; private Vector3 m_LocalGravity = Vector3.zero; private Vector3 m_ObjectMove = Vector3.zero; private Vector3 m_ObjectPrevPosition = Vector3.zero; private float m_BoneTotalLength; private float m_ObjectScale = 1f; private float m_Time; private float m_Weight = 1f; private bool m_DistantDisabled; private List<Particle> m_Particles = new List<Particle>(); private void Start() { SetupParticles(); } private void FixedUpdate() { if (m_UpdateMode == UpdateMode.AnimatePhysics) { PreUpdate(); } } private void Update() { if (m_UpdateMode != UpdateMode.AnimatePhysics) { PreUpdate(); } } private void LateUpdate() { if (m_DistantDisable) { CheckDistance(); } if (m_Weight > 0f && (!m_DistantDisable || !m_DistantDisabled)) { float deltaTime = Time.deltaTime; UpdateDynamicBones(deltaTime); } } private void PreUpdate() { if (m_Weight > 0f && (!m_DistantDisable || !m_DistantDisabled)) { InitTransforms(); } } private void CheckDistance() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: 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) Transform val = m_ReferenceObject; if ((Object)(object)val == (Object)null && (Object)(object)Camera.main != (Object)null) { val = ((Component)Camera.main).transform; } if (!((Object)(object)val != (Object)null)) { return; } Vector3 val2 = val.position - ((Component)this).transform.position; bool flag = ((Vector3)(ref val2)).sqrMagnitude > m_DistanceToObject * m_DistanceToObject; if (flag != m_DistantDisabled) { if (!flag) { ResetParticlesPosition(); } m_DistantDisabled = flag; } } private void OnEnable() { ResetParticlesPosition(); } private void OnDisable() { InitTransforms(); } private void OnValidate() { m_UpdateRate = Mathf.Max(m_UpdateRate, 0f); m_Damping = Mathf.Clamp01(m_Damping); m_Elasticity = Mathf.Clamp01(m_Elasticity); m_Stiffness = Mathf.Clamp01(m_Stiffness); m_Inert = Mathf.Clamp01(m_Inert); m_Radius = Mathf.Max(m_Radius, 0f); if (Application.isEditor && Application.isPlaying) { InitTransforms(); SetupParticles(); } } private void OnDrawGizmosSelected() { //IL_0052: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) if (!((Behaviour)this).enabled || (Object)(object)m_Root == (Object)null) { return; } if (Application.isEditor && !Application.isPlaying && ((Component)this).transform.hasChanged) { InitTransforms(); SetupParticles(); } Gizmos.color = Color.white; for (int i = 0; i < m_Particles.Count; i++) { Particle particle = m_Particles[i]; if (particle.m_ParentIndex >= 0) { Particle particle2 = m_Particles[particle.m_ParentIndex]; Gizmos.DrawLine(particle.m_Position, particle2.m_Position); } if (particle.m_Radius > 0f) { Gizmos.DrawWireSphere(particle.m_Position, particle.m_Radius * m_ObjectScale); } } } public void SetWeight(float w) { if (m_Weight != w) { if (w == 0f) { InitTransforms(); } else if (m_Weight == 0f) { ResetParticlesPosition(); } m_Weight = w; } } public float GetWeight() { return m_Weight; } private void UpdateDynamicBones(float t) { //IL_001e: 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) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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) if ((Object)(object)m_Root == (Object)null) { return; } m_ObjectScale = Mathf.Abs(((Component)this).transform.lossyScale.x); m_ObjectMove = ((Component)this).transform.position - m_ObjectPrevPosition; m_ObjectPrevPosition = ((Component)this).transform.position; int num = 1; if (m_UpdateRate > 0f) { float num2 = 1f / m_UpdateRate; m_Time += t; num = 0; while (m_Time >= num2) { m_Time -= num2; if (++num >= 3) { m_Time = 0f; break; } } } if (num > 0) { for (int i = 0; i < num; i++) { UpdateParticles1(); UpdateParticles2(); m_ObjectMove = Vector3.zero; } } else { SkipUpdateParticles(); } ApplyParticlesToTransforms(); } private void SetupParticles() { //IL_002b: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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) m_Particles.Clear(); if ((Object)(object)m_Root == (Object)null) { return; } m_LocalGravity = m_Root.InverseTransformDirection(m_Gravity); m_ObjectScale = Mathf.Abs(((Component)this).transform.lossyScale.x); m_ObjectPrevPosition = ((Component)this).transform.position; m_ObjectMove = Vector3.zero; m_BoneTotalLength = 0f; AppendParticles(m_Root, -1, 0f); for (int i = 0; i < m_Particles.Count; i++) { Particle particle = m_Particles[i]; particle.m_Damping = m_Damping; particle.m_Elasticity = m_Elasticity; particle.m_Stiffness = m_Stiffness; particle.m_Inert = m_Inert; particle.m_Radius = m_Radius; if (m_BoneTotalLength > 0f) { float num = particle.m_BoneLength / m_BoneTotalLength; if (m_DampingDistrib != null && m_DampingDistrib.keys.Length != 0) { particle.m_Damping *= m_DampingDistrib.Evaluate(num); } if (m_ElasticityDistrib != null && m_ElasticityDistrib.keys.Length != 0) { particle.m_Elasticity *= m_ElasticityDistrib.Evaluate(num); } if (m_StiffnessDistrib != null && m_StiffnessDistrib.keys.Length != 0) { particle.m_Stiffness *= m_StiffnessDistrib.Evaluate(num); } if (m_InertDistrib != null && m_InertDistrib.keys.Length != 0) { particle.m_Inert *= m_InertDistrib.Evaluate(num); } if (m_RadiusDistrib != null && m_RadiusDistrib.keys.Length != 0) { particle.m_Radius *= m_RadiusDistrib.Evaluate(num); } } particle.m_Damping = Mathf.Clamp01(particle.m_Damping); particle.m_Elasticity = Mathf.Clamp01(particle.m_Elasticity); particle.m_Stiffness = Mathf.Clamp01(particle.m_Stiffness); particle.m_Inert = Mathf.Clamp01(particle.m_Inert); particle.m_Radius = Mathf.Max(particle.m_Radius, 0f); } } private void AppendParticles(Transform b, int parentIndex, float boneLength) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_0031: 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_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_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_0112: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0267: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) Particle particle = new Particle(); particle.m_Transform = b; particle.m_ParentIndex = parentIndex; Vector3 val; if ((Object)(object)b != (Object)nu