Decompiled source of Dante v0.0.57
plugins/Dante/DanteMod.dll
Decompiled a month 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.Melee.Yamato; using DanteMod.SkillStates.Dante.Skill; using DanteMod.SkillStates.Emote; using EntityStates; using EntityStates.BeetleGuardMonster; using EntityStates.Bison; using EntityStates.ClayBruiser.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.ImpMonster; using GaleShockTrooper.Characters.Survivors.GaleShockTrooper.Components; 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.CharacterAI; 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, Katana } 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, CLOSE, 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 GaleShockTrooper.Characters.Survivors.GaleShockTrooper.Components { public class TrailerCameraComponent : MonoBehaviour { public CharacterBody body; public CharacterDirection direction; public Transform camTrans; public Transform trackTrans; public Transform demonCamTrans; public Transform demonTrackTrans; private CameraTargetParams camParams; private CameraRigController cameraRig; private UIController ui; private bool baseAIPresent = false; public GameObject camObject; public Transform previousParent; public CameraParamsOverrideHandle handle; public float smoothDampTime = 0.2f; public float maxSmoothDampSpeed = 50f; public float fov = 50f; public Vector3 smoothDampVelocity; public bool shouldRotateCamera; public float stopwatch; public Quaternion startRotation; public static float lerpTime; public float demonStopwatch; public float demonTime = 0f; private bool inDemonCam = false; private bool inCam = false; public bool parentToCharacter = false; public bool useFeetAnim = false; public GameObject camParentObj; public bool activatePan = false; private bool inDebug = false; public Quaternion baseRotation; public Vector3 debugPosition = Vector3.zero; public float panAmount = 60f; public float panDuration = 1f; public bool up = false; public bool down = false; public bool left = false; public bool right = false; public bool zoomIn = false; public bool zoomOut = false; private float debugStopwatch = 0f; public void Awake() { } public void Start() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) body = ((Component)this).gameObject.GetComponent<CharacterBody>(); direction = ((Component)this).gameObject.GetComponent<CharacterDirection>(); camParams = ((Component)this).GetComponent<CameraTargetParams>(); ui = ((Component)this).GetComponent<UIController>(); cameraRig = body.master.playerCharacterMasterController.networkUser.cameraRigController; CharacterMaster master = body.master; BaseAI component = ((Component)master).GetComponent<BaseAI>(); baseAIPresent = Object.op_Implicit((Object)(object)component); if (!Object.op_Implicit((Object)(object)master)) { baseAIPresent = true; } try { camObject = ((Component)Camera.main).gameObject; previousParent = camObject.transform.parent; } catch (NullReferenceException arg) { Debug.Log((object)$"Should be alright: {arg}"); } baseRotation = camObject.transform.rotation; } public void SetCam() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) if (baseAIPresent) { return; } smoothDampTime = 0.001f; maxSmoothDampSpeed = 9999999f; Transform coreTransform = body.coreTransform; if (Object.op_Implicit((Object)(object)coreTransform)) { camParentObj = new GameObject("CameraParent"); if (parentToCharacter) { camParentObj.transform.parent = coreTransform; } camParentObj.transform.position = coreTransform.position; camParentObj.transform.rotation = coreTransform.rotation; camTrans = camParentObj.transform; } if ((Object)(object)camTrans != (Object)null) { camObject.transform.SetParent(camTrans, true); } if (parentToCharacter) { camObject.transform.localRotation = Quaternion.identity; } shouldRotateCamera = false; inCam = true; CharacterCameraParamsData currentCameraParamsData = camParams.currentCameraParamsData; currentCameraParamsData.fov = BlendableFloat.op_Implicit(fov); CameraParamsOverrideRequest val = default(CameraParamsOverrideRequest); val.cameraParamsData = currentCameraParamsData; val.priority = 0f; CameraParamsOverrideRequest val2 = val; ui.SetRORUIActiveState(state: false); handle = camParams.AddParamsOverride(val2, 0.05f); } public void UnsetCam() { //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_006a: 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) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Invalid comparison between Unknown and I4 if (baseAIPresent) { return; } smoothDampTime = 0.5f; maxSmoothDampSpeed = 50f; shouldRotateCamera = true; inCam = false; startRotation = camObject.transform.localRotation; camObject.transform.SetParent(previousParent, true); camParams.RemoveParamsOverride(handle, 1f); foreach (CharacterModel instances in InstanceTracker.GetInstancesList<CharacterModel>()) { if ((int)instances.visibility > 0) { for (int i = 0; i < instances.baseRendererInfos.Length; i++) { instances.baseRendererInfos[i].renderer.enabled = true; } } } if (Object.op_Implicit((Object)(object)camParentObj)) { Object.Destroy((Object)(object)camParentObj); } ui.SetRORUIActiveState(state: true); } public void Update() { //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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_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_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_0204: Unknown result type (might be due to invalid IL or missing references) //IL_0206: 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_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0239: 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_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024a: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0252: Unknown result type (might be due to invalid IL or missing references) //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Unknown result type (might be due to invalid IL or missing references) //IL_02ab: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Unknown result type (might be due to invalid IL or missing references) //IL_02b5: Unknown result type (might be due to invalid IL or missing references) //IL_02b8: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02d2: Unknown result type (might be due to invalid IL or missing references) //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_032f: 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_0336: Unknown result type (might be due to invalid IL or missing references) //IL_0338: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0427: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)camObject)) { camObject = ((Component)Camera.main).gameObject; previousParent = camObject.transform.parent; cameraRig = camObject.GetComponent<CameraRigController>(); } if (Object.op_Implicit((Object)(object)camObject) && !inDebug) { camObject.transform.localPosition = Vector3.SmoothDamp(camObject.transform.localPosition, Vector3.zero, ref smoothDampVelocity, smoothDampTime, maxSmoothDampSpeed, Time.deltaTime); } if (shouldRotateCamera) { stopwatch += Time.deltaTime; camObject.transform.localRotation = Quaternion.Slerp(startRotation, Quaternion.identity, stopwatch / lerpTime); if (stopwatch >= lerpTime) { stopwatch = 0f; shouldRotateCamera = false; } } if (activatePan && !inDebug) { inDebug = true; SetCam(); } if (inDebug) { debugStopwatch += Time.deltaTime; if (debugStopwatch >= panDuration) { debugStopwatch = 0f; } camObject.transform.localPosition = debugPosition; Quaternion localRotation = baseRotation; Vector3 localPosition = debugPosition; if (up) { float num = panAmount / 2f; Quaternion val = baseRotation * Quaternion.AngleAxis(num, Vector3.right); Quaternion val2 = baseRotation * Quaternion.AngleAxis(num, Vector3.left); localRotation = Quaternion.Slerp(val, val2, debugStopwatch / panDuration); } if (down) { float num2 = panAmount / 2f; Quaternion val3 = baseRotation * Quaternion.AngleAxis(num2, Vector3.left); Quaternion val4 = baseRotation * Quaternion.AngleAxis(num2, Vector3.right); localRotation = Quaternion.Slerp(val3, val4, debugStopwatch / panDuration); } if (left) { float num3 = panAmount / 2f; Quaternion val5 = baseRotation * Quaternion.AngleAxis(num3, Vector3.up); Quaternion val6 = baseRotation * Quaternion.AngleAxis(num3, Vector3.down); localRotation = Quaternion.Slerp(val5, val6, debugStopwatch / panDuration); } if (right) { float num4 = panAmount / 2f; Quaternion val7 = baseRotation * Quaternion.AngleAxis(num4, Vector3.down); Quaternion val8 = baseRotation * Quaternion.AngleAxis(num4, Vector3.up); localRotation = Quaternion.Slerp(val7, val8, debugStopwatch / panDuration); } if (zoomIn) { float num5 = panAmount / 20f; float num6 = debugPosition.z - num5; float num7 = debugPosition.z + num5; float z = Mathf.Lerp(num6, num7, debugStopwatch / panDuration); localPosition.z = z; } if (zoomOut) { float num8 = panAmount / 20f; float num9 = debugPosition.z + num8; float num10 = debugPosition.z - num8; float z2 = Mathf.Lerp(num9, num10, debugStopwatch / panDuration); localPosition.z = z2; } camObject.transform.localRotation = localRotation; camObject.transform.localPosition = localPosition; } if (!activatePan && inDebug) { inDebug = false; UnsetCam(); } } private void LateUpdate() { //IL_0054: 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) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0083: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_010c: 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_00cd: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)camObject) || !inCam) { return; } float num = ((cameraRig.localUserViewer == null) ? 1f : cameraRig.localUserViewer.userProfile.screenShakeScale); Vector3 position = camObject.transform.position; Vector3 val = ShakeEmitter.ComputeTotalShakeAtPoint(camObject.transform.position); Vector3 val2 = val * num; Vector3 val3 = position + val2; if (val2 != Vector3.zero) { Vector3 val4 = val2; RaycastHit val5 = default(RaycastHit); if (Physics.SphereCast(position, Camera.main.nearClipPlane, val4, ref val5, ((Vector3)(ref val2)).magnitude, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask), (QueryTriggerInteraction)1)) { val3 = position + ((Vector3)(ref val2)).normalized * ((RaycastHit)(ref val5)).distance; val3 *= 0.5f; } } camObject.transform.SetPositionAndRotation(val3, camObject.transform.rotation); } } public class UIController : MonoBehaviour { private GameObject RoRHUDObject; public void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HUD.Update += new hook_Update(HUD_Update); } public void OnDestroy() { Unhook(); } public void SetRORUIActiveState(bool state) { if (Object.op_Implicit((Object)(object)RoRHUDObject)) { RoRHUDObject.SetActive(state); } } private void HUD_Update(orig_Update orig, HUD self) { orig.Invoke(self); if (!Object.op_Implicit((Object)(object)RoRHUDObject)) { RoRHUDObject = ((Component)self).gameObject; } } public void Unhook() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown HUD.Update -= new hook_Update(HUD_Update); } } } 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.57")] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.Dante"; public const string MODNAME = "Dante"; public const string MODVERSION = "0.0.57"; 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 Overlord().Init(); if (Config.cinema2.Value) { new Yamato().Init(); new MirageEdge().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 += 5f; self.attackSpeed *= 1.25f; self.armor += 50f + self.level * 5f; self.regen += 5f + self.level * 3f; } 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 (!Config.cinema.Value) { 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"; } } else if (rng < 6) { component = ((EntityState)this).gameObject.AddComponent<MusicPlayer>(); component.bgmString = "sfx_fetty_wap"; } } else { component = ((EntityState)this).gameObject.AddComponent<MusicPlayer>(); } } 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_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0170: 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_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) 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"); } else if (dante.weaponDef.animationSet == DanteWeaponDef.AnimationSet.Katana) { ((EntityState)this).PlayAnimation("Gesture, Override", "ReadyKatana"); } 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(); if (dante.cancelAimModeTimer <= 0f) { ((BaseState)this).StartAimMode(0.75f, false); } else { ((EntityState)this).characterBody.SetAimTimer(-1f); } ((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.15f && ((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)