Decompiled source of Dante v0.0.43
plugins/Dante/DanteMod.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using DanteMod.Content; using DanteMod.Content.Achievements; using DanteMod.Content.Components; using DanteMod.Content.Misc; using DanteMod.Content.Survivors; using DanteMod.Content.Weapons; using DanteMod.Modules; using DanteMod.SkillStates; using DanteMod.SkillStates.BaseStates; using DanteMod.SkillStates.Dante; using DanteMod.SkillStates.Dante.Gun; using DanteMod.SkillStates.Dante.Melee.Queen; using DanteMod.SkillStates.Dante.Melee.Sword; using DanteMod.SkillStates.Dante.Melee.Titan; using DanteMod.SkillStates.Dante.Skill; using DanteMod.SkillStates.Emote; using EntityStates; using EntityStates.BeetleGuardMonster; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using Grumpy; using HG; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using MaterialHud; using On.RoR2; using On.RoR2.CameraModes; using On.RoR2.CharacterSpeech; using On.RoR2.UI; using On.RoR2.UI.MainMenu; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CameraModes; using RoR2.CharacterSpeech; using RoR2.ContentManagement; using RoR2.Navigation; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using RoR2.UI.MainMenu; using TMPro; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("DanteMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DanteMod")] [assembly: AssemblyTitle("DanteMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] public class DeflectTracker : MonoBehaviour { } public class Interpolate { public enum EaseType { Linear, EaseInQuad, EaseOutQuad, EaseInOutQuad, EaseInCubic, EaseOutCubic, EaseInOutCubic, EaseInQuart, EaseOutQuart, EaseInOutQuart, EaseInQuint, EaseOutQuint, EaseInOutQuint, EaseInSine, EaseOutSine, EaseInOutSine, EaseInExpo, EaseOutExpo, EaseInOutExpo, EaseInCirc, EaseOutCirc, EaseInOutCirc } public delegate Vector3 ToVector3<T>(T v); public delegate float Function(float a, float b, float c, float d); private static Vector3 Identity(Vector3 v) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return v; } private static Vector3 TransformDotPosition(Transform t) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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) return t.position; } private static IEnumerable<float> NewTimer(float duration) { float elapsedTime = 0f; while (elapsedTime < duration) { yield return elapsedTime; elapsedTime += Time.deltaTime; if (elapsedTime >= duration) { yield return elapsedTime; } } } private static IEnumerable<float> NewCounter(int start, int end, int step) { for (int i = start; i <= end; i += step) { yield return i; } } public static IEnumerator NewEase(Function ease, Vector3 start, Vector3 end, 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) IEnumerable<float> driver = NewTimer(duration); return NewEase(ease, start, end, duration, driver); } public static IEnumerator NewEase(Function ease, Vector3 start, Vector3 end, int slices) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) IEnumerable<float> driver = NewCounter(0, slices + 1, 1); return NewEase(ease, start, end, slices + 1, driver); } private static IEnumerator NewEase(Function ease, Vector3 start, Vector3 end, float total, IEnumerable<float> driver) { //IL_000e: 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_0015: 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) Vector3 distance = end - start; foreach (float i in driver) { yield return Ease(ease, start, distance, i, total); } } private static Vector3 Ease(Function ease, Vector3 start, Vector3 distance, float elapsedTime, float duration) { //IL_0004: 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_0020: 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_003c: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) start.x = ease(start.x, distance.x, elapsedTime, duration); start.y = ease(start.y, distance.y, elapsedTime, duration); start.z = ease(start.z, distance.z, elapsedTime, duration); return start; } public static Function Ease(EaseType type) { Function result = null; switch (type) { case EaseType.Linear: result = Linear; break; case EaseType.EaseInQuad: result = EaseInQuad; break; case EaseType.EaseOutQuad: result = EaseOutQuad; break; case EaseType.EaseInOutQuad: result = EaseInOutQuad; break; case EaseType.EaseInCubic: result = EaseInCubic; break; case EaseType.EaseOutCubic: result = EaseOutCubic; break; case EaseType.EaseInOutCubic: result = EaseInOutCubic; break; case EaseType.EaseInQuart: result = EaseInQuart; break; case EaseType.EaseOutQuart: result = EaseOutQuart; break; case EaseType.EaseInOutQuart: result = EaseInOutQuart; break; case EaseType.EaseInQuint: result = EaseInQuint; break; case EaseType.EaseOutQuint: result = EaseOutQuint; break; case EaseType.EaseInOutQuint: result = EaseInOutQuint; break; case EaseType.EaseInSine: result = EaseInSine; break; case EaseType.EaseOutSine: result = EaseOutSine; break; case EaseType.EaseInOutSine: result = EaseInOutSine; break; case EaseType.EaseInExpo: result = EaseInExpo; break; case EaseType.EaseOutExpo: result = EaseOutExpo; break; case EaseType.EaseInOutExpo: result = EaseInOutExpo; break; case EaseType.EaseInCirc: result = EaseInCirc; break; case EaseType.EaseOutCirc: result = EaseOutCirc; break; case EaseType.EaseInOutCirc: result = EaseInOutCirc; break; } return result; } public static IEnumerable<Vector3> NewBezier(Function ease, Transform[] nodes, float duration) { IEnumerable<float> steps = NewTimer(duration); return NewBezier<Transform>(ease, nodes, TransformDotPosition, duration, steps); } public static IEnumerable<Vector3> NewBezier(Function ease, Transform[] nodes, int slices) { IEnumerable<float> steps = NewCounter(0, slices + 1, 1); return NewBezier<Transform>(ease, nodes, TransformDotPosition, slices + 1, steps); } public static IEnumerable<Vector3> NewBezier(Function ease, Vector3[] points, float duration) { IEnumerable<float> steps = NewTimer(duration); return NewBezier<Vector3>(ease, points, Identity, duration, steps); } public static IEnumerable<Vector3> NewBezier(Function ease, Vector3[] points, int slices) { IEnumerable<float> steps = NewCounter(0, slices + 1, 1); return NewBezier<Vector3>(ease, points, Identity, slices + 1, steps); } private static IEnumerable<Vector3> NewBezier<T>(Function ease, IList nodes, ToVector3<T> toVector3, float maxStep, IEnumerable<float> steps) { if (nodes.Count < 2) { yield break; } Vector3[] points = (Vector3[])(object)new Vector3[nodes.Count]; foreach (float step in steps) { for (int i = 0; i < nodes.Count; i++) { points[i] = toVector3((T)nodes[i]); } yield return Bezier(ease, points, step, maxStep); } } private static Vector3 Bezier(Function ease, Vector3[] points, float elapsedTime, float duration) { //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) for (int num = points.Length - 1; num > 0; num--) { for (int i = 0; i < num; i++) { points[i].x = ease(points[i].x, points[i + 1].x - points[i].x, elapsedTime, duration); points[i].y = ease(points[i].y, points[i + 1].y - points[i].y, elapsedTime, duration); points[i].z = ease(points[i].z, points[i + 1].z - points[i].z, elapsedTime, duration); } } return points[0]; } public static IEnumerable<Vector3> NewCatmullRom(Transform[] nodes, int slices, bool loop) { return NewCatmullRom<Transform>(nodes, TransformDotPosition, slices, loop); } public static IEnumerable<Vector3> NewCatmullRom(Vector3[] points, int slices, bool loop) { return NewCatmullRom<Vector3>(points, Identity, slices, loop); } private static IEnumerable<Vector3> NewCatmullRom<T>(IList nodes, ToVector3<T> toVector3, int slices, bool loop) { if (nodes.Count < 2) { yield break; } yield return toVector3((T)nodes[0]); int last = nodes.Count - 1; for (int current = 0; loop || current < last; current++) { if (loop && current > last) { current = 0; } int previous = ((current != 0) ? (current - 1) : (loop ? last : current)); int start = current; int end = ((current != last) ? (current + 1) : ((!loop) ? current : 0)); int next = ((end != last) ? (end + 1) : ((!loop) ? end : 0)); int stepCount = slices + 1; for (int step = 1; step <= stepCount; step++) { yield return CatmullRom(toVector3((T)nodes[previous]), toVector3((T)nodes[start]), toVector3((T)nodes[end]), toVector3((T)nodes[next]), step, stepCount); } } } private static Vector3 CatmullRom(Vector3 previous, Vector3 start, Vector3 end, Vector3 next, float elapsedTime, float duration) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) float num = elapsedTime / duration; float num2 = num * num; float num3 = num2 * num; return previous * (-0.5f * num3 + num2 - 0.5f * num) + start * (1.5f * num3 + -2.5f * num2 + 1f) + end * (-1.5f * num3 + 2f * num2 + 0.5f * num) + next * (0.5f * num3 - 0.5f * num2); } private static float Linear(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return distance * (elapsedTime / duration) + start; } private static float EaseInQuad(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return distance * elapsedTime * elapsedTime + start; } private static float EaseOutQuad(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return (0f - distance) * elapsedTime * (elapsedTime - 2f) + start; } private static float EaseInOutQuad(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return distance / 2f * elapsedTime * elapsedTime + start; } elapsedTime -= 1f; return (0f - distance) / 2f * (elapsedTime * (elapsedTime - 2f) - 1f) + start; } private static float EaseInCubic(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return distance * elapsedTime * elapsedTime * elapsedTime + start; } private static float EaseOutCubic(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); elapsedTime -= 1f; return distance * (elapsedTime * elapsedTime * elapsedTime + 1f) + start; } private static float EaseInOutCubic(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return distance / 2f * elapsedTime * elapsedTime * elapsedTime + start; } elapsedTime -= 2f; return distance / 2f * (elapsedTime * elapsedTime * elapsedTime + 2f) + start; } private static float EaseInQuart(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return distance * elapsedTime * elapsedTime * elapsedTime * elapsedTime + start; } private static float EaseOutQuart(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); elapsedTime -= 1f; return (0f - distance) * (elapsedTime * elapsedTime * elapsedTime * elapsedTime - 1f) + start; } private static float EaseInOutQuart(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return distance / 2f * elapsedTime * elapsedTime * elapsedTime * elapsedTime + start; } elapsedTime -= 2f; return (0f - distance) / 2f * (elapsedTime * elapsedTime * elapsedTime * elapsedTime - 2f) + start; } private static float EaseInQuint(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return distance * elapsedTime * elapsedTime * elapsedTime * elapsedTime * elapsedTime + start; } private static float EaseOutQuint(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); elapsedTime -= 1f; return distance * (elapsedTime * elapsedTime * elapsedTime * elapsedTime * elapsedTime + 1f) + start; } private static float EaseInOutQuint(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return distance / 2f * elapsedTime * elapsedTime * elapsedTime * elapsedTime * elapsedTime + start; } elapsedTime -= 2f; return distance / 2f * (elapsedTime * elapsedTime * elapsedTime * elapsedTime * elapsedTime + 2f) + start; } private static float EaseInSine(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return (0f - distance) * Mathf.Cos(elapsedTime / duration * (MathF.PI / 2f)) + distance + start; } private static float EaseOutSine(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return distance * Mathf.Sin(elapsedTime / duration * (MathF.PI / 2f)) + start; } private static float EaseInOutSine(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return (0f - distance) / 2f * (Mathf.Cos(MathF.PI * elapsedTime / duration) - 1f) + start; } private static float EaseInExpo(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return distance * Mathf.Pow(2f, 10f * (elapsedTime / duration - 1f)) + start; } private static float EaseOutExpo(float start, float distance, float elapsedTime, float duration) { if (elapsedTime > duration) { elapsedTime = duration; } return distance * (0f - Mathf.Pow(2f, -10f * elapsedTime / duration) + 1f) + start; } private static float EaseInOutExpo(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return distance / 2f * Mathf.Pow(2f, 10f * (elapsedTime - 1f)) + start; } elapsedTime -= 1f; return distance / 2f * (0f - Mathf.Pow(2f, -10f * elapsedTime) + 2f) + start; } private static float EaseInCirc(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); return (0f - distance) * (Mathf.Sqrt(1f - elapsedTime * elapsedTime) - 1f) + start; } private static float EaseOutCirc(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 1f : (elapsedTime / duration)); elapsedTime -= 1f; return distance * Mathf.Sqrt(1f - elapsedTime * elapsedTime) + start; } private static float EaseInOutCirc(float start, float distance, float elapsedTime, float duration) { elapsedTime = ((elapsedTime > duration) ? 2f : (elapsedTime / (duration / 2f))); if (elapsedTime < 1f) { return (0f - distance) / 2f * (Mathf.Sqrt(1f - elapsedTime * elapsedTime) - 1f) + start; } elapsedTime -= 2f; return distance / 2f * (Mathf.Sqrt(1f - elapsedTime * elapsedTime) + 1f) + start; } } public class MeleeWeaponTrail : MonoBehaviour { [Serializable] public class Point { public float timeCreated = 0f; public Vector3 basePosition; public Vector3 tipPosition; } public bool _emit = true; private bool _use = true; public float _emitTime = 0f; public Material _material; public float _lifeTime = 1f; public Color[] _colors; public float[] _sizes; [SerializeField] private float _minVertexDistance = 0.01f; [SerializeField] private float _maxVertexDistance = 10f; private float _minVertexDistanceSqr = 0f; private float _maxVertexDistanceSqr = 0f; [SerializeField] private float _maxAngle = 3f; [SerializeField] private bool _autoDestruct = false; [SerializeField] private int subdivisions = 8; public Transform _base; public Transform _tip; private List<Point> _points = new List<Point>(); private List<Point> _smoothedPoints = new List<Point>(); private GameObject _trailObject; private Mesh _trailMesh; private Vector3 _lastPosition; public bool Emit { set { _emit = value; } } public bool Use { set { _use = value; } } public Color mainColor { get; private set; } public void Init(Color trailColor, float length, float lifetime, Material mat) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) _material = mat; _tip.position = ((Component)_base).transform.position + ((Component)_base).transform.forward * length; mainColor = trailColor; _trailObject.GetComponent<Renderer>().material = _material; _lifeTime = lifetime; } private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown _lastPosition = ((Component)this).transform.position; _trailObject = new GameObject("Trail"); _trailObject.transform.parent = null; _trailObject.transform.position = Vector3.zero; _trailObject.transform.rotation = Quaternion.identity; _trailObject.transform.localScale = Vector3.one; _trailObject.AddComponent(typeof(MeshFilter)); _trailObject.AddComponent(typeof(MeshRenderer)); _trailObject.GetComponent<Renderer>().material = _material; _trailMesh = new Mesh(); ((Object)_trailMesh).name = ((Object)this).name + "TrailMesh"; _trailObject.GetComponent<MeshFilter>().mesh = _trailMesh; _minVertexDistanceSqr = _minVertexDistance * _minVertexDistance; _maxVertexDistanceSqr = _maxVertexDistance * _maxVertexDistance; } private void OnDisable() { Object.Destroy((Object)(object)_trailObject); } private void Update() { //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_0600: 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_0628: Unknown result type (might be due to invalid IL or missing references) //IL_062d: 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_016f: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: 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_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_0666: Unknown result type (might be due to invalid IL or missing references) //IL_066b: Unknown result type (might be due to invalid IL or missing references) //IL_068e: Unknown result type (might be due to invalid IL or missing references) //IL_0693: Unknown result type (might be due to invalid IL or missing references) //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_056b: Unknown result type (might be due to invalid IL or missing references) //IL_0570: Unknown result type (might be due to invalid IL or missing references) //IL_0593: 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_05bb: Unknown result type (might be due to invalid IL or missing references) //IL_05c0: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: 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_0215: Unknown result type (might be due to invalid IL or missing references) //IL_023b: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0787: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0334: Unknown result type (might be due to invalid IL or missing references) //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0359: Unknown result type (might be due to invalid IL or missing references) //IL_035e: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c0: Unknown result type (might be due to invalid IL or missing references) //IL_03e0: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_040a: Unknown result type (might be due to invalid IL or missing references) //IL_0985: Unknown result type (might be due to invalid IL or missing references) //IL_098c: Unknown result type (might be due to invalid IL or missing references) //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_0996: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Unknown result type (might be due to invalid IL or missing references) //IL_09a5: Unknown result type (might be due to invalid IL or missing references) //IL_09af: Unknown result type (might be due to invalid IL or missing references) //IL_09b4: Unknown result type (might be due to invalid IL or missing references) //IL_09b9: Unknown result type (might be due to invalid IL or missing references) //IL_09c8: Unknown result type (might be due to invalid IL or missing references) //IL_09cd: Unknown result type (might be due to invalid IL or missing references) //IL_09d7: Unknown result type (might be due to invalid IL or missing references) //IL_09dc: Unknown result type (might be due to invalid IL or missing references) //IL_09e1: 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_09f6: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_09f9: Unknown result type (might be due to invalid IL or missing references) //IL_09fe: Unknown result type (might be due to invalid IL or missing references) //IL_0a00: Unknown result type (might be due to invalid IL or missing references) //IL_0a1f: Unknown result type (might be due to invalid IL or missing references) //IL_0a24: Unknown result type (might be due to invalid IL or missing references) //IL_0a38: Unknown result type (might be due to invalid IL or missing references) //IL_0a3d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Unknown result type (might be due to invalid IL or missing references) //IL_087a: Unknown result type (might be due to invalid IL or missing references) //IL_0881: Unknown result type (might be due to invalid IL or missing references) //IL_0886: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Unknown result type (might be due to invalid IL or missing references) //IL_04c0: Unknown result type (might be due to invalid IL or missing references) //IL_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Unknown result type (might be due to invalid IL or missing references) if (!_use) { return; } if (_emit && _emitTime != 0f) { _emitTime -= Time.deltaTime; if (_emitTime == 0f) { _emitTime = -1f; } if (_emitTime < 0f) { _emit = false; } } if (!_emit && _points.Count == 0 && _autoDestruct) { Object.Destroy((Object)(object)_trailObject); Object.Destroy((Object)(object)((Component)this).gameObject); } if (!Object.op_Implicit((Object)(object)Camera.main)) { return; } Vector3 val = _lastPosition - ((Component)this).transform.position; float sqrMagnitude = ((Vector3)(ref val)).sqrMagnitude; if (_emit) { if (sqrMagnitude > _minVertexDistanceSqr) { bool flag = false; if (_points.Count < 3) { flag = true; } else { Vector3 val2 = _points[_points.Count - 2].tipPosition - _points[_points.Count - 3].tipPosition; Vector3 val3 = _points[_points.Count - 1].tipPosition - _points[_points.Count - 2].tipPosition; if (Vector3.Angle(val2, val3) > _maxAngle || sqrMagnitude > _maxVertexDistanceSqr) { flag = true; } } if (flag) { Point point = new Point(); point.basePosition = _base.position; point.tipPosition = _tip.position; point.timeCreated = Time.time; _points.Add(point); _lastPosition = ((Component)this).transform.position; if (_points.Count == 1) { _smoothedPoints.Add(point); } else if (_points.Count > 1) { for (int i = 0; i < 1 + subdivisions; i++) { _smoothedPoints.Add(point); } } if (_points.Count >= 4) { IEnumerable<Vector3> collection = Interpolate.NewCatmullRom((Vector3[])(object)new Vector3[4] { _points[_points.Count - 4].tipPosition, _points[_points.Count - 3].tipPosition, _points[_points.Count - 2].tipPosition, _points[_points.Count - 1].tipPosition }, subdivisions, loop: false); IEnumerable<Vector3> collection2 = Interpolate.NewCatmullRom((Vector3[])(object)new Vector3[4] { _points[_points.Count - 4].basePosition, _points[_points.Count - 3].basePosition, _points[_points.Count - 2].basePosition, _points[_points.Count - 1].basePosition }, subdivisions, loop: false); List<Vector3> list = new List<Vector3>(collection); List<Vector3> list2 = new List<Vector3>(collection2); float timeCreated = _points[_points.Count - 4].timeCreated; float timeCreated2 = _points[_points.Count - 1].timeCreated; for (int j = 0; j < list.Count; j++) { int num = _smoothedPoints.Count - (list.Count - j); if (num > -1 && num < _smoothedPoints.Count) { Point point2 = new Point(); point2.basePosition = list2[j]; point2.tipPosition = list[j]; point2.timeCreated = Mathf.Lerp(timeCreated, timeCreated2, (float)j / (float)list.Count); _smoothedPoints[num] = point2; } } } } else { _points[_points.Count - 1].basePosition = _base.position; _points[_points.Count - 1].tipPosition = _tip.position; _smoothedPoints[_smoothedPoints.Count - 1].basePosition = _base.position; _smoothedPoints[_smoothedPoints.Count - 1].tipPosition = _tip.position; } } else { if (_points.Count > 0) { _points[_points.Count - 1].basePosition = _base.position; _points[_points.Count - 1].tipPosition = _tip.position; } if (_smoothedPoints.Count > 0) { _smoothedPoints[_smoothedPoints.Count - 1].basePosition = _base.position; _smoothedPoints[_smoothedPoints.Count - 1].tipPosition = _tip.position; } } } RemoveOldPoints(_points); if (_points.Count == 0) { _trailMesh.Clear(); } RemoveOldPoints(_smoothedPoints); if (_smoothedPoints.Count == 0) { _trailMesh.Clear(); } List<Point> smoothedPoints = _smoothedPoints; if (smoothedPoints.Count <= 1) { return; } Vector3[] array = (Vector3[])(object)new Vector3[smoothedPoints.Count * 2]; Vector2[] array2 = (Vector2[])(object)new Vector2[smoothedPoints.Count * 2]; int[] array3 = new int[(smoothedPoints.Count - 1) * 6]; Color[] array4 = (Color[])(object)new Color[smoothedPoints.Count * 2]; for (int k = 0; k < smoothedPoints.Count; k++) { Point point3 = smoothedPoints[k]; float num2 = (Time.time - point3.timeCreated) / _lifeTime; Color val4 = Color.Lerp(mainColor, Color.clear, num2); if (_colors != null && _colors.Length != 0) { float num3 = num2 * (float)(_colors.Length - 1); float num4 = Mathf.Floor(num3); float num5 = Mathf.Clamp(Mathf.Ceil(num3), 1f, (float)(_colors.Length - 1)); float num6 = Mathf.InverseLerp(num4, num5, num3); if (num4 >= (float)_colors.Length) { num4 = _colors.Length - 1; } if (num4 < 0f) { num4 = 0f; } if (num5 >= (float)_colors.Length) { num5 = _colors.Length - 1; } if (num5 < 0f) { num5 = 0f; } val4 = Color.Lerp(_colors[(int)num4], _colors[(int)num5], num6); } float num7 = 0f; if (_sizes != null && _sizes.Length != 0) { float num8 = num2 * (float)(_sizes.Length - 1); float num9 = Mathf.Floor(num8); float num10 = Mathf.Clamp(Mathf.Ceil(num8), 1f, (float)(_sizes.Length - 1)); float num11 = Mathf.InverseLerp(num9, num10, num8); if (num9 >= (float)_sizes.Length) { num9 = _sizes.Length - 1; } if (num9 < 0f) { num9 = 0f; } if (num10 >= (float)_sizes.Length) { num10 = _sizes.Length - 1; } if (num10 < 0f) { num10 = 0f; } num7 = Mathf.Lerp(_sizes[(int)num9], _sizes[(int)num10], num11); } Vector3 val5 = point3.tipPosition - point3.basePosition; array[k * 2] = point3.basePosition - val5 * (num7 * 0.5f); array[k * 2 + 1] = point3.tipPosition + val5 * (num7 * 0.5f); array4[k * 2] = (array4[k * 2 + 1] = val4); float num12 = (float)k / (float)smoothedPoints.Count; array2[k * 2] = new Vector2(num12, 0f); array2[k * 2 + 1] = new Vector2(num12, 1f); if (k > 0) { array3[(k - 1) * 6] = k * 2 - 2; array3[(k - 1) * 6 + 1] = k * 2 - 1; array3[(k - 1) * 6 + 2] = k * 2; array3[(k - 1) * 6 + 3] = k * 2 + 1; array3[(k - 1) * 6 + 4] = k * 2; array3[(k - 1) * 6 + 5] = k * 2 - 1; } } _trailMesh.Clear(); _trailMesh.vertices = array; _trailMesh.colors = array4; _trailMesh.uv = array2; _trailMesh.triangles = array3; } private void RemoveOldPoints(List<Point> pointList) { List<Point> list = new List<Point>(); foreach (Point point in pointList) { if (Time.time - point.timeCreated > _lifeTime) { list.Add(point); } } foreach (Point item in list) { pointList.Remove(item); } } } public class RocketRotation : MonoBehaviour { private Rigidbody rb; private void Awake() { rb = ((Component)this).GetComponent<Rigidbody>(); } private void FixedUpdate() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) Transform transform = ((Component)this).transform; Vector3 velocity = rb.velocity; transform.rotation = Util.QuaternionSafeLookRotation(((Vector3)(ref velocity)).normalized); } } public class StupidFuckingBullshit : MonoBehaviour { public ParticleSystem faggot; private void Awake() { faggot = ((Component)this).GetComponentInChildren<ParticleSystem>(); ((Component)faggot).transform.SetParent((Transform)null); } private void FixedUpdate() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) ((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); } } [CreateAssetMenu(fileName = "wpn", menuName = "ScriptableObjects/WeaponDef", order = 1)] public class DanteWeaponDef : ScriptableObject { public enum AnimationSet { Sword, Greatshield, Gauntlets, Hammer, Cannon } public enum DeflectType { None, Deflect, AlwaysPerfect, OnlyPerfect, Destroy } [Header("General")] public string nameToken = ""; public string descriptionToken = ""; public Sprite icon = null; public GameObject crosshairPrefab = null; [Header("Skills")] public SkillDef skillDef = null; public DeflectType deflectType = DeflectType.Deflect; public float power = 1f; [Header("Upgrade")] public DanteWeaponDef baseWeaponDef; [Header("Visuals")] public Mesh mesh = null; public Mesh meshSheathed = null; public Material material = null; public AnimationSet animationSet = AnimationSet.Sword; public string readySoundString = ""; [HideInInspector] public ushort index; [HideInInspector] public ItemDef itemDef; public static DanteWeaponDef CreateWeaponDefFromInfo(DanteWeaponDefInfo weaponDefInfo) { DanteWeaponDef danteWeaponDef = (DanteWeaponDef)(object)ScriptableObject.CreateInstance(typeof(DanteWeaponDef)); ((Object)danteWeaponDef).name = weaponDefInfo.nameToken; danteWeaponDef.nameToken = weaponDefInfo.nameToken; danteWeaponDef.descriptionToken = weaponDefInfo.descriptionToken; danteWeaponDef.icon = weaponDefInfo.icon; danteWeaponDef.crosshairPrefab = weaponDefInfo.crosshairPrefab; danteWeaponDef.skillDef = weaponDefInfo.skillDef; danteWeaponDef.deflectType = weaponDefInfo.deflectType; danteWeaponDef.power = weaponDefInfo.power; danteWeaponDef.baseWeaponDef = weaponDefInfo.baseWeaponDef; danteWeaponDef.mesh = weaponDefInfo.mesh; danteWeaponDef.meshSheathed = weaponDefInfo.meshSheathed; danteWeaponDef.material = weaponDefInfo.material; danteWeaponDef.animationSet = weaponDefInfo.animationSet; danteWeaponDef.readySoundString = weaponDefInfo.readySoundString; return danteWeaponDef; } } [Serializable] public struct DanteWeaponDefInfo { public string nameToken; public string descriptionToken; public Sprite icon; public GameObject crosshairPrefab; public SkillDef skillDef; public DanteWeaponDef.DeflectType deflectType; public float power; public DanteWeaponDef baseWeaponDef; public Mesh mesh; public Mesh meshSheathed; public Material material; public DanteWeaponDef.AnimationSet animationSet; public string readySoundString; } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } internal enum DanteCameraParams { DEFAULT, AIM, EMOTE, FAR } internal class BodyInfo { internal string sourceBody = ""; internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Color bodyColor = Color.white; public Vector3 modelBasePosition = new Vector3(0f, -0.9f, 0f); public Vector3 aimOrigin = new Vector3(0f, 1.4f, 0f); public Vector3 cameraPivot = new Vector3(0f, 1.59f, 0f); internal Texture characterPortrait = null; internal GameObject crosshair = null; internal GameObject podPrefab = null; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen = 0f; internal float shield = 0f; internal float shieldGrowth = 0f; internal float moveSpeed = 7f; internal float moveSpeedGrowth = 0f; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth = 0f; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth = 0f; internal float armor = 0f; internal float armorGrowth = 0f; internal float crit = 1f; internal float critGrowth = 0f; internal int jumpCount = 1; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite icon; public SerializableEntityStateType activationState; public InterruptPriority interruptPriority; public string activationStateMachineName; public float baseRechargeInterval; public int baseMaxStock = 1; public int rechargeStock = 1; public int requiredStock = 1; public int stockToConsume = 1; public bool isCombatSkill = true; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool cancelSprintingOnActivation = true; public bool beginSkillCooldownOnSkillEnd; public bool fullRestockOnAssign = true; public bool resetCooldownTimerOnUse; public bool mustKeyPress; public SkillDefInfo() { } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; icon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; this.interruptPriority = interruptPriority; this.isCombatSkill = isCombatSkill; this.baseRechargeInterval = baseRechargeInterval; } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; icon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; interruptPriority = (InterruptPriority)0; isCombatSkill = true; baseRechargeInterval = 0f; requiredStock = 0; stockToConsume = 0; cancelSprintingOnActivation = !agile; if (agile) { keywordTokens = new string[1] { "KEYWORD_AGILE" }; } } } namespace DanteMod { public static class DanteWeaponCatalog { public static Dictionary<string, DanteWeaponDef> weaponDrops = new Dictionary<string, DanteWeaponDef>(); public static DanteWeaponDef[] weaponDefs = new DanteWeaponDef[0]; public static List<ItemDef> itemDefs = new List<ItemDef>(0); public static void AddWeapon(DanteWeaponDef weaponDef, bool addItem = true) { Array.Resize(ref weaponDefs, weaponDefs.Length + 1); int num = weaponDefs.Length - 1; weaponDef.index = (ushort)num; weaponDefs[num] = weaponDef; weaponDef.index = (ushort)num; if (addItem) { itemDefs.Add(weaponDef.itemDef); } Debug.Log((object)("Added " + weaponDef.nameToken + " to Dante weapon catalog with index: " + weaponDef.index)); } public static void AddWeaponDrop(string bodyName, DanteWeaponDef weaponDef, bool autoComplete = true) { if (autoComplete) { if (!bodyName.Contains("Body")) { bodyName += "Body"; } if (!bodyName.Contains("(Clone)")) { bodyName += "(Clone)"; } } weaponDrops.Add(bodyName, weaponDef); } public static DanteWeaponDef GetWeaponFromIndex(int index) { return weaponDefs[index]; } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.rob.Dante", "Dante", "0.0.43")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.Dante"; public const string MODNAME = "Dante"; public const string MODVERSION = "0.0.43"; public const string developerPrefix = "ROB"; public static MainPlugin instance; public static List<HurtBox> hurtboxesList = new List<HurtBox>(); public static bool scepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool rooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool hunkInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk"); public static bool greenAlienHeadInstalled => Chainloader.PluginInfos.ContainsKey("com.Borbo.GreenAlienHead"); public static bool enemiesReturnsInstalled => Chainloader.PluginInfos.ContainsKey("com.Viliger.EnemiesReturns"); public static bool riskUIInstalled { get { if (Chainloader.PluginInfos.ContainsKey("bubbet.riskui") && RiskUIEnabled()) { return true; } return false; } } private void Awake() { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) instance = this; Files.PluginInfo = ((BaseUnityPlugin)this).Info; Config.myConfig = ((BaseUnityPlugin)this).Config; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(); DanteAssets.PopulateAssets(); CameraParams.InitializeParams(); States.RegisterStates(); Projectiles.RegisterProjectiles(); new LanguageTokens(); ItemDisplays.PopulateDisplays(); NetworkingAPI.RegisterMessageType<SyncGainGauge>(); NetworkingAPI.RegisterMessageType<SyncDeflect>(); NetworkingAPI.RegisterMessageType<SyncHeal>(); Dante.devilArmTier = Object.Instantiate<ItemTierDef>(Addressables.LoadAssetAsync<ItemTierDef>((object)"RoR2/Base/Common/BossTierDef.asset").WaitForCompletion()); ((Object)Dante.devilArmTier).name = "DevilArmTierDef"; Dante.devilArmTier.pickupRules = (PickupRules)2; Dante.devilArmTier.isDroppable = false; Dante.devilArmTier.colorIndex = (ColorIndex)27; Dante.devilArmTier.darkColorIndex = (ColorIndex)27; Dante.devilArmTier.canScrap = false; Dante.devilArmTier.canRestack = false; Dante.devilArmTier.tier = (ItemTier)10; Dante.devilArmTier._tier = (ItemTier)10; new Rebellion().Init(); new Queen().Init(); new Titan().Init(); new Colossus().Init(); new Mithrix().Init(); new Dante().CreateCharacter(); Hook(); new ContentPacks().Initialize(); ContentManager.onContentPacksAssigned += LateSetup; } private void LateSetup(ReadOnlyArray<ReadOnlyContentPack> obj) { Dante.SetItemDisplays(); } private void Hook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown CharacterBody.RecalculateStats += new hook_RecalculateStats(CharacterBody_RecalculateStats); HurtBox.OnEnable += new hook_OnEnable(HurtBox_OnEnable); HurtBox.OnDisable += new hook_OnDisable(HurtBox_OnDisable); BodyCatalog.Init += new hook_Init(BodyCatalog_Init); } private IEnumerator BodyCatalog_Init(orig_Init orig) { yield return orig.Invoke(); foreach (GameObject body in BodyCatalog.allBodyPrefabs) { if (Object.op_Implicit((Object)(object)body)) { KinematicCharacterMotor motor = body.GetComponent<KinematicCharacterMotor>(); if (Object.op_Implicit((Object)(object)motor)) { motor.playerCharacter = true; } } } } private void HurtBox_OnEnable(orig_OnEnable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Add(self); } private void HurtBox_OnDisable(orig_OnDisable orig, HurtBox self) { orig.Invoke(self); hurtboxesList.Remove(self); } private void CharacterBody_RecalculateStats(orig_RecalculateStats orig, CharacterBody self) { orig.Invoke(self); if (Object.op_Implicit((Object)(object)self)) { if (self.HasBuff(Dante.devilTriggerBuff)) { self.moveSpeed += 3f; self.attackSpeed *= 1.25f; self.armor += 100f; self.regen += Util.Remap(self.healthComponent.combinedHealthFraction, 0f, 1f, 24f, 4f); } if (self.HasBuff(Dante.superSprintBuff) && self.isSprinting) { self.moveSpeed += 5f; } } } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int itemCount = body.inventory.GetItemCount(Items.MoreMissile); int num2 = itemCount - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } private static bool RiskUIEnabled() { return RiskUIPlugin.Enabled.Value; } } } namespace DanteMod.SkillStates { public class FuckMyAss : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { return; } RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (!Object.op_Implicit((Object)(object)component)) { return; } Transform[] bones = component.bones; foreach (Transform val2 in bones) { if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.layer = LayerIndex.ragdoll.intVal; ((Component)val2).gameObject.SetActive(true); } } component.BeginRagdoll(val); } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)7; } } } namespace DanteMod.SkillStates.Emote { public class BaseEmote : BaseState { private CameraParamsOverrideHandle camOverrideHandle; private Animator animator; private ChildLocator childLocator; private float duration; private uint activePlayID; public LocalUser localUser; public override void OnEnter() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); FindLocalUser(); ((EntityState)this).characterBody.hideCrosshair = true; camOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, DanteCameraParams.EMOTE); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } protected void PlayEmote(string animString, string soundString = "", float animDuration = 0f) { PlayEmote(animString, soundString, ((EntityState)this).GetModelAnimator(), animDuration); } protected void PlayEmote(string animString, string soundString, Animator animator, float animDuration = 0f) { if (animDuration >= 0f && duration != 0f) { animDuration = duration; } if (duration > 0f) { EntityState.PlayAnimationOnAnimator(animator, "Emote, Override", animString, "Emote.playbackRate", animDuration, 0f); } else { animator.SetFloat("Emote.playbackRate", 1f); EntityState.PlayAnimationOnAnimator(animator, "Emote, Override", animString); } if (!string.IsNullOrEmpty(soundString)) { activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject); } } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).isAuthority) { CheckEmote<Rest>(Config.restKey); CheckEmote<Taunt>(Config.tauntKey); CheckEmote<Dance>(Config.danceKey); } } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (Config.GetKeyPressed(keybind)) { FindLocalUser(); if (localUser != null && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } public override void FixedUpdate() { //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); bool flag = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { flag = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (((EntityState)this).inputBank.skill1.down) { flag = true; } if (((EntityState)this).inputBank.skill2.down) { flag = true; } if (((EntityState)this).inputBank.skill3.down) { flag = true; } if (((EntityState)this).inputBank.skill4.down) { flag = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero) { flag = true; } } if (duration > 0f && ((EntityState)this).fixedAge >= duration) { flag = true; } if (flag && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).PlayAnimation("Emote, Override", "BufferEmpty"); if (activePlayID != 0) { AkSoundEngine.StopPlayingID(activePlayID); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)0; } } public class Dance : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Dance"); } public override void OnExit() { base.OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).modelLocator) && Object.op_Implicit((Object)(object)((EntityState)this).modelLocator.modelTransform)) { DanteAnimationEvents component = ((Component)((EntityState)this).modelLocator.modelTransform).GetComponent<DanteAnimationEvents>(); if (Object.op_Implicit((Object)(object)component)) { component.EndTrails(); } } } } public class Rest : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Rest", "", 1.5f); } } public class Taunt : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Taunt", "", 1.5f); } } public class ToggleMusic : BaseState { private float duration = 0.6f; private bool boom = false; private int rng; public override void OnEnter() { rng = Mathf.RoundToInt(Random.value * 100f); ((BaseState)this).OnEnter(); ((EntityState)this).PlayCrossfade("Gesture Additive, Left", "ToggleMusic", "Emote.playbackRate", duration, 0.05f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!boom && ((EntityState)this).fixedAge >= 0.25f * duration) { boom = true; TryToggleMusic(); Util.PlaySound("sfx_hunk_button_click", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void TryToggleMusic() { MusicPlayer component = ((EntityState)this).GetComponent<MusicPlayer>(); if (Object.op_Implicit((Object)(object)component)) { EntityState.Destroy((Object)(object)component); ((Component)((BaseState)this).FindModelChild("HeadphonesModel")).gameObject.SetActive(false); return; } ((Component)((BaseState)this).FindModelChild("HeadphonesModel")).gameObject.SetActive(true); if (((EntityState)this).isAuthority) { component = ((EntityState)this).gameObject.AddComponent<MusicPlayer>(); if (rng < 6) { component.bgmString = "Sin_Devil_Trigger"; } else if (rng < 50) { component.bgmString = "Bury_The_Light_System"; } else { component.bgmString = "Devil_Trigger"; } } } public override void OnSerialize(NetworkWriter writer) { writer.Write(rng); } public override void OnDeserialize(NetworkReader reader) { rng = reader.ReadInt32(); } } } namespace DanteMod.SkillStates.Dante { public class BaseDanteSkillState : BaseSkillState { public enum InputDirection { None, Forward, Back, Left, Right } protected DanteController dante; protected virtual bool turningAllowed => true; protected virtual bool normalizeModel => false; protected InputDirection inputDirection { get { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0094: 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) if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank) && ((EntityState)this).inputBank.moveVector == Vector3.zero) { return InputDirection.None; } if (true) { Vector3 val = ((EntityState)this).transform.position + ((EntityState)this).inputBank.aimDirection * 5f; val.y = ((EntityState)this).transform.position.y; Vector3 val2 = val - ((EntityState)this).transform.position; float num = Vector3.Angle(((EntityState)this).inputBank.moveVector, val2); if (num <= 20f) { return InputDirection.Forward; } if (num >= 135f && num <= 225f) { return InputDirection.Back; } } return InputDirection.None; } } protected virtual bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } public override void OnEnter() { ValidateControllerReference(); ((BaseState)this).OnEnter(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = 0f; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = true; } } public override void OnExit() { ((EntityState)this).OnExit(); if (!turningAllowed) { ((EntityState)this).characterDirection.turnSpeed = dante.baseTurnSpeed; } if (normalizeModel) { ((EntityState)this).modelLocator.normalizeToFloor = false; } } protected void ValidateControllerReference() { dante = ((EntityState)this).gameObject.GetComponent<DanteController>(); } } public class BaseDanteState : BaseState { protected DanteController dante; protected virtual bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } public override void OnEnter() { ValidateControllerReference(); ((BaseState)this).OnEnter(); } protected void ValidateControllerReference() { dante = ((EntityState)this).gameObject.GetComponent<DanteController>(); } } public class EnemyStep : MainState { public override void OnEnter() { base.OnEnter(); ((EntityState)this).GetComponent<DanteController>().jumpLockoutStopwatch = 0f; ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).characterMotor.jumpCount = 1; ((GenericCharacterMain)this).ProcessJump(); } } public class LockOn : BaseDanteSkillState { private DanteTracker tracker; private HealthComponent target; private CameraParamsOverrideHandle camOverrideHandle; private float lumStopwatch; private bool shouldDeflect = false; public override void OnEnter() { //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: 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) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); tracker = ((EntityState)this).GetComponent<DanteTracker>(); dante.ReadyWeapon(); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(DanteMod.Content.Survivors.Dante.lockedOnBuff); } ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); Util.PlaySound(dante.weaponDef.readySoundString, ((EntityState)this).gameObject); if (dante.weaponDef.animationSet == DanteWeaponDef.AnimationSet.Sword) { ((EntityState)this).PlayAnimation("Gesture Additive, Right", "ReadySword"); } else if (dante.weaponDef.animationSet == DanteWeaponDef.AnimationSet.Greatshield) { ((EntityState)this).PlayAnimation("Gesture, Override", "ReadyGreatshield"); } else if (dante.weaponDef.animationSet == DanteWeaponDef.AnimationSet.Gauntlets) { ((EntityState)this).PlayAnimation("Gesture, Override", "ReadyGauntlets"); } dante.weaponDef.skillDef.mustKeyPress = true; ((EntityState)this).characterBody.hideCrosshair = true; ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).gameObject, dante.weaponDef.skillDef, (SkillOverridePriority)5); camOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, DanteCameraParams.FAR, 0.25f); dante.delayedInputTimer = 0f; dante.deflectLockoutStopwatch = 0f; dante.luminousFuckingChargeValue = 0f; dante.isLockedOn = true; shouldDeflect = dante.weaponDef.deflectType != DanteWeaponDef.DeflectType.None; CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 0x20); } public override void OnExit() { //IL_000f: 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_0017: 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_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_005e: Unknown result type (might be due to invalid IL or missing references) base.OnExit(); CharacterBody characterBody = ((EntityState)this).characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -33); dante.luminousFuckingChargeValue = 0f; dante.lockOnTarget = null; if (NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(DanteMod.Content.Survivors.Dante.lockedOnBuff); ((EntityState)this).characterBody.SetBuffCount(Buffs.IncreasePrimaryDamageBuff.buffIndex, 0); } dante.isLockedOn = false; dante.UnreadyWeapon(); ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f); ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).PlayCrossfade("Gesture, Override", "ReadyGuns", 0.05f); Util.PlaySound("sfx_dante_gun_foley", ((EntityState)this).gameObject); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).gameObject, dante.weaponDef.skillDef, (SkillOverridePriority)5); if (((EntityState)this).inputBank.moveVector != Vector3.zero) { ((EntityState)this).characterBody.isSprinting = true; } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); ((BaseState)this).StartAimMode(0.75f, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; ((EntityState)this).characterBody.isSprinting = false; HandleLuminousShot(); if (Object.op_Implicit((Object)(object)target) && !target.alive) { dante.lockOnTarget = null; } if ((!Object.op_Implicit((Object)(object)target) || (Object.op_Implicit((Object)(object)target) && !target.alive)) && Object.op_Implicit((Object)(object)tracker) && Object.op_Implicit((Object)(object)dante)) { HurtBox trackingTarget = tracker.GetTrackingTarget(); if (Object.op_Implicit((Object)(object)trackingTarget)) { if (!Object.op_Implicit((Object)(object)target)) { dante.ResetCameraVector(); } target = trackingTarget.healthComponent; dante.lockOnTarget = ((Component)trackingTarget).gameObject; } } if (((EntityState)this).fixedAge > 0.05f && ((EntityState)this).isAuthority) { if (!Config.lockOnToggle.Value) { if (!((EntityState)this).inputBank.skill2.down) { ((EntityState)this).outer.SetNextStateToMain(); } } else if (((ButtonState)(ref ((EntityState)this).inputBank.skill2)).justPressed) { ((EntityState)this).skillLocator.secondary.stock = 0; ((EntityState)this).skillLocator.secondary.rechargeStopwatch = -0.1f; ((EntityState)this).outer.SetNextStateToMain(); } } if (((EntityState)this).isAuthority && ((ButtonState)(ref ((EntityState)this).inputBank.sprint)).justPressed && !((EntityState)this).inputBank.skill3.down) { ((EntityState)this).outer.SetNextState((EntityState)(object)new Swap()); } else if (NetworkServer.active && shouldDeflect && Object.op_Implicit((Object)(object)dante) && dante.deflectLockoutStopwatch <= 0f) { HandleDeflect(); } } private void HandleDeflect() { //IL_002e: 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_0036: 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_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if (dante.weaponDef.deflectType == DanteWeaponDef.DeflectType.OnlyPerfect && ((EntityState)this).fixedAge > 0.25f) { return; } Ray aimRay = ((BaseState)this).GetAimRay(); Vector3 val = ((Ray)(ref aimRay)).origin + ((Ray)(ref aimRay)).direction * 2f; Collider[] array = Physics.OverlapSphere(val, 2f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.projectile)).mask)); for (int i = 0; i < array.Length; i++) { ProjectileController componentInParent = ((Component)array[i]).GetComponentInParent<ProjectileController>(); if (Object.op_Implicit((Object)(object)componentInParent) && (Object)(object)componentInParent.owner != (Object)(object)((EntityState)this).gameObject && componentInParent.teamFilter.teamIndex != ((BaseState)this).GetTeam()) { DeflectProjectile(componentInParent); } } } protected virtual void DeflectProjectile(ProjectileController pc) { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008e: 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_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0376: Unknown result type (might be due to invalid IL or missing references) //IL_037b: Unknown result type (might be due to invalid IL or missing references) //IL_038c: Expected O, but got Unknown //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: 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_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: 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_02d3: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_046b: Unknown result type (might be due to invalid IL or missing references) //IL_046e: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04a2: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active) { return; } if (dante.weaponDef.deflectType == DanteWeaponDef.DeflectType.Destroy) { dante.ServerDeflect(); EntityState.Destroy((Object)(object)((Component)pc).gameObject); } else { if (Object.op_Implicit((Object)(object)((Component)pc).gameObject.GetComponent<DeflectTracker>())) { return; } ((Component)pc).gameObject.AddComponent<DeflectTracker>(); dante.ServerDeflect(); Vector3 position = ((Component)pc).transform.position; position.y = ((EntityState)this).characterBody.aimOrigin.y; Vector3 origin = Vector3.Lerp(((Component)pc).transform.position, ((EntityState)this).characterBody.aimOrigin, 0.5f); Vector3 val = position - ((EntityState)this).characterBody.aimOrigin; Vector3 normalized = ((Vector3)(ref val)).normalized; normalized = Util.ApplySpread(normalized, 0f, 30f, 1f, 0f, 0f, 0f); float num = Random.Range(30f, 50f); if (((EntityState)this).fixedAge <= 0.25f || dante.weaponDef.deflectType == DanteWeaponDef.DeflectType.AlwaysPerfect) { Ray aimRay = ((BaseState)this).GetAimRay(); normalized = ((Ray)(ref aimRay)).direction; if (Object.op_Implicit((Object)(object)pc.owner)) { Vector3 val2 = pc.owner.transform.position + Vector3.up; HealthComponent component = pc.owner.GetComponent<HealthComponent>(); if (Object.op_Implicit((Object)(object)component) && Object.op_Implicit((Object)(object)component.body) && Object.op_Implicit((Object)(object)component.body.mainHurtBox)) { val2 = ((Component)component.body.mainHurtBox).transform.position; } val = val2 - ((Component)pc).transform.position; normalized = ((Vector3)(ref val)).normalized; } num = 70f; dante.GainGauge(dante.GetGaugeAmount(Mathf.CeilToInt((float)dante.baseGaugeGain * 0.5f))); ProjectileDamage component2 = ((Component)pc).GetComponent<ProjectileDamage>(); if (Object.op_Implicit((Object)(object)pc) && Object.op_Implicit((Object)(object)component2)) { pc.owner = ((EntityState)this).gameObject; pc.IgnoreCollisionsWithOwner(true); pc.teamFilter.teamIndex = ((BaseState)this).GetTeam(); ProjectileOverlapAttack component3 = ((Component)pc).GetComponent<ProjectileOverlapAttack>(); if (Object.op_Implicit((Object)(object)component3)) { OverlapAttack attack = component3.attack; attack.attacker = ((EntityState)this).gameObject; attack.attackerFiltering = (AttackerFiltering)2; attack.damage *= 2f; attack.inflictor = ((EntityState)this).gameObject; attack.isCrit = ((BaseState)this).RollCrit(); attack.teamIndex = ((BaseState)this).GetTeam(); attack.ResetIgnoredHealthComponents(); } ProjectileProximityBeamController component4 = ((Component)pc).GetComponent<ProjectileProximityBeamController>(); if (Object.op_Implicit((Object)(object)component4)) { component4.damageCoefficient *= 2f; } ProjectileImpactExplosion component5 = ((Component)pc).GetComponent<ProjectileImpactExplosion>(); if (Object.op_Implicit((Object)(object)component5)) { ((ProjectileExplosion)component5).blastRadius = ((ProjectileExplosion)component5).blastRadius * 2f; ((ProjectileExplosion)component5).falloffModel = (FalloffModel)0; } } ((Component)pc).gameObject.SetActive(false); ((Component)pc).gameObject.SetActive(true); } EffectManager.SpawnEffect(DanteAssets.deflectEffect, new EffectData { origin = origin, rotation = Quaternion.identity, scale = 1f }, true); ProjectileSteerTowardTarget component6 = ((Component)pc).GetComponent<ProjectileSteerTowardTarget>(); if (Object.op_Implicit((Object)(object)component6)) { EntityState.Destroy((Object)(object)component6); } ProjectileDirectionalTargetFinder component7 = ((Component)pc).GetComponent<ProjectileDirectionalTargetFinder>(); if (Object.op_Implicit((Object)(object)component7)) { EntityState.Destroy((Object)(object)component7); } ProjectileTargetComponent component8 = ((Component)pc).GetComponent<ProjectileTargetComponent>(); if (Object.op_Implicit((Object)(object)component8)) { EntityState.Destroy((Object)(object)component8); } ProjectileSimple component9 = ((Component)pc).GetComponent<ProjectileSimple>(); if (Object.op_Implicit((Object)(object)component9)) { EntityState.Destroy((Object)(object)component9); } ProjectileCharacterController component10 = ((Component)pc).GetComponent<ProjectileCharacterController>(); if (Object.op_Implicit((Object)(object)component10)) { component10.velocity *= -1f; } if (Object.op_Implicit((Object)(object)((Component)pc).GetComponent<MissileController>())) { Object.Destroy((Object)(object)((Component)pc).gameObject); } if (Object.op_Implicit((Object)(object)pc)) { Rigidbody rigidbody = pc.rigidbody; if (Object.op_Implicit((Object)(object)rigidbody)) { rigidbody.velocity = normalized * num; rigidbody.velocity = new Vector3(rigidbody.velocity.x, Random.Range(3f, 12f), rigidbody.velocity.z); rigidbody.useGravity = true; rigidbody.isKinematic = false; } } } } private void HandleLuminousShot() { //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory) || ((EntityState)this).characterBody.inventory.GetItemCount(Items.IncreasePrimaryDamage) <= 0) { return; } if (dante.shouldResetLuminousShot) { lumStopwatch = 0f; dante.luminousFuckingChargeValue = 0f; if (NetworkServer.active) { ((EntityState)this).characterBody.SetBuffCount(Buffs.IncreasePrimaryDamageBuff.buffIndex, 0); } dante.shouldResetLuminousShot = false; } int num = 4 + ((EntityState)this).characterBody.inventory.GetItemCount(Items.IncreasePrimaryDamage); lumStopwatch += Time.fixedDeltaTime; if (((EntityState)this).inputBank.moveVector == Vector3.zero && ((BaseState)this).isGrounded) { lumStopwatch += Time.fixedDeltaTime; } if (lumStopwatch >= 2f) { lumStopwatch = 0f; if (((EntityState)this).characterBody.GetBuffCount(Buffs.IncreasePrimaryDamageBuff) < num && NetworkServer.active) { ((EntityState)this).characterBody.AddIncreasePrimaryDamageStack(); } } if (((EntityState)this).characterBody.GetBuffCount(Buffs.IncreasePrimaryDamageBuff) == num) { dante.luminousFuckingChargeValue = 1f; } else { dante.luminousFuckingChargeValue = Util.Remap(lumStopwatch, 0f, 2f, 0f, 1f); } } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } public class MainState : GenericCharacterMain { private Animator animator; public LocalUser localUser; private DanteController dante; private EnemyStepController enemyStep; private MomentumController momentumController; private float sprintTimer; private bool wasSprinting; private bool wasGrounded2; private bool isSliding; private GameObject slideEffectInstance; private uint slidePlayID; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((BaseCharacterMain)this).modelAnimator; dante = ((EntityState)this).GetComponent<DanteController>(); enemyStep = ((EntityState)this).GetComponent<EnemyStepController>(); momentumController = ((EntityState)this).GetComponent<MomentumController>(); FindLocalUser(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = false; } } public override void OnExit() { ((GenericCharacterMain)this).OnExit(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = false; } AkSoundEngine.StopPlayingID(slidePlayID); } public override void FixedUpdate() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_026b: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Expected O, but got Unknown //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterMain)this).FixedUpdate(); if (((EntityState)this).inputBank.moveVector != Vector3.zero && ((EntityState)this).characterBody.isSprinting) { if (((BaseState)this).isGrounded) { sprintTimer += Time.fixedDeltaTime; } else if (sprintTimer >= 1f && wasGrounded2) { Util.PlaySound("sfx_dante_jump", ((EntityState)this).gameObject); ((EntityState)this).PlayCrossfade("Body", "Hop", 0.05f); ((BaseState)this).SmallHop(((EntityState)this).characterMotor, 6f); } } else { sprintTimer = 0f; } if (((EntityState)this).characterBody.outOfCombatStopwatch <= 0.1f) { sprintTimer = 0f; } wasGrounded2 = ((BaseState)this).isGrounded; if (Object.op_Implicit((Object)(object)animator)) { bool flag = false; if (!((EntityState)this).characterBody.outOfDanger || !((EntityState)this).characterBody.outOfCombat) { flag = true; } animator.SetBool("inCombat", flag); if (((BaseState)this).isGrounded) { animator.SetFloat("airBlend", 0f); } else { animator.SetFloat("airBlend", 1f); } animator.SetFloat("aimDir", ((EntityState)this).inputBank.aimDirection.y); if (((EntityState)this).inputBank.moveVector != Vector3.zero || !((BaseState)this).isGrounded) { animator.SetFloat("moving", Mathf.Lerp(animator.GetFloat("moving"), 1f, Time.fixedDeltaTime * 5f)); } else { animator.SetFloat("moving", Mathf.Lerp(animator.GetFloat("moving"), 0f, Time.fixedDeltaTime * 5f)); } } if (sprintTimer >= 1f) { if (!wasSprinting) { Util.PlaySound("sfx_dante_sprint", ((EntityState)this).gameObject); EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(((EntityState)this).characterDirection.forward); val.origin = ((EntityState)this).characterBody.corePosition; EffectManager.SpawnEffect(DanteAssets.dashEffectSimple, val, true); if (NetworkServer.active) { ((EntityState)this).characterBody.AddBuff(DanteMod.Content.Survivors.Dante.superSprintBuff); } } wasSprinting = true; animator.SetBool("isSuperSprinting", true); } else { if (NetworkServer.active && wasSprinting) { ((EntityState)this).characterBody.RemoveBuff(DanteMod.Content.Survivors.Dante.superSprintBuff); } wasSprinting = false; animator.SetBool("isSuperSprinting", false); } HandleSlide(); } private void HandleSlide() { if (sprintTimer >= 1f) { momentumController.shouldCalc = true; if (momentumController.desiredMomentum >= 0.5f) { isSliding = true; } else { isSliding = false; } } else { isSliding = false; } if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody.modelLocator)) { ((EntityState)this).characterBody.modelLocator.normalizeToFloor = sprintTimer >= 1f; } animator.SetBool("isSliding", isSliding); if (isSliding) { if (!Object.op_Implicit((Object)(object)slideEffectInstance)) { if (Object.op_Implicit((Object)(object)SlideState.slideEffectPrefab)) { slideEffectInstance = Object.Instantiate<GameObject>(SlideState.slideEffectPrefab, ((BaseState)this).FindModelChild("Root")); } slidePlayID = Util.PlaySound("sfx_dante_slide_loop", ((EntityState)this).gameObject); } } else { if (Object.op_Implicit((Object)(object)slideEffectInstance)) { EntityState.Destroy((Object)(object)slideEffectInstance); } AkSoundEngine.StopPlayingID(slidePlayID); } } public override void Update() { ((GenericCharacterMain)this).Update(); if (((EntityState)this).isAuthority) { if (((EntityState)this).characterMotor.isGrounded) { CheckEmote<Rest>(Config.restKey); CheckEmote<Taunt>(Config.tauntKey); } CheckMovingEmote<ToggleMusic>(Config.danceKey); } } private bool HasItem(ItemDef itemDef) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && Object.op_Implicit((Object)(object)((EntityState)this).characterBody.inventory)) { return ((EntityState)this).characterBody.inventory.GetItemCount(itemDef) > 0; } return false; } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (Config.GetKeyPressed(keybind)) { FindLocalUser(); if (localUser != null && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } private void CheckMovingEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (!Config.GetKeyPressed(keybind)) { return; } FindLocalUser(); if (localUser == null || localUser.isUIFocused) { return; } EntityStateMachine[] components = ((EntityState)this).gameObject.GetComponents<EntityStateMachine>(); foreach (EntityStateMachine val in components) { if (val.customName == "Weapon") { val.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } public override void ProcessJump() { //IL_00e9: 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_00f5: 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_0117: Expected O, but got Unknown //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: 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_0442: Expected O, but got Unknown //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0473: Expected O, but got Unknown //IL_0475: Unknown result type (might be due to invalid IL or missing references) //IL_047a: Unknown result type (might be due to invalid IL or missing references) //IL_047f: Unknown result type (might be due to invalid IL or missing references) //IL_048c: Unknown result type (might be due to invalid IL or missing references) //IL_04bf: 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_04cb: Unknown result type (might be due to invalid IL or missing references) //IL_04d6: Unknown result type (might be due to invalid IL or missing references) //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04e2: Unknown result type (might be due to invalid IL or missing references) //IL_04e7: Unknown result type (might be due to invalid IL or missing references) //IL_04f2: Expected O, but got Unknown //IL_0522: Unknown result type (might be due to invalid IL or missing references) //IL_0534: Unknown result type (might be due to invalid IL or missing references) //IL_0562: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)dante) && dante.jumpLockoutStopwatch > 0f) { return; } if (Object.op_Implicit((Object)(object)enemyStep)) { enemyStep.stepCooldown = 0.25f; } if (!((BaseCharacterMain)this).hasCharacterMotor) { return; } if (Object.op_Implicit((Object)(object)enemyStep) && base.jumpInputReceived && enemyStep.CheckForEnemy()) { sprintTimer = 0f; Util.PlaySound("sfx_dante_jump", ((EntityState)this).gameObject); if (Object.op_Implicit((Object)(object)((BaseCharacterMain)this).modelAnimator)) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body")); } EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/ImpactEffects/CharacterLandImpact"), new EffectData { origin = ((EntityState)this).characterBody.footPosition, scale = ((EntityState)this).characterBody.radius }, true); ((EntityState)this).characterMotor.jumpCount = 1; if ((Object)(object)((EntityState)this).skillLocator.utility.skillDef == (Object)(object)DanteMod.Content.Survivors.Dante.trickSkillDef) { ((EntityState)this).skillLocator.utility.RunRecharge(((EntityState)this).skillLocator.utility.finalRechargeInterval); } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, 1f, 1f, false); return; } bool flag = false; bool flag2 = false; bool flag3 = false; if (!base.jumpInputReceived || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody) || ((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.maxJumpCount) { return; } sprintTimer = 0f; Util.PlaySound("sfx_dante_jump", ((EntityState)this).gameObject); int itemCount = ((EntityState)this).characterBody.inventory.GetItemCount(Items.JumpBoost); float num = 1f; float num2 = 1f; if (((EntityState)this).characterMotor.jumpCount >= ((EntityState)this).characterBody.baseJumpCount) { flag = true; num = 1.5f; num2 = 1.5f; } else if (itemCount > 0 && ((EntityState)this).characterBody.isSprinting) { float num3 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num3 > 0f) { flag2 = true; float num4 = Mathf.Sqrt(10f * (float)itemCount / num3); float num5 = ((EntityState)this).characterBody.moveSpeed / num3; num = (num4 + num5) / num5; } } if (wasSprinting) { flag3 = true; float num6 = ((EntityState)this).characterBody.acceleration * ((EntityState)this).characterMotor.airControl; if (((EntityState)this).characterBody.moveSpeed > 0f && num6 > 0f) { flag2 = true; float num7 = Mathf.Sqrt(10f / num6); float num8 = ((EntityState)this).characterBody.moveSpeed / num6; num = (num7 + num8) / num8; } } GenericCharacterMain.ApplyJumpVelocity(((EntityState)this).characterMotor, ((EntityState)this).characterBody, num, num2, false); if (((BaseCharacterMain)this).hasModelAnimator) { int layerIndex = ((BaseCharacterMain)this).modelAnimator.GetLayerIndex("Body"); if (layerIndex >= 0) { if (flag3) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("SprintJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else if (((EntityState)this).characterMotor.jumpCount == 0) { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("Jump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } else { ((BaseCharacterMain)this).modelAnimator.CrossFadeInFixedTime("BonusJump", ((BaseCharacterMain)this).smoothingParameters.intoJumpTransitionTime, layerIndex); } } } if (flag) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/FeatherEffect"), new EffectData { origin = ((EntityState)this).characterBody.footPosition }, true); } else if (((EntityState)this).characterMotor.jumpCount > 0) { Util.PlaySound("sfx_dante_airhike", ((EntityState)this).gameObject); EffectData val = new EffectData(); val.rotation = Util.QuaternionSafeLookRotation(Vector3.up); val.origin = ((EntityState)this).characterBody.footPosition; EffectManager.SpawnEffect(dante.dashEffect, val, false); } if (flag2) { EffectManager.SpawnEffect(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/BoostJumpEffect