Decompiled source of EnemiesReturns v0.3.8
plugins/Risky_Sleeps-EnemiesReturns/EnemiesReturns.dll
Decompiled a week ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using AdvancedPrediction.Prediction; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using EnemiesReturns.Behaviors; using EnemiesReturns.Components; using EnemiesReturns.Components.BodyComponents; using EnemiesReturns.Components.BodyComponents.CharacterMotor; using EnemiesReturns.Components.BodyComponents.NetworkedEntityStateMachine; using EnemiesReturns.Components.BodyComponents.Skills; using EnemiesReturns.Components.GeneralComponents; using EnemiesReturns.Components.MasterComponents; using EnemiesReturns.Components.ModelComponents; using EnemiesReturns.Components.ModelComponents.Hitboxes; using EnemiesReturns.Components.ModelComponents.Hurtboxes; using EnemiesReturns.Components.ModelComponents.Skins; using EnemiesReturns.Configuration; using EnemiesReturns.EditorHelpers; using EnemiesReturns.Enemies.Colossus; using EnemiesReturns.Enemies.Ifrit; using EnemiesReturns.Enemies.Ifrit.Pillar; using EnemiesReturns.Enemies.MechanicalSpider; using EnemiesReturns.Enemies.Spitter; using EnemiesReturns.Helpers; using EnemiesReturns.Items.ColossalKnurl; using EnemiesReturns.Items.SpawnPillarOnChampionKill; using EnemiesReturns.Junk.ModdedEntityStates.Colossus.HeadLaser; using EnemiesReturns.Junk.ModdedEntityStates.Ifrit; using EnemiesReturns.Junk.ModdedEntityStates.Spitter; using EnemiesReturns.ModCompats; using EnemiesReturns.ModCompats.PrefabAPICompat; using EnemiesReturns.ModdedEntityStates; using EnemiesReturns.ModdedEntityStates.Colossus; using EnemiesReturns.ModdedEntityStates.Colossus.Death; using EnemiesReturns.ModdedEntityStates.Colossus.HeadLaserBarrage; using EnemiesReturns.ModdedEntityStates.Colossus.RockClap; using EnemiesReturns.ModdedEntityStates.Colossus.Stomp; using EnemiesReturns.ModdedEntityStates.Ifrit; using EnemiesReturns.ModdedEntityStates.Ifrit.FlameCharge; using EnemiesReturns.ModdedEntityStates.Ifrit.Hellzone; using EnemiesReturns.ModdedEntityStates.Ifrit.Pillar; using EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Enemy; using EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Player; using EnemiesReturns.ModdedEntityStates.LynxTribe.Storm; using EnemiesReturns.ModdedEntityStates.MechanicalSpider; using EnemiesReturns.ModdedEntityStates.MechanicalSpider.Dash; using EnemiesReturns.ModdedEntityStates.MechanicalSpider.Death; using EnemiesReturns.ModdedEntityStates.MechanicalSpider.DoubleShot; using EnemiesReturns.ModdedEntityStates.Spitter; using EnemiesReturns.PrefabSetupComponents.BodyComponents; using EnemiesReturns.PrefabSetupComponents.MasterComponents; using EnemiesReturns.PrefabSetupComponents.ModelComponents; using EnemiesReturns.Projectiles; using EntityStates; using EntityStates.AI.Walker; using EntityStates.MeridianEvent; using EntityStates.Missions.BrotherEncounter; using EntityStates.TitanMonster; using Grumpy; using HG; using HG.Reflection; using KinematicCharacterController; using On.EntityStates.MeridianEvent; using On.EntityStates.Missions.BrotherEncounter; using On.RoR2; using R2API; using Rewired.Utils; using Rewired.Utils.Classes.Utility; using Risky_Artifacts.Artifacts; using RoR2; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.EntityLogic; using RoR2.Hologram; using RoR2.Mecanim; using RoR2.Navigation; using RoR2.Networking; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using ThreeEyedGames; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.Rendering.PostProcessing; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("EnemiesReturns")] [assembly: AssemblyTitle("EnemiesReturns")] [assembly: AssemblyCompany("EnemiesReturns")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace EnemiesReturns { public class ContentProvider : IContentPackProvider { [StructLayout(LayoutKind.Sequential, Size = 1)] public struct MonsterCategories { public const string Champions = "Champions"; public const string Minibosses = "Minibosses"; public const string BasicMonsters = "Basic Monsters"; public const string Special = "Special"; } private readonly ContentPack _contentPack = new ContentPack(); public const string AssetBundleName = "EnemiesReturns"; public const string AssetBundleFolder = "AssetBundles"; public const string SoundbankFolder = "Soundbanks"; public const string SoundsSoundBankFileName = "EnemiesReturnsSounds"; private readonly List<GameObject> bodyList = new List<GameObject>(); private readonly List<GameObject> masterList = new List<GameObject>(); private readonly List<Type> stateList = new List<Type>(); private readonly List<SkillFamily> sfList = new List<SkillFamily>(); private readonly List<SkillDef> sdList = new List<SkillDef>(); private readonly List<EffectDef> effectsList = new List<EffectDef>(); private readonly List<GameObject> projectilesList = new List<GameObject>(); private readonly List<UnlockableDef> unlockablesList = new List<UnlockableDef>(); private readonly List<ItemDef> itemList = new List<ItemDef>(); private readonly List<NetworkSoundEventDef> nseList = new List<NetworkSoundEventDef>(); private readonly List<GameObject> nopList = new List<GameObject>(); public static readonly Dictionary<string, string> ShaderLookup = new Dictionary<string, string> { { "stubbedror2/base/shaders/hgstandard", "RoR2/Base/Shaders/HGStandard.shader" }, { "stubbedror2/base/shaders/hgsnowtopped", "RoR2/Base/Shaders/HGSnowTopped.shader" }, { "stubbedror2/base/shaders/hgtriplanarterrainblend", "RoR2/Base/Shaders/HGTriplanarTerrainBlend.shader" }, { "stubbedror2/base/shaders/hgintersectioncloudremap", "RoR2/Base/Shaders/HGIntersectionCloudRemap.shader" }, { "stubbedror2/base/shaders/hgcloudremap", "RoR2/Base/Shaders/HGCloudRemap.shader" }, { "stubbedror2/base/shaders/hgopaquecloudremap", "RoR2/Base/Shaders/HGOpaqueCloudRemap.shader" }, { "stubbedror2/base/shaders/hgdistortion", "RoR2/Base/Shaders/HGDistortion.shader" }, { "stubbedcalm water/calmwater - dx11 - doublesided", "Calm Water/CalmWater - DX11 - DoubleSided.shader" }, { "stubbedcalm water/calmwater - dx11", "Calm Water/CalmWater - DX11.shader" }, { "stubbednature/speedtree", "RoR2/Base/Shaders/SpeedTreeCustom.shader" }, { "stubbeddecalicious/decaliciousdeferreddecal", "Decalicious/DecaliciousDeferredDecal.shader" } }; public static Dictionary<string, Material> MaterialCache = new Dictionary<string, Material>(); public static ItemRelationshipProvider ModdedContagiousItemProvider; public static ItemDef VoidMegaCrabItem = Addressables.LoadAssetAsync<ItemDef>((object)"RoR2/DLC1/VoidMegaCrabItem.asset").WaitForCompletion(); public string identifier => "com.Viliger.EnemiesReturns.ContentProvider"; public IEnumerator FinalizeAsync(FinalizeAsyncArgs args) { args.ReportProgress(1f); yield break; } public IEnumerator GenerateContentPackAsync(GetContentPackAsyncArgs args) { ContentPack.Copy(_contentPack, args.output); args.ReportProgress(1f); yield break; } public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { Stopwatch totalStopwatch = new Stopwatch(); ((StopwatchBase)totalStopwatch).Start(); _contentPack.identifier = identifier; ModdedContagiousItemProvider = ScriptableObject.CreateInstance<ItemRelationshipProvider>(); ((Object)ModdedContagiousItemProvider).name = "EnemiesReturnsContagiousItemProvider"; ModdedContagiousItemProvider.relationshipType = Addressables.LoadAssetAsync<ItemRelationshipType>((object)"RoR2/DLC1/Common/ContagiousItem.asset").WaitForCompletion(); ModdedContagiousItemProvider.relationships = Array.Empty<Pair>(); Stopwatch val = new Stopwatch(); ((StopwatchBase)val).Start(); string soundbanksFolderPath = Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "Soundbanks"); LoadSoundBanks(soundbanksFolderPath); ((StopwatchBase)val).Stop(); Log.Info("Soundbanks loaded in " + ((StopwatchBase)val).elapsedSeconds); string path = Path.Combine(Path.GetDirectoryName(typeof(ContentProvider).Assembly.Location), "AssetBundles"); AssetBundle assetbundle = null; yield return LoadAssetBundle(Path.Combine(path, "EnemiesReturns"), args.progressReceiver, delegate(AssetBundle resultAssetBundle) { assetbundle = resultAssetBundle; }); yield return LoadAllAssetsAsync<Material>(assetbundle, args.progressReceiver, (Action<Material[]>)delegate(Material[] assets) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown //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) Stopwatch val4 = new Stopwatch(); ((StopwatchBase)val4).Start(); if (assets != null) { Material[] array = assets; foreach (Material val5 in array) { Shader val6 = Addressables.LoadAssetAsync<Shader>((object)ShaderLookup[((Object)val5.shader).name.ToLower()]).WaitForCompletion(); if (Object.op_Implicit((Object)(object)val6)) { val5.shader = val6; } else { Log.Info("Couldn't find replacement shader for " + ((Object)val5.shader).name.ToLower()); } MaterialCache.Add(((Object)val5).name, val5); } } ((StopwatchBase)val4).Stop(); Log.Info("Materials swapped in " + ((StopwatchBase)val4).elapsedSeconds); }); Dictionary<string, Sprite> iconLookup = new Dictionary<string, Sprite>(); Texture2D texLavaCrackRound = null; yield return LoadAllAssetsAsync<Texture2D>(assetbundle, args.progressReceiver, (Action<Texture2D[]>)delegate(Texture2D[] textures) { texLavaCrackRound = textures.First((Texture2D texture) => ((Object)texture).name == "texLavaCrackRound"); }); yield return LoadAllAssetsAsync<Sprite>(assetbundle, args.progressReceiver, (Action<Sprite[]>)delegate(Sprite[] assets) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown Stopwatch val3 = new Stopwatch(); ((StopwatchBase)val3).Start(); iconLookup = assets.ToDictionary((Sprite item) => ((Object)item).name, (Sprite item) => item); ((StopwatchBase)val3).Stop(); Log.Info("Icons loaded in " + ((StopwatchBase)val3).elapsedSeconds); }); Dictionary<string, AnimationCurveDef> acdLookup = new Dictionary<string, AnimationCurveDef>(); yield return LoadAllAssetsAsync<AnimationCurveDef>(assetbundle, args.progressReceiver, (Action<AnimationCurveDef[]>)delegate(AnimationCurveDef[] assets) { acdLookup = assets.ToDictionary((AnimationCurveDef item) => ((Object)item).name); }); yield return LoadAllAssetsAsync<GameObject>(assetbundle, args.progressReceiver, (Action<GameObject[]>)delegate(GameObject[] assets) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown Stopwatch val2 = new Stopwatch(); ((StopwatchBase)val2).Start(); stateList.Add(typeof(BasePlayerEmoteState)); CreateSpitter(assets, iconLookup); CreateColossus(assets, iconLookup, acdLookup); CreateIfrit(assets, iconLookup, texLavaCrackRound, acdLookup); CreateMechanicalSpider(assets, iconLookup, acdLookup); ((StopwatchBase)val2).Stop(); Log.Info("Characters created in " + ((StopwatchBase)val2).elapsedSeconds); }); _contentPack.bodyPrefabs.Add(bodyList.ToArray()); _contentPack.masterPrefabs.Add(masterList.ToArray()); _contentPack.skillDefs.Add(sdList.ToArray()); _contentPack.skillFamilies.Add(sfList.ToArray()); _contentPack.entityStateTypes.Add(stateList.ToArray()); _contentPack.effectDefs.Add(effectsList.ToArray()); _contentPack.projectilePrefabs.Add(projectilesList.ToArray()); _contentPack.unlockableDefs.Add(unlockablesList.ToArray()); _contentPack.itemDefs.Add(itemList.ToArray()); _contentPack.networkSoundEventDefs.Add(nseList.ToArray()); _contentPack.networkedObjectPrefabs.Add(nopList.ToArray()); _contentPack.itemRelationshipProviders.Add((ItemRelationshipProvider[])(object)new ItemRelationshipProvider[1] { ModdedContagiousItemProvider }); ((StopwatchBase)totalStopwatch).Stop(); Log.Info("Total loading time: " + ((StopwatchBase)totalStopwatch).elapsedSeconds); } private void CreateIfrit(GameObject[] assets, Dictionary<string, Sprite> iconLookup, Texture2D texLavaCrackRound, Dictionary<string, AnimationCurveDef> acdLookup) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Expected O, but got Unknown //IL_0364: Unknown result type (might be due to invalid IL or missing references) //IL_0369: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_0384: Unknown result type (might be due to invalid IL or missing references) //IL_0386: Unknown result type (might be due to invalid IL or missing references) //IL_038b: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Expected O, but got Unknown //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03b3: Unknown result type (might be due to invalid IL or missing references) //IL_03ba: Expected O, but got Unknown CreateIfritPillar(assets, iconLookup, acdLookup); ExplicitPickupDropTable droptable = CreateIfritItem(assets, iconLookup); if (Ifrit.Enabled.Value) { IfritStuff ifritStuff = new IfritStuff(); SummonPylon.screamPrefab = ifritStuff.CreateBreathParticle(); effectsList.Add(new EffectDef(SummonPylon.screamPrefab)); NetworkSoundEventDef val = Utils.CreateNetworkSoundDef("ER_Ifrit_Hellzone_Rock_Play"); nseList.Add(val); GameObject gameObject = assets.First((GameObject effect) => ((Object)effect).name == "IfritSpawnPortal"); EnemiesReturns.ModdedEntityStates.Ifrit.SpawnState.spawnEffect = ifritStuff.CreateSpawnEffect(gameObject, acdLookup["acdPortalPP"]); effectsList.Add(new EffectDef(EnemiesReturns.ModdedEntityStates.Ifrit.SpawnState.spawnEffect)); GameObject gameObject2 = assets.First((GameObject projectile) => ((Object)projectile).name == "IfritHellzonePillarProjectile"); GameObject ghostPrefab = assets.First((GameObject projectile) => ((Object)projectile).name == "IfritHellzonePillarProjectileGhost"); GameObject volcanoEffectPrefab = assets.First((GameObject projectile) => ((Object)projectile).name == "IfritHellzoneVolcanoEffect"); GameObject val2 = ifritStuff.CreateHellzonePillarProjectile(gameObject2, ghostPrefab); GameObject val3 = ifritStuff.CreateHellfireDotZoneProjectile(val2, volcanoEffectPrefab, texLavaCrackRound, val); GameObject val4 = ifritStuff.CreateHellzoneProjectile(); GameObject val5 = ifritStuff.CreateHellzonePredictionProjectile(val3, texLavaCrackRound); projectilesList.Add(val3); projectilesList.Add(val4); projectilesList.Add(val2); projectilesList.Add(val5); FlameCharge.flamethrowerEffectPrefab = ifritStuff.CreateFlameBreath(); FireHellzoneFire.projectilePrefab = val4; FireHellzoneFire.dotZoneProjectile = val5; IfritBody ifritBody = new IfritBody(); IfritBody.Skills.Hellzone = ifritBody.CreateHellzoneSkill(); IfritBody.SkillFamilies.Secondary = Utils.CreateSkillFamily("IfritSecondaryFamily", IfritBody.Skills.Hellzone); IfritBody.Skills.SummonPylon = ifritBody.CreateSummonPylonSkill(); IfritBody.SkillFamilies.Special = Utils.CreateSkillFamily("IfritSpecialFamily", IfritBody.Skills.SummonPylon); IfritBody.Skills.FlameCharge = ifritBody.CreateFlameChargeSkill(); IfritBody.SkillFamilies.Utility = Utils.CreateSkillFamily("IfritUtilityFamily", IfritBody.Skills.FlameCharge); IfritBody.Skills.Smash = ifritBody.CreateSmashSkill(); IfritBody.SkillFamilies.Primary = Utils.CreateSkillFamily("IfritPrimaryFamily", IfritBody.Skills.Smash); UnlockableDef val6 = Utils.CreateUnlockableDef("Logs.IfritBody.0", "ENEMIES_RETURNS_UNLOCKABLE_LOG_IFRIT"); unlockablesList.Add(val6); IfritBody.BodyPrefab = ifritBody.AddBodyComponents(assets.First((GameObject body) => ((Object)body).name == "IfritBody"), iconLookup["texIconIfritBody"], val6, droptable); bodyList.Add(IfritBody.BodyPrefab); assets.First((GameObject mane) => ((Object)mane).name == "IfritManeFireParticle").GetComponent<Renderer>().material = GetOrCreateMaterial("matIfritManeFire", ifritBody.CreateManeFiresMaterial); IfritMaster.MasterPrefab = new IfritMaster().AddMasterComponents(assets.First((GameObject master) => ((Object)master).name == "IfritMaster"), IfritBody.BodyPrefab); masterList.Add(IfritMaster.MasterPrefab); IfritBody.SpawnCards.cscIfritDefault = ifritBody.CreateCard("cscIfritDefault", IfritMaster.MasterPrefab, IfritBody.SkinDefs.Default, IfritBody.BodyPrefab); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)IfritBody.SpawnCards.cscIfritDefault, selectionWeight = Ifrit.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Ifrit.MinimumStageCompletion.Value }; DirectorCardHolder directorCard = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToStage(Ifrit.DefaultStageList.Value, directorCard); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.SpawnState)); stateList.Add(typeof(DeathState)); stateList.Add(typeof(SummonPylon)); stateList.Add(typeof(FireHellzoneStart)); stateList.Add(typeof(FireHellzoneFire)); stateList.Add(typeof(FireHellzoneEnd)); stateList.Add(typeof(FlameChargeBegin)); stateList.Add(typeof(FlameCharge)); stateList.Add(typeof(FlameChargeEnd)); stateList.Add(typeof(Smash)); if (Ifrit.AddToArtifactOfOrigin.Value && RiskyArtifafactsCompat.enabled) { RiskyArtifafactsCompat.AddMonsterToArtifactOfOrigin((SpawnCard)(object)IfritBody.SpawnCards.cscIfritDefault, 2); } } } private ExplicitPickupDropTable CreateIfritItem(GameObject[] assets, Dictionary<string, Sprite> iconLookup) { //IL_0083: 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_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) ExplicitPickupDropTable val = null; if (Ifrit.ItemEnabled.Value) { SpawnPillarOnChampionKillFactory.ItemDef = new SpawnPillarOnChampionKillFactory().CreateItem(assets.First((GameObject item) => ((Object)item).name == "IfritItem"), iconLookup["texIconIfritItem"]); itemList.Add(SpawnPillarOnChampionKillFactory.ItemDef); val = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); ((Object)val).name = "epdtIfrit"; ((PickupDropTable)val).canDropBeReplaced = true; val.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupWeight = 1f, pickupDef = (Object)(object)SpawnPillarOnChampionKillFactory.ItemDef } }; ref Pair[] relationships = ref ModdedContagiousItemProvider.relationships; Pair val2 = new Pair { itemDef1 = SpawnPillarOnChampionKillFactory.ItemDef, itemDef2 = VoidMegaCrabItem }; ArrayUtils.ArrayAppend<Pair>(ref relationships, ref val2); } return val; } private void CreateIfritPillar(GameObject[] assets, Dictionary<string, Sprite> iconLookup, Dictionary<string, AnimationCurveDef> acdLookup) { //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Expected O, but got Unknown //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) if (Ifrit.ItemEnabled.Value || Ifrit.Enabled.Value) { PillarStuff pillarStuff = new PillarStuff(); EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.SpawnState.burrowPrefab = pillarStuff.CreateSpawnEffect(); effectsList.Add(new EffectDef(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.SpawnState.burrowPrefab)); BaseDeathState.fallEffect = pillarStuff.CreateDeathFallEffect(); effectsList.Add(new EffectDef(BaseDeathState.fallEffect)); KilledDeathState.explosionPrefab = (BaseFireExplosion.explosionPrefab = pillarStuff.CreateExlosionEffectAlt()); effectsList.Add(new EffectDef(BaseFireExplosion.explosionPrefab)); GameObject val = assets.First((GameObject body) => ((Object)body).name == "IfritPylonBody"); GameObject val2 = assets.First((GameObject master) => ((Object)master).name == "IfritPylonMaster"); KilledDeathState.fireballYCurve = acdLookup["acdFireballFallCurve"].curve; PillarStuff.PillarExplosion = ProcTypeAPI.ReserveProcType(); PillarMaster pillarMaster = new PillarMaster(); if (Ifrit.Enabled.Value) { PillarEnemyBody pillarEnemyBody = new PillarEnemyBody(); PillarEnemyBody.BodyPrefab = pillarEnemyBody.AddBodyComponents(PrefabAPI.InstantiateClone(val, "IfritPylonEnemyBody", false), iconLookup["texIconPillarEnemy"], acdLookup); bodyList.Add(PillarEnemyBody.BodyPrefab); PillarMaster.EnemyMasterPrefab = pillarMaster.AddMasterComponents(PrefabAPI.InstantiateClone(val2, "IfritPylonEnemyMaster", false), PillarEnemyBody.BodyPrefab); masterList.Add(PillarMaster.EnemyMasterPrefab); PillarEnemyBody.SpawnCard = pillarEnemyBody.CreateCard("cscIfritEnemyPillar", PillarMaster.EnemyMasterPrefab); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Enemy.ChargingExplosion)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Enemy.FireExplosion)); stateList.Add(typeof(KilledDeathState)); } if (Ifrit.ItemEnabled.Value) { PillarAllyBody pillarAllyBody = new PillarAllyBody(); PillarAllyBody.BodyPrefab = pillarAllyBody.AddBodyComponents(PrefabAPI.InstantiateClone(val, "IfritPylonPlayerBody", false), iconLookup["texIconPillarAlly"], acdLookup); bodyList.Add(PillarAllyBody.BodyPrefab); PillarMaster.AllyMasterPrefab = pillarMaster.AddMasterComponents(PrefabAPI.InstantiateClone(val2, "IfritPylonPlayerMaster", false), PillarAllyBody.BodyPrefab); masterList.Add(PillarMaster.AllyMasterPrefab); PillarAllyBody.SpawnCard = pillarAllyBody.CreateCard("cscIfritPlayerPillar", PillarMaster.AllyMasterPrefab); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Player.ChargingExplosion)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.Player.FireExplosion)); } stateList.Add(typeof(SuicideDeathState)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Ifrit.Pillar.SpawnState)); } } private void CreateColossus(GameObject[] assets, Dictionary<string, Sprite> iconLookup, Dictionary<string, AnimationCurveDef> acdLookup) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_04e1: Unknown result type (might be due to invalid IL or missing references) //IL_04e6: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Unknown result type (might be due to invalid IL or missing references) //IL_0501: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Unknown result type (might be due to invalid IL or missing references) //IL_050f: Unknown result type (might be due to invalid IL or missing references) //IL_0521: Expected O, but got Unknown //IL_0521: Unknown result type (might be due to invalid IL or missing references) //IL_0526: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0530: Unknown result type (might be due to invalid IL or missing references) //IL_0537: Expected O, but got Unknown //IL_0543: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0587: Unknown result type (might be due to invalid IL or missing references) //IL_058c: Unknown result type (might be due to invalid IL or missing references) //IL_0597: Unknown result type (might be due to invalid IL or missing references) //IL_05a7: Unknown result type (might be due to invalid IL or missing references) //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05b5: Unknown result type (might be due to invalid IL or missing references) //IL_05c7: Expected O, but got Unknown //IL_05c7: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Unknown result type (might be due to invalid IL or missing references) //IL_05d6: Unknown result type (might be due to invalid IL or missing references) //IL_05dd: Expected O, but got Unknown //IL_060e: Unknown result type (might be due to invalid IL or missing references) //IL_0613: Unknown result type (might be due to invalid IL or missing references) //IL_061e: Unknown result type (might be due to invalid IL or missing references) //IL_062e: Unknown result type (might be due to invalid IL or missing references) //IL_0630: Unknown result type (might be due to invalid IL or missing references) //IL_0635: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_064e: Expected O, but got Unknown //IL_064e: Unknown result type (might be due to invalid IL or missing references) //IL_0653: Unknown result type (might be due to invalid IL or missing references) //IL_065b: Unknown result type (might be due to invalid IL or missing references) //IL_065d: Unknown result type (might be due to invalid IL or missing references) //IL_0664: Expected O, but got Unknown //IL_0670: Unknown result type (might be due to invalid IL or missing references) //IL_0675: Unknown result type (might be due to invalid IL or missing references) //IL_06b4: Unknown result type (might be due to invalid IL or missing references) //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c4: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06d6: Unknown result type (might be due to invalid IL or missing references) //IL_06db: Unknown result type (might be due to invalid IL or missing references) //IL_06e2: Unknown result type (might be due to invalid IL or missing references) //IL_06f4: Expected O, but got Unknown //IL_06f4: Unknown result type (might be due to invalid IL or missing references) //IL_06f9: Unknown result type (might be due to invalid IL or missing references) //IL_0701: Unknown result type (might be due to invalid IL or missing references) //IL_0703: Unknown result type (might be due to invalid IL or missing references) //IL_070a: Expected O, but got Unknown //IL_073b: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Unknown result type (might be due to invalid IL or missing references) //IL_074b: Unknown result type (might be due to invalid IL or missing references) //IL_075b: Unknown result type (might be due to invalid IL or missing references) //IL_075d: Unknown result type (might be due to invalid IL or missing references) //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_0769: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Expected O, but got Unknown //IL_077b: Unknown result type (might be due to invalid IL or missing references) //IL_0780: Unknown result type (might be due to invalid IL or missing references) //IL_0788: Unknown result type (might be due to invalid IL or missing references) //IL_078a: Unknown result type (might be due to invalid IL or missing references) //IL_0791: Expected O, but got Unknown //IL_079d: Unknown result type (might be due to invalid IL or missing references) //IL_07a2: Unknown result type (might be due to invalid IL or missing references) //IL_07e1: Unknown result type (might be due to invalid IL or missing references) //IL_07e6: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Unknown result type (might be due to invalid IL or missing references) //IL_0801: Unknown result type (might be due to invalid IL or missing references) //IL_0803: Unknown result type (might be due to invalid IL or missing references) //IL_0808: Unknown result type (might be due to invalid IL or missing references) //IL_080f: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Expected O, but got Unknown //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_082e: Unknown result type (might be due to invalid IL or missing references) //IL_0830: Unknown result type (might be due to invalid IL or missing references) //IL_0837: Expected O, but got Unknown //IL_0843: Unknown result type (might be due to invalid IL or missing references) //IL_0848: Unknown result type (might be due to invalid IL or missing references) ExplicitPickupDropTable droptable = CreateColossusItem(assets, iconLookup); if (Colossus.Enabled.Value) { ColossusStuff colossusStuff = new ColossusStuff(); GameObject val = (StompBase.stompEffectPrefab = colossusStuff.CreateStompEffect()); effectsList.Add(new EffectDef(val)); GameObject item = (StompBase.projectilePrefab = colossusStuff.CreateStompProjectile()); projectilesList.Add(item); GameObject val2 = colossusStuff.CreateDeathFallEffect(); effectsList.Add(new EffectDef(val2)); BaseDeath.fallEffect = val2; GameObject val3 = colossusStuff.CreateDeath2Effect(); effectsList.Add(new EffectDef(val3)); Death2.deathEffect = val3; RockClapEnd.clapEffect = colossusStuff.CreateClapEffect(); GameObject item2 = (RockClapEnd.projectilePrefab = colossusStuff.CreateFlyingRockProjectile(FloatingRocksController.flyingRockPrefab = colossusStuff.CreateFlyingRocksGhost())); projectilesList.Add(item2); GameObject item3 = (HeadLaserBarrageAttack.projectilePrefab = colossusStuff.CreateLaserBarrageProjectile()); projectilesList.Add(item3); GameObject val4 = (EnemiesReturns.ModdedEntityStates.Colossus.SpawnState.burrowPrefab = colossusStuff.CreateSpawnEffect()); effectsList.Add(new EffectDef(val4)); HeadLaserBarrageAttack.intencityGraph = acdLookup["LaserBarrageLightIntencity"].curve; UnlockableDef val5 = Utils.CreateUnlockableDef("Logs.ColossusBody.0", "ENEMIES_RETURNS_UNLOCKABLE_LOG_COLOSSUS"); unlockablesList.Add(val5); HeadLaserAttack.beamPrefab = colossusStuff.CreateLaserEffect(); ColossusBody colossusBody = new ColossusBody(); ColossusBody.Skills.Stomp = colossusBody.CreateStompSkill(); ColossusBody.Skills.StoneClap = colossusBody.CreateStoneClapSkill(); ColossusBody.Skills.LaserBarrage = colossusBody.CreateLaserBarrageSkill(); ColossusBody.Skills.HeadLaser = colossusBody.CreateHeadLaserSkill(); sdList.Add(ColossusBody.Skills.Stomp); sdList.Add(ColossusBody.Skills.StoneClap); sdList.Add(ColossusBody.Skills.LaserBarrage); sdList.Add(ColossusBody.Skills.HeadLaser); ColossusBody.SkillFamilies.Primary = Utils.CreateSkillFamily("ColossusPrimaryFamily", ColossusBody.Skills.Stomp); ColossusBody.SkillFamilies.Secondary = Utils.CreateSkillFamily("ColossusSecondaryFamily", ColossusBody.Skills.StoneClap); ColossusBody.SkillFamilies.Utility = Utils.CreateSkillFamily("ColossusUtilityFamily", ColossusBody.Skills.LaserBarrage); ColossusBody.SkillFamilies.Special = Utils.CreateSkillFamily("ColossusSpecialFamily", ColossusBody.Skills.HeadLaser); sfList.Add(ColossusBody.SkillFamilies.Primary); sfList.Add(ColossusBody.SkillFamilies.Secondary); sfList.Add(ColossusBody.SkillFamilies.Utility); sfList.Add(ColossusBody.SkillFamilies.Special); ColossusBody.BodyPrefab = colossusBody.AddBodyComponents(assets.First((GameObject body) => ((Object)body).name == "ColossusBody"), iconLookup["texColossusIcon"], val5, droptable); bodyList.Add(ColossusBody.BodyPrefab); ColossusMaster.MasterPrefab = new ColossusMaster().AddMasterComponents(assets.First((GameObject master) => ((Object)master).name == "ColossusMaster"), ColossusBody.BodyPrefab); masterList.Add(ColossusMaster.MasterPrefab); stateList.Add(typeof(ColossusMain)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Colossus.SpawnState)); stateList.Add(typeof(DancePlayer)); stateList.Add(typeof(InitialDeathState)); stateList.Add(typeof(BaseDeath)); stateList.Add(typeof(DeathFallBase)); stateList.Add(typeof(Death1)); stateList.Add(typeof(Death2)); stateList.Add(typeof(DeathBoner)); stateList.Add(typeof(RockClapEnd)); stateList.Add(typeof(RockClapStart)); stateList.Add(typeof(StompEnter)); stateList.Add(typeof(StompBase)); stateList.Add(typeof(StompL)); stateList.Add(typeof(StompR)); stateList.Add(typeof(HeadLaserBarrageStart)); stateList.Add(typeof(HeadLaserBarrageAttack)); stateList.Add(typeof(HeadLaserBarrageEnd)); stateList.Add(typeof(HeadLaserStart)); stateList.Add(typeof(HeadLaserAttack)); stateList.Add(typeof(HeadLaserEnd)); ColossusBody.SpawnCards.cscColossusDefault = colossusBody.CreateCard("cscColossusDefault", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.Default, ColossusBody.BodyPrefab); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusDefault, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToCardCategory(card, "Champions", (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGolemFamily.asset").WaitForCompletion()); Utils.AddMonsterToStage(Colossus.DefaultStageList.Value, directorCard); ColossusBody.SpawnCards.cscColossusSkyMeadow = colossusBody.CreateCard("cscColossusSkyMeadow", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.SkyMeadow, ColossusBody.BodyPrefab); DirectorCard card2 = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusSkyMeadow, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard2 = new DirectorCardHolder { Card = card2, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToStage(Colossus.SkyMeadowStageList.Value, directorCard2); ColossusBody.SpawnCards.cscColossusGrassy = colossusBody.CreateCard("cscColossusGrassy", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.Grassy, ColossusBody.BodyPrefab); DirectorCard card3 = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusGrassy, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard3 = new DirectorCardHolder { Card = card3, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToCardCategory(card3, "Champions", (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGolemFamilyNature").WaitForCompletion()); Utils.AddMonsterToStage(Colossus.GrassyStageList.Value, directorCard3); ColossusBody.SpawnCards.cscColossusCastle = colossusBody.CreateCard("cscColossusCastle", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.Castle, ColossusBody.BodyPrefab); DirectorCard card4 = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusCastle, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard4 = new DirectorCardHolder { Card = card4, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToStage(Colossus.CastleStageList.Value, directorCard4); ColossusBody.SpawnCards.cscColossusSandy = colossusBody.CreateCard("cscColossusSandy", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.Sandy, ColossusBody.BodyPrefab); DirectorCard card5 = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusSandy, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard5 = new DirectorCardHolder { Card = card5, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToCardCategory(card5, "Champions", (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGolemFamilySandy.asset").WaitForCompletion()); Utils.AddMonsterToStage(Colossus.SandyStageList.Value, directorCard5); ColossusBody.SpawnCards.cscColossusSnowy = colossusBody.CreateCard("cscColossusSnowy", ColossusMaster.MasterPrefab, ColossusBody.SkinDefs.Snowy, ColossusBody.BodyPrefab); DirectorCard card6 = new DirectorCard { spawnCard = (SpawnCard)(object)ColossusBody.SpawnCards.cscColossusSnowy, selectionWeight = Colossus.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Colossus.MinimumStageCompletion.Value }; DirectorCardHolder directorCard6 = new DirectorCardHolder { Card = card6, MonsterCategory = (MonsterCategory)4 }; Utils.AddMonsterToCardCategory(card6, "Champions", (DirectorCardCategorySelection)(object)Addressables.LoadAssetAsync<FamilyDirectorCardCategorySelection>((object)"RoR2/Base/Common/dccsGolemFamilySnowy.asset").WaitForCompletion()); Utils.AddMonsterToStage(Colossus.SnowyStageList.Value, directorCard6); if (Colossus.AddToArtifactOfOrigin.Value && RiskyArtifafactsCompat.enabled) { RiskyArtifafactsCompat.AddMonsterToArtifactOfOrigin((SpawnCard)(object)ColossusBody.SpawnCards.cscColossusGrassy, 3); } } } private ExplicitPickupDropTable CreateColossusItem(GameObject[] assets, Dictionary<string, Sprite> iconLookup) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_008f: 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_00af: 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) ExplicitPickupDropTable val = null; if (Colossus.ItemEnabled.Value) { ColossalKnurlFactory.ColossalFist = ProcTypeAPI.ReserveProcType(); ColossalKnurlFactory colossalKnurlFactory = new ColossalKnurlFactory(); ColossalKnurlFactory.ItemDef = colossalKnurlFactory.CreateItem(assets.First((GameObject item) => ((Object)item).name == "PickupColossalCurl"), iconLookup["texColossalKnurlIcon"]); itemList.Add(ColossalKnurlFactory.ItemDef); val = ScriptableObject.CreateInstance<ExplicitPickupDropTable>(); ((Object)val).name = "epdtColossus"; ((PickupDropTable)val).canDropBeReplaced = true; val.pickupEntries = (PickupDefEntry[])(object)new PickupDefEntry[1] { new PickupDefEntry { pickupWeight = 1f, pickupDef = (Object)(object)ColossalKnurlFactory.ItemDef } }; GameObject prefab = assets.First((GameObject item) => ((Object)item).name == "ColossalKnurlFistProjectileGhost"); prefab = colossalKnurlFactory.CreateFistGhostPrefab(prefab); GameObject fistPrefab = assets.First((GameObject item) => ((Object)item).name == "ColossalKnurlFistProjectile"); ColossalKnurlFactory.projectilePrefab = colossalKnurlFactory.CreateFistProjectile(fistPrefab, prefab); projectilesList.Add(ColossalKnurlFactory.projectilePrefab); ref Pair[] relationships = ref ModdedContagiousItemProvider.relationships; Pair val2 = new Pair { itemDef1 = ColossalKnurlFactory.ItemDef, itemDef2 = VoidMegaCrabItem }; ArrayUtils.ArrayAppend<Pair>(ref relationships, ref val2); } return val; } private void CreateSpitter(GameObject[] assets, Dictionary<string, Sprite> iconLookup) { //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown //IL_025a: Unknown result type (might be due to invalid IL or missing references) //IL_025f: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_0288: Unknown result type (might be due to invalid IL or missing references) //IL_029a: Expected O, but got Unknown //IL_029a: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Unknown result type (might be due to invalid IL or missing references) //IL_02a9: Unknown result type (might be due to invalid IL or missing references) //IL_02b0: Expected O, but got Unknown //IL_02e1: Unknown result type (might be due to invalid IL or missing references) //IL_02e6: Unknown result type (might be due to invalid IL or missing references) //IL_02f1: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0303: Unknown result type (might be due to invalid IL or missing references) //IL_0308: Unknown result type (might be due to invalid IL or missing references) //IL_030f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: Expected O, but got Unknown //IL_0321: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Unknown result type (might be due to invalid IL or missing references) //IL_032e: Unknown result type (might be due to invalid IL or missing references) //IL_0330: Unknown result type (might be due to invalid IL or missing references) //IL_0337: Expected O, but got Unknown //IL_0368: Unknown result type (might be due to invalid IL or missing references) //IL_036d: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Unknown result type (might be due to invalid IL or missing references) //IL_038a: Unknown result type (might be due to invalid IL or missing references) //IL_038f: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Expected O, but got Unknown //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ad: Unknown result type (might be due to invalid IL or missing references) //IL_03b5: Unknown result type (might be due to invalid IL or missing references) //IL_03b7: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Expected O, but got Unknown //IL_03ef: Unknown result type (might be due to invalid IL or missing references) //IL_03f4: Unknown result type (might be due to invalid IL or missing references) //IL_03ff: Unknown result type (might be due to invalid IL or missing references) //IL_040f: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041d: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Expected O, but got Unknown //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0434: Unknown result type (might be due to invalid IL or missing references) //IL_043c: Unknown result type (might be due to invalid IL or missing references) //IL_043e: Unknown result type (might be due to invalid IL or missing references) //IL_0445: Expected O, but got Unknown if (Spitter.Enabled.Value) { SpitterStuff spitterStuff = new SpitterStuff(); Bite.biteEffectPrefab = spitterStuff.CreateBiteEffect(); effectsList.Add(new EffectDef(Bite.biteEffectPrefab)); GameObject val = spitterStuff.CreatedChargedSpitSmallDoTZone(); GameObject val2 = spitterStuff.CreateChargedSpitDoTZone(); GameObject val3 = spitterStuff.CreateChargedSpitSplitProjectile(val); GameObject item = (FireChargedSpit.projectilePrefab = spitterStuff.CreateChargedSpitProjectile(val2, val3)); projectilesList.Add(item); projectilesList.Add(val); projectilesList.Add(val2); projectilesList.Add(val3); NormalSpit.normalSpitProjectile = spitterStuff.CreateNormalSpitProjectile(); projectilesList.Add(NormalSpit.normalSpitProjectile); UnlockableDef val4 = Utils.CreateUnlockableDef("Logs.SpitterBody.0", "ENEMIES_RETURNS_UNLOCKABLE_LOG_SPITTER"); unlockablesList.Add(val4); SpitterBody spitterBody = new SpitterBody(); SpitterBody.Skills.NormalSpit = spitterBody.CreateNormalSpitSkill(); SpitterBody.Skills.ChargedSpit = spitterBody.CreateChargedSpitSkill(); SpitterBody.Skills.Bite = spitterBody.CreateBiteSkill(); sdList.Add(SpitterBody.Skills.NormalSpit); sdList.Add(SpitterBody.Skills.Bite); sdList.Add(SpitterBody.Skills.ChargedSpit); SpitterBody.SkillFamilies.Primary = Utils.CreateSkillFamily("SpitterPrimaryFamily", SpitterBody.Skills.NormalSpit); SpitterBody.SkillFamilies.Secondary = Utils.CreateSkillFamily("SpitterSecondaryFamily", SpitterBody.Skills.Bite); SpitterBody.SkillFamilies.Special = Utils.CreateSkillFamily("SpitterSpecialFamily", SpitterBody.Skills.ChargedSpit); sfList.Add(SpitterBody.SkillFamilies.Primary); sfList.Add(SpitterBody.SkillFamilies.Secondary); sfList.Add(SpitterBody.SkillFamilies.Special); SpitterBody.BodyPrefab = spitterBody.AddBodyComponents(assets.First((GameObject body) => ((Object)body).name == "SpitterBody"), iconLookup["texSpitterIcon"], val4); bodyList.Add(SpitterBody.BodyPrefab); SpitterMaster.MasterPrefab = new SpitterMaster().AddMasterComponents(assets.First((GameObject master) => ((Object)master).name == "SpitterMaster"), SpitterBody.BodyPrefab); masterList.Add(SpitterMaster.MasterPrefab); SpitterBody.SpawnCards.cscSpitterDefault = spitterBody.CreateCard("cscSpitterDefault", SpitterMaster.MasterPrefab, SpitterBody.SkinDefs.Default, SpitterBody.BodyPrefab); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)SpitterBody.SpawnCards.cscSpitterDefault, selectionWeight = Spitter.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Spitter.MinimumStageCompletion.Value }; DirectorCardHolder directorCard = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)3 }; Utils.AddMonsterToStage(Spitter.DefaultStageList.Value, directorCard); SpitterBody.SpawnCards.cscSpitterLakes = spitterBody.CreateCard("cscSpitterLakes", SpitterMaster.MasterPrefab, SpitterBody.SkinDefs.Lakes, SpitterBody.BodyPrefab); DirectorCard card2 = new DirectorCard { spawnCard = (SpawnCard)(object)SpitterBody.SpawnCards.cscSpitterLakes, selectionWeight = Spitter.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Spitter.MinimumStageCompletion.Value }; DirectorCardHolder directorCard2 = new DirectorCardHolder { Card = card2, MonsterCategory = (MonsterCategory)3 }; Utils.AddMonsterToStage(Spitter.LakesStageList.Value, directorCard2); SpitterBody.SpawnCards.cscSpitterSulfur = spitterBody.CreateCard("cscSpitterSulfur", SpitterMaster.MasterPrefab, SpitterBody.SkinDefs.Sulfur, SpitterBody.BodyPrefab); DirectorCard card3 = new DirectorCard { spawnCard = (SpawnCard)(object)SpitterBody.SpawnCards.cscSpitterSulfur, selectionWeight = Spitter.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Spitter.MinimumStageCompletion.Value }; DirectorCardHolder directorCard3 = new DirectorCardHolder { Card = card3, MonsterCategory = (MonsterCategory)3 }; Utils.AddMonsterToStage(Spitter.SulfurStageList.Value, directorCard3); SpitterBody.SpawnCards.cscSpitterDepths = spitterBody.CreateCard("cscSpitterDepths", SpitterMaster.MasterPrefab, SpitterBody.SkinDefs.Depths, SpitterBody.BodyPrefab); DirectorCard card4 = new DirectorCard { spawnCard = (SpawnCard)(object)SpitterBody.SpawnCards.cscSpitterDepths, selectionWeight = Spitter.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = Spitter.MinimumStageCompletion.Value }; DirectorCardHolder directorCard4 = new DirectorCardHolder { Card = card4, MonsterCategory = (MonsterCategory)3 }; Utils.AddMonsterToStage(Spitter.DepthStageList.Value, directorCard4); if (Spitter.HelminthroostReplaceMushrum.Value) { Helpers.RemoveExistingMonsterFromStage(MonsterNames.MiniMushrum, (Stage)1099511627776L, ""); } stateList.Add(typeof(Bite)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.Spitter.SpawnState)); stateList.Add(typeof(NormalSpit)); stateList.Add(typeof(ChargeChargedSpit)); stateList.Add(typeof(FireChargedSpit)); stateList.Add(typeof(DeathDance)); stateList.Add(typeof(SpitterMain)); stateList.Add(typeof(DeathDancePlayer)); } } private void CreateMechanicalSpider(GameObject[] assets, Dictionary<string, Sprite> iconLookup, Dictionary<string, AnimationCurveDef> acdLookup) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Expected O, but got Unknown if (MechanicalSpider.Enabled.Value) { UnlockableDef val = Utils.CreateUnlockableDef("Logs.MechanicalSpiderBody.0", "ENEMIES_RETURNS_UNLOCKABLE_LOG_MECHANICAL_SPIDER"); unlockablesList.Add(val); MechanicalSpiderStuff mechanicalSpiderStuff = new MechanicalSpiderStuff(); GameObject val2 = mechanicalSpiderStuff.CreateDoubleShotImpactEffect(); effectsList.Add(new EffectDef(val2)); Fire.projectilePrefab = mechanicalSpiderStuff.CreateDoubleShotProjectilePrefab(val2); projectilesList.Add(Fire.projectilePrefab); ChargeFire.effectPrefab = mechanicalSpiderStuff.CreateDoubleShotChargeEffect(); MechanicalSpiderEnemyBody mechanicalSpiderEnemyBody = new MechanicalSpiderEnemyBody(); MechanicalSpiderBodyBase.Skills.DoubleShot = mechanicalSpiderEnemyBody.CreateDoubleShotSkill(); MechanicalSpiderBodyBase.Skills.Dash = mechanicalSpiderEnemyBody.CreateDashSkill(); Dash.forwardSpeedCoefficientCurve = acdLookup["acdSpiderDash"].curve; sdList.Add(MechanicalSpiderBodyBase.Skills.DoubleShot); sdList.Add(MechanicalSpiderBodyBase.Skills.Dash); MechanicalSpiderBodyBase.SkillFamilies.Primary = Utils.CreateSkillFamily("MechanicalSpiderPrimaryFamily", MechanicalSpiderBodyBase.Skills.DoubleShot); MechanicalSpiderBodyBase.SkillFamilies.Utility = Utils.CreateSkillFamily("MechanicalSpiderUtilityFamily", MechanicalSpiderBodyBase.Skills.Dash); sfList.Add(MechanicalSpiderBodyBase.SkillFamilies.Primary); sfList.Add(MechanicalSpiderBodyBase.SkillFamilies.Utility); CreateMechanicalSpiderEnemy(assets, iconLookup, val, mechanicalSpiderEnemyBody); CreateMechanichalSpiderDrone(assets, iconLookup, mechanicalSpiderStuff); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.MechanicalSpider.MainState)); stateList.Add(typeof(EnemiesReturns.ModdedEntityStates.MechanicalSpider.SpawnState)); stateList.Add(typeof(SpawnStateDrone)); stateList.Add(typeof(VictoryDance)); stateList.Add(typeof(VictoryDancePlayer)); stateList.Add(typeof(OpenHatch)); stateList.Add(typeof(ChargeFire)); stateList.Add(typeof(Fire)); stateList.Add(typeof(CloseHatch)); stateList.Add(typeof(DashStart)); stateList.Add(typeof(Dash)); stateList.Add(typeof(DashStop)); stateList.Add(typeof(DeathInitial)); stateList.Add(typeof(DeathDrone)); stateList.Add(typeof(DeathNormal)); } } private void CreateMechanichalSpiderDrone(GameObject[] assets, Dictionary<string, Sprite> iconLookup, MechanicalSpiderStuff spiderStuff) { MechanicalSpiderDroneBody.BodyPrefab = new MechanicalSpiderDroneBody().AddBodyComponents(assets.First((GameObject body) => ((Object)body).name == "MechanicalSpiderDroneBody"), iconLookup["texMechanicalSpiderAllyIcon"]); bodyList.Add(MechanicalSpiderDroneBody.BodyPrefab); MechanicalSpiderDroneMaster.MasterPrefab = new MechanicalSpiderDroneMaster().AddMasterComponents(assets.First((GameObject master) => ((Object)master).name == "MechanicalSpiderDroneMaster"), MechanicalSpiderDroneBody.BodyPrefab); masterList.Add(MechanicalSpiderDroneMaster.MasterPrefab); MechanicalSpiderStuff.InteractablePrefab = spiderStuff.CreateInteractable(assets.First((GameObject interactable) => ((Object)interactable).name == "MechanicalSpiderBroken"), MechanicalSpiderDroneMaster.MasterPrefab); nopList.Add(MechanicalSpiderStuff.InteractablePrefab); MechanicalSpiderStuff.SpawnCards.iscMechanicalSpiderBroken = spiderStuff.CreateInteractableSpawnCard("iscMechanicalSpiderBroken", MechanicalSpiderStuff.InteractablePrefab); } private void CreateMechanicalSpiderEnemy(GameObject[] assets, Dictionary<string, Sprite> iconLookup, UnlockableDef spiderLog, MechanicalSpiderEnemyBody spiderEnemyBody) { //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: 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_00fb: Unknown result type (might be due to invalid IL or missing references) //IL_0101: Expected O, but got Unknown //IL_0131: 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_0141: 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_0158: 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_0170: Expected O, but got Unknown //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_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_0184: Expected O, but got Unknown //IL_01b4: 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_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Expected O, but got Unknown //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0201: 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_020a: Expected O, but got Unknown MechanicalSpiderEnemyBody.BodyPrefab = spiderEnemyBody.AddBodyComponents(assets.First((GameObject body) => ((Object)body).name == "MechanicalSpiderBody"), iconLookup["texMechanicalSpiderEnemyIcon"], spiderLog); bodyList.Add(MechanicalSpiderEnemyBody.BodyPrefab); MechanicalSpiderEnemyMaster.MasterPrefab = new MechanicalSpiderEnemyMaster().AddMasterComponents(assets.First((GameObject master) => ((Object)master).name == "MechanicalSpiderMaster"), MechanicalSpiderEnemyBody.BodyPrefab); masterList.Add(MechanicalSpiderEnemyMaster.MasterPrefab); MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderDefault = spiderEnemyBody.CreateCard("cscMechanicalSpeiderDefault", MechanicalSpiderEnemyMaster.MasterPrefab); DirectorCard card = new DirectorCard { spawnCard = (SpawnCard)(object)MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderDefault, selectionWeight = MechanicalSpider.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = MechanicalSpider.MinimumStageCompletion.Value }; DirectorCardHolder directorCard = new DirectorCardHolder { Card = card, MonsterCategory = (MonsterCategory)2 }; Utils.AddMonsterToStage(MechanicalSpider.DefaultStageList.Value, directorCard); MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderGrassy = spiderEnemyBody.CreateCard("cscMechanicalSpiderGrassy", MechanicalSpiderEnemyMaster.MasterPrefab, MechanicalSpiderEnemyBody.SkinDefs.Grassy, MechanicalSpiderEnemyMaster.MasterPrefab); DirectorCard card2 = new DirectorCard { spawnCard = (SpawnCard)(object)MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderGrassy, selectionWeight = MechanicalSpider.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = MechanicalSpider.MinimumStageCompletion.Value }; DirectorCardHolder directorCard2 = new DirectorCardHolder { Card = card2, MonsterCategory = (MonsterCategory)2 }; Utils.AddMonsterToStage(MechanicalSpider.GrassyStageList.Value, directorCard2); MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderSnowy = spiderEnemyBody.CreateCard("cscMechanicalSpiderSnowy", MechanicalSpiderEnemyMaster.MasterPrefab, MechanicalSpiderEnemyBody.SkinDefs.Snowy, MechanicalSpiderEnemyMaster.MasterPrefab); DirectorCard card3 = new DirectorCard { spawnCard = (SpawnCard)(object)MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderSnowy, selectionWeight = MechanicalSpider.SelectionWeight.Value, spawnDistance = (MonsterSpawnDistance)0, preventOverhead = true, minimumStageCompletions = MechanicalSpider.MinimumStageCompletion.Value }; DirectorCardHolder directorCard3 = new DirectorCardHolder { Card = card3, MonsterCategory = (MonsterCategory)2 }; Utils.AddMonsterToStage(MechanicalSpider.SnowyStageList.Value, directorCard3); } private IEnumerator LoadAssetBundle(string assetBundleFullPath, IProgress<float> progress, Action<AssetBundle> onAssetBundleLoaded) { Stopwatch stopwatch = new Stopwatch(); ((StopwatchBase)stopwatch).Start(); AssetBundleCreateRequest assetBundleCreateRequest = AssetBundle.LoadFromFileAsync(assetBundleFullPath); while (!((AsyncOperation)assetBundleCreateRequest).isDone) { progress.Report(((AsyncOperation)assetBundleCreateRequest).progress); yield return null; } onAssetBundleLoaded(assetBundleCreateRequest.assetBundle); ((StopwatchBase)stopwatch).Stop(); Log.Info("Asset bundle " + assetBundleFullPath + " loaded in " + ((StopwatchBase)stopwatch).elapsedSeconds); } private static IEnumerator LoadAllAssetsAsync<T>(AssetBundle assetBundle, IProgress<float> progress, Action<T[]> onAssetsLoaded) where T : Object { AssetBundleRequest sceneDefsRequest = assetBundle.LoadAllAssetsAsync<T>(); while (!((AsyncOperation)sceneDefsRequest).isDone) { progress.Report(((AsyncOperation)sceneDefsRequest).progress); yield return null; } onAssetsLoaded(sceneDefsRequest.allAssets.Cast<T>().ToArray()); } public static Material GetOrCreateMaterial(string materialName, Func<Material> materialCreateFunc) { if (!MaterialCache.TryGetValue(materialName, out var value)) { return materialCreateFunc(); } return value; } public static Material GetOrCreateMaterial(string materialName, Func<Texture2D, Material> materialCreateFunc, Texture2D texture) { if (!MaterialCache.TryGetValue(materialName, out var value)) { return materialCreateFunc(texture); } return value; } private void LoadSoundBanks(string soundbanksFolderPath) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0009: Invalid comparison between Unknown and I4 //IL_002d: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Invalid comparison between Unknown and I4 //IL_0068: Unknown result type (might be due to invalid IL or missing references) AKRESULT val = AkSoundEngine.AddBasePath(soundbanksFolderPath); if ((int)val == 1) { Log.Info("Added bank base path : " + soundbanksFolderPath); } else { Log.Error("Error adding base path : " + soundbanksFolderPath + " " + $"Error code : {val}"); } uint num = default(uint); val = AkSoundEngine.LoadBank("EnemiesReturnsSounds", ref num); if ((int)val == 1) { Log.Info("Added bank : EnemiesReturnsSounds"); } else { Log.Error("Error loading bank : EnemiesReturnsSounds " + $"Error code : {val}"); } } } [BepInPlugin("com.Viliger.EnemiesReturns", "EnemiesReturns", "0.3.8")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class EnemiesReturnsPlugin : BaseUnityPlugin { public const string Author = "Viliger"; public const string ModName = "EnemiesReturns"; public const string Version = "0.3.8"; public const string GUID = "com.Viliger.EnemiesReturns"; private void Awake() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00db: Expected O, but got Unknown //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0052: 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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0086: Expected O, but got Unknown //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown ConfigEntry<bool> obj = ((BaseUnityPlugin)this).Config.Bind<bool>("Config", "Use Config File", false, "Use config file for storring config. Each enemy gets their own config file. Due to mod being currently unfinished and unbalanced, we deploy rapid changes to values. So this way we can still have configs, but without the issue of people having those values saved."); Log.Init(((BaseUnityPlugin)this).Logger); if (obj.Value) { General.PopulateConfig(((BaseUnityPlugin)this).Config); Spitter.PopulateConfig(new ConfigFile(Path.Combine(Paths.ConfigPath, "com.Viliger.EnemiesReturns.Spitter.cfg"), true)); Colossus.PopulateConfig(new ConfigFile(Path.Combine(Paths.ConfigPath, "com.Viliger.EnemiesReturns.Colossus.cfg"), true)); Ifrit.PopulateConfig(new ConfigFile(Path.Combine(Paths.ConfigPath, "com.Viliger.EnemiesReturns.Ifrit.cfg"), true)); MechanicalSpider.PopulateConfig(new ConfigFile(Path.Combine(Paths.ConfigPath, "com.Viliger.EnemiesReturns.MechanicalSpider.cfg"), true)); } else { ConfigFile val = new ConfigFile(Path.Combine(Paths.ConfigPath, "Config"), false) { SaveOnConfigSet = false }; General.PopulateConfig(val); Spitter.PopulateConfig(val); Colossus.PopulateConfig(val); Ifrit.PopulateConfig(val); MechanicalSpider.PopulateConfig(val); } Hooks(); } private void Hooks() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown ContentManager.collectContentPackProviders += new CollectContentPackProvidersDelegate(ContentManager_collectContentPackProviders); Language.collectLanguageRootFolders += CollectLanguageRootFolders; Language.onCurrentLanguageChanged += Language.Language_onCurrentLanguageChanged; GlobalEventManager.onServerDamageDealt += GlobalEventManager_onServerDamageDealt; ColossalKnurlFactory.Hooks(); IfritStuff.Hooks(); SpawnPillarOnChampionKillFactory.Hooks(); MechanicalSpiderVictoryDanceController.Hooks(); } private void GlobalEventManager_onServerDamageDealt(DamageReport obj) { DamageInfo damageInfo = obj.damageInfo; GameObject gameObject = ((Component)obj.victim).gameObject; CharacterBody val = default(CharacterBody); if (Object.op_Implicit((Object)(object)damageInfo.attacker) && damageInfo.attacker.TryGetComponent<CharacterBody>(ref val) && Object.op_Implicit((Object)(object)val.master)) { ColossalKnurlFactory.OnHitEnemy(damageInfo, val, gameObject); } } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCSpawnTitans(ConCommandArgs args) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) CharacterBody cachedBody = LocalUserManager.readOnlyLocalUsersList[0].cachedBody; SpawnMonster(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanBlackBeach.asset").WaitForCompletion(), cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanDampCave.asset").WaitForCompletion(), cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGolemPlains.asset").WaitForCompletion(), cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGooLake.asset").WaitForCompletion(), cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(Addressables.LoadAssetAsync<CharacterSpawnCard>((object)"RoR2/Base/Titan/cscTitanGold.asset").WaitForCompletion(), cachedBody.modelLocator.modelBaseTransform.position); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCSpawnSpitters(ConCommandArgs args) { //IL_0021: 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_0055: 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) CharacterBody cachedBody = LocalUserManager.readOnlyLocalUsersList[0].cachedBody; SpawnMonster(SpitterBody.SpawnCards.cscSpitterDefault, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(SpitterBody.SpawnCards.cscSpitterLakes, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(SpitterBody.SpawnCards.cscSpitterDepths, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(SpitterBody.SpawnCards.cscSpitterSulfur, cachedBody.modelLocator.modelBaseTransform.position); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCSpawnColossi(ConCommandArgs args) { //IL_0021: 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_0055: 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_0089: 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) CharacterBody cachedBody = LocalUserManager.readOnlyLocalUsersList[0].cachedBody; SpawnMonster(ColossusBody.SpawnCards.cscColossusDefault, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(ColossusBody.SpawnCards.cscColossusGrassy, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(ColossusBody.SpawnCards.cscColossusSnowy, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(ColossusBody.SpawnCards.cscColossusSandy, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(ColossusBody.SpawnCards.cscColossusSkyMeadow, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(ColossusBody.SpawnCards.cscColossusCastle, cachedBody.modelLocator.modelBaseTransform.position); } [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCPocketSpiders(ConCommandArgs args) { //IL_0021: 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_0055: Unknown result type (might be due to invalid IL or missing references) CharacterBody cachedBody = LocalUserManager.readOnlyLocalUsersList[0].cachedBody; SpawnMonster(MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderSnowy, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderDefault, cachedBody.modelLocator.modelBaseTransform.position); SpawnMonster(MechanicalSpiderEnemyBody.SpawnCards.cscMechanicalSpiderGrassy, cachedBody.modelLocator.modelBaseTransform.position); } private static void SpawnMonster(CharacterSpawnCard card, Vector3 position) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown DirectorSpawnRequest val = new DirectorSpawnRequest((SpawnCard)(object)card, new DirectorPlacementRule { placementMode = (PlacementMode)3, position = position }, RoR2Application.rng); val.teamIndexOverride = (TeamIndex)2; val.ignoreTeamMemberLimit = true; DirectorCore.instance.TrySpawnObject(val); } private void ContentManager_collectContentPackProviders(AddContentPackProviderDelegate addContentPackProvider) { addContentPackProvider.Invoke((IContentPackProvider)(object)new ContentProvider()); } private void CollectLanguageRootFolders(List<string> folders) { folders.Add(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "Language")); } } public class Language { public const string LanguageFolder = "Language"; public static event Action<Language, List<KeyValuePair<string, string>>> onCurrentLangaugeChanged; public static void Language_onCurrentLanguageChanged() { Language currentLanguage = Language.currentLanguage; string text = Path.Combine(Path.GetDirectoryName(typeof(EnemiesReturnsPlugin).Assembly.Location), "Language", Language.currentLanguageName); if (Directory.Exists(text)) { List<KeyValuePair<string, string>> list = new List<KeyValuePair<string, string>>(); Language.LoadAllTokensFromFolder(text, list); Language.onCurrentLangaugeChanged?.Invoke(currentLanguage, list); } } } internal static class Log { private static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } public static class MissingAnimationParameters { public static readonly int aimYawCycle = Animator.StringToHash("aimYawCycle"); public static readonly int aimPitchCycle = Animator.StringToHash("aimPitchCycle"); } public class PortraitGenerator { [ConCommand(/*Could not decode attribute arguments.*/)] private static void CCBodyGeneratePortraits(ConCommandArgs args) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/UI/IconGenerator.prefab").WaitForCompletion(); if (Object.op_Implicit((Object)(object)val)) { ModelPanel componentInChildren = val.GetComponentInChildren<ModelPanel>(); if (Object.op_Implicit((Object)(object)componentInChildren)) { componentInChildren.modelPostProcessVolumePrefab = GameObject.CreatePrimitive((PrimitiveType)3); } } ((MonoBehaviour)RoR2Application.instance).StartCoroutine(GeneratePortraits(((ConCommandArgs)(ref args)).TryGetArgBool(0).GetValueOrDefault())); } private static IEnumerator GeneratePortraits(bool forceRegeneration) { Debug.Log((object)"Starting portrait generation."); ModelPanel modelPanel = Object.Instantiate<GameObject>(LegacyResourcesAPI.Load<GameObject>("Prefabs/UI/IconGenerator")).GetComponentInChildren<ModelPanel>(); modelPanel.renderSettings = new RenderSettingsState { ambientIntensity = 1f, ambientLight = Color.white, ambientMode = (AmbientMode)3, ambientGroundColor = Color.white }; yield return (object)new WaitForEndOfFrame(); modelPanel.BuildRenderTexture(); yield return (object)new WaitForEndOfFrame(); yield return GeneratePortrait(modelPanel, SpitterBody.BodyPrefab); yield return GeneratePortrait(modelPanel, ColossusBody.BodyPrefab); yield return GeneratePortrait(modelPanel, IfritBody.BodyPrefab); yield return GeneratePortrait(modelPanel, PillarEnemyBody.BodyPrefab); yield return GeneratePortrait(modelPanel, MechanicalSpiderEnemyBody.BodyPrefab); yield return GeneratePortrait(modelPanel, Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Lemurian/LemurianBody.prefab").WaitForCompletion()); Object.Destroy((Object)(object)((Component)((Component)modelPanel).transform.root).gameObject); Debug.Log((object)"Portrait generation complete."); } private static IEnumerator GeneratePortrait(ModelPanel modelPanel, GameObject gameObject) { if (!Object.op_Implicit((Object)(object)gameObject.GetComponent<CharacterBody>())) { yield break; } float num = 1f; try { Debug.LogFormat("Generating portrait for {0}", new object[1] { ((Object)gameObject).name }); ModelPanel obj = modelPanel; ModelLocator component = gameObject.GetComponent<ModelLocator>(); obj.modelPrefab = ((component != null) ? ((Component)component.modelTransform).gameObject : null); modelPanel.SetAnglesForCharacterThumbnail(true); GameObject modelPrefab = modelPanel.modelPrefab; PrintController val; if ((val = ((modelPrefab != null) ? modelPrefab.GetComponentInChildren<PrintController>() : null)) != null) { num = Mathf.Max(num, val.printTime + 1f); } GameObject modelPrefab2 = modelPanel.modelPrefab; TemporaryOverlay val2; if ((val2 = ((modelPrefab2 != null) ? modelPrefab2.GetComponentInChildren<TemporaryOverlay>() : null)) != null) { num = Mathf.Max(num, val2.duration + 1f); } ParticleSystem[] componentsInChildren = modelPanel.modelPrefab.GetComponentsInChildren<ParticleSystem>(); for (int i = 0; i < componentsInChildren.Length; i++) { Object.Destroy((Object)(object)((Component)componentsInChildren[i]).gameObject); } Light[] componentsInChildren2 = modelPanel.modelPrefab.GetComponentsInChildren<Light>(); for (int i = 0; i < componentsInChildren2.Length; i++) { Object.Destroy((Object)(object)((Component)componentsInChildren2[i]).gameObject); } } catch (Exception ex) { Debug.Log((object)ex); } RoR2Application.onLateUpdate += UpdateCamera; yield return (object)new WaitForSeconds(num); modelPanel.SetAnglesForCharacterThumbnail(true); yield return (object)new WaitForEndOfFrame(); yield return (object)new WaitForEndOfFrame(); try { Texture2D val3 = new Texture2D(((Texture)modelPanel.renderTexture).width, ((Texture)modelPanel.renderTexture).height, (TextureFormat)5, false, false); RenderTexture active = RenderTexture.active; RenderTexture.active = modelPanel.renderTexture; val3.ReadPixels(new Rect(0f, 0f, (float)((Texture)modelPanel.renderTexture).width, (float)((Texture)modelPanel.renderTexture).height), 0, 0, false); RenderTexture.active = active; byte[] array = ImageConversion.EncodeToPNG(val3); FileStream fileStream = new FileStream("Assets/RoR2/GeneratedPortraits/" + ((Object)gameObject).name + ".png", FileMode.Create, FileAccess.Write); fileStream.Write(array, 0, array.Length); fileStream.Close(); } catch (Exception ex2) { Debug.Log((object)ex2); } RoR2Application.onLateUpdate -= UpdateCamera; yield return (object)new WaitForEndOfFrame(); void UpdateCamera() { modelPanel.SetAnglesForCharacterThumbnail(true); } } } public static class Utils { public static void AddMonsterToStage(string stageList, DirectorCardHolder directorCard) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) string[] array = stageList.Split(","); foreach (string text in array) { Stage val = DirectorAPI.ParseInternalStageName(string.Join("", text.Split((string[]?)null, StringSplitOptions.RemoveEmptyEntries))); Helpers.AddNewMonsterToStage(directorCard, false, val, text); } } public static SkinDef CreateSkinDef(string name, GameObject model, RendererInfo[] renderInfo, SkinDef baseSkin = null, GameObject[] gameObjectActivations = null) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) SkinDef val = Object.Instantiate<SkinDef>(Addressables.LoadAssetAsync<SkinDef>((object)"RoR2/Base/Beetle/skinBeetleDefault.asset").WaitForCompletion()); ((Object)val).name = name; val.baseSkins = Array.Empty<SkinDef>(); val.icon = null; val.nameToken = ""; val.unlockableDef = null; val.rootObject = null; val.rendererInfos = Array.Empty<RendererInfo>(); val.gameObjectActivations = Array.Empty<GameObjectActivation>(); val.meshReplacements = Array.Empty<MeshReplacement>(); val.projectileGhostReplacements = Array.Empty<ProjectileGhostReplacement>(); val.minionSkinReplacements = Array.Empty<MinionSkinReplacement>(); val.runtimeSkin = null; val.skinIndex = (SkinIndex)(-1); if (Object.op_Implicit((Object)(object)baseSkin)) { val.baseSkins = (SkinDef[])(object)new SkinDef[1] { baseSkin }; } val.rootObject = model; val.rendererInfos = renderInfo; if (gameObjectActivations != null) { val.gameObjectActivations = Array.ConvertAll(gameObjectActivations, delegate(GameObject item) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) GameObjectActivation result = default(GameObjectActivation); result.gameObject = item; result.shouldActivate = true; return result; }); } val.Bake(); return val; } public static SkillFamily CreateSkillFamily(string name, params SkillDef[] skills) { SkillFamily obj = ScriptableObject.CreateInstance<SkillFamily>(); ((Object)obj).name = name; obj.variants = Array.ConvertAll(skills, delegate(SkillDef item) { //IL_0002: 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_002c: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) Variant result = default(Variant); result.skillDef = item; result.unlockableDef = null; ((Variant)(ref result)).viewableNode = new Node(item.skillNameToken, false, (Node)null); return result; }); obj.defaultVariantIndex = 0u; return obj; } public static UnlockableDef CreateUnlockableDef(string name, string nameToken) { UnlockableDef obj = ScriptableObject.CreateInstance<UnlockableDef>(); ((Object)obj).name = name; obj.cachedName = name; obj.nameToken = nameToken; return obj; } public static NetworkSoundEventDef CreateNetworkSoundDef(string eventName) { NetworkSoundEventDef obj = ScriptableObject.CreateInstance<NetworkSoundEventDef>(); obj.eventName = eventName; return obj; } public static void AddMonsterToCardCategory(DirectorCard card, string categoryName, DirectorCardCategorySelection stageCard) { int num = FindCategoryIndexByName(stageCard, categoryName); if (num >= 0) { stageCard.AddCard(num, card); } } public static T GetOrAddComponent<T>(this GameObject gameObject) where T : Component { T result = default(T); if (!gameObject.TryGetComponent<T>(ref result)) { return gameObject.AddComponent<T>(); } return result; } public static int FindCategoryIndexByName(DirectorCardCategorySelection dcs, string categoryName) { if ((Object)(object)dcs == (Object)null) { return -1; } for (int i = 0; i < dcs.categories.Length; i++) { if (string.CompareOrdinal(dcs.categories[i].name, categoryName) == 0) { return i; } } return -1; } } } namespace EnemiesReturns.Projectiles { public class ProjectileEnableHomingAfterTargetAquired : MonoBehaviour { public bool changeSpeedAfterTargetFound; public float newSpeed; private ProjectileSimple projectileSimple; private ProjectileSphereTargetFinder sphereTargetFinder; private void Start() { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown if (!NetworkServer.active) { ((Behaviour)this).enabled = false; return; } projectileSimple = ((Component)this).GetComponent<ProjectileSimple>(); sphereTargetFinder = ((Component)this).GetComponent<ProjectileSphereTargetFinder>(); if (Object.op_Implicit((Object)(object)sphereTargetFinder)) { if (sphereTargetFinder.onNewTargetFound == null) { sphereTargetFinder.onNewTargetFound = new UnityEvent(); } sphereTargetFinder.onNewTargetFound.AddListener(new UnityAction(OnTargetFoundChangeSpeed)); } } private void OnTargetFoundChangeSpeed() { if (Object.op_Implicit((Object)(object)projectileSimple)) { projectileSimple.updateAfterFiring = true; if (changeSpeedAfterTargetFound) { projectileSimple.desiredForwardSpeed = newSpeed; } } } } [RequireComponent(typeof(ProjectileController))] public class ProjectileImpactExplosionWithChildrenArray : MonoBehaviour, IProjectileImpactBehavior { protected ProjectileController projectileController; protected ProjectileDamage projectileDamage; protected bool alive = true; [Header("Main Properties")] public FalloffModel falloffModel = (FalloffModel)1; public float blastRadius; [Tooltip("The percentage of the damage, proc coefficient, and force of the initial projectile. Ranges from 0-1")] public float blastDamageCoefficient; public float blastProcCoefficient = 1f; public AttackerFiltering blastAttackerFiltering; public Vector3 bonusBlastForce; public bool canRejectForce = true; public HealthComponent projectileHealthComponent; public GameObject explosionEffect; [Tooltip("Does this projectile release children on death?")] [Header("Child Properties")] public bool fireChildren; public GameObject childrenProjectilePrefab; public int childrenCount; [Tooltip("What percentage of our damage does the children get?")] public float childrenDamageCoefficient; public float childredMinRollDegrees; public float childrenRangeRollDegrees; public float childrenMinPitchDegrees; public float childrenRangePitchDegrees; [Header("DoT Properties")] [Tooltip("If true, applies a DoT given the following properties")] public bool applyDot; public DotIndex dotIndex = (DotIndex)(-1); [Tooltip("Duration in seconds of the DoT. Unused if calculateTotalDamage is true.")] public float dotDuration; [Tooltip("Multiplier on the per-tick damage")] public float dotDamageMultiplier = 1f; [Tooltip("If true, we cap the numer of DoT stacks for this attacker.")] public bool applyMaxStacksFromAttacker; [Tooltip("The maximum number of stacks that we can apply for this attacker")] public uint maxStacksFromAttacker = uint.MaxValue; [Tooltip("If true, we disregard the duration and instead specify the total damage.")] public bool calculateTotalDamage; [Tooltip("totalDamage = totalDamageMultiplier * attacker's damage")] public float totalDamageMultiplier; private Vector3 impactNormal = Vector3.up; public bool fireDoTZone; public GameObject dotZoneProjectilePrefab; public float dotZoneDamageCoefficient; public float dotZoneMinRollDegrees; public float dotZoneRangeRollDegrees; public float dotZoneMinPitchDegrees; public float dotZoneRangePitchDegrees; [Header("Impact & Lifetime Properties")] public GameObject impactEffect; public NetworkSoundEventDef lifetimeExpiredSound; public float offsetForLifetimeExpiredSound; public bool destroyOnEnemy = true; public bool destroyOnWorld; public bool impactOnWorld = true; public bool timerAfterImpact; public float lifetime; public float lifetimeAfterImpact; public float lifetimeRandomOffset; private float stopwatch; private float stopwatchAfterImpact; private bool hasImpact; private bool hasPlayedLifetimeExpiredSound; public TransformSpace transformSpace; protected void Awake() { projectileController = ((Component)this).GetComponent<ProjectileController>(); projectileDamage = ((Component)this).GetComponent<ProjectileDamage>(); lifetime += Random.Range(0f, lifetimeRandomOffset); } public void FixedUpdate() { //IL_010a: 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) stopwatch += Time.fixedDeltaTime; if (!NetworkServer.active && !projectileController.isPrediction) { return; } if (timerAfterImpact && hasImpact) { stopwatchAfterImpact += Time.fixedDeltaTime; } bool num = stopwatch >= lifetime; bool flag = timerAfterImpact && stopwatchAfterImpact > lifetimeAfterImpact; bool flag2 = Object.op_Implicit((Object)(object)projectileHealthComponent) && !projectileHealthComponent.alive; if (num || flag || flag2) { alive = false; } if (alive && !hasPlayedLifetimeExpiredSound) { bool flag3 = stopwatch > lifetime - offsetForLifetimeExpiredSound; if (timerAfterImpact) { flag3 |= stopwatchAfterImpact > lifetimeAfterImpact - offsetForLifetimeExpiredSound; } if (flag3) { hasPlayedLifetimeExpiredSound = true; if (NetworkServer.active && Object.op_Implicit((Object)(object)lifetimeExpiredSound)) { PointSoundManager.EmitSoundServer(lifetimeExpiredSound.index, ((Component)this).transform.position); } } } if (!alive) { explosionEffect = impactEffect ?? explosionEffect; Detonate(); } } public void Detonate() { if (NetworkServer.active) { DetonateServer(); } Object.Destroy((Object)(object)((Component)this).gameObject); } protected void DetonateServer() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: 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_003b: Expected O, but got Unknown //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //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_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_0127: 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_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0138: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_0166: 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_017d: 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) if (Object.op_Implicit((Object)(object)explosionEffect)) { EffectManager.SpawnEffect(explosionEffect, new EffectData { origin = ((Component)this).transform.position, scale = blastRadius }, true); } if (Object.op_Implicit((Object)(object)projectileDamage)) { BlastAttack val = new BlastAttack(); val.position = ((Component)this).transform.position; val.baseDamage = projectileDamage.damage * blastDamageCoefficient; val.baseForce = projectileDamage.force * blastDamageCoefficient; val.radius = blastRadius; val.attacker = (Object.op_Implicit((Object)(object)projectileController.owner) ? projectileController.owner.gameObject : null); val.inflictor = ((Component)this).gameObject; val.teamIndex = projectileController.teamFilter.teamIndex; val.crit = projectileDamage.crit; val.procChainMask = projectileController.procChainMask; val.procCoefficient = projectileController.procCoefficient * blastProcCoefficient; val.bonusForce = bonusBlastForce; val.falloffModel = falloffModel; val.damageColorIndex = projectileDamage.damageColorIndex; val.damageType = projectileDamage.damageType; val.attackerFiltering = blastAttackerFiltering; val.canRejectForce = canRejectForce; Result result = val.Fire(); OnBlastAttackResult(val, result); } if (fireChildren) { FireChild(); } if (fireDoTZone) { FireDoTZone(); } } protected Quaternion GetRandomChildRollPitch() { //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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) Quaternion val = Quaternion.AngleAxis(childredMinRollDegrees + Random.Range(0f, childrenRangeRollDegrees), Vector3.forward); Quaternion val2 = Quaternion.AngleAxis(childrenMinPitchDegrees + Random.Range(0f, childrenRangePitchDegrees), Vector3.left); return val * val2; } protected virtual Quaternion GetRandomDirectionForChild() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Invalid comparison between Unknown and I4 //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Invalid comparison between Unknown and I4 //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_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_0041: Unkn