Decompiled source of IAmBecomeMissiles v1.1.1
MissileRework.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.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 EntityStates; using EntityStates.ArtifactShell; using EntityStates.BeetleGuardMonster; using EntityStates.Captain.Weapon; using EntityStates.Chef; using EntityStates.ChildMonster; using EntityStates.ClayBoss; using EntityStates.Commando.CommandoWeapon; using EntityStates.FalseSon; using EntityStates.FlyingVermin.Weapon; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GrandParentBoss; using EntityStates.LemurianMonster; using EntityStates.Loader; using EntityStates.LunarWisp; using EntityStates.Mage.Weapon; using EntityStates.MiniMushroom; using EntityStates.MinorConstruct.Weapon; using EntityStates.Railgunner.Weapon; using EntityStates.Seeker; using EntityStates.Toolbot; using EntityStates.VagrantMonster; using EntityStates.VoidBarnacle.Weapon; using EntityStates.VoidSurvivor.Weapon; using IL.RoR2; using ModularEclipse; using Mono.Cecil.Cil; using MonoMod.Cil; using On.EntityStates; using On.EntityStates.ArtifactShell; using On.EntityStates.BeetleGuardMonster; using On.EntityStates.Captain.Weapon; using On.EntityStates.Chef; using On.EntityStates.ChildMonster; using On.EntityStates.ClayBoss; using On.EntityStates.FalseSon; using On.EntityStates.GrandParentBoss; using On.EntityStates.LemurianMonster; using On.EntityStates.Loader; using On.EntityStates.LunarWisp; using On.EntityStates.Mage.Weapon; using On.EntityStates.MiniMushroom; using On.EntityStates.Railgunner.Weapon; using On.EntityStates.Seeker; using On.EntityStates.VagrantMonster; using On.EntityStates.VoidSurvivor.Weapon; using On.RoR2; using On.RoR2.Projectile; using R2API; using R2API.Utils; using RoR2; using RoR2.ExpansionManagement; using RoR2.Projectile; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("MissileRework")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MissileRework")] [assembly: AssemblyTitle("MissileRework")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: UnverifiableCode] [module: UnverifiableCode] [module: UnverifiableCode] [module: UnverifiableCode] namespace MissileRework; [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("com.RiskOfBrainrot.IAmBecomeMissiles", "IAmBecomeMissiles", "1.1.0")] [R2APISubmoduleDependency(new string[] { "LanguageAPI", "ContentAddition", "DamageAPI" })] public class MissileReworkPlugin : BaseUnityPlugin { public static GameObject missilePrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/Projectiles/MissileProjectile"); public float procCoefficient = 0.5f; public float procChance = 10f; public static float atgMk3BaseDamageCoefficientPerRocket = 3f; public static float atgMk3TotalDamageMultiplierBase = 0f; public static float atgMk3TotalDamageMultiplierStack = 1.5f; private static int maxMissiles = 100; private string damagePerMissile = atgMk3BaseDamageCoefficientPerRocket * 100f + "%"; private string damagePerStack = atgMk3TotalDamageMultiplierStack * 100f + "%"; private string damageBase = (atgMk3TotalDamageMultiplierBase + atgMk3TotalDamageMultiplierStack) * 100f + "%"; public static ArtifactDef MissileArtifact = null; public const float missileSpread = 45f; public const float projectileSpread = 20f; public const string guid = "com.RiskOfBrainrot.IAmBecomeMissiles"; public const string teamName = "RiskOfBrainrot"; public const string modName = "IAmBecomeMissiles"; public const string version = "1.1.0"; public static bool ModularEclipseLoaded = isLoaded("com.HouseOfFruits.ModularEclipse"); private ItemDef icbmItemDef; private static AssetBundle _assetBundle; private float shrimpShieldBase = 40f; private float shrimpDamageCoeffBase = 0.3f; private float shrimpDamageCoeffStack = 0.3f; public static PluginInfo PInfo { get; private set; } internal static ConfigFile CustomConfigFile { get; set; } public static ConfigEntry<bool> ShouldReworkIcbm { get; set; } public static ConfigEntry<bool> ShouldReworkAtg { get; set; } public static ConfigEntry<bool> ShouldReworkShrimp { get; set; } public static ConfigEntry<bool> ShouldReworkDml { get; set; } public static ConfigEntry<bool> ShouldReworkEnemyMissileTargeting { get; set; } public static AssetBundle assetBundle { get { if ((Object)(object)_assetBundle == (Object)null) { _assetBundle = AssetBundle.LoadFromFile(GetAssetBundlePath("missilereworkassets")); } return _assetBundle; } set { _assetBundle = value; } } internal void ReworkAtg() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown missilePrefab.GetComponent<ProjectileController>().procCoefficient = procCoefficient; GlobalEventManager.ProcessHitEnemy += new Manipulator(RemoveVanillaAtgLogic); CharacterBody.OnInventoryChanged += new hook_OnInventoryChanged(AddItemBehavior); GlobalEventManager.ProcessHitEnemy += new hook_ProcessHitEnemy(AtgReworkLogic); LanguageAPI.Add("ITEM_MISSILE_NAME", "AtG Missile Mk.3"); LanguageAPI.Add("ITEM_MISSILE_PICKUP", "Chance to fire missiles."); LanguageAPI.Add("ITEM_MISSILE_DESC", $"<style=cIsDamage>{procChance}%</style> chance to fire a volley of missiles on hit " + "for <style=cIsDamage>" + damageBase + "</style> <style=cStack>(+" + damagePerStack + " per stack)</style> TOTAL damage. Each missile deals <style=cIsDamage>" + damagePerMissile + "</style> base damage."); } private void AddItemBehavior(orig_OnInventoryChanged orig, CharacterBody self) { orig.Invoke(self); if (NetworkServer.active) { self.AddItemBehavior<Mk3MissileBehavior>(self.inventory.GetItemCount(Items.Missile)); } } private void RemoveVanillaAtgLogic(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) ILCursor val = new ILCursor(il); val.GotoNext((MoveType)0, new Func<Instruction, bool>[2] { (Instruction x) => ILPatternMatchingExt.MatchLdsfld(x, "RoR2.RoR2Content/Items", "Missile"), (Instruction x) => ILPatternMatchingExt.MatchCallOrCallvirt<Inventory>(x, "GetItemCount") }); int index = val.Index; val.Index = index - 1; val.Remove(); val.Remove(); val.Remove(); val.Emit(OpCodes.Ldc_I4, 0); } private void AtgReworkLogic(orig_ProcessHitEnemy orig, GlobalEventManager self, DamageInfo damageInfo, GameObject victim) { orig.Invoke(self, damageInfo, victim); if (!Object.op_Implicit((Object)(object)damageInfo.attacker) || !(damageInfo.procCoefficient > 0f) || ((ProcChainMask)(ref damageInfo.procChainMask)).HasProc((ProcType)1)) { return; } CharacterBody component = damageInfo.attacker.GetComponent<CharacterBody>(); CharacterBody val = (Object.op_Implicit((Object)(object)victim) ? victim.GetComponent<CharacterBody>() : null); if (Object.op_Implicit((Object)(object)component)) { CharacterMaster master = component.master; Inventory inventory = component.inventory; if ((Object)(object)master != (Object)null && (Object)(object)inventory != (Object)null) { int itemCount = inventory.GetItemCount(Items.Missile); DoMissileProc(damageInfo, victim, component, master, itemCount); } } } private void DoMissileProc(DamageInfo damageInfo, GameObject victim, CharacterBody attackerBody, CharacterMaster attackerMaster, int missileItemCount) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) if (missileItemCount <= 0) { return; } Mk3MissileBehavior component = ((Component)attackerBody).gameObject.GetComponent<Mk3MissileBehavior>(); if ((Object)(object)component == (Object)null) { return; } float num = damageInfo.damage * (atgMk3TotalDamageMultiplierBase + atgMk3TotalDamageMultiplierStack * (float)missileItemCount); float num2 = atgMk3BaseDamageCoefficientPerRocket * attackerBody.damage; float num3 = num % num2; int num4 = (int)((num - num3) / num2); if (num3 > 0f) { float num5 = num3 / num2; if (Util.CheckRoll(num5 * 100f, 0f, (CharacterMaster)null)) { num4++; } } if (Util.CheckRoll(procChance, attackerMaster) && num4 > 0) { FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = missilePrefab; val.procChainMask = damageInfo.procChainMask; val.damage = num2; val.crit = damageInfo.crit; val.target = victim; FireProjectileInfo newMissile = val; component.AddMissiles(newMissile, Mathf.Min(num4, maxMissiles - component.currentMissiles.Count)); } } internal void ReworkIcbm() { DisableICBM(); } private void DisableICBM() { //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_0031: Unknown result type (might be due to invalid IL or missing references) icbmItemDef = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/MoreMissile/MoreMissile.asset").WaitForCompletion(); if ((Object)(object)icbmItemDef != (Object)null) { icbmItemDef.deprecatedTier = (ItemTier)5; icbmItemDef.tier = (ItemTier)5; } } private void CreateArtifact() { //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown MissileArtifact = ScriptableObject.CreateInstance<ArtifactDef>(); MissileArtifact.cachedName = "BorboWarfare"; MissileArtifact.nameToken = "ARTIFACT_MISSILE_NAME"; MissileArtifact.descriptionToken = "ARTIFACT_MISSILE_DESC"; MissileArtifact.smallIconSelectedSprite = assetBundle.LoadAsset<Sprite>("Assets/warfare.png"); MissileArtifact.smallIconDeselectedSprite = assetBundle.LoadAsset<Sprite>("Assets/warfaredeactivated.png"); MissileArtifact.unlockableDef = null; MissileArtifact.requiredExpansion = Addressables.LoadAssetAsync<ExpansionDef>((object)"RoR2/DLC1/Common/DLC1.asset").WaitForCompletion(); LanguageAPI.Add(MissileArtifact.nameToken, "Artifact of Warfare"); LanguageAPI.Add(MissileArtifact.descriptionToken, "Triple most projectile attacks."); ContentAddition.AddArtifactDef(MissileArtifact); if (ModularEclipseLoaded) { ModularEclipseCompat(); } MissileUtils.FireMissile_Vector3_CharacterBody_ProcChainMask_GameObject_float_bool_GameObject_DamageColorIndex_Vector3_float_bool += new Manipulator(OverrideIcbmMissiles); DoMissileArtifactEffects(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] private void ModularEclipseCompat() { ModularEclipsePlugin.SetArtifactDefaultWhitelist(MissileArtifact, true); } private void OverrideIcbmMissiles(ILContext il) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown ILCursor val = new ILCursor(il); ILLabel val2 = default(ILLabel); val.GotoNext((MoveType)0, new Func<Instruction, bool>[3] { (Instruction x) => ILPatternMatchingExt.MatchLdloc(x, 0), (Instruction x) => ILPatternMatchingExt.MatchLdcI4(x, 0), (Instruction x) => ILPatternMatchingExt.MatchBle(x, ref val2) }); val.Remove(); val.EmitDelegate<Func<int>>((Func<int>)(() => RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact) ? 1 : 0)); } private void DoMissileArtifactEffects() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Expected O, but got Unknown //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Expected O, but got Unknown //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Expected O, but got Unknown //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0120: Expected O, but got Unknown //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Expected O, but got Unknown //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Expected O, but got Unknown //IL_0194: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown GenericProjectileBaseState.FireProjectile += new hook_FireProjectile(MissileArtifact_FireProjectile); BaseThrowBombState.Fire += new hook_Fire(MissileArtifact_ThrowBomb); PrimarySkillShurikenBehavior.FireShuriken += new hook_FireShuriken(MissileArtifact_Shuriken); FireMegaBlasterBase.FireProjectiles += new hook_FireProjectiles(MissileArtifact_ViendSecondary); FireCorruptDisks.OnEnter += new hook_OnEnter(MissileArtifact_ViendCorruptSecondary); FireTazer.Fire += new hook_Fire(MissileArtifact_CaptainTazer); FireFireBolt.FireGauntlet += new hook_FireGauntlet(MissileArtifact_ArtiBolts); ThrowPylon.OnEnter += new hook_OnEnter(MissileArtifact_LodrPylon); FirePistol.FireBullet += new hook_FireBullet(MissileArtifact_RailerPistol); SpiritPunch.FireGauntlet += new hook_FireGauntlet(MissileArtifact_SeekerPunch); LunarSpikes.FireLunarSpike += new hook_FireLunarSpike(MissileArtifact_SonSurvivorSpike); Dice.OnEnter += new hook_OnEnter(MissileArtifact_ChefCleaver); SporeGrenade.FireGrenade += new hook_FireGrenade(MissileArtifact_MushrumSporeGrenade); FireSolarFlares.FixedUpdate += new hook_FixedUpdate(MissileArtifact_ReliquaryFlares); WormBodyPositions2.FireMeatballs += new hook_FireMeatballs(MissileArtifact_FireMeatballs); TitanRockController.Fire += new hook_Fire(MissileArtifact_TitanRock); FireFireball.OnEnter += new hook_OnEnter(MissileArtifact_LemurianFireball); FireTrackingBomb.FireBomb += new hook_FireBomb(MissileArtifact_VagrantTrackingBomb); SeekingBomb.FireBomb += new hook_FireBomb(MissileArtifact_ChimeraSeekingBomb); FireSunder.FixedUpdate += new hook_FixedUpdate(MissileArtifact_BeetleGuardRoller); FireTarball.FireSingleTarball += new hook_FireSingleTarball(MissileArtifact_DunestriderRoller); FireSecondaryProjectile.Fire += new hook_Fire(MissileArtifact_GrandpaVacuum); SparkBallFire.FireBomb += new hook_FireBomb(MissileArtifact_ChildSpark); } private void MissileArtifact_ChildSpark(orig_FireBomb orig, SparkBallFire self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = SparkBallFire.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * SparkBallFire.bombDamageCoefficient; fireProjectileInfo.force = SparkBallFire.bombForce; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 45f); } } private void MissileArtifact_ChefCleaver(orig_OnEnter orig, Dice self) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005a: 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_0063: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_011a: 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_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_015e: 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_0196: 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) orig.Invoke(self); if (((EntityState)self).isAuthority && !self.hasBoost && RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { Ray aimRay = ((BaseState)self).GetAimRay(); Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = self.projectilePrefab; val3.position = ((Ray)(ref aimRay)).origin; val3.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val3.owner = ((EntityState)self).gameObject; val3.damage = ((BaseState)self).damageStat * self.damageCoefficient; val3.force = self.force; val3.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireProjectileInfo val4 = val3; val3.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-45f, val2) * ((Ray)(ref aimRay)).direction); val4.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(45f, val2) * ((Ray)(ref aimRay)).direction); if (!NetworkServer.active && Object.op_Implicit((Object)(object)self.chefController)) { self.chefController.CacheCleaverProjectileFireInfo(val3); } ProjectileManager.instance.FireProjectile(val3); if (!NetworkServer.active && Object.op_Implicit((Object)(object)self.chefController)) { self.chefController.CacheCleaverProjectileFireInfo(val4); } ProjectileManager.instance.FireProjectile(val4); } } public void FireWarfareProjectiles(Ray aimRay, FireProjectileInfo fireProjectileInfo, float spread) { //IL_0015: 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_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0071: 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_0087: Unknown result type (might be due to invalid IL or missing references) if (RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); FireProjectileInfo val3 = fireProjectileInfo; fireProjectileInfo.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(spread, val2) * ((Ray)(ref aimRay)).direction); val3.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(0f - spread, val2) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(fireProjectileInfo); ProjectileManager.instance.FireProjectile(val3); } } private void MissileArtifact_SeekerPunch(orig_FireGauntlet orig, SpiritPunch self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = self.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * self.damageCoefficient; fireProjectileInfo.force = 0f; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_SonSurvivorSpike(orig_FireLunarSpike orig, LunarSpikes self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = self.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * self.damageCoefficient; fireProjectileInfo.force = 0f; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_Shuriken(orig_FireShuriken orig, PrimarySkillShurikenBehavior self) { //IL_0017: 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_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (NetworkServer.active) { Ray aimRay = self.GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = self.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((Component)self).gameObject; fireProjectileInfo.damage = ((ItemBehavior)self).body.damage * (3f + 1f * (float)((ItemBehavior)self).stack); fireProjectileInfo.force = 0f; fireProjectileInfo.crit = Util.CheckRoll(((ItemBehavior)self).body.crit, ((ItemBehavior)self).body.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 45f); } } private void MissileArtifact_GrandpaVacuum(orig_Fire orig, FireSecondaryProjectile self) { //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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_0113: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Unknown result type (might be due to invalid IL or missing references) //IL_011d: 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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017e: 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_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self); return; } self.hasFired = true; if (Object.op_Implicit((Object)(object)self.muzzleEffectPrefab)) { EffectManager.SimpleMuzzleFlash(self.muzzleEffectPrefab, ((EntityState)self).gameObject, self.muzzleName, false); } if (!((EntityState)self).isAuthority || !Object.op_Implicit((Object)(object)self.projectilePrefab)) { return; } Ray aimRay = ((BaseState)self).GetAimRay(); Transform modelTransform = ((EntityState)self).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { ((Ray)(ref aimRay)).origin = ((Component)component.FindChild(self.muzzleName)).transform.position; } } Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = self.projectilePrefab; val3.position = ((Ray)(ref aimRay)).origin; val3.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val3.owner = ((EntityState)self).gameObject; val3.damage = ((BaseState)self).damageStat * self.damageCoefficient; val3.force = self.force; val3.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); ProjectileManager.instance.FireProjectile(val3); FireProjectileInfo val4 = val3; FireProjectileInfo val5 = val3; val4.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(45f, val2) * ((Ray)(ref aimRay)).direction); val5.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-45f, val2) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(val4); ProjectileManager.instance.FireProjectile(val5); } private void MissileArtifact_RailerPistol(orig_FireBullet orig, FirePistol self, Ray aimRay) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: 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_0143: 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_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ee: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_01fe: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021c: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_0229: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Unknown result type (might be due to invalid IL or missing references) //IL_0235: Unknown result type (might be due to invalid IL or missing references) //IL_023a: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0240: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Unknown result type (might be due to invalid IL or missing references) //IL_0272: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self, aimRay); return; } ((BaseState)self).StartAimMode(aimRay, 2f, false); Util.PlaySound(self.fireSoundString, ((EntityState)self).gameObject); EffectManager.SimpleMuzzleFlash(self.muzzleFlashPrefab, ((EntityState)self).gameObject, self.muzzleName, false); ((EntityState)self).PlayAnimation(self.animationLayerName, self.animationStateName, self.animationPlaybackRateParam, self.duration, 0f); ((BaseState)self).AddRecoil(self.recoilYMin, self.recoilYMax, self.recoilXMin, self.recoilXMax); if (((EntityState)self).isAuthority) { float num = 0f; if (Object.op_Implicit((Object)(object)((EntityState)self).characterBody)) { num = ((EntityState)self).characterBody.spreadBloomAngle; } Quaternion val = Quaternion.AngleAxis((float)Random.Range(0, 360), Vector3.forward); Quaternion val2 = Quaternion.AngleAxis(Random.Range(0f, self.baseInaccuracyDegrees + num), Vector3.left); Quaternion rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction, Vector3.up) * val * val2; FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = self.projectilePrefab; val3.position = ((Ray)(ref aimRay)).origin; val3.rotation = rotation; val3.owner = ((EntityState)self).gameObject; val3.damage = ((BaseState)self).damageStat * self.damageCoefficient; val3.crit = ((BaseState)self).RollCrit(); val3.force = self.force; val3.procChainMask = default(ProcChainMask); val3.damageColorIndex = (DamageColorIndex)0; FireProjectileInfo val4 = val3; ProjectileManager.instance.FireProjectile(val4); Vector3 val5 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val6 = Vector3.Cross(((Ray)(ref aimRay)).direction, val5); FireProjectileInfo val7 = val4; val7.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(20f, val6) * ((Ray)(ref aimRay)).direction) * val * val2; ProjectileManager.instance.FireProjectile(val7); FireProjectileInfo val8 = val4; val8.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-20f, val6) * ((Ray)(ref aimRay)).direction) * val * val2; ProjectileManager.instance.FireProjectile(val8); ((EntityState)self).characterBody.characterMotor.ApplyForce((0f - self.selfKnockbackForce) * ((Ray)(ref aimRay)).direction, false, false); } ((EntityState)self).characterBody.AddSpreadBloom(self.spreadBloomValue); } private void MissileArtifact_ThrowBomb(orig_Fire orig, BaseThrowBombState self) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0141: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_0187: Unknown result type (might be due to invalid IL or missing references) //IL_018c: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact) && ((EntityState)self).isAuthority && self is ThrowLunarSecondary) { Ray aimRay = ((BaseState)self).GetAimRay(); if ((Object)(object)self.projectilePrefab != (Object)null) { float num = Util.Remap(self.charge, 0f, 1f, self.minDamageCoefficient, self.maxDamageCoefficient); float force = self.charge * self.force; FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = self.projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)self).gameObject; val.damage = ((BaseState)self).damageStat * num; val.force = force; val.crit = ((BaseState)self).RollCrit(); FireProjectileInfo val2 = val; self.ModifyProjectile(ref val2); ProjectileManager.instance.FireProjectile(val2); Vector3 val3 = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val4 = Vector3.Cross(((Ray)(ref aimRay)).direction, val3); FireProjectileInfo val5 = val2; val5.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(20f, val4) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(val5); FireProjectileInfo val6 = val2; val6.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-20f, val4) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(val6); } if (Object.op_Implicit((Object)(object)((EntityState)self).characterMotor)) { ((EntityState)self).characterMotor.ApplyForce(((Ray)(ref aimRay)).direction * ((0f - self.selfForce) * self.charge), false, false); } } else { orig.Invoke(self); } } private void MissileArtifact_LodrPylon(orig_OnEnter orig, ThrowPylon self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = ThrowPylon.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * ThrowPylon.damageCoefficient; fireProjectileInfo.force = 0f; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 45f); } } private void MissileArtifact_ArtiBolts(orig_FireGauntlet orig, FireFireBolt self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_008c: 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) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = self.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * self.damageCoefficient; fireProjectileInfo.force = 0f; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_DunestriderRoller(orig_FireSingleTarball orig, FireTarball self, string targetMuzzle) { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0115: 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_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_015f: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c9: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01d0: 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_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: 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_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0212: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self, targetMuzzle); return; } ((EntityState)self).PlayCrossfade("Body", "FireTarBall", 0.1f); Util.PlaySound(FireTarball.attackSoundString, ((EntityState)self).gameObject); self.aimRay = ((BaseState)self).GetAimRay(); if (Object.op_Implicit((Object)(object)self.modelTransform)) { ChildLocator component = ((Component)self.modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { Transform val = component.FindChild(targetMuzzle); if (Object.op_Implicit((Object)(object)val)) { ((Ray)(ref self.aimRay)).origin = val.position; } } } ((BaseState)self).AddRecoil(-1f * FireTarball.recoilAmplitude, -2f * FireTarball.recoilAmplitude, -1f * FireTarball.recoilAmplitude, 1f * FireTarball.recoilAmplitude); if (Object.op_Implicit((Object)(object)FireTarball.effectPrefab)) { EffectManager.SimpleMuzzleFlash(FireTarball.effectPrefab, ((EntityState)self).gameObject, targetMuzzle, false); } if (((EntityState)self).isAuthority) { Vector3 up = Vector3.up; Vector3 val2 = Vector3.ProjectOnPlane(((Ray)(ref self.aimRay)).direction, up); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = FireTarball.projectilePrefab; val3.position = ((Ray)(ref self.aimRay)).origin; val3.rotation = Util.QuaternionSafeLookRotation(val2); val3.owner = ((EntityState)self).gameObject; val3.damage = ((BaseState)self).damageStat * FireTarball.damageCoefficient; val3.force = 0f; val3.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); ProjectileManager.instance.FireProjectile(val3); FireProjectileInfo val4 = val3; FireProjectileInfo val5 = val3; val4.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(45f, up) * val2); val5.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-45f, up) * val2); ProjectileManager.instance.FireProjectile(val4); ProjectileManager.instance.FireProjectile(val5); } ((EntityState)self).characterBody.AddSpreadBloom(FireTarball.spreadBloomValue); } private void MissileArtifact_BeetleGuardRoller(orig_FixedUpdate orig, FireSunder self) { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: 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_00b1: 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_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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015c: 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_016d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_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_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_018f: 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) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self); return; } ((EntityState)self).fixedAge = ((EntityState)self).fixedAge + Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)self.modelAnimator) && self.modelAnimator.GetFloat("FireSunder.activate") > 0.5f && !self.hasAttacked) { if (((EntityState)self).isAuthority && Object.op_Implicit((Object)(object)self.modelTransform)) { Ray aimRay = ((BaseState)self).GetAimRay(); ((Ray)(ref aimRay)).origin = self.handRTransform.position; Vector3 up = Vector3.up; FireProjectileInfo val = default(FireProjectileInfo); val.projectilePrefab = FireSunder.projectilePrefab; val.position = ((Ray)(ref aimRay)).origin; val.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val.owner = ((EntityState)self).gameObject; val.damage = ((BaseState)self).damageStat * FireSunder.damageCoefficient; val.force = FireSunder.forceMagnitude; val.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); ProjectileManager.instance.FireProjectile(val); FireProjectileInfo val2 = val; FireProjectileInfo val3 = val; val2.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(20f, up) * ((Ray)(ref aimRay)).direction); val3.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-20f, up) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(val2); ProjectileManager.instance.FireProjectile(val3); } self.hasAttacked = true; EntityState.Destroy((Object)(object)self.rightHandChargeEffect); } if (((EntityState)self).fixedAge >= self.duration && ((EntityState)self).isAuthority) { ((EntityState)self).outer.SetNextStateToMain(); } } private void MissileArtifact_ChimeraSeekingBomb(orig_FireBomb orig, SeekingBomb self) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_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_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: 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_0178: Unknown result type (might be due to invalid IL or missing references) //IL_017f: 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_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: 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_0078: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self); return; } Util.PlaySound(SeekingBomb.fireBombSoundString, ((EntityState)self).gameObject); Ray aimRay = ((BaseState)self).GetAimRay(); Transform modelTransform = ((EntityState)self).GetModelTransform(); if (Object.op_Implicit((Object)(object)modelTransform)) { ChildLocator component = ((Component)modelTransform).GetComponent<ChildLocator>(); if (Object.op_Implicit((Object)(object)component)) { ((Ray)(ref aimRay)).origin = ((Component)component.FindChild(SeekingBomb.muzzleName)).transform.position; } } if (((EntityState)self).isAuthority) { Vector3 val = Vector3.Cross(Vector3.up, ((Ray)(ref aimRay)).direction); Vector3 val2 = Vector3.Cross(((Ray)(ref aimRay)).direction, val); FireProjectileInfo val3 = default(FireProjectileInfo); val3.projectilePrefab = SeekingBomb.projectilePrefab; val3.position = ((Ray)(ref aimRay)).origin; val3.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); val3.owner = ((EntityState)self).gameObject; val3.damage = ((BaseState)self).damageStat * SeekingBomb.bombDamageCoefficient; val3.force = SeekingBomb.bombForce; val3.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); ProjectileManager.instance.FireProjectile(val3); FireProjectileInfo val4 = val3; FireProjectileInfo val5 = val3; val4.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(45f, val2) * ((Ray)(ref aimRay)).direction); val5.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-45f, val2) * ((Ray)(ref aimRay)).direction); ProjectileManager.instance.FireProjectile(val4); ProjectileManager.instance.FireProjectile(val5); } Util.PlaySound(SeekingBomb.spinDownSoundString, ((EntityState)self).gameObject); ((EntityState)self).PlayCrossfade("Gesture", "BombStop", 0.2f); } private void MissileArtifact_VagrantTrackingBomb(orig_FireBomb orig, FireTrackingBomb self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = FireTrackingBomb.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * FireTrackingBomb.bombDamageCoefficient; fireProjectileInfo.force = FireTrackingBomb.bombForce; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 45f); } } private void MissileArtifact_TitanRock(orig_Fire orig, TitanRockController self) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: 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_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_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_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01b8: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self); } else if (NetworkServer.active && Object.op_Implicit((Object)(object)self.ownerInputBank)) { Vector3 position = self.fireTransform.position; Vector3 val = self.ownerInputBank.aimDirection; RaycastHit val2 = default(RaycastHit); if (Util.CharacterRaycast(self.owner, new Ray(self.ownerInputBank.aimOrigin, self.ownerInputBank.aimDirection), ref val2, float.PositiveInfinity, LayerMask.op_Implicit(LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask)), (QueryTriggerInteraction)0)) { val = ((RaycastHit)(ref val2)).point - position; } float num = (Object.op_Implicit((Object)(object)self.ownerCharacterBody) ? self.ownerCharacterBody.damage : 1f); ProjectileManager.instance.FireProjectile(self.projectilePrefab, position, Util.QuaternionSafeLookRotation(val), self.owner, self.damageCoefficient * num, self.damageForce, self.isCrit, (DamageColorIndex)0, (GameObject)null, -1f); Vector3 val3 = Vector3.Cross(Vector3.up, val); Vector3 val4 = Vector3.Cross(val, val3); FireProjectileInfo val5 = default(FireProjectileInfo); val5.projectilePrefab = self.projectilePrefab; val5.position = position; val5.rotation = Util.QuaternionSafeLookRotation(val); val5.owner = ((Component)self).gameObject; val5.damage = self.damageCoefficient * num; val5.force = self.damageForce; val5.crit = self.isCrit; ProjectileManager.instance.FireProjectile(val5); FireProjectileInfo val6 = val5; FireProjectileInfo val7 = val5; val6.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(20f, val4) * val); val7.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-20f, val4) * val); ProjectileManager.instance.FireProjectile(val6); ProjectileManager.instance.FireProjectile(val7); } } private void MissileArtifact_LemurianFireball(orig_OnEnter orig, FireFireball self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = FireFireball.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * FireFireball.damageCoefficient; fireProjectileInfo.force = FireFireball.force; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_FireMeatballs(orig_FireMeatballs orig, WormBodyPositions2 self, Vector3 impactNormal, Vector3 impactPosition, Vector3 forward, int meatballCount, float meatballAngle, float meatballForce) { //IL_001e: 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) //IL_0021: Unknown result type (might be due to invalid IL or missing references) if (RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { meatballCount *= 3; } orig.Invoke(self, impactNormal, impactPosition, forward, meatballCount, meatballAngle, meatballForce); } private void MissileArtifact_ReliquaryFlares(orig_FixedUpdate orig, FireSolarFlares self) { //IL_006d: 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_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_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: 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_0120: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0129: 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_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_0163: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_017d: 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_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0192: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self); } else if (NetworkServer.active) { float num = self.duration / (float)self.projectileCount; if (((EntityState)self).fixedAge >= (float)self.projectilesFired * num) { self.projectilesFired++; FireProjectileInfo val = default(FireProjectileInfo); val.owner = ((EntityState)self).gameObject; val.position = ((EntityState)self).transform.position + self.currentRotation * Vector3.forward * FireSolarFlares.radius; val.rotation = self.currentRotation; val.projectilePrefab = FireSolarFlares.projectilePrefab; ((FireProjectileInfo)(ref val)).fuseOverride = FireSolarFlares.projectileFuse; val.useFuseOverride = true; ((FireProjectileInfo)(ref val)).speedOverride = FireSolarFlares.projectileSpeed; val.useSpeedOverride = true; val.damage = ((BaseState)self).damageStat * FireSolarFlares.projectileDamageCoefficient; val.force = FireSolarFlares.projectileForce; ProjectileManager.instance.FireProjectile(val); Vector3 up = Vector3.up; FireProjectileInfo val2 = val; val2.rotation = Quaternion.AngleAxis(45f, up) * self.currentRotation; ProjectileManager.instance.FireProjectile(val2); FireProjectileInfo val3 = val; val3.rotation = Quaternion.AngleAxis(-45f, up) * self.currentRotation; ProjectileManager.instance.FireProjectile(val3); self.currentRotation *= self.deltaRotation; } if (((EntityState)self).fixedAge >= self.duration) { ((EntityState)self).outer.SetNextStateToMain(); } } } private void MissileArtifact_CaptainTazer(orig_Fire orig, FireTazer self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = FireTazer.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref aimRay)).direction); fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * FireTazer.damageCoefficient; fireProjectileInfo.force = FireTazer.force; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_ViendSecondary(orig_FireProjectiles orig, FireMegaBlasterBase self) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) orig.Invoke(self); if (((EntityState)self).isAuthority) { Ray aimRay = ((BaseState)self).GetAimRay(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, self.spread, 1f, 1f, 0f, 0f); FireProjectileInfo fireProjectileInfo = default(FireProjectileInfo); fireProjectileInfo.projectilePrefab = self.projectilePrefab; fireProjectileInfo.position = ((Ray)(ref aimRay)).origin; fireProjectileInfo.owner = ((EntityState)self).gameObject; fireProjectileInfo.damage = ((BaseState)self).damageStat * self.damageCoefficient; fireProjectileInfo.force = self.force; fireProjectileInfo.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); FireWarfareProjectiles(aimRay, fireProjectileInfo, 20f); } } private void MissileArtifact_ViendCorruptSecondary(orig_OnEnter orig, FireCorruptDisks self) { if (RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { self.projectileCount = 3; self.yawPerProjectile = 20f; } orig.Invoke(self); } private void MissileArtifact_MushrumSporeGrenade(orig_FireGrenade orig, SporeGrenade self, string targetMuzzle) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Expected O, but got Unknown //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_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_005a: 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_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0125: 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_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_021b: Unknown result type (might be due to invalid IL or missing references) //IL_0225: Unknown result type (might be due to invalid IL or missing references) //IL_022a: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02b6: 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_015d: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_016f: 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_018b: Unknown result type (might be due to invalid IL or missing references) //IL_018f: 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_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02dd: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_02f3: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_02fe: Unknown result type (might be due to invalid IL or missing references) //IL_0305: Unknown result type (might be due to invalid IL or missing references) //IL_030a: Unknown result type (might be due to invalid IL or missing references) //IL_0314: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0328: Unknown result type (might be due to invalid IL or missing references) //IL_0332: Unknown result type (might be due to invalid IL or missing references) //IL_033a: Unknown result type (might be due to invalid IL or missing references) //IL_033c: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0347: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0367: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_037b: 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_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) if (!RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact)) { orig.Invoke(self, targetMuzzle); return; } Ray aimRay = ((BaseState)self).GetAimRay(); Ray val = default(Ray); ((Ray)(ref val))..ctor(((Ray)(ref aimRay)).origin, Vector3.up); Transform val2 = ((BaseState)self).FindModelChild(targetMuzzle); if (Object.op_Implicit((Object)(object)val2)) { ((Ray)(ref val)).origin = val2.position; } BullseyeSearch val3 = new BullseyeSearch(); val3.searchOrigin = ((Ray)(ref aimRay)).origin; val3.searchDirection = ((Ray)(ref aimRay)).direction; val3.filterByLoS = false; val3.teamMaskFilter = TeamMask.allButNeutral; if (Object.op_Implicit((Object)(object)((EntityState)self).teamComponent)) { ((TeamMask)(ref val3.teamMaskFilter)).RemoveTeam(((EntityState)self).teamComponent.teamIndex); } val3.sortMode = (SortMode)2; val3.RefreshCandidates(); HurtBox val4 = val3.GetResults().FirstOrDefault(); bool flag = false; Vector3 val5 = Vector3.zero; RaycastHit val6 = default(RaycastHit); if (Object.op_Implicit((Object)(object)val4)) { val5 = ((Component)val4).transform.position; flag = true; } else if (Physics.Raycast(aimRay, ref val6, 1000f, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask) | LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.entityPrecise)).mask), (QueryTriggerInteraction)1)) { val5 = ((RaycastHit)(ref val6)).point; flag = true; } float speedOverride = SporeGrenade.projectileVelocity; if (flag) { Vector3 val7 = val5 - ((Ray)(ref val)).origin; Vector2 val8 = default(Vector2); ((Vector2)(ref val8))..ctor(val7.x, val7.z); float num = ((Vector2)(ref val8)).magnitude; Vector2 val9 = val8 / num; if (num < SporeGrenade.minimumDistance) { num = SporeGrenade.minimumDistance; } if (num > SporeGrenade.maximumDistance) { num = SporeGrenade.maximumDistance; } float num2 = Trajectory.CalculateInitialYSpeed(SporeGrenade.timeToTarget, val7.y); float num3 = num / SporeGrenade.timeToTarget; Vector3 direction = default(Vector3); ((Vector3)(ref direction))..ctor(val9.x * num3, num2, val9.y * num3); speedOverride = ((Vector3)(ref direction)).magnitude; ((Ray)(ref val)).direction = direction; } Quaternion rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction + Random.insideUnitSphere * 0.05f); FireProjectileInfo val10 = default(FireProjectileInfo); val10.projectilePrefab = SporeGrenade.projectilePrefab; val10.position = ((Ray)(ref val)).origin; val10.rotation = rotation; val10.owner = ((EntityState)self).gameObject; val10.damage = ((BaseState)self).damageStat * SporeGrenade.damageCoefficient; val10.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); val10.force = 0f; ((FireProjectileInfo)(ref val10)).speedOverride = speedOverride; FireProjectileInfo val11 = val10; ProjectileManager.instance.FireProjectile(val11); Vector3 val12 = (Object.op_Implicit((Object)(object)((EntityState)self).inputBank) ? ((EntityState)self).inputBank.aimDirection : ((EntityState)self).characterBody.transform.position); FireProjectileInfo val13 = val11; val13.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(45f, val12) * (((Ray)(ref val)).direction + Random.insideUnitSphere * 0.05f)); ProjectileManager.instance.FireProjectile(val13); FireProjectileInfo val14 = val11; val14.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-45f, val12) * (((Ray)(ref val)).direction + Random.insideUnitSphere * 0.05f)); ProjectileManager.instance.FireProjectile(val14); } private void MissileArtifact_FireProjectile(orig_FireProjectile orig, GenericProjectileBaseState self) { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: 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_00a0: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_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_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0153: 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_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_0176: Unknown result type (might be due to invalid IL or missing references) //IL_0180: 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_018a: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_0195: 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_01a1: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01ab: Unknown result type (might be due to invalid IL or missing references) //IL_01b5: Unknown result type (might be due to invalid IL or missing references) if (RunArtifactManager.instance.IsArtifactEnabled(MissileArtifact) && ((EntityState)self).isAuthority && (self is FireConstructBeam || self is Spit || self is Fire || self is FireFMJ || self is FireGrenadeLauncher)) { Ray val = ((BaseState)self).GetAimRay(); val = self.ModifyProjectileAimRay(val); ((Ray)(ref val)).direction = Util.ApplySpread(((Ray)(ref val)).direction, self.minSpread, self.maxSpread, 1f, 1f, 0f, self.projectilePitchBonus); FireProjectileInfo val2 = default(FireProjectileInfo); val2.projectilePrefab = self.projectilePrefab; val2.position = ((Ray)(ref val)).origin; val2.rotation = Util.QuaternionSafeLookRotation(((Ray)(ref val)).direction); val2.owner = ((EntityState)self).gameObject; val2.damage = ((BaseState)self).damageStat * self.damageCoefficient; val2.crit = Util.CheckRoll(((BaseState)self).critStat, ((EntityState)self).characterBody.master); val2.force = self.force; FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); Vector3 val4 = Vector3.Cross(Vector3.up, ((Ray)(ref val)).direction); Vector3 val5 = Vector3.Cross(((Ray)(ref val)).direction, val4); FireProjectileInfo val6 = val3; val6.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(20f, val5) * ((Ray)(ref val)).direction); ProjectileManager.instance.FireProjectile(val6); FireProjectileInfo val7 = val3; val7.rotation = Util.QuaternionSafeLookRotation(Quaternion.AngleAxis(-20f, val5) * ((Ray)(ref val)).direction); ProjectileManager.instance.FireProjectile(val7); } else { orig.Invoke(self); } } internal static bool isLoaded(string modguid) { foreach (KeyValuePair<string, PluginInfo> pluginInfo in Chainloader.PluginInfos) { string key = pluginInfo.Key; PluginInfo value = pluginInfo.Value; if (key == modguid) { return true; } } return false; } public static string GetAssetBundlePath(string bundleName) { return Path.Combine(Path.GetDirectoryName(PInfo.Location), bundleName); } public void Awake() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Expected O, but got Unknown PInfo = ((BaseUnityPlugin)this).Info; CustomConfigFile = new ConfigFile(Paths.ConfigPath + "\\IAmBecomeMissiles.cfg", true); ShouldReworkIcbm = CustomConfigFile.Bind<bool>("IAmBecomeMissiles: Reworks", "Pocket ICBM (incl. Artifact of Warfare)", true, "Set to TRUE to rework Pocket ICBM and turn its vanilla effect into an artifact."); ShouldReworkAtg = CustomConfigFile.Bind<bool>("IAmBecomeMissiles: Reworks", "AtG Missile Mk.3", true, "Set to TRUE to rework AtG Missile Mk.1."); ShouldReworkShrimp = CustomConfigFile.Bind<bool>("IAmBecomeMissiles: Reworks", "Plasma Shrimp", true, "Set to TRUE to rework Plasma Shrimp."); ShouldReworkDml = CustomConfigFile.Bind<bool>("IAmBecomeMissiles: Reworks", "Disposable Missile Launcher", true, "Set to TRUE to rework Disposable Missile Launcher."); ShouldReworkEnemyMissileTargeting = CustomConfigFile.Bind<bool>("IAmBecomeMissiles: Reworks", "Missile Tracking", true, "Set to TRUE to rework missile tracking on enemies."); if (ShouldReworkIcbm.Value) { CreateArtifact(); ReworkIcbm(); } if (ShouldReworkAtg.Value) { ReworkAtg(); } if (ShouldReworkShrimp.Value) { ReworkPrimp(); } if (ShouldReworkEnemyMissileTargeting.Value) { MissileController.FixedUpdate += new hook_FixedUpdate(MissileController_FixedUpdate); MissileController.FindTarget += new hook_FindTarget(MissileController_FindTarget); } } private void MissileController_FixedUpdate(orig_FixedUpdate orig, MissileController self) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Invalid comparison between Unknown and I4 if ((Object)(object)sel