Decompiled source of JinxMod v1.3.1
LemonJinxMod.dll
Decompiled 2 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EntityStates; using EntityStates.Captain.Weapon; using EntityStates.Commando.CommandoWeapon; using HG.BlendableTypes; using IL.RoR2; using JinxMod.Controller; using JinxMod.Controllers; using JinxMod.Modules; using JinxMod.Modules.Characters; using JinxMod.Modules.Survivors; using JinxMod.SkillStates; using JinxMod.SkillStates.BaseStates; using KinematicCharacterController; using Mono.Cecil.Cil; using MonoMod.Cil; using NetworkedTimedBuffs; using On.RoR2; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.ContentManagement; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LemonJinxMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.3.1.0")] [assembly: AssemblyInformationalVersion("1.3.1+0bf962ca3bc2a3e762207b3653956cc25b8b67a4")] [assembly: AssemblyProduct("LemonJinxMod")] [assembly: AssemblyTitle("LemonJinxMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.3.1.0")] [module: UnverifiableCode] [module: UnverifiableCode] [module: UnverifiableCode] namespace JinxMod { [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [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.Lemonlust.JinxMod", "JinxMod", "1.3.1")] public class JinxPlugin : BaseUnityPlugin { public const string MODUID = "com.Lemonlust.JinxMod"; public const string MODNAME = "JinxMod"; public const string MODVERSION = "1.3.1"; public const string DEVELOPER_PREFIX = "Lemonlust"; public static JinxPlugin instance; public static ModdedDamageType jinxDamage; private void Awake() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) instance = this; try { jinxDamage = DamageAPI.ReserveDamageType(); Log.Init(((BaseUnityPlugin)this).Logger); Assets.Initialize(); Config.ReadConfig(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); NetworkingAPI.RegisterMessageType<RefreshStacksMessage>(); new MyCharacter().Initialize(); new ContentPacks().Initialize(); Hook(); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)(ex.Message + " - " + ex.StackTrace)); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void Hook() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Expected O, but got Unknown GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); } private void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Buffs.revdUp)) { args.attackSpeedMultAdd += (float)sender.GetBuffCount(Buffs.revdUp) * 0.3f; } if (sender.HasBuff(Buffs.getExcitedSpeedBuff)) { args.moveSpeedMultAdd += (float)sender.GetBuffCount(Buffs.getExcitedSpeedBuff) * 0.125f; args.attackSpeedMultAdd += 0.25f; } } private void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Invalid comparison between Unknown and I4 //IL_0025: 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_0059: Unknown result type (might be due to invalid IL or missing references) if (damageReport != null && damageReport.victimBody != null && damageReport.attackerBody != null && (int)damageReport.victimTeamIndex != 1 && damageReport.attackerBody.bodyIndex == BodyCatalog.FindBodyIndex("JinxBody") && (damageReport.victimIsChampion || damageReport.victimIsBoss || damageReport.victimIsElite)) { damageReport.attackerBody.RefreshStacks(Buffs.getExcitedSpeedBuff.buffIndex, 1f, 6, setToMax: true); } } } 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); } } public static class RefreshStacksHelper { public static void RefreshStacks(this CharacterBody body, BuffIndex index, float duration, int maxStacks, bool setToMax = false) { //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_008f: 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) int num = 0; for (int i = 0; i < body.timedBuffs.Count; i++) { TimedBuff val = body.timedBuffs[i]; if (val.buffIndex != index) { continue; } num++; if (val.timer < duration * (float)num) { val.timer = duration * (float)num; if (Chainloader.PluginInfos.ContainsKey("bubbet.networkedtimedbuffs")) { NetworkBuffTimer(body, i, val.timer); } } } if (setToMax) { for (int j = num; j < maxStacks; j++) { body.AddTimedBuff(BuffCatalog.GetBuffDef(index), duration * (float)(j + 1), maxStacks); } } else if (num < maxStacks) { body.AddTimedBuff(BuffCatalog.GetBuffDef(index), duration * (float)(num + 1), maxStacks); } } public static void NetworkBuffTimer(CharacterBody body, int index, float duration) { //IL_0023: 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_0035: Expected O, but got Unknown if (NetworkServer.active && (body.isPlayerControlled || !NetworkedTimedBuffsPlugin.onlySyncPlayers.Value)) { NetMessageExtensions.Send((INetMessage)new SyncTimedBuffUpdate(body.networkIdentity.netId, index, duration), (NetworkDestination)1); } } } public class RefreshStacksMessage : INetMessage, ISerializableObject { private CharacterBody body; private BuffIndex index; private float duration; private int maxStacks; private bool setToMax; public RefreshStacksMessage() { } public RefreshStacksMessage(CharacterBody body, BuffIndex index, float duration, int maxStacks, bool setToMax = false) { //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) this.body = body; this.index = index; this.duration = duration; this.maxStacks = maxStacks; this.setToMax = setToMax; } public void Serialize(NetworkWriter writer) { //IL_000c: 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 I4, but got Unknown writer.Write(body.networkIdentity.netId); writer.WritePackedUInt32((uint)(int)index); writer.Write(duration); writer.Write(maxStacks); writer.Write(setToMax); } public void Deserialize(NetworkReader reader) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) GameObject val = Util.FindNetworkObject(reader.ReadNetworkId()); body = val.GetComponent<CharacterBody>(); index = (BuffIndex)reader.ReadPackedUInt32(); duration = reader.ReadSingle(); maxStacks = reader.ReadInt32(); setToMax = reader.ReadBoolean(); } public void OnReceived() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) body.RefreshStacks(index, duration, maxStacks, setToMax); } } } namespace JinxMod.SkillStates { public class FishBones : BaseSkillState { public static float damageCoefficient = Config.fishBonesDamageCoefficient.Value; public static float procCoefficient = Config.fishBonesProcCoefficient.Value; public static float baseDuration = 1.5f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private Animator animator; private RocketController rocketController; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.2f; if (duration < fireTime) { fireTime = duration * 0.2f; } ((BaseState)this).StartAimMode(duration, false); animator = ((EntityState)this).GetModelAnimator(); rocketController = ((EntityState)this).GetComponent<RocketController>(); if (Object.op_Implicit((Object)(object)rocketController)) { rocketController.attacks++; } if (animator.GetBool("isMoving") || !animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("Gesture, Override", "fishbonesattack"); } else if (!animator.GetBool("isMoving") && animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("FullBody, Override", "fishbonesattack"); } if (((EntityState)this).characterBody.GetBuffCount(Buffs.revdUp) > 0 && NetworkServer.active) { ((EntityState)this).characterBody.RemoveOldestTimedBuff(Buffs.revdUp); } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { if (!hasFired) { hasFired = true; Util.PlaySound("Play_JinxFishBonesShoot", ((EntityState)this).gameObject); FireMissile(); } } private void FireMissile() { //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: 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) //IL_01e3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f7: 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_0200: 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_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_021f: Unknown result type (might be due to invalid IL or missing references) //IL_0226: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0241: Unknown result type (might be due to invalid IL or missing references) //IL_024b: Unknown result type (might be due to invalid IL or missing references) ((BaseState)this).AddRecoil(-3f, -6f, -1.5f, 1.5f); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); GameObject missilePrefab = Projectiles.missilePrefab; bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); if (Object.op_Implicit((Object)(object)FireRocket.effectPrefab)) { EffectManager.SimpleMuzzleFlash(FireRocket.effectPrefab, ((EntityState)this).gameObject, "FishBonesMuzzle", false); } if (((EntityState)this).isAuthority) { int? num; if ((Object)(object)((EntityState)this).characterBody == (Object)null) { num = null; } else { Inventory inventory = ((EntityState)this).characterBody.inventory; num = (((Object)(object)inventory != (Object)null) ? new int?(inventory.GetItemCount(Items.MoreMissile)) : null); } InputBankTest component = ((Component)((EntityState)this).characterBody).GetComponent<InputBankTest>(); int valueOrDefault = num.GetValueOrDefault(); float num2 = Mathf.Max(1f, 1f + 0.5f * (float)(valueOrDefault - 1)); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = missilePrefab; val.position = component.aimOrigin; val.rotation = Util.QuaternionSafeLookRotation(component.aimDirection); val.procChainMask = default(ProcChainMask); val.target = null; val.owner = ((Component)((EntityState)this).characterBody).gameObject; val.damage = ((EntityState)this).characterBody.damage * damageCoefficient * num2; val.crit = crit; val.force = 600f; val.damageColorIndex = (DamageColorIndex)0; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); Quaternion val3 = Quaternion.LookRotation(component.aimDirection); if (valueOrDefault > 0) { FireProjectileInfo val4 = val2; val4.rotation = val3 * Quaternion.Euler(0f, -15f, 0f); val4.position = val2.position + Random.insideUnitSphere * 1f; ProjectileManager.instance.FireProjectile(val4); FireProjectileInfo val5 = val2; val5.rotation = val3 * Quaternion.Euler(0f, 15f, 0f); val5.position = val2.position + Random.insideUnitSphere * 1f; ProjectileManager.instance.FireProjectile(val5); } } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class MegaRocket : BaseSkillState { public static float damageCoefficient = Config.megaRocketDamageCoefficient.Value; public static float procCoefficient = Config.megaRocketProcCoefficient.Value; public static float baseDuration = 1f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private Animator animator; private RocketController rocketController; public override void OnEnter() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown ((BaseState)this).OnEnter(); duration = baseDuration; fireTime = 0.53f; ((BaseState)this).StartAimMode(duration, false); animator = ((EntityState)this).GetModelAnimator(); rocketController = ((EntityState)this).GetComponent<RocketController>(); if (Object.op_Implicit((Object)(object)rocketController)) { rocketController.attacks++; } ((EntityState)this).PlayAnimation("FullBody, Override", "megarocket"); Util.PlaySound("Play_JinxMegaRocketShootInitial", ((EntityState)this).gameObject); Vector3 origin = ((EntityState)this).characterBody.corePosition + Vector3.up * 1f; GameObject chargeEffect = Assets.chargeEffect; EffectData val = new EffectData { origin = origin }; Ray aimRay = ((BaseState)this).GetAimRay(); val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.scale = 1f; EffectManager.SpawnEffect(chargeEffect, val, false); if (Config.voiceLines.Value) { Util.PlaySound("Play_JinxMegaRocketVO", ((EntityState)this).gameObject); } } public override void OnExit() { ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); ((EntityState)this).OnExit(); } private void Fire() { if (!hasFired) { hasFired = true; Util.PlaySound("Play_JinxMegaRocketShoot", ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { FireMissile(); } } } private void FireMissile() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); ((BaseState)this).AddRecoil(-6f, -12f, -3f, 3f); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); GameObject megaRocketPrefab = Projectiles.megaRocketPrefab; bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); if (Object.op_Implicit((Object)(object)FireRocket.effectPrefab)) { EffectManager.SimpleMuzzleFlash(FireRocket.effectPrefab, ((EntityState)this).gameObject, "FishBonesMuzzle", false); } int? num; if ((Object)(object)((EntityState)this).characterBody == (Object)null) { num = null; } else { Inventory inventory = ((EntityState)this).characterBody.inventory; num = (((Object)(object)inventory != (Object)null) ? new int?(inventory.GetItemCount(Items.MoreMissile)) : null); } int valueOrDefault = num.GetValueOrDefault(); float num2 = Mathf.Max(1f, 1f + 0.5f * (float)(valueOrDefault - 1)); FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = megaRocketPrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.procChainMask = default(ProcChainMask); val.target = null; val.owner = ((Component)((EntityState)this).characterBody).gameObject; val.damage = ((EntityState)this).characterBody.damage * damageCoefficient * num2; val.crit = crit; val.force = 1200f; val.damageColorIndex = (DamageColorIndex)0; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } public override void FixedUpdate() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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_003a: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); Ray aimRay = ((BaseState)this).GetAimRay(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) && ((Ray)(ref aimRay)).direction != Vector3.zero) { ((EntityState)this).characterDirection.moveVector = ((Ray)(ref aimRay)).direction; } if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class PowPow : BaseSkillState { public static float damageCoefficient = Config.powPowDamageCoefficient.Value; public static float procCoefficient = Config.powPowProcCoefficient.Value; public static float baseDuration = 0.8f; public static float force = 400f; public static float recoil = 0.5f; public static float range = 256f; public static GameObject tracerEffectPrefab = Assets.powPowTracer; private float duration; private float fireTime; private bool hasFired; private string muzzleString; private float bulletStopWatch; private int bulletCount = 3; private RocketController rocketController; private bool hasHit; private bool hasBuff; public Animator animator { get; private set; } public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; fireTime = 0.1f * duration; ((BaseState)this).StartAimMode(duration, false); muzzleString = "PowPowMuzzle"; animator = ((EntityState)this).GetModelAnimator(); if (animator.GetBool("isMoving") || !animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("Gesture, Override", "powpowattack"); } else if (!animator.GetBool("isMoving") && animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("FullBody, Override", "powpowattack"); } Util.PlaySound("Play_JinxPowPowShoot", ((EntityState)this).gameObject); rocketController = ((EntityState)this).GetComponent<RocketController>(); if (Object.op_Implicit((Object)(object)rocketController)) { rocketController.attacks++; } } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0070: 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_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0107: 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_011f: 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_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_0194: 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_01a6: Expected O, but got Unknown ((EntityState)this).characterBody.AddSpreadBloom(1.5f); EffectManager.SimpleMuzzleFlash(FirePistol2.muzzleEffectPrefab, ((EntityState)this).gameObject, muzzleString, false); ((BaseState)this).AddRecoil(-1f * recoil, -2f * recoil, -0.5f * recoil, 0.5f * recoil); if (((EntityState)this).isAuthority) { new BulletAttack { bulletCount = 1u, aimVector = ((EntityState)this).inputBank.aimDirection, origin = ((EntityState)this).inputBank.aimOrigin, damage = damageCoefficient * ((BaseState)this).damageStat, damageColorIndex = (DamageColorIndex)0, damageType = DamageTypeCombo.op_Implicit((DamageType)0), falloffModel = (FalloffModel)1, maxDistance = range, force = force, hitMask = CommonMasks.bullet, minSpread = 0f, maxSpread = ((EntityState)this).characterBody.spreadBloomAngle, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = muzzleString, smartCollision = true, procChainMask = default(ProcChainMask), procCoefficient = procCoefficient, radius = 0.75f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = tracerEffectPrefab, spreadPitchScale = 0f, spreadYawScale = 0f, queryTriggerInteraction = (QueryTriggerInteraction)0, hitEffectPrefab = FirePistol2.hitEffectPrefab, hitCallback = new HitCallback(BulletHitCallback) }.Fire(); } } private bool BulletHitCallback(BulletAttack bulletAttack, ref BulletHit hitInfo) { //IL_0041: 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_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) bool result = BulletAttack.defaultHitCallback.Invoke(bulletAttack, ref hitInfo); HealthComponent val = (Object.op_Implicit((Object)(object)hitInfo.hitHurtBox) ? hitInfo.hitHurtBox.healthComponent : null); if (Object.op_Implicit((Object)(object)val) && val.alive && hitInfo.hitHurtBox.teamIndex != ((EntityState)this).teamComponent.teamIndex) { hasHit = true; PointSoundManager.EmitSoundLocal(AkEventIdArg.op_Implicit(NetworkSoundEventCatalog.GetAkIdFromNetworkSoundEventIndex(Assets.bulletHitSoundEvent.index)), ((Component)hitInfo.hitHurtBox).transform.position); } return result; } public override void FixedUpdate() { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (bulletStopWatch < fireTime / 3f) { bulletStopWatch += Time.fixedDeltaTime; } if (((EntityState)this).fixedAge >= fireTime && bulletStopWatch > fireTime / 3f && bulletCount > 0) { bulletStopWatch = 0f; bulletCount--; if (!hasFired) { Fire(); } if (bulletCount <= 0) { hasFired = true; } } if (hasHit && !hasBuff) { hasBuff = true; NetMessageExtensions.Send((INetMessage)(object)new RefreshStacksMessage(((EntityState)this).characterBody, Buffs.revdUp.buffIndex, 2.5f, 3), (NetworkDestination)2); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Switcharoo : GenericCharacterMain { public static float baseDuration = 0.266f; private Animator animator; private RocketController rocketController; private AnimatorOverrideController animatorOverrideController; private float stopwatch; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); rocketController = ((EntityState)this).GetComponent<RocketController>(); if (!rocketController.isRocket) { rocketController.isRocket = true; ((EntityState)this).PlayAnimation("Gesture, Override", "equip_rocket"); animatorOverrideController = Assets.mainAssetBundle.LoadAsset<AnimatorOverrideController>("RocketOverrideController"); animator.runtimeAnimatorController = (RuntimeAnimatorController)(object)animatorOverrideController; Util.PlaySound("Play_JinxSwitch2FishBones", ((EntityState)this).gameObject); ((EntityState)this).skillLocator.primary.SetSkillOverride((object)((EntityState)this).skillLocator.primary, MyCharacter.fishBonesSkillDef, (SkillOverridePriority)3); } else { rocketController.isRocket = false; ((EntityState)this).PlayAnimation("Gesture, Override", "equip_gat"); animatorOverrideController = Assets.mainAssetBundle.LoadAsset<AnimatorOverrideController>("GatOverrideController"); animator.runtimeAnimatorController = (RuntimeAnimatorController)(object)animatorOverrideController; Util.PlaySound("Play_JinxSwitch2PowPow", ((EntityState)this).gameObject); ((EntityState)this).skillLocator.primary.UnsetSkillOverride((object)((EntityState)this).skillLocator.primary, MyCharacter.fishBonesSkillDef, (SkillOverridePriority)3); } } public override void FixedUpdate() { ((GenericCharacterMain)this).FixedUpdate(); stopwatch += Time.fixedDeltaTime; if (((EntityState)this).isAuthority && stopwatch >= baseDuration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); ((GenericCharacterMain)this).OnExit(); } } public class Zap : BaseSkillState { public static float damageCoefficient = Config.zapDamageCoefficient.Value; public static float procCoefficient = Config.zapProcCoefficient.Value; public static float baseDuration = 1.18f; public static float throwForce = 80f; private float duration; private float fireTime; private bool hasFired; private Animator animator; private GameObject projectilePrefab = Projectiles.zapPrefab; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = FishBones.baseDuration; fireTime = 0.5f; ((BaseState)this).StartAimMode(duration, false); animator = ((EntityState)this).GetModelAnimator(); if (animator.GetBool("isMoving") || !animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("Gesture, Override", "zap"); } else if (!animator.GetBool("isMoving") && animator.GetBool("isGrounded")) { ((EntityState)this).PlayAnimation("FullBody, Override", "zap"); } Util.PlaySound("Play_JinxZapSFX", ((EntityState)this).gameObject); } public override void OnExit() { ((EntityState)this).OnExit(); } private void Fire() { if (!hasFired) { hasFired = true; Util.PlaySound("Play_JinxZapShoot", ((EntityState)this).gameObject); if (Config.voiceLines.Value) { Util.PlaySound("Play_JinxZapVO", ((EntityState)this).gameObject); } if (((EntityState)this).isAuthority) { FireMissile(); } } } private void FireMissile() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) Ray aimRay = ((BaseState)this).GetAimRay(); if ((Object)(object)projectilePrefab != (Object)null) { bool crit = Util.CheckRoll(((EntityState)this).characterBody.crit, ((EntityState)this).characterBody.master); ((EntityState)this).characterBody.AddSpreadBloom(1.5f); ((BaseState)this).AddRecoil(-1f * FireTazer.recoilAmplitude, -1.5f * FireTazer.recoilAmplitude, -0.25f * FireTazer.recoilAmplitude, 0.25f * FireTazer.recoilAmplitude); if (Object.op_Implicit((Object)(object)FireTazer.muzzleflashEffectPrefab)) { EffectManager.SimpleMuzzleFlash(FireTazer.muzzleflashEffectPrefab, ((EntityState)this).gameObject, "Muzzle", false); } FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.procChainMask = default(ProcChainMask); val.target = null; val.owner = ((Component)((EntityState)this).characterBody).gameObject; val.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val.crit = crit; val.force = 200f; val.damageColorIndex = (DamageColorIndex)0; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireTime) { Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } } namespace JinxMod.SkillStates.BaseStates { public class BaseMeleeAttack : BaseSkillState { public int swingIndex; protected string hitboxName = "Sword"; protected DamageType damageType; protected float damageCoefficient = 3.5f; protected float procCoefficient = 1f; protected float pushForce = 300f; protected Vector3 bonusForce = Vector3.zero; protected float baseDuration = 1f; protected float attackStartTime = 0.2f; protected float attackEndTime = 0.4f; protected float baseEarlyExitTime = 0.4f; protected float hitStopDuration = 0.012f; protected float attackRecoil = 0.75f; protected float hitHopVelocity = 4f; protected bool cancelled; protected string swingSoundString = ""; protected string hitSoundString = ""; protected string muzzleString = "SwingCenter"; protected GameObject swingEffectPrefab; protected GameObject hitEffectPrefab; protected NetworkSoundEventIndex impactSound; private float earlyExitTime; public float duration; private bool hasFired; private float hitPauseTimer; private OverlapAttack attack; protected bool inHitPause; private bool hasHopped; protected float stopwatch; protected Animator animator; private HitStopCachedState hitStopCachedState; private Vector3 storedVelocity; public override void OnEnter() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_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) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_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) ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; earlyExitTime = baseEarlyExitTime / ((BaseState)this).attackSpeedStat; hasFired = false; animator = ((EntityState)this).GetModelAnimator(); ((BaseState)this).StartAimMode(0.5f + duration, false); ((EntityState)this).characterBody.outOfCombatStopwatch = 0f; animator.SetBool("attacking", true); HitBoxGroup hitBoxGroup = null; Transform modelTransform = ((EntityState)this).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { hitBoxGroup = Array.Find(((Component)modelTransform).GetComponents<HitBoxGroup>(), (HitBoxGroup element) => element.groupName == hitboxName); } PlayAttackAnimation(); attack = new OverlapAttack(); attack.damageType = DamageTypeCombo.op_Implicit(damageType); attack.attacker = ((EntityState)this).gameObject; attack.inflictor = ((EntityState)this).gameObject; attack.teamIndex = ((BaseState)this).GetTeam(); attack.damage = damageCoefficient * ((BaseState)this).damageStat; attack.procCoefficient = procCoefficient; attack.hitEffectPrefab = hitEffectPrefab; attack.forceVector = bonusForce; attack.pushAwayForce = pushForce; attack.hitBoxGroup = hitBoxGroup; attack.isCrit = ((BaseState)this).RollCrit(); attack.impactSound = impactSound; } protected virtual void PlayAttackAnimation() { ((EntityState)this).PlayCrossfade("Gesture, Override", "Slash" + (1 + swingIndex), "Slash.playbackRate", duration, 0.05f); } public override void OnExit() { if (!hasFired && !cancelled) { FireAttack(); } ((EntityState)this).OnExit(); animator.SetBool("attacking", false); } protected virtual void PlaySwingEffect() { EffectManager.SimpleMuzzleFlash(swingEffectPrefab, ((EntityState)this).gameObject, muzzleString, true); } protected virtual void OnHitEnemyAuthority() { //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) Util.PlaySound(hitSoundString, ((EntityState)this).gameObject); if (!hasHopped) { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded && hitHopVelocity > 0f) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hitHopVelocity); } hasHopped = true; } if (!inHitPause && hitStopDuration > 0f) { storedVelocity = ((EntityState)this).characterMotor.velocity; hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, "Slash.playbackRate"); hitPauseTimer = hitStopDuration / ((BaseState)this).attackSpeedStat; inHitPause = true; } } private void FireAttack() { if (!hasFired) { hasFired = true; Util.PlayAttackSpeedSound(swingSoundString, ((EntityState)this).gameObject, ((BaseState)this).attackSpeedStat); if (((EntityState)this).isAuthority) { PlaySwingEffect(); ((BaseState)this).AddRecoil(-1f * attackRecoil, -2f * attackRecoil, -0.5f * attackRecoil, 0.5f * attackRecoil); } } if (((EntityState)this).isAuthority && attack.Fire((List<HurtBox>)null)) { OnHitEnemyAuthority(); } } protected virtual void SetNextState() { int num = ((swingIndex == 0) ? 1 : 0); ((EntityState)this).outer.SetNextState((EntityState)(object)new BaseMeleeAttack { swingIndex = num }); } public override void FixedUpdate() { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitPauseTimer <= 0f && inHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); inHitPause = false; ((EntityState)this).characterMotor.velocity = storedVelocity; } if (!inHitPause) { stopwatch += Time.fixedDeltaTime; } else { if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { ((EntityState)this).characterMotor.velocity = Vector3.zero; } if (Object.op_Implicit((Object)(object)animator)) { animator.SetFloat("Swing.playbackRate", 0f); } } if (stopwatch >= duration * attackStartTime && stopwatch <= duration * attackEndTime) { FireAttack(); } if (stopwatch >= duration - earlyExitTime && ((EntityState)this).isAuthority && ((EntityState)this).inputBank.skill1.down) { if (!hasFired) { FireAttack(); } SetNextState(); } else if (stopwatch >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)1; } public override void OnSerialize(NetworkWriter writer) { ((BaseSkillState)this).OnSerialize(writer); writer.Write(swingIndex); } public override void OnDeserialize(NetworkReader reader) { ((BaseSkillState)this).OnDeserialize(reader); swingIndex = reader.ReadInt32(); } } public class BaseTimedSkillState : BaseSkillState { public static float TimedBaseDuration; public static float TimedBaseCastStartTime; public static float TimedBaseCastEndTime; protected float duration; protected float castStartTime; protected float castEndTime; protected bool hasFired; protected bool isFiring; protected bool hasExited; protected virtual void InitDurationValues(float baseDuration, float baseCastStartTime, float baseCastEndTime = 1f) { TimedBaseDuration = baseDuration; TimedBaseCastStartTime = baseCastStartTime; TimedBaseCastEndTime = baseCastEndTime; duration = TimedBaseDuration / ((BaseState)this).attackSpeedStat; castStartTime = baseCastStartTime * duration; castEndTime = baseCastEndTime * duration; } protected virtual void OnCastEnter() { } protected virtual void OnCastFixedUpdate() { } protected virtual void OnCastUpdate() { } protected virtual void OnCastExit() { } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (!hasFired && ((EntityState)this).fixedAge > castStartTime) { hasFired = true; OnCastEnter(); } bool flag = ((EntityState)this).fixedAge >= castStartTime; bool flag2 = ((EntityState)this).fixedAge >= castEndTime; isFiring = false; if ((flag && !flag2) || (flag && flag2 && !hasFired)) { isFiring = true; OnCastFixedUpdate(); } if (flag2 && !hasExited) { hasExited = true; OnCastExit(); } if (((EntityState)this).fixedAge > duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void Update() { ((EntityState)this).Update(); if (isFiring) { OnCastUpdate(); } } } public class ExampleTimedSkillState : BaseTimedSkillState { public static float SkillBaseDuration = 1.5f; public static float SkillStartTime = 0.2f; public static float SkillEndTime = 0.9f; public override void OnEnter() { ((BaseState)this).OnEnter(); InitDurationValues(SkillBaseDuration, SkillStartTime, SkillEndTime); } protected override void OnCastEnter() { } protected override void OnCastFixedUpdate() { } protected override void OnCastExit() { } } public class ExampleDelayedSkillState : BaseTimedSkillState { public static float SkillBaseDuration = 1.5f; public static float SkillStartTime = 0.2f; public override void OnEnter() { ((BaseState)this).OnEnter(); InitDurationValues(SkillBaseDuration, SkillStartTime); } protected override void OnCastEnter() { } } internal class DeathState : GenericCharacterDeath { public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } public override void OnEnter() { ((GenericCharacterDeath)this).OnEnter(); Util.PlaySound("Play_JinxDeathVO", ((EntityState)this).gameObject); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (Object.op_Implicit((Object)(object)modelAnimator)) { modelAnimator.CrossFadeInFixedTime("Death", 0.1f); } } public override void OnExit() { ((GenericCharacterDeath)this).OnExit(); } } } namespace JinxMod.Controller { [RequireComponent(typeof(Rigidbody))] [RequireComponent(typeof(ProjectileTargetComponent))] public class JinxMissileController : MonoBehaviour { private ProjectileTargetComponent targetComponent; public float maxVelocity = 25f; public float rollVelocity; public float acceleration = 3f; public float delayTimer = 0.5f; public float giveupTimer = 8f; public float deathTimer = 10f; private float timer; public float turbulence = 2f; private void Start() { targetComponent = ((Component)this).GetComponent<ProjectileTargetComponent>(); } private void Awake() { if (!NetworkServer.active) { ((Behaviour)this).enabled = false; } } private void FixedUpdate() { //IL_0051: 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_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_007b: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) timer += Time.fixedDeltaTime; if (timer < giveupTimer && Object.op_Implicit((Object)(object)targetComponent.target) && timer >= delayTimer) { Vector3 val = targetComponent.target.position + Random.insideUnitSphere * turbulence - ((Component)this).transform.position; if (val != Vector3.zero) { ((Component)this).transform.forward = Vector3.RotateTowards(((Component)this).transform.forward, val, MathF.PI * 4f * (Time.fixedDeltaTime * 2f), 0f); } } } } public class MenuController : MonoBehaviour { private uint playID; private uint playID2; private void OnDestroy() { if (playID != 0) { AkSoundEngine.StopPlayingID(playID); } if (playID2 != 0) { AkSoundEngine.StopPlayingID(playID2); } } private void OnEnable() { ((MonoBehaviour)this).Invoke("PlayEffect", 0.05f); } private void PlayEffect() { if (Config.voiceLines.Value) { playID = Util.PlaySound("Play_JinxTauntVO", ((Component)this).gameObject); } playID2 = Util.PlaySound("Play_JinxMenuSFX", ((Component)this).gameObject); } } public class RocketController : MonoBehaviour { public bool isRocket; private CharacterBody body; public float stopwatch; public float random; public float attackspeed; public int attacks; public void Start() { isRocket = false; body = ((Component)this).GetComponent<CharacterBody>(); random = Random.Range(15f * body.attackSpeed, 30f * body.attackSpeed); } public void Update() { if ((float)attacks > random) { attacks = 0; if (Config.voiceLines.Value) { Util.PlaySound("Play_JinxAttackVO", ((Component)this).gameObject); } random = Random.Range(15f * body.attackSpeed, 30f * body.attackSpeed); } } } } namespace JinxMod.Controllers { [RequireComponent(typeof(ProjectileController))] public class JinxMegaImpact : ProjectileExplosion, IProjectileImpactBehavior { private float age; public static float bonusDamageCoefficient = 0.25f; public override void Awake() { ((ProjectileExplosion)this).Awake(); } public void FixedUpdate() { age += Time.fixedDeltaTime; } public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: 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_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_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_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) new List<HurtBox>(); List<HurtBox> list = new SphereSearch { radius = 16f, mask = ((LayerIndex)(ref LayerIndex.entityPrecise)).mask, origin = impactInfo.estimatedPointOfImpact }.RefreshCandidates().FilterCandidatesByHurtBoxTeam(TeamMask.GetEnemyTeams(base.projectileController.teamFilter.teamIndex)).FilterCandidatesByDistinctHurtBoxEntities() .GetHurtBoxes() .ToList(); List<HealthComponent> list2 = new List<HealthComponent>(); foreach (HurtBox item in list) { if (Object.op_Implicit((Object)(object)item) && Object.op_Implicit((Object)(object)item.healthComponent) && item.healthComponent.alive && !list2.Contains(item.healthComponent)) { float num = base.projectileDamage.damage * Mathf.Min(1f, age * 0.2f); DamageInfo val = new DamageInfo(); val.damage = num + item.healthComponent.missingCombinedHealth * bonusDamageCoefficient; val.crit = false; val.damageColorIndex = (DamageColorIndex)3; val.attacker = (Object.op_Implicit((Object)(object)base.projectileController.owner) ? base.projectileController.owner.gameObject : null); val.inflictor = ((Component)this).gameObject; val.position = ((Component)item.healthComponent).gameObject.transform.position; val.force = base.projectileDamage.force * ((Component)this).transform.forward; val.procChainMask = base.projectileController.procChainMask; val.procCoefficient = base.projectileController.procCoefficient; item.healthComponent.TakeDamage(val); list2.Add(item.healthComponent); } } } } [RequireComponent(typeof(ProjectileController))] public class RocketJumpController : MonoBehaviour { private struct OwnerInfo { public readonly GameObject gameObject; public readonly CharacterBody characterBody; public readonly CharacterMotor characterMotor; public readonly Rigidbody rigidbody; public readonly bool hasEffectiveAuthority; public OwnerInfo(GameObject ownerGameObject) { this = default(OwnerInfo); gameObject = ownerGameObject; if (Object.op_Implicit((Object)(object)gameObject)) { characterBody = gameObject.GetComponent<CharacterBody>(); characterMotor = gameObject.GetComponent<CharacterMotor>(); rigidbody = gameObject.GetComponent<Rigidbody>(); hasEffectiveAuthority = Util.HasEffectiveAuthority(gameObject); } } } private ProjectileController projectileController; private ProjectileImpactExplosion projectileImpactExplosion; public Rigidbody rigidbody; public ProjectileImpactEventCaller projectileImpactEventCaller; private OwnerInfo owner; public float explosionForce = 4000f; public float explosionRadius = Config.rocketJumpRadius.Value; private void Start() { owner = new OwnerInfo(projectileController.owner); } private void Awake() { projectileController = ((Component)this).GetComponent<ProjectileController>(); projectileImpactExplosion = ((Component)this).GetComponent<ProjectileImpactExplosion>(); rigidbody = ((Component)this).GetComponent<Rigidbody>(); explosionRadius = ((ProjectileExplosion)projectileImpactExplosion).blastRadius; if (NetworkServer.active) { projectileImpactEventCaller = ((Component)this).GetComponent<ProjectileImpactEventCaller>(); if (Object.op_Implicit((Object)(object)projectileImpactEventCaller)) { ((UnityEvent<ProjectileImpactInfo>)(object)projectileImpactEventCaller.impactEvent).AddListener((UnityAction<ProjectileImpactInfo>)OnImpact); } } } private void OnDestroy() { if (Object.op_Implicit((Object)(object)projectileImpactEventCaller)) { ((UnityEvent<ProjectileImpactInfo>)(object)projectileImpactEventCaller.impactEvent).RemoveListener((UnityAction<ProjectileImpactInfo>)OnImpact); } } private void OnImpact(ProjectileImpactInfo projectileImpactInfo) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0085: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_00e3: 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) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) if (((Component)((Component)projectileImpactInfo.collider).transform).gameObject.layer != LayerIndex.world.intVal) { return; } Collider[] array = Physics.OverlapSphere(projectileImpactInfo.estimatedPointOfImpact, explosionRadius); for (int i = 0; i < array.Length; i++) { CharacterBody component = ((Component)array[i]).GetComponent<CharacterBody>(); if ((Object)(object)owner.characterBody == (Object)(object)component && Object.op_Implicit((Object)(object)component) && component?.bodyIndex == (BodyIndex?)BodyCatalog.FindBodyIndex("JinxBody")) { owner.characterMotor.onHitGround += new HitGroundDelegate(CharacterMotor_onHitGround); ((BaseCharacterController)owner.characterMotor).Motor.ForceUnground(0.1f); CharacterBody characterBody = owner.characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags | 1); AddExplosionForce(component, explosionForce, projectileImpactInfo.estimatedPointOfImpact, explosionRadius); } } } private void CharacterMotor_onHitGround(ref HitGroundInfo hitGroundInfo) { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) CharacterBody characterBody = owner.characterBody; characterBody.bodyFlags = (BodyFlags)(characterBody.bodyFlags & -2); } private void AddExplosionForce(CharacterBody characterBody, float explosionForce, Vector3 explosionPosition, float explosionRadius, float upliftModifier = 0f) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: 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_000c: 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_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_0086: Unknown result type (might be due to invalid IL or missing references) Vector3 val = characterBody.corePosition - explosionPosition; float num = 1f - ((Vector3)(ref val)).magnitude / explosionRadius; Vector3 val2 = ((Vector3)(ref val)).normalized * explosionForce * num; if (Config.rocketJump.Value) { characterBody.characterMotor.ApplyForce(val2, false, false); } if (upliftModifier != 0f) { float num2 = 1f - upliftModifier / explosionRadius; Vector3 val3 = Vector3.up * explosionForce * num2; if (Config.rocketJump.Value) { characterBody.characterMotor.ApplyForce(val3, false, false); } } } } } namespace JinxMod.Modules { internal static class Assets { internal static AssetBundle mainAssetBundle; internal static GameObject bombExplosionEffect; internal static GameObject megaExplosionEffect; internal static GameObject powPowTracer; internal static GameObject chargeEffect; internal static NetworkSoundEventDef swordHitSoundEvent; internal static NetworkSoundEventDef explosionHitSoundEvent; internal static NetworkSoundEventDef bulletHitSoundEvent; internal static Shader hotpoo = LegacyResourcesAPI.Load<Shader>("Shaders/Deferred/HGStandard"); internal static Material commandoMat; private static string[] assetNames = new string[0]; private const string assetbundleName = "jinx"; private const string csProjName = "JinxMod."; internal static void Initialize() { LoadAssetBundle(); LoadSoundbank(); PopulateAssets(); } internal static void LoadAssetBundle() { if ((Object)(object)mainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("JinxMod.jinx"); mainAssetBundle = AssetBundle.LoadFromStream(stream); } if ((Object)(object)mainAssetBundle == (Object)null) { Log.Error("Failed to load assetbundle. Make sure your assetbundle name is setup correctly"); } else { assetNames = mainAssetBundle.GetAllAssetNames(); } } internal static void LoadSoundbank() { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("JinxMod.JinxBank.bnk"); byte[] array = new byte[stream.Length]; stream.Read(array, 0, array.Length); SoundBanks.Add(array); } internal static void PopulateAssets() { //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)mainAssetBundle)) { Log.Error("There is no AssetBundle to load assets from."); return; } bombExplosionEffect = LoadEffect("Jinx Normal rockets", "Play_JinxFishBonesImpact"); megaExplosionEffect = LoadEffect("Jinx Normal rockets Variant", "Play_JinxMegaRocketImpact"); explosionHitSoundEvent = CreateNetworkSoundEventDef("Play_JinxFishBonesImpact"); chargeEffect = LoadEffect("Charge Variant"); powPowTracer = CreateTracer("TracerGoldGat", "PowPowTracer"); if (Object.op_Implicit((Object)(object)powPowTracer)) { powPowTracer.GetComponent<Tracer>().speed = 600f; powPowTracer.GetComponent<Tracer>().length = 75f; } bulletHitSoundEvent = CreateNetworkSoundEventDef("Play_JinxPowPowImpact"); if (Object.op_Implicit((Object)(object)megaExplosionEffect)) { ShakeEmitter obj = megaExplosionEffect.AddComponent<ShakeEmitter>(); obj.amplitudeTimeDecay = true; obj.duration = 0.5f; obj.radius = 200f; obj.scaleShakeRadiusWithLocalScale = false; obj.wave = new Wave { amplitude = 1f, frequency = 40f, cycleOffset = 0f }; } } private static GameObject CreateTracer(string originalTracerName, string newTracerName) { if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName) == (Object)null) { return null; } GameObject val = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/Effects/Tracers/" + originalTracerName), newTracerName, true); if (!Object.op_Implicit((Object)(object)val.GetComponent<EffectComponent>())) { val.AddComponent<EffectComponent>(); } if (!Object.op_Implicit((Object)(object)val.GetComponent<VFXAttributes>())) { val.AddComponent<VFXAttributes>(); } if (!Object.op_Implicit((Object)(object)val.GetComponent<NetworkIdentity>())) { val.AddComponent<NetworkIdentity>(); } val.GetComponent<Tracer>().speed = 250f; val.GetComponent<Tracer>().length = 50f; AddNewEffectDef(val); return val; } internal static NetworkSoundEventDef CreateNetworkSoundEventDef(string eventName) { NetworkSoundEventDef obj = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); obj.akId = AkSoundEngine.GetIDFromString(eventName); obj.eventName = eventName; Content.AddNetworkSoundEventDef(obj); return obj; } internal static void ConvertAllRenderersToHopooShader(GameObject objectToConvert) { if (!Object.op_Implicit((Object)(object)objectToConvert)) { return; } Renderer[] componentsInChildren = objectToConvert.GetComponentsInChildren<Renderer>(); foreach (Renderer obj in componentsInChildren) { if (obj != null) { obj.material?.SetHopooMaterial(); } } } internal static RendererInfo[] SetupRendererInfos(GameObject obj) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0048: Unknown result type (might be due to invalid IL or missing references) MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>(); RendererInfo[] array = (RendererInfo[])(object)new RendererInfo[componentsInChildren.Length]; for (int i = 0; i < componentsInChildren.Length; i++) { array[i] = new RendererInfo { defaultMaterial = ((Renderer)componentsInChildren[i]).material, renderer = (Renderer)(object)componentsInChildren[i], defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }; } return array; } public static GameObject LoadSurvivorModel(string modelName) { GameObject val = mainAssetBundle.LoadAsset<GameObject>(modelName); if ((Object)(object)val == (Object)null) { Log.Error("Trying to load a null model- check to see if the name in your code matches the name of the object in Unity"); return null; } return PrefabAPI.InstantiateClone(val, ((Object)val).name, false); } internal static Texture LoadCharacterIconGeneric(string characterName) { return mainAssetBundle.LoadAsset<Texture>("tex" + characterName + "Icon"); } internal static GameObject LoadCrosshair(string crosshairName) { if ((Object)(object)LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair") == (Object)null) { return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/StandardCrosshair"); } return LegacyResourcesAPI.Load<GameObject>("Prefabs/Crosshair/" + crosshairName + "Crosshair"); } private static GameObject LoadEffect(string resourceName) { return LoadEffect(resourceName, "", parentToTransform: false); } private static GameObject LoadEffect(string resourceName, string soundName) { return LoadEffect(resourceName, soundName, parentToTransform: false); } private static GameObject LoadEffect(string resourceName, bool parentToTransform) { return LoadEffect(resourceName, "", parentToTransform); } private static GameObject LoadEffect(string resourceName, string soundName, bool parentToTransform) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) bool flag = false; for (int i = 0; i < assetNames.Length; i++) { if (assetNames[i].Contains(resourceName.ToLowerInvariant())) { flag = true; i = assetNames.Length; } } if (!flag) { Log.Error("Failed to load effect: " + resourceName + " because it does not exist in the AssetBundle"); return null; } GameObject obj = mainAssetBundle.LoadAsset<GameObject>(resourceName); obj.AddComponent<DestroyOnTimer>().duration = 12f; obj.AddComponent<NetworkIdentity>(); obj.AddComponent<VFXAttributes>().vfxPriority = (VFXPriority)2; EffectComponent obj2 = obj.AddComponent<EffectComponent>(); obj2.applyScale = false; obj2.effectIndex = (EffectIndex)(-1); obj2.parentToReferencedTransform = parentToTransform; obj2.positionAtReferencedTransform = true; obj2.soundName = soundName; AddNewEffectDef(obj, soundName); return obj; } private static void AddNewEffectDef(GameObject effectPrefab) { AddNewEffectDef(effectPrefab, ""); } private static void AddNewEffectDef(GameObject effectPrefab, string soundName) { //IL_0000: 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) //IL_000c: 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_0024: 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_003c: Expected O, but got Unknown Content.AddEffectDef(new EffectDef { prefab = effectPrefab, prefabEffectComponent = effectPrefab.GetComponent<EffectComponent>(), prefabName = ((Object)effectPrefab).name, prefabVfxAttributes = effectPrefab.GetComponent<VFXAttributes>(), spawnSoundEventName = soundName }); } } public static class Buffs { internal static BuffDef revdUp; internal static BuffDef getExcitedSpeedBuff; internal static void RegisterBuffs() { //IL_0014: 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) revdUp = AddNewBuff("JinxRevdUp", Assets.mainAssetBundle.LoadAsset<Sprite>("Rev_d_up"), Color.white, canStack: true, isDebuff: false); getExcitedSpeedBuff = AddNewBuff("GetExcitedMovementSpeedBuff", Assets.mainAssetBundle.LoadAsset<Sprite>("Jinx_Passive"), Color.white, canStack: true, isDebuff: false); } internal static BuffDef AddNewBuff(string buffName, Sprite buffIcon, Color buffColor, bool canStack, bool isDebuff) { //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) BuffDef obj = ScriptableObject.CreateInstance<BuffDef>(); ((Object)obj).name = buffName; obj.buffColor = buffColor; obj.canStack = canStack; obj.isDebuff = isDebuff; obj.eliteDef = null; obj.iconSprite = buffIcon; Content.AddBuffDef(obj); return obj; } } public static class Config { public static ConfigEntry<bool> voiceLines; public static ConfigEntry<bool> rocketJump; public static ConfigEntry<bool> enableCharacter; public static ConfigEntry<float> armorGrowth; public static ConfigEntry<float> baseArmor; public static ConfigEntry<float> baseCrit; public static ConfigEntry<float> baseDamage; public static ConfigEntry<float> baseHealth; public static ConfigEntry<float> baseMovementSpeed; public static ConfigEntry<float> baseRegen; public static ConfigEntry<float> bonusHealthCoefficient; public static ConfigEntry<float> healthGrowth; public static ConfigEntry<int> jumpCount; public static ConfigEntry<float> damageGrowth; public static ConfigEntry<float> regenGrowth; public static ConfigEntry<float> fishBonesDamageCoefficient; public static ConfigEntry<float> fishBonesProcCoefficient; public static ConfigEntry<float> powPowDamageCoefficient; public static ConfigEntry<float> powPowProcCoefficient; public static ConfigEntry<float> zapDamageCoefficient; public static ConfigEntry<float> zapProcCoefficient; public static ConfigEntry<float> zapCD; public static ConfigEntry<float> megaRocketDamageCoefficient; public static ConfigEntry<float> megaRocketProcCoefficient; public static ConfigEntry<float> megaRocketCD; public static ConfigEntry<float> rocketJumpFishBonesForce; public static ConfigEntry<float> rocketJumpMegaRocketForce; public static ConfigEntry<float> rocketJumpRadius; public static void ReadConfig() { //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Expected O, but got Unknown //IL_002f: Expected O, but got Unknown //IL_0048: 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_0063: Expected O, but got Unknown //IL_0063: Expected O, but got Unknown //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_0097: Expected O, but got Unknown //IL_00b0: 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_00cf: Expected O, but got Unknown //IL_00cf: Expected O, but got Unknown //IL_00e8: 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_0107: Expected O, but got Unknown //IL_0107: Expected O, but got Unknown //IL_0120: 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_013f: Expected O, but got Unknown //IL_013f: Expected O, but got Unknown //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Unknown result type (might be due to invalid IL or missing references) //IL_0177: Expected O, but got Unknown //IL_0177: Expected O, but got Unknown //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Expected O, but got Unknown //IL_01af: Expected O, but got Unknown //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Expected O, but got Unknown //IL_01e7: Expected O, but got Unknown //IL_0200: 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_021f: Expected O, but got Unknown //IL_021f: Expected O, but got Unknown //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_024d: Unknown result type (might be due to invalid IL or missing references) //IL_0257: Expected O, but got Unknown //IL_0257: Expected O, but got Unknown //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_0285: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Expected O, but got Unknown //IL_028f: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Expected O, but got Unknown //IL_02c7: Expected O, but got Unknown //IL_02e0: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Unknown result type (might be due to invalid IL or missing references) //IL_02ff: Expected O, but got Unknown //IL_02ff: Expected O, but got Unknown //IL_0318: Unknown result type (might be due to invalid IL or missing references) //IL_032d: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Expected O, but got Unknown //IL_0337: Expected O, but got Unknown //IL_0350: Unknown result type (might be due to invalid IL or missing references) //IL_0365: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Expected O, but got Unknown //IL_036f: Expected O, but got Unknown //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Expected O, but got Unknown //IL_03a3: Expected O, but got Unknown //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03d1: Unknown result type (might be due to invalid IL or missing references) //IL_03db: Expected O, but got Unknown //IL_03db: Expected O, but got Unknown //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_0409: Unknown result type (might be due to invalid IL or missing references) //IL_0413: Expected O, but got Unknown //IL_0413: Expected O, but got Unknown //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0441: Unknown result type (might be due to invalid IL or missing references) //IL_044b: Expected O, but got Unknown //IL_044b: Expected O, but got Unknown //IL_0464: Unknown result type (might be due to invalid IL or missing references) //IL_0479: Unknown result type (might be due to invalid IL or missing references) //IL_0483: Expected O, but got Unknown //IL_0483: Expected O, but got Unknown //IL_049c: Unknown result type (might be due to invalid IL or missing references) //IL_04b1: Unknown result type (might be due to invalid IL or missing references) //IL_04bb: Expected O, but got Unknown //IL_04bb: Expected O, but got Unknown //IL_04d4: Unknown result type (might be due to invalid IL or missing references) //IL_04e9: Unknown result type (might be due to invalid IL or missing references) //IL_04f3: Expected O, but got Unknown //IL_04f3: Expected O, but got Unknown //IL_050c: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_052b: Expected O, but got Unknown //IL_052b: Expected O, but got Unknown //IL_0544: Unknown result type (might be due to invalid IL or missing references) //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0563: Expected O, but got Unknown //IL_0563: Expected O, but got Unknown //IL_057c: Unknown result type (might be due to invalid IL or missing references) //IL_0591: Unknown result type (might be due to invalid IL or missing references) //IL_059b: Expected O, but got Unknown //IL_059b: Expected O, but got Unknown //IL_05b4: Unknown result type (might be due to invalid IL or missing references) //IL_05c9: Unknown result type (might be due to invalid IL or missing references) //IL_05d3: Expected O, but got Unknown //IL_05d3: Expected O, but got Unknown enableCharacter = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<bool>(new ConfigDefinition("00 - Other", "Enable Character"), true, new ConfigDescription("Enable Character", (AcceptableValueBase)null, Array.Empty<object>())); voiceLines = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<bool>(new ConfigDefinition("00 - Other", "Voice Lines"), true, new ConfigDescription("Enable Voice Lines", (AcceptableValueBase)null, Array.Empty<object>())); rocketJump = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<bool>(new ConfigDefinition("00 - Other", "Rocket Jumping"), true, new ConfigDescription("Enable Rocket Jumping", (AcceptableValueBase)null, Array.Empty<object>())); rocketJumpFishBonesForce = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("00 - Other", "Rocket Jump Force (Fishbones)"), 6000f, new ConfigDescription("Rocket Jump Force (Fishbones)", (AcceptableValueBase)null, Array.Empty<object>())); rocketJumpMegaRocketForce = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("00 - Other", "Rocket Jump Force (Mega Rocket)"), 12000f, new ConfigDescription("Rocket Jump Force (Mega Rocket)", (AcceptableValueBase)null, Array.Empty<object>())); rocketJumpRadius = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("00 - Other", "Rocket Jump Blast Radius"), 8f, new ConfigDescription("Rocket Jump Blast Radius", (AcceptableValueBase)null, Array.Empty<object>())); baseHealth = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Health"), 110f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); healthGrowth = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Health Growth"), 30f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); baseRegen = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Health Regen"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); regenGrowth = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Health Regen Growth"), 0.2f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); baseArmor = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Armor"), 20f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); armorGrowth = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Armor Growth"), 0f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); baseDamage = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Damage"), 12f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); damageGrowth = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Damage Growth"), 2.4f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); baseMovementSpeed = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Movement Speed"), 7f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); baseCrit = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("01 - Character Stats", "Base Crit"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); jumpCount = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<int>(new ConfigDefinition("01 - Character Stats", "Jump Count"), 1, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); fishBonesDamageCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Fish Bones", "Fish Bones Damage Coefficient"), 6.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); fishBonesProcCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Fish Bones", "Fish Bones Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); powPowDamageCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Pow Pow", "Pow Pow Damage Coefficient"), 1.65f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); powPowProcCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("02 - Pow Pow", "Pow Pow Proc Coefficient"), 0.7f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); zapDamageCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("03 - Zap", "Zap Damage Coefficient"), 10f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); zapProcCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("03 - Zap", "Zap Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); zapCD = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("03 - Zap", "Zap CD"), 6f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); megaRocketDamageCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Mega Rocket", "Mega Rocket Damage Coefficient"), 13.5f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); megaRocketProcCoefficient = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Mega Rocket", "Mega Rocket Proc Coefficient"), 1f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); megaRocketCD = ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<float>(new ConfigDefinition("04 - Mega Rocket", "Mega Rocket CD"), 10f, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); } public static ConfigEntry<bool> CharacterEnableConfig(string characterName, string description = "Set to false to disable this character", bool enabledDefault = true) { return ((BaseUnityPlugin)JinxPlugin.instance).Config.Bind<bool>("General", "Enable " + characterName, enabledDefault, description); } } internal class ContentPacks : IContentPackProvider { internal ContentPack contentPack = new ContentPack(); public static List<GameObject> bodyPrefabs = new List<GameObject>(); public static List<GameObject> masterPrefabs = new List<GameObject>(); public static List<GameObject> projectilePrefabs = new List<GameObject>(); public static List<SurvivorDef> survivorDefs = new List<SurvivorDef>(); public static List<UnlockableDef> unlockableDefs = new List<UnlockableDef>(); public static List<SkillFamily> skillFamilies = new List<SkillFamily>(); public static List<SkillDef> skillDefs = new List<SkillDef>(); public static List<Type> entityStates = new List<Type>(); public static List<BuffDef> buffDefs = new List<BuffDef>(); public static List<EffectDef> effectDefs = new List<EffectDef>(); public static List<NetworkSoundEventDef> networkSoundEventDefs = new List<NetworkSoundEventDef>(); public string identifier => "com.Lemonlust.JinxMod"; public void Initialize() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)this); } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { contentPack.identifier = identifier; contentPack.bodyPrefabs.Add(bodyPrefabs.ToArray()); contentPack.masterPrefabs.Add(masterPrefabs.ToArray()); contentPack.projectilePrefabs.Add(projectilePrefabs.ToArray()); contentPack.survivorDefs.Add(survivorDefs.ToArray()); contentPack.unlockableDefs.Add(unlockableDefs.ToArray()); contentPack.skillDefs.Add(skillDefs.ToArray()); contentPack.skillFamilies.Add(skillFamilies.ToArray()); contentPack.entityStateTypes.Add(entityStates.ToArray()); contentPack.buffDefs.Add(buffDefs.ToArray()); contentPack.effectDefs.Add(effectDefs.ToArray()); contentPack.networkSoundEventDefs.Add(networkSoundEventDefs.ToArray()); args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } } internal class Content { public static void AddCharacterBodyPrefab(GameObject bprefab) { ContentPacks.bodyPrefabs.Add(bprefab); } public static void AddMasterPrefab(GameObject prefab) { ContentPacks.masterPrefabs.Add(prefab); } public static void AddProjectilePrefab(GameObject prefab) { ContentPacks.projectilePrefabs.Add(prefab); } public static void AddSurvivorDef(SurvivorDef survivorDef) { ContentPacks.survivorDefs.Add(survivorDef); } public static void AddUnlockableDef(UnlockableDef unlockableDef) { ContentPacks.unlockableDefs.Add(unlockableDef); } public static void AddSkillDef(SkillDef skillDef) { ContentPacks.skillDefs.Add(skillDef); } public static void AddSkillFamily(SkillFamily skillFamily) { ContentPacks.skillFamilies.Add(skillFamily); } public static void AddEntityState(Type entityState) { ContentPacks.entityStates.Add(entityState); } public static void AddBuffDef(BuffDef buffDef) { ContentPacks.buffDefs.Add(buffDef); } public static void AddEffectDef(EffectDef effectDef) { ContentPacks.effectDefs.Add(effectDef); } public static void AddNetworkSoundEventDef(NetworkSoundEventDef networkSoundEventDef) { ContentPacks.networkSoundEventDefs.Add(networkSoundEventDef); } } internal static class Helpers { internal const string agilePrefix = "<style=cIsUtility>Agile.</style> "; internal const string shockingPrefix = "<style=cIsDamage>Shocking.</style> "; internal static string ScepterDescription(string desc) { return "\n<color=#d299ff>SCEPTER: " + desc + "</color>"; } public static T[] Append<T>(ref T[] array, List<T> list) { int num = array.Length; int count = list.Count; Array.Resize(ref array, num + count); list.CopyTo(array, num); return array; } public static Func<T[], T[]> AppendDel<T>(List<T> list) { return (T[] r) => Append(ref r, list); } internal static string colorText(string v1, string v2) { throw new NotImplementedException(); } } internal static class Materials { private static List<Material> cachedMaterials = new List<Material>(); public static Material CreateHopooMaterial(string materialName) { //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown Material val = cachedMaterials.Find(delegate(Material mat) { materialName.Replace(" (Instance)", ""); return ((Object)mat).name.Contains(materialName); }); if (Object.op_Implicit((Object)(object)val)) { return val; } val = Assets.mainAssetBundle.LoadAsset<Material>(materialName); if (!Object.op_Implicit((Object)(object)val)) { Log.Error("Failed to load material: " + materialName + " - Check to see that the material in your Unity project matches this name"); return new Material(Assets.hotpoo); } return val.SetHopooMaterial(); } public static Material SetHopooMaterial(this Material tempMat) { //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (cachedMaterials.Contains(tempMat)) { return tempMat; } float? num = null; Color? val = null; if (tempMat.IsKeywordEnabled("_NORMALMAP")) { num = tempMat.GetFloat("_BumpScale"); } if (tempMat.IsKeywordEnabled("_EMISSION")) { val = tempMat.GetColor("_EmissionColor"); } tempMat.shader = Assets.hotpoo; tempMat.SetColor("_Color", tempMat.GetColor("_Color")); tempMat.SetTexture("_MainTex", tempMat.GetTexture("_MainTex")); tempMat.SetTexture("_EmTex", tempMat.GetTexture("_EmissionMap")); tempMat.EnableKeyword("DITHER"); if (num.HasValue) { tempMat.SetFloat("_NormalStrength", num.Value); } if (val.HasValue) { tempMat.SetColor("_EmColor", val.Value); tempMat.SetFloat("_EmPower", 1f); } if (tempMat.IsKeywordEnabled("NOCULL")) { tempMat.SetInt("_Cull", 0); } if (tempMat.IsKeywordEnabled("LIMBREMOVAL")) { tempMat.SetInt("_LimbRemovalOn", 1); } cachedMaterials.Add(tempMat); return tempMat; } public static Material MakeUnique(this Material material) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Expected O, but got Unknown if (cachedMaterials.Contains(material)) { return new Material(material); } return material; } public static Material SetColor(this Material material, Color color) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) material.SetColor("_Color", color); return material; } public static Material SetNormal(this Material material, float normalStrength = 1f) { material.SetFloat("_NormalStrength", normalStrength); return material; } public static Material SetEmission(this Material material) { return material.SetEmission(1f); } public static Material SetEmission(this Material material, float emission) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return material.SetEmission(emission, Color.white); } public static Material SetEmission(this Material material, float emission, Color emissionColor) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) material.SetFloat("_EmPower", emission); material.SetColor("_EmColor", emissionColor); return material; } public static Material SetCull(this Material material, bool cull = false) { material.SetInt("_Cull", cull ? 1 : 0); return material; } } internal static class Prefabs { private static PhysicMaterial ragdollMaterial; public static GameObject CreateDisplayPrefab(string displayModelName, GameObject prefab, BodyInfo bodyInfo) { GameObject val = Assets.LoadSurvivorModel(displayModelName); CharacterModel val2 = val.GetComponent<CharacterModel>(); if (!Object.op_Implicit((Object)(object)val2)) { val2 = val.AddComponent<CharacterModel>(); } val2.baseRendererInfos = prefab.GetComponentInChildren<CharacterModel>().baseRendererInfos; Assets.ConvertAllRenderersToHopooShader(val); return val.gameObject; } public static GameObject CreateBodyPrefab(string bodyName, string modelName, BodyInfo bodyInfo) { //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) GameObject val = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/" + bodyInfo.bodyNameToClone + "Body"); if (!Object.op_Implicit((Object)(object)val)) { Log.Error(bodyInfo.bodyNameToClone + "Body is not a valid body, character creation failed"); return null; } GameObject val2 = PrefabAPI.InstantiateClone(val, bodyName); Transform val3 = null; GameObject val4 = null; if (modelName != "mdl") { val4 = Assets.LoadSurvivorModel(modelName); if ((Object)(object)val4 == (Object)null) { val4 = ((Component)val2.GetComponentInChildren<CharacterModel>()).gameObject; } val3 = AddCharacterModelToSurvivorBody(val2, val4.transform, bodyInfo); } CharacterBody component = val2.GetComponent<CharacterBody>(); ((Object)component).name = bodyInfo.bodyName; component.baseNameToken = bodyInfo.bodyNameToken; component.subtitleNameToken = bodyInfo.subtitleNameToken; component.portraitIcon = bodyInfo.characterPortrait; component.bodyColor = bodyInfo.bodyColor; component._defaultCrosshairPrefab = bodyInfo.crosshair; component.hideCrosshair = false; component.preferredPodPrefab = bodyInfo.podPrefab; component.baseMaxHealth = bodyInfo.maxHealth; component.baseRegen = bodyInfo.healthRegen; component.levelArmor = bodyInfo.