Decompiled source of Bulma v1.0.2
Dragon Ball Z/Bulma.dll
Decompiled 6 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using DBZUtils; using EntityStates; using EntityStates.Commando; using EntityStates.GravekeeperBoss; using EntityStates.Merc; using HG.BlendableTypes; using JetBrains.Annotations; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Achievements; using RoR2.Projectile; using RoR2.Skills; using RoR2.UI; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = "")] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: CompilationRelaxations(8)] [assembly: AssemblyCompany("Bulma")] [assembly: AssemblyProduct("Bulma")] [assembly: AssemblyTitle("Bulma")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Bulma; public static class Achievements { [RegisterAchievement("BULMA_MASTERY", "ACHIEVEMENT_BULMA_MASTERY_UNLOCKABLE_ID", null, null)] public class MasteryUnlockable : BasePerSurvivorClearGameMonsoonAchievement { public override BodyIndex LookUpRequiredBodyIndex() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) return BodyCatalog.FindBodyIndex("BulmaBody"); } } internal static UnlockableDef masteryUnlock; public static void RegisterUnlockables() { } private static UnlockableDef NewUnlockable<T>(string AchievementIdentifier, Sprite Icon, string Title, string Description) where T : BaseAchievement { string text = "ACHIEVEMENT_BULMA_"; UnlockableDef val = ScriptableObject.CreateInstance<UnlockableDef>(); string langName = text + AchievementIdentifier + "_NAME"; string langDesc = text + AchievementIdentifier + "_DESCRIPTION"; LanguageAPI.Add(langName, Title); LanguageAPI.Add(langDesc, Description); Func<string> func = () => Language.GetStringFormatted("UNLOCKED_FORMAT", new object[2] { Language.GetString(langName), Language.GetString(langDesc) }); Type typeFromHandle = typeof(T); val.cachedName = text + AchievementIdentifier + "_UNLOCKABLE_ID"; val.getHowToUnlockString = func; val.getUnlockedString = func; val.achievementIcon = Icon; val.sortScore = 200; val.hidden = false; ContentAddition.AddUnlockableDef(val); return val; } } internal class Assets { public static AssetBundle MainAssetBundle; public static T Load<T>(string name) where T : Object { return MainAssetBundle.LoadAsset<T>(name); } public static void PopulateAssets() { Assembly executingAssembly = Assembly.GetExecutingAssembly(); using (Stream stream = executingAssembly.GetManifestResourceStream("Bulma.AssetBundle." + "Bulma".ToLower() + "assets")) { MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = executingAssembly.GetManifestResourceStream("Bulma.Bulma.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class BulmaBehaviour : NetworkBehaviour { public bool driving; [SyncVar] public float networkedCarHealth; public float downVelocity = 15f; public bool canExecute = true; public bool removeBalls; public float stopwatch; public float NetworknetworkedCarHealth { get { return networkedCarHealth; } [param: In] set { ((NetworkBehaviour)this).SetSyncVar<float>(value, ref networkedCarHealth, 1u); } } private void FixedUpdate() { if (removeBalls) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= 2f) { removeBalls = false; } } } private void UNetVersion() { } public override bool OnSerialize(NetworkWriter writer, bool forceAll) { if (forceAll) { writer.Write(networkedCarHealth); return true; } bool flag = false; if ((((NetworkBehaviour)this).syncVarDirtyBits & (true ? 1u : 0u)) != 0) { if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); flag = true; } writer.Write(networkedCarHealth); } if (!flag) { writer.WritePackedUInt32(((NetworkBehaviour)this).syncVarDirtyBits); } return flag; } public override void OnDeserialize(NetworkReader reader, bool initialState) { if (initialState) { networkedCarHealth = reader.ReadSingle(); return; } int num = (int)reader.ReadPackedUInt32(); if (((uint)num & (true ? 1u : 0u)) != 0) { networkedCarHealth = reader.ReadSingle(); } } } internal class BulmaDamageHolder : MonoBehaviour { public GameObject attacker; } internal class BulmaDragonBallHolder : MonoBehaviour { private float stopwatch; public bool activateBalls; private Inventory inventory; private CharacterMaster master; private bool effectSpawned; private void Start() { inventory = ((Component)this).GetComponent<Inventory>(); master = ((Component)this).GetComponent<CharacterMaster>(); } private void FixedUpdate() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Expected O, but got Unknown //IL_03d0: Unknown result type (might be due to invalid IL or missing references) //IL_03d5: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e5: Expected O, but got Unknown if (!activateBalls) { return; } if (!effectSpawned) { effectSpawned = true; if (Object.op_Implicit((Object)(object)master)) { CharacterBody body = master.GetBody(); if (Object.op_Implicit((Object)(object)body)) { if (Object.op_Implicit((Object)(object)((Component)body).GetComponent<BulmaBehaviour>())) { EffectManager.SimpleMuzzleFlash(Prefabs.shenlongEffect, ((Component)body).gameObject, "base", true); } else { EffectData val = new EffectData { origin = body.corePosition }; val.SetHurtBoxReference(body.mainHurtBox); EffectManager.SpawnEffect(Prefabs.shenlongEffect, val, true); } } } } stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= 2f)) { return; } stopwatch = 0f; activateBalls = false; effectSpawned = false; foreach (ItemDef dragonball in Prefabs.dragonballs) { if (inventory.GetItemCount(dragonball) > 0) { inventory.RemoveItem(dragonball, 1); } } ItemDef val2 = null; if (inventory.GetItemCount(Prefabs.boostDamage) < 5) { val2 = Prefabs.boostDamage; } else if (inventory.GetItemCount(Prefabs.boostAtkSpeed) < 5) { val2 = Prefabs.boostAtkSpeed; } else if (inventory.GetItemCount(Prefabs.boostHP) < 5) { val2 = Prefabs.boostHP; } else if (inventory.GetItemCount(Prefabs.boostSpeed) < 5) { val2 = Prefabs.boostSpeed; } else if (inventory.GetItemCount(Prefabs.boostRegen) < 5) { val2 = Prefabs.boostRegen; } else if (inventory.GetItemCount(Prefabs.boostCrit) < 5) { val2 = Prefabs.boostCrit; } else { ItemDef[] array = (ItemDef[])(object)new ItemDef[6] { Prefabs.boostDamage, Prefabs.boostAtkSpeed, Prefabs.boostHP, Prefabs.boostSpeed, Prefabs.boostRegen, Prefabs.boostCrit }; val2 = array[RoR2Application.rng.RangeInt(0, array.Length - 1)]; } inventory.GiveItem(val2, 5); string text = ""; ItemDef val3 = val2; ItemDef val4 = val3; if ((Object)(object)val4 == (Object)(object)Prefabs.boostDamage) { text = "Damage"; } else { ItemDef val5 = val4; if ((Object)(object)val5 == (Object)(object)Prefabs.boostAtkSpeed) { text = "AttackSpeed"; } else { ItemDef val6 = val4; if ((Object)(object)val6 == (Object)(object)Prefabs.boostHP) { text = "HP"; } else { ItemDef val7 = val4; if ((Object)(object)val7 == (Object)(object)Prefabs.boostSpeed) { text = "MovementSpeed"; } else { ItemDef val8 = val4; if ((Object)(object)val8 == (Object)(object)Prefabs.boostRegen) { text = "Regen"; } else { ItemDef val9 = val4; if ((Object)(object)val9 == (Object)(object)Prefabs.boostCrit) { text = "Crit"; } } } } } } ((TMP_Text)Prefabs.statUpEffect.GetComponentInChildren<TextMeshPro>()).text = text + " Up!"; if (!Object.op_Implicit((Object)(object)master)) { return; } CharacterBody body2 = master.GetBody(); if (Object.op_Implicit((Object)(object)body2)) { if (Object.op_Implicit((Object)(object)((Component)body2).GetComponent<BulmaBehaviour>())) { EffectManager.SimpleMuzzleFlash(Prefabs.statUpEffect, ((Component)body2).gameObject, "center", true); return; } EffectData val10 = new EffectData { origin = body2.corePosition }; val10.SetHurtBoxReference(body2.mainHurtBox); EffectManager.SpawnEffect(Prefabs.statUpEffect, val10, true); } } } internal class DisplayModelBehaviour : MonoBehaviour { public Animator animator; public static int poseIndex = -2; private void Start() { poseIndex++; if (poseIndex >= 0) { animator.Play("DisplayPose" + poseIndex, 0); ChildLocator component = ((Component)animator).GetComponent<ChildLocator>(); ((Component)component.FindChild("smg")).gameObject.SetActive(false); ((Component)component.FindChild("smgOutline")).gameObject.SetActive(false); } if (poseIndex >= 18) { poseIndex = -2; } AkSoundEngine.PostEvent(Sounds.Play_Bulma_Select, ((Component)this).gameObject); } } internal class DragonBallOwnerComponent : MonoBehaviour { public GameObject owner; } internal class HelpMe : MonoBehaviour { public float radius = 0.04f; public float height = 0.35f; public bool Do; private void FixedUpdate() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) if (!Do) { return; } Do = false; PhysicMaterial val = Addressables.LoadAssetAsync<PhysicMaterial>((object)"RoR2/Base/Common/physmatRagdoll.physicMaterial").WaitForCompletion(); List<Transform> list = new List<Transform>(); List<string> list2 = new List<string> { "mixamorig:Hips", "mixamorig:Spine", "mixamorig:Spine1", "mixamorig:Spine2", "mixamorig:LeftShoulder", "mixamorig:LeftArm", "mixamorig:LeftForeArm", "mixamorig:LeftHand", "mixamorig:Neck", "mixamorig:Head", "bunny_ears_root", "hairRoot", "mixamorig:RightShoulder", "mixamorig:RightArm", "mixamorig:RightForeArm", "mixamorig:RightHand", "mixamorig:LeftUpLeg", "mixamorig:LeftLeg", "mixamorig:LeftFoot", "mixamorig:RightUpLeg", "mixamorig:RightLeg", "mixamorig:RightFoot" }; Transform[] componentsInChildren = ((Component)this).GetComponentsInChildren<Transform>(true); foreach (Transform val2 in componentsInChildren) { string name = ((Object)val2).name; if (list2.Contains(name)) { list.Add(val2); GameObject gameObject = ((Component)val2).gameObject; gameObject.layer = LayerIndex.ragdoll.intVal; if (!Object.op_Implicit((Object)(object)gameObject.GetComponent<Rigidbody>())) { gameObject.AddComponent<Rigidbody>(); } CapsuleCollider val3 = gameObject.AddComponent<CapsuleCollider>(); val3.radius = radius; val3.height = height; ((Collider)val3).material = val; ((Collider)val3).sharedMaterial = val; Rigidbody component = ((Component)val2.parent).GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)component)) { CharacterJoint val4 = gameObject.AddComponent<CharacterJoint>(); ((Joint)val4).autoConfigureConnectedAnchor = true; ((Joint)val4).enablePreprocessing = true; ((Joint)val4).connectedBody = component; } } } RagdollController val5 = ((Component)this).gameObject.AddComponent<RagdollController>(); val5.bones = list.ToArray(); } } internal class TracerRepos : MonoBehaviour { private GameObject obj; private Tracer tracer; private void OnEnable() { tracer = ((Component)this).GetComponent<Tracer>(); } private void Update() { //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)obj) && Object.op_Implicit((Object)(object)tracer) && Object.op_Implicit((Object)(object)tracer.beamObject)) { obj = tracer.beamObject; Vector3 localPosition = obj.transform.localPosition; obj.transform.localPosition = new Vector3(localPosition.x, localPosition.y, localPosition.z + 2f); } } } internal class BulmaSkillDef : SkillDef { private class InstanceData : BaseSkillInstanceData { public BulmaBehaviour behaviour; public SkillLocator skillLocator; } public override BaseSkillInstanceData OnAssigned([NotNull] GenericSkill skillSlot) { return (BaseSkillInstanceData)(object)new InstanceData { behaviour = ((Component)skillSlot).GetComponent<BulmaBehaviour>(), skillLocator = ((Component)skillSlot).GetComponent<SkillLocator>() }; } internal static bool IsExecutable([NotNull] GenericSkill skillSlot) { InstanceData instanceData = (InstanceData)(object)skillSlot.skillInstanceData; BulmaBehaviour behaviour = instanceData.behaviour; SkillLocator skillLocator = instanceData.skillLocator; if (Object.op_Implicit((Object)(object)behaviour) && Object.op_Implicit((Object)(object)skillLocator) && (Object)(object)skillSlot != (Object)(object)skillLocator.primary) { return !behaviour.driving && behaviour.canExecute; } return true; } public override bool CanExecute([NotNull] GenericSkill skillSlot) { return IsExecutable(skillSlot) && ((SkillDef)this).CanExecute(skillSlot); } public override bool IsReady([NotNull] GenericSkill skillSlot) { return ((SkillDef)this).IsReady(skillSlot) && IsExecutable(skillSlot); } } internal class Hook { internal static void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); GlobalEventManager.onCharacterDeathGlobal += GlobalEventManager_onCharacterDeathGlobal; CharacterBody.onBodyInventoryChangedGlobal += CharacterBody_onBodyInventoryChangedGlobal; } private static void CharacterBody_onBodyInventoryChangedGlobal(CharacterBody body) { if (!NetworkServer.active) { return; } List<ItemDef> list = new List<ItemDef>(); list.AddRange(Prefabs.dragonballs); List<ItemDef> list2 = new List<ItemDef>(); list2.AddRange(list); bool flag = false; foreach (ItemDef item in list) { if (body.inventory.GetItemCount(item) > 0) { flag = true; list2.Remove(item); } } if (flag && Object.op_Implicit((Object)(object)body.masterObject) && !Object.op_Implicit((Object)(object)body.masterObject.GetComponent<BulmaDragonBallHolder>())) { body.masterObject.AddComponent<BulmaDragonBallHolder>(); } if (list2.Count == 0 && Object.op_Implicit((Object)(object)body.inventory)) { ((Component)body.inventory).GetComponent<BulmaDragonBallHolder>().activateBalls = true; } } private static void GlobalEventManager_onCharacterDeathGlobal(DamageReport damageReport) { //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) if (!NetworkServer.active || !Object.op_Implicit((Object)(object)damageReport.victim)) { return; } BulmaDamageHolder[] components = ((Component)damageReport.victim).GetComponents<BulmaDamageHolder>(); if (components == null || components.Length == 0) { return; } BulmaDamageHolder[] array = components; foreach (BulmaDamageHolder bulmaDamageHolder in array) { CharacterBody component = bulmaDamageHolder.attacker.GetComponent<CharacterBody>(); if (!Object.op_Implicit((Object)(object)component) || !Object.op_Implicit((Object)(object)component.inventory)) { continue; } List<ItemDef> list = new List<ItemDef>(); list.AddRange(Prefabs.dragonballs); List<ItemDef> list2 = new List<ItemDef>(); list2.AddRange(list); foreach (ItemDef item in list) { if (component.inventory.GetItemCount(item) > 0) { list2.Remove(item); } } if (list2.Count > 0 && RoR2Application.rng.RangeInt(0, 100) <= MainPlugin.dragonballPercentage.Value) { PickupDropletController.CreatePickupDroplet(PickupCatalog.FindPickupIndex((list2.Count == 1) ? list2[0].itemIndex : list2[RoR2Application.rng.RangeInt(0, list2.Count - 1)].itemIndex), damageReport.victimBody.corePosition, Vector3.up * 20f); } } } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageInfo.attacker) && Object.op_Implicit((Object)(object)damageInfo.attacker.GetComponent<BulmaBehaviour>())) { BulmaDamageHolder component = ((Component)self).gameObject.GetComponent<BulmaDamageHolder>(); if (!Object.op_Implicit((Object)(object)component) || (Object.op_Implicit((Object)(object)component) & Object.op_Implicit((Object)(object)component.attacker) & ((Object)(object)component.attacker != (Object)(object)damageInfo.attacker))) { ((Component)self).gameObject.AddComponent<BulmaDamageHolder>().attacker = damageInfo.attacker; } } BulmaBehaviour component2 = ((Component)self).GetComponent<BulmaBehaviour>(); if (Object.op_Implicit((Object)(object)component2) && Object.op_Implicit((Object)(object)self.body) && self.body.HasBuff(Prefabs.car)) { GameObject val = Prefabs.carImpactSmall; if (damageInfo.damage >= component2.networkedCarHealth) { damageInfo.damage -= component2.networkedCarHealth; component2.NetworknetworkedCarHealth = 0f; self.body.RemoveBuff(Prefabs.car); val = Prefabs.Load<GameObject>("RoR2/Base/Toolbot/ImpactToolbotDashLarge.prefab"); EffectManager.SimpleEffect(Prefabs.Load<GameObject>("RoR2/Base/Toolbot/RoboCratePodGroundImpact.prefab"), ((Component)self).transform.position, Quaternion.identity, true); } else { component2.NetworknetworkedCarHealth = component2.networkedCarHealth - damageInfo.damage; damageInfo.rejected = true; } EffectManager.SimpleEffect(val, damageInfo.position, Quaternion.identity, true); } orig.Invoke(self, damageInfo); } private static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (Object.op_Implicit((Object)(object)sender.inventory)) { int itemCount = sender.inventory.GetItemCount(Prefabs.boostDamage); if (itemCount > 0) { args.damageMultAdd += 0.1f * (float)itemCount; } int itemCount2 = sender.inventory.GetItemCount(Prefabs.boostAtkSpeed); if (itemCount2 > 0) { args.attackSpeedMultAdd += 0.1f * (float)itemCount2; } int itemCount3 = sender.inventory.GetItemCount(Prefabs.boostHP); if (itemCount3 > 0) { args.healthMultAdd += 0.1f * (float)itemCount3; } int itemCount4 = sender.inventory.GetItemCount(Prefabs.boostRegen); if (itemCount4 > 0) { args.regenMultAdd += 0.1f * (float)itemCount4; } int itemCount5 = sender.inventory.GetItemCount(Prefabs.boostSpeed); if (itemCount5 > 0) { args.moveSpeedMultAdd += 0.1f * (float)itemCount5; } int itemCount6 = sender.inventory.GetItemCount(Prefabs.boostCrit); if (itemCount6 > 0) { args.critAdd += (float)(2 * itemCount6); } } if (sender.HasBuff(Prefabs.car)) { args.moveSpeedMultAdd += 2f; } } } [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.*/)] [BepInPlugin("com.Dragonyck.Bulma", "Bulma", "1.0.2")] [NetworkCompatibility(/*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 MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Bulma"; public const string MODNAME = "Bulma"; public const string VERSION = "1.0.2"; public const string SURVIVORNAME = "Bulma"; public const string SURVIVORNAMEKEY = "BULMA"; public static GameObject characterPrefab; private static readonly Color characterColor = new Color(0.7f, 0.7f, 0.7f); public static ConfigEntry<int> dragonballPercentage; private void Awake() { //IL_0011: 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_002d: Expected O, but got Unknown //IL_002d: Expected O, but got Unknown dragonballPercentage = ((BaseUnityPlugin)this).Config.Bind<int>(new ConfigDefinition("Chance To Drop DragonBalls On Kill", "Chance"), 15, new ConfigDescription("", (AcceptableValueBase)null, Array.Empty<object>())); Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); Hook.Hooks(); if (ModCompat.DBZUtilsEnabled) { ModCompat.AddDBZUtilsSupport(); } } internal static void CreatePrefab() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_0257: 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_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_03c7: Unknown result type (might be due to invalid IL or missing references) //IL_042b: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_045d: Unknown result type (might be due to invalid IL or missing references) //IL_0462: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_048b: Unknown result type (might be due to invalid IL or missing references) //IL_0490: Unknown result type (might be due to invalid IL or missing references) //IL_065f: Unknown result type (might be due to invalid IL or missing references) //IL_0678: Unknown result type (might be due to invalid IL or missing references) //IL_0691: Unknown result type (might be due to invalid IL or missing references) //IL_0533: Unknown result type (might be due to invalid IL or missing references) //IL_07f2: 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) //IL_084d: Unknown result type (might be due to invalid IL or missing references) //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0592: Unknown result type (might be due to invalid IL or missing references) //IL_0bc4: Unknown result type (might be due to invalid IL or missing references) //IL_0bc9: Unknown result type (might be due to invalid IL or missing references) //IL_0c1e: Unknown result type (might be due to invalid IL or missing references) //IL_0c30: Unknown result type (might be due to invalid IL or missing references) //IL_0c3a: Unknown result type (might be due to invalid IL or missing references) //IL_0c3f: Unknown result type (might be due to invalid IL or missing references) //IL_0c60: Unknown result type (might be due to invalid IL or missing references) //IL_0c72: Unknown result type (might be due to invalid IL or missing references) //IL_0c77: Unknown result type (might be due to invalid IL or missing references) //IL_0c8b: Unknown result type (might be due to invalid IL or missing references) //IL_0c90: Unknown result type (might be due to invalid IL or missing references) //IL_0e2c: Unknown result type (might be due to invalid IL or missing references) //IL_0e3b: Unknown result type (might be due to invalid IL or missing references) //IL_0e45: Unknown result type (might be due to invalid IL or missing references) //IL_0ec0: Unknown result type (might be due to invalid IL or missing references) //IL_0ec5: Unknown result type (might be due to invalid IL or missing references) //IL_0ee8: Unknown result type (might be due to invalid IL or missing references) //IL_0eed: Unknown result type (might be due to invalid IL or missing references) //IL_0f1b: Unknown result type (might be due to invalid IL or missing references) //IL_0f20: Unknown result type (might be due to invalid IL or missing references) //IL_0d1b: Unknown result type (might be due to invalid IL or missing references) //IL_0d3e: Unknown result type (might be due to invalid IL or missing references) //IL_0d61: Unknown result type (might be due to invalid IL or missing references) //IL_0d84: Unknown result type (might be due to invalid IL or missing references) GameObject val = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/CommandoBody.prefab").WaitForCompletion(); characterPrefab = PrefabAPI.InstantiateClone(val, "BulmaBody", true); characterPrefab.AddComponent<BulmaBehaviour>(); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject); GameObject val2 = Assets.MainAssetBundle.LoadAsset<GameObject>("bulma"); GameObject val3 = new GameObject("ModelBase"); val3.transform.parent = characterPrefab.transform; val3.transform.localPosition = new Vector3(0f, -0.9f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = new Vector3(1.25f, 1.25f, 1.25f); GameObject val4 = new GameObject("AimOrigin"); val4.transform.parent = val3.transform; val4.transform.localPosition = new Vector3(0f, 0.8125f, 0f); val4.transform.localRotation = Quaternion.identity; val4.transform.localScale = Vector3.one; Transform transform = val2.transform; transform.parent = val3.transform; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.moveVector = Vector3.zero; component.targetTransform = val3.transform; component.overrideAnimatorForwardTransform = null; component.rootMotionAccumulator = null; component.modelAnimator = val2.GetComponentInChildren<Animator>(); component.driveFromRootRotation = false; component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "BulmaBody"; component2.baseNameToken = "BULMA_NAME"; component2.subtitleNameToken = "BULMA_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 110f; component2.levelMaxHealth = 35f; component2.baseRegen = 1f; component2.levelRegen = 0.33f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 0f; component2.levelArmor = 0f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val4.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portraitx128").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.bodyColor = characterColor; CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>(); component3.walkSpeedPenaltyCoefficient = 1f; component3.characterDirection = component; component3.muteWalkMotion = false; component3.mass = 80f; component3.airControl = 0.25f; component3.disableAirControlUntilCollision = false; component3.generateParametersOnAwake = true; InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CharacterCameraParams val5 = Object.Instantiate<CharacterCameraParams>(val.GetComponent<CameraTargetParams>().cameraParams); val5.data.idealLocalCameraPos = BlendableVector3.op_Implicit(new Vector3(0f, 0f, -5.2f)); CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>(); component5.cameraParams = val5; component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val3.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; CharacterModel val6 = val2.AddComponent<CharacterModel>(); SkinnedMeshRenderer[] componentsInChildren = val2.GetComponentsInChildren<SkinnedMeshRenderer>(true); List<RendererInfo> list = new List<RendererInfo>(); for (int i = 0; i < componentsInChildren.Length; i++) { if (!((Object)componentsInChildren[i]).name.Contains("car")) { list.Add(new RendererInfo { renderer = (Renderer)(object)componentsInChildren[i], defaultMaterial = (((Object)componentsInChildren[i]).name.Contains("Outline") ? ((Renderer)componentsInChildren[i]).material : Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture)), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } } RendererInfo[] array = list.ToArray(); val6.body = component2; val6.baseRendererInfos = array; val6.autoPopulateLightInfos = true; val6.invisibilityCount = 0; val6.temporaryOverlays = new List<TemporaryOverlay>(); val6.mainSkinnedMeshRenderer = componentsInChildren[0]; GameObject gameObject = ((Component)transform).gameObject; CharacterModel component7 = gameObject.GetComponent<CharacterModel>(); ModelSkinController val7 = gameObject.AddComponent<ModelSkinController>(); ChildLocator component8 = gameObject.GetComponent<ChildLocator>(); LanguageAPI.Add("BULMABODY_DEFAULT_SKIN_NAME", "Youth"); LanguageAPI.Add("BULMABODY_SKIN01_NAME", "Young"); LanguageAPI.Add("BULMABODY_SKIN02_NAME", "Bunny"); val7.skins = (SkinDef[])(object)new SkinDef[3] { LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "BULMABODY_DEFAULT_SKIN_NAME", 0, array)), LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "BULMABODY_SKIN01_NAME", 1, array)), LoadoutAPI.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(componentsInChildren, gameObject, "BULMABODY_SKIN02_NAME", 2, array)) }; HealthComponent component9 = characterPrefab.GetComponent<HealthComponent>(); component9.health = component2.baseMaxHealth; component9.shield = 0f; component9.barrier = 0f; component9.magnetiCharge = 0f; component9.body = null; component9.dontShowHealthbar = false; component9.globalDeathEventChanceCoefficient = 1f; characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component10 = characterPrefab.GetComponent<SfxLocator>(); component10.deathSound = "Play_ui_player_death"; component10.barkSound = ""; component10.openSound = ""; component10.landingSound = "Play_char_land"; component10.fallDamageSound = "Play_char_land_fall_damage"; component10.aliveLoopStart = ""; component10.aliveLoopStop = ""; characterPrefab.GetComponent<Rigidbody>().mass = 100f; HurtBoxGroup val8 = val2.AddComponent<HurtBoxGroup>(); List<HurtBox> list2 = new List<HurtBox>(); Collider[] componentsInChildren2 = val2.GetComponentsInChildren<Collider>(); foreach (Collider val9 in componentsInChildren2) { HurtBox val10 = ((Component)val9).gameObject.AddComponent<HurtBox>(); ((Component)val10).gameObject.layer = LayerIndex.entityPrecise.intVal; val10.healthComponent = component9; val10.isBullseye = true; val10.damageModifier = (DamageModifier)0; val10.hurtBoxGroup = val8; val10.indexInGroup = 0; val8.mainHurtBox = val10; val8.bullseyeCount = 1; list2.Add(val10); } val8.hurtBoxes = list2.ToArray(); PhysicMaterial val11 = Addressables.LoadAssetAsync<PhysicMaterial>((object)"RoR2/Base/Common/physmatRagdoll.physicMaterial").WaitForCompletion(); List<Transform> list3 = new List<Transform>(); List<string> list4 = new List<string> { "mixamorig:Hips", "mixamorig:Spine", "mixamorig:Spine1", "mixamorig:Spine2", "mixamorig:LeftShoulder", "mixamorig:LeftArm", "mixamorig:LeftForeArm", "mixamorig:LeftHand", "mixamorig:Neck", "mixamorig:Head", "bunny_ears_root", "hairRoot", "mixamorig:RightShoulder", "mixamorig:RightArm", "mixamorig:RightForeArm", "mixamorig:RightHand", "mixamorig:LeftUpLeg", "mixamorig:LeftLeg", "mixamorig:LeftFoot", "mixamorig:RightUpLeg", "mixamorig:RightLeg", "mixamorig:RightFoot" }; Transform[] componentsInChildren3 = val2.GetComponentsInChildren<Transform>(true); foreach (Transform val12 in componentsInChildren3) { string name = ((Object)val12).name; if (list4.Contains(name)) { list3.Add(val12); GameObject gameObject2 = ((Component)val12).gameObject; gameObject2.layer = LayerIndex.ragdoll.intVal; if (!Object.op_Implicit((Object)(object)gameObject2.GetComponent<Rigidbody>())) { gameObject2.AddComponent<Rigidbody>(); } CapsuleCollider val13 = gameObject2.AddComponent<CapsuleCollider>(); val13.radius = 0.04f; val13.height = 0.45f; ((Collider)val13).material = val11; ((Collider)val13).sharedMaterial = val11; Rigidbody component11 = ((Component)val12.parent).GetComponent<Rigidbody>(); if (Object.op_Implicit((Object)(object)component11)) { CharacterJoint val14 = gameObject2.AddComponent<CharacterJoint>(); ((Joint)val14).autoConfigureConnectedAnchor = true; ((Joint)val14).enablePreprocessing = true; ((Joint)val14).connectedBody = component11; } } } RagdollController val15 = val2.AddComponent<RagdollController>(); val15.bones = list3.ToArray(); ChildLocator component12 = val2.GetComponent<ChildLocator>(); ((Component)component12.FindChild("rpg")).gameObject.SetActive(false); ((Component)component12.FindChild("rpgOutline")).gameObject.SetActive(false); ((Component)component12.FindChild("rocket")).gameObject.SetActive(false); ((Component)component12.FindChild("rocketOutline")).gameObject.SetActive(false); ((Component)component12.FindChild("blaster")).gameObject.SetActive(false); ((Component)component12.FindChild("blasterOutline")).gameObject.SetActive(false); ((Component)component12.FindChild("young")).gameObject.SetActive(false); ((Component)component12.FindChild("youngOutline")).gameObject.SetActive(false); ((Component)component12.FindChild("bunny")).gameObject.SetActive(false); ((Component)component12.FindChild("bunnyOutline")).gameObject.SetActive(false); Transform val16 = component12.FindChild("car"); ((Component)val16).gameObject.SetActive(false); Transform val17 = component12.FindChild("exhaustMuzzle"); GameObject val18 = Object.Instantiate<GameObject>(((Component)Prefabs.Load<GameObject>("RoR2/Base/Common/Props/Geyser.prefab").GetComponentsInChildren<ParticleSystemRenderer>()[1]).gameObject, val17.position, Quaternion.identity); ParticleSystemRenderer component13 = val18.GetComponent<ParticleSystemRenderer>(); ((Renderer)component13).material = Prefabs.Load<Material>("RoR2/Base/Common/VFX/matDustDirectionalDark.mat"); component13.alignment = (ParticleSystemRenderSpace)0; val18.transform.parent = val17; val18.transform.localPosition = new Vector3(0.15f, 0.2f, 0.15f); val18.transform.localRotation = Quaternion.Euler(Vector3.forward * 270f); val18.transform.localScale = new Vector3(0.15f, 0.0047f, 0.15f); MainModule main = val18.GetComponent<ParticleSystem>().main; ((MainModule)(ref main)).simulationSpeed = 1.2f; GameObject gameObject3 = ((Component)((Component)Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Toolbot/ToolbotBody.prefab").WaitForCompletion().GetComponent<ModelLocator>() .modelTransform).GetComponent<SkateSparks>().leftParticleSystem).gameObject; for (int l = 0; l < 4; l++) { GameObject val19 = PrefabAPI.InstantiateClone(gameObject3, "TankSprintSparks", false); val19.transform.SetParent(val2.transform); switch (l) { case 1: val19.transform.localPosition = new Vector3(0f, 0f, 0f); break; case 2: val19.transform.localPosition = new Vector3(0f, 0f, 0f); break; case 3: val19.transform.localPosition = new Vector3(0f, 0f, 0f); break; case 4: val19.transform.localPosition = new Vector3(0f, 0f, 0f); break; } SkateSparks val20 = ((Component)val16).gameObject.AddComponent<SkateSparks>(); val20.maxStress = 16f; val20.minStressForEmission = 4f; val20.overspeedStressCoefficient = 40f; val20.accelerationStressCoefficient = 8f; val20.perpendicularTravelStressCoefficient = 22f; val20.maxEmissionRate = 400f; val20.landingStress = 4; val20.leftParticleSystem = val19.GetComponent<ParticleSystem>(); } Utils.CreateHitbox("Car", val2.transform, new Vector3(2f, 2.5f, 3f)).transform.localPosition = Vector3.up * 0.8f; SkinnedMeshRenderer componentInChildren = ((Component)component12.FindChild("car")).GetComponentInChildren<SkinnedMeshRenderer>(); ((Renderer)componentInChildren).material = Utils.InstantiateMaterial(((Renderer)componentInChildren).material.mainTexture); KinematicCharacterMotor component14 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component14.CharacterController = (BaseCharacterController)(object)component3; FootstepHandler val21 = val2.AddComponent<FootstepHandler>(); val21.baseFootstepString = "Play_player_footstep"; val21.sprintFootstepOverrideString = ""; val21.enableFootstepDust = true; val21.footstepDustPrefab = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/GenericFootstepDust.prefab").WaitForCompletion(); EntityStateMachine component15 = ((Component)component2).GetComponent<EntityStateMachine>(); component15.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component16 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component16.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component16.deathState = new SerializableEntityStateType(typeof(DeathState)); NetworkStateMachine component17 = ((Component)component2).GetComponent<NetworkStateMachine>(); component17.stateMachines = ((Component)component2).GetComponents<EntityStateMachine>(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > "; string text2 = "..and so she went to find a place with room service."; string text3 = "..and so she went to find where the others went off to."; LanguageAPI.Add("BULMA_NAME", "Bulma"); LanguageAPI.Add("BULMA_DESCRIPTION", text); LanguageAPI.Add("BULMA_SUBTITLE", ""); LanguageAPI.Add("BULMA_OUTRO", text2); LanguageAPI.Add("BULMA_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "BULMA_NAME"; val.unlockableDef = null; val.descriptionToken = "BULMA_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "BulmaDisplay"); val.outroFlavorToken = "BULMA_OUTRO"; val.desiredSortPosition = 15f; val.mainEndingEscapeFailureFlavorToken = "BULMA_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); GameObject val2 = PrefabAPI.InstantiateClone(Prefabs.Load<GameObject>("RoR2/Base/Commando/CommandoMonsterMaster.prefab"), "BulmaMaster", true); ContentAddition.AddMaster(val2); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; } private void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<PrimaryRPG>(ref flag); ContentAddition.AddEntityState<PrimaryHonk>(ref flag); ContentAddition.AddEntityState<SecondaryCast>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<SpecialCast>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<BulmaBaseState>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); ContentAddition.AddEntityState<CapsuleThrowState>(ref flag); ContentAddition.AddEntityState<DeathState>(ref flag); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("BULMA_PASSIVE_NAME", "DragonBalls"); LanguageAPI.Add("BULMA_PASSIVE_DESCRIPTION", "Dragonballs randomly drop from enemies. Collecting all 7 grants you a <style=cIsDamage>permanent</style> stat buff. After you get a buff for each stat, you start getting random stat buffs."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "BULMA_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "BULMA_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("passive"); } private void PrimarySetup() { //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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0243: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("BULMA_M1", "Machine Gun"); LanguageAPI.Add("BULMA_M1_DESCRIPTION", "Rapid-fire for <style=cIsDamage>30% damage</style>."); BulmaSkillDef bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(Primary)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Weapon"; ((SkillDef)bulmaSkillDef).baseMaxStock = 50; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 2f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = true; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)bulmaSkillDef).isCombatSkill = true; ((SkillDef)bulmaSkillDef).mustKeyPress = false; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = true; ((SkillDef)bulmaSkillDef).rechargeStock = 120; ((SkillDef)bulmaSkillDef).requiredStock = 1; ((SkillDef)bulmaSkillDef).stockToConsume = 1; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("smgIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_M1_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_M1"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_M1"; ContentAddition.AddSkillDef((SkillDef)(object)bulmaSkillDef); component.primary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)bulmaSkillDef); LanguageAPI.Add("BULMA_M1_RPG", "Rocket Launcher"); LanguageAPI.Add("BULMA_M1_RPG_DESCRIPTION", "Fire a fast missile that explodes on contact for <style=cIsDamage>800% damage</style>."); bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(PrimaryRPG)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Weapon"; ((SkillDef)bulmaSkillDef).baseMaxStock = 4; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 0f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = true; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)bulmaSkillDef).isCombatSkill = true; ((SkillDef)bulmaSkillDef).mustKeyPress = false; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = true; ((SkillDef)bulmaSkillDef).rechargeStock = 0; ((SkillDef)bulmaSkillDef).requiredStock = 1; ((SkillDef)bulmaSkillDef).stockToConsume = 1; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("rpgFireIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_M1_RPG_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_M1_RPG"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_M1_RPG"; Special.primaryOverride = (SkillDef)(object)bulmaSkillDef; LanguageAPI.Add("BULMA_M1_HONK", "HONK"); LanguageAPI.Add("BULMA_M1_HONK_DESCRIPTION", "Honk."); bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(PrimaryHonk)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Slide"; ((SkillDef)bulmaSkillDef).baseMaxStock = 0; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 0f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = true; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)bulmaSkillDef).isCombatSkill = true; ((SkillDef)bulmaSkillDef).mustKeyPress = false; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = false; ((SkillDef)bulmaSkillDef).rechargeStock = 0; ((SkillDef)bulmaSkillDef).requiredStock = 0; ((SkillDef)bulmaSkillDef).stockToConsume = 0; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("honkIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_M1_HONK_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_M1_HONK"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_M1_HONK"; Utility.primaryOverride = (SkillDef)(object)bulmaSkillDef; } private void SecondarySetup() { //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_007b: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("BULMA_M2", "Ray Gun"); LanguageAPI.Add("BULMA_M2_DESCRIPTION", "Charge a red beam of energy for <style=cIsDamage>650% damage</style>."); BulmaSkillDef bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(SecondaryCast)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Weapon"; ((SkillDef)bulmaSkillDef).baseMaxStock = 1; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 5f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = false; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)1; ((SkillDef)bulmaSkillDef).isCombatSkill = true; ((SkillDef)bulmaSkillDef).mustKeyPress = true; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = true; ((SkillDef)bulmaSkillDef).rechargeStock = 1; ((SkillDef)bulmaSkillDef).requiredStock = 1; ((SkillDef)bulmaSkillDef).stockToConsume = 1; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("beamIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_M2_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_M2"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_M2"; ContentAddition.AddSkillDef((SkillDef)(object)bulmaSkillDef); component.secondary = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)bulmaSkillDef); } private void UtilitySetup() { //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_007b: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("BULMA_UTIL", "Capsule: Renault 5 Turbo"); LanguageAPI.Add("BULMA_UTIL_DESCRIPTION", "Activate a capsule to grant you a speedy car. The car has <style=cIsHealth>50%</style> of your max <style=cIsHealth>HP</style>. It deactives after it's health is dropped to or below 0, or after reactivating this ability."); BulmaSkillDef bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(CapsuleThrowState)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Weapon"; ((SkillDef)bulmaSkillDef).baseMaxStock = 1; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 5f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = false; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)1; ((SkillDef)bulmaSkillDef).isCombatSkill = false; ((SkillDef)bulmaSkillDef).mustKeyPress = true; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = false; ((SkillDef)bulmaSkillDef).rechargeStock = 1; ((SkillDef)bulmaSkillDef).requiredStock = 1; ((SkillDef)bulmaSkillDef).stockToConsume = 1; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("carIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_UTIL_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_UTIL"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_UTIL"; ContentAddition.AddSkillDef((SkillDef)(object)bulmaSkillDef); component.utility = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)bulmaSkillDef); } private void SpecialSetup() { //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_007b: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("BULMA_SPEC", "Capsule: Rocket Launcher"); LanguageAPI.Add("BULMA_SPEC_DESCRIPTION", "Activate a capsule to grant you a powerful <style=cIsDamage>Rocket Launcher</style>. It has <style=cIsUtility>4</style> missiles."); BulmaSkillDef bulmaSkillDef = ScriptableObject.CreateInstance<BulmaSkillDef>(); ((SkillDef)bulmaSkillDef).activationState = new SerializableEntityStateType(typeof(SpecialCast)); ((SkillDef)bulmaSkillDef).activationStateMachineName = "Slide"; ((SkillDef)bulmaSkillDef).baseMaxStock = 1; ((SkillDef)bulmaSkillDef).baseRechargeInterval = 12f; ((SkillDef)bulmaSkillDef).beginSkillCooldownOnSkillEnd = true; ((SkillDef)bulmaSkillDef).canceledFromSprinting = false; ((SkillDef)bulmaSkillDef).fullRestockOnAssign = false; ((SkillDef)bulmaSkillDef).interruptPriority = (InterruptPriority)0; ((SkillDef)bulmaSkillDef).isCombatSkill = false; ((SkillDef)bulmaSkillDef).mustKeyPress = true; ((SkillDef)bulmaSkillDef).cancelSprintingOnActivation = false; ((SkillDef)bulmaSkillDef).rechargeStock = 1; ((SkillDef)bulmaSkillDef).requiredStock = 1; ((SkillDef)bulmaSkillDef).stockToConsume = 1; ((SkillDef)bulmaSkillDef).icon = Assets.MainAssetBundle.LoadAsset<Sprite>("rpgIcon"); ((SkillDef)bulmaSkillDef).skillDescriptionToken = "BULMA_SPEC_DESCRIPTION"; ((SkillDef)bulmaSkillDef).skillName = "BULMA_SPEC"; ((SkillDef)bulmaSkillDef).skillNameToken = "BULMA_SPEC"; ContentAddition.AddSkillDef((SkillDef)(object)bulmaSkillDef); component.special = Utils.NewGenericSkill(characterPrefab, (SkillDef)(object)bulmaSkillDef); } } public static class ModCompat { private static bool? utilsEnabled; public static bool DBZUtilsEnabled { get { if (!utilsEnabled.HasValue) { utilsEnabled = Chainloader.PluginInfos.ContainsKey("com.Dragonyck.DBZUtils"); } return utilsEnabled.Value; } } public static void AddDBZUtilsSupport() { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) DBZSurvivorDef val = ScriptableObject.CreateInstance<DBZSurvivorDef>(); val.attackVO = Sounds.Play_Bulma_ATK; val.bossEncounterVO = Sounds.Play_Bulma_Encounter; val.bossKillVO = Sounds.Play_Bulma_BossKill; val.heavyHitVO = Sounds.Play_Bulma_HeavyDMG; val.killVO = Sounds.Play_Bulma_Kill; val.lightHitVO = Sounds.Play_Bulma_DMG; val.skillVO = Sounds.Play_Bulma_Skill; val.deathVO = Sounds.Play_Bulma_Death; val.hasSkins = true; DBZSurvivorCatalog.AddDBZSurvivorDef("BULMA_NAME", val); DBZSurvivors.survivorSceneProps.Add(((Component)MainPlugin.characterPrefab.GetComponent<ModelLocator>().modelTransform).gameObject, new TransformMemory { position = new Vector3(0.1f, 1.157f, 11.45f) }); MainPlugin.characterPrefab.AddComponent<VOHandler>(); } } internal class Prefabs { internal static GameObject capsuleExplosionEffect; internal static GameObject rayEffect; internal static GameObject rayChargeEffect; internal static GameObject rpgProjectile; internal static GameObject rpgProjectileGhost; internal static GameObject rpgExplosionEffect; internal static GameObject rpgCrosshair; internal static GameObject carImpactSmall; internal static GameObject shenlongEffect; internal static GameObject statUpEffect; internal static GameObject laserTracer; internal static BuffDef car; internal static ItemDef boostDamage; internal static ItemDef boostAtkSpeed; internal static ItemDef boostHP; internal static ItemDef boostRegen; internal static ItemDef boostSpeed; internal static ItemDef boostCrit; internal static List<ItemDef> dragonballs = new List<ItemDef>(); internal static T Load<T>(string path) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) return Addressables.LoadAssetAsync<T>((object)path).WaitForCompletion(); } internal static void CreatePrefabs() { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_023e: Unknown result type (might be due to invalid IL or missing references) //IL_0270: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Expected O, but got Unknown //IL_02b2: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: 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_02f0: Unknown result type (might be due to invalid IL or missing references) //IL_042d: Unknown result type (might be due to invalid IL or missing references) //IL_0437: Unknown result type (might be due to invalid IL or missing references) //IL_0679: Unknown result type (might be due to invalid IL or missing references) //IL_0683: Unknown result type (might be due to invalid IL or missing references) //IL_06f3: Unknown result type (might be due to invalid IL or missing references) //IL_06fd: Unknown result type (might be due to invalid IL or missing references) //IL_0702: Unknown result type (might be due to invalid IL or missing references) //IL_0752: Unknown result type (might be due to invalid IL or missing references) //IL_0757: Unknown result type (might be due to invalid IL or missing references) car = Utils.NewBuffDef("TURBO", stack: false, hidden: false, null, Color.white); laserTracer = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Golem/TracerGolem.prefab"), "LaserTracer", false); Transform transform = ((Component)laserTracer.GetComponentInChildren<ParticleSystem>()).transform; transform.localPosition += Vector3.right * 2f; ((Renderer)laserTracer.GetComponentInChildren<ParticleSystemRenderer>()).material.SetTexture("_MainTex", (Texture)(object)Load<Texture2D>("RoR2/Base/Common/VFX/texFluffyCloud1Mask.png")); laserTracer.AddComponent<TracerRepos>(); ContentAddition.AddEffect(laserTracer); statUpEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Bear/BearProc.prefab"), "StatUpEffect", false); ((TMP_Text)statUpEffect.GetComponentInChildren<TextMeshPro>()).text = ""; ((Component)statUpEffect.transform.GetChild(1)).transform.localPosition = Vector3.up; Object.Destroy((Object)(object)statUpEffect.GetComponentInChildren<LanguageTextMeshController>()); Utils.RegisterEffect(statUpEffect, -1f, "Play_Bulma_Shelong_Wish"); shenlongEffect = ((Component)Utils.RegisterEffect(Assets.Load<GameObject>("ShenlongSummonEffect"), 2f, "Play_Bulma_Shelong_Summon")).gameObject; rayChargeEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Golem/ChargeGolem.prefab"), "BulmaLaserChargeEffect", false); rayChargeEffect.AddComponent<DestroyOnParticleEnd>(); ParticleSystemRenderer[] componentsInChildren = rayChargeEffect.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val in componentsInChildren) { ((Component)val).gameObject.SetActive(true); ((Component)val).transform.localScale = Vector3.one * 0.35f; if (((Object)val).name == "Glow") { Material val2 = new Material(Load<Material>("RoR2/Base/Common/VFX/matArcaneCircleProvi.mat")); val2.SetTexture("_MainTex", (Texture)(object)Load<Texture2D>("RoR2/Base/ArtifactCompounds/texArtifactCompoundCircleMask.png")); ((Renderer)val).material = val2; } } rayEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Titan/LaserTitan.prefab"), "BulmaLaserEffect", false); Object.Destroy((Object)(object)rayEffect.GetComponentInChildren<ShakeEmitter>()); rayEffect.transform.localScale = Vector3.one * 0.0015f; Light val3 = rayEffect.AddComponent<Light>(); val3.range = 50f; val3.color = new Color(0.847058f, 0.180392f, 0.180392f); ParticleSystemRenderer[] componentsInChildren2 = rayEffect.GetComponentsInChildren<ParticleSystemRenderer>(); ((Renderer)componentsInChildren2[2]).enabled = false; ParticleSystemRenderer[] componentsInChildren3 = rayEffect.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val4 in componentsInChildren3) { ((Component)val4).transform.localScale = Vector3.one * 0.15f; if (((Object)val4).name == "Flare") { ((Component)val4).transform.localScale = Vector3.one * 0.08f; } } LanguageAPI.Add("BULMA_DRAGONBALL_ITEM_NAME", "DragonBall"); LanguageAPI.Add("BULMA_DRAGONBALL_ITEM_DESCRIPTION", "One of seven mystical objects."); int num = 7; for (int k = 0; k < num; k++) { dragonballs.Add(Utils.NewDragonBall()); } boostDamage = Utils.NewDragonBall(); boostDamage.hidden = true; boostAtkSpeed = Utils.NewDragonBall(); boostAtkSpeed.hidden = true; boostHP = Utils.NewDragonBall(); boostHP.hidden = true; boostRegen = Utils.NewDragonBall(); boostRegen.hidden = true; boostSpeed = Utils.NewDragonBall(); boostSpeed.hidden = true; boostCrit = Utils.NewDragonBall(); boostCrit.hidden = true; rpgExplosionEffect = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/LemurianBruiser/OmniExplosionVFXLemurianBruiserFireballImpact.prefab"), "BulmaRPGExplosionEffect", false); Object.Destroy((Object)(object)rpgExplosionEffect.GetComponent<OmniEffect>()); ParticleSystem[] componentsInChildren4 = rpgExplosionEffect.GetComponentsInChildren<ParticleSystem>(true); foreach (ParticleSystem val5 in componentsInChildren4) { ((Component)val5).gameObject.SetActive(true); ((Component)val5).transform.localScale = Vector3.one * 12f; } rpgExplosionEffect.GetComponent<EffectComponent>().applyScale = true; Utils.RegisterEffect(rpgExplosionEffect, -1f, "Play_Bulma_RPG_Explosion"); capsuleExplosionEffect = PrefabAPI.InstantiateClone(rpgExplosionEffect, "CapsuleExplosionEffect", false); ParticleSystemRenderer[] componentsInChildren5 = capsuleExplosionEffect.GetComponentsInChildren<ParticleSystemRenderer>(true); foreach (ParticleSystemRenderer val6 in componentsInChildren5) { ((Component)val6).gameObject.SetActive(true); string name = ((Object)val6).name; if (name.Contains("Hitspark")) { ((Renderer)val6).material = Load<Material>("RoR2/Base/Common/VFX/matOpaqueDustDirectional.mat"); } else if (name.Contains("AreaIndicatorRing")) { ((Renderer)val6).material = Load<Material>("RoR2/Base/Common/VFX/matDustDirectional.mat"); } else if (name == "Unscaled Flames") { ((Renderer)val6).material = Load<Material>("RoR2/Base/Common/VFX/matOpaqueDust.mat"); } } Utils.RegisterEffect(capsuleExplosionEffect, -1f, "Play_Bulma_Capsule_Activate"); capsuleExplosionEffect.GetComponent<EffectComponent>().applyScale = true; rpgProjectileGhost = PrefabAPI.InstantiateClone(Assets.Load<GameObject>("missile"), "BulmaRPGProjectileGhost", false); rpgProjectileGhost.AddComponent<ProjectileGhostController>(); Utils.AddScaleComponent(((Component)rpgProjectileGhost.transform.GetChild(0)).gameObject, 0.2f, AnimationCurve.EaseInOut(0f, 1f, 1f, 2f)); rpgProjectile = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/LemurianBruiser/LemurianBigFireball.prefab"), "BulmaRPGProjectile", true); ProjectileController component = rpgProjectile.GetComponent<ProjectileController>(); component.startSound = "Play_Bulma_RPG_Missile"; component.ghostPrefab = rpgProjectileGhost; rpgProjectile.GetComponent<ProjectileImpactExplosion>().impactEffect = rpgExplosionEffect; rpgProjectile.GetComponent<SphereCollider>().radius = 0.5f; ContentAddition.AddProjectile(rpgProjectile); carImpactSmall = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/Toolbot/ImpactToolbotDash.prefab"), "BulmaCarImpactEffectSmall", false); ParticleSystemRenderer[] componentsInChildren6 = carImpactSmall.GetComponentsInChildren<ParticleSystemRenderer>(); foreach (ParticleSystemRenderer val7 in componentsInChildren6) { ((Component)val7).transform.localScale = Vector3.one * 0.5f; } Utils.RegisterEffect(carImpactSmall, -1f, "Play_MULT_shift_hit"); rpgCrosshair = PrefabAPI.InstantiateClone(Load<GameObject>("RoR2/Base/UI/StandardCrosshair.prefab"), "BulmaRPGCrosshair", false); RawImage component2 = rpgCrosshair.GetComponent<RawImage>(); component2.texture = (Texture)(object)Load<Texture2D>("RoR2/Base/Captain/texCaptainCrosshairInner.png"); ((Component)component2).transform.localScale = Vector2.op_Implicit(Vector2.one * 0.8f); Image[] componentsInChildren7 = rpgCrosshair.GetComponentsInChildren<Image>(); Sprite sprite = Load<Sprite>("RoR2/DLC1/Railgunner/texCrosshairRailgunSniperNib.png"); Image[] array = componentsInChildren7; foreach (Image val8 in array) { val8.sprite = sprite; ((Component)val8).transform.localScale = Vector2.op_Implicit(new Vector2(0.45f, 0.6f)); } CrosshairController component3 = rpgCrosshair.GetComponent<CrosshairController>(); component3.spriteSpreadPositions[0].zeroPosition.x = 19f; component3.spriteSpreadPositions[1].zeroPosition.x = -19f; component3.spriteSpreadPositions[2].zeroPosition.y = 19f; component3.spriteSpreadPositions[3].zeroPosition.y = -19f; } } internal class BulmaBaseState : BaseSkillState { public Animator animator; public ChildLocator childLocator; public BulmaBehaviour behaviour; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((Component)animator).GetComponent<ChildLocator>(); behaviour = ((EntityState)this).GetComponent<BulmaBehaviour>(); } } internal class CapsuleThrowState : BulmaBaseState { private float throwDelay = 0.25f; private float duration = 0.3f; private bool thrown; public virtual float effectScale => 0.5f; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("LeftArm, Override", "Throw", "Utility", throwDelay); AkSoundEngine.PostEvent(Sounds.Play_Bulma_Capsule_Throw, ((EntityState)this).gameObject); behaviour.canExecute = false; if (Object.op_Implicit((Object)(object)((EntityState)this).cameraTargetParams)) { } if (RoR2Application.rng.RangeInt(0, 100) <= 40) { AkSoundEngine.PostEvent(Sounds.Play_Bulma_Skill, ((EntityState)this).gameObject); } } public virtual EntityState State() { return (EntityState)(object)new Utility(); } public override void FixedUpdate() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0044: 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_0061: Expected O, but got Unknown ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= throwDelay && !thrown) { thrown = true; EffectManager.SpawnEffect(Prefabs.capsuleExplosionEffect, new EffectData { origin = ((BaseState)this).FindModelChild("handmuzzle.l").position, scale = effectScale }, false); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState(State()); } } public override void OnExit() { behaviour.canExecute = true; ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)6; } } internal class CharacterMain : GenericCharacterMain { private BulmaBehaviour behaviour; private uint engineOn = 0u; private uint engineOnHigh = 0u; public override void OnEnter() { ((GenericCharacterMain)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<BulmaBehaviour>(); } public override void ProcessJump() { //IL_0086: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).characterBody.isSprinting = true; base.sprintInputReceived = true; if (Object.op_Implicit((Object)(object)behaviour) && behaviour.driving) { if (engineOn == 0) { engineOn = AkSoundEngine.PostEvent(Sounds.Play_Bulma_Engine_Low_Loop, ((EntityState)this).gameObject); } if (engineOnHigh == 0) { engineOnHigh = AkSoundEngine.PostEvent(Sounds.Play_Bulma_Engine_High_Loop, ((EntityState)this).gameObject); } CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity += Vector3.down * behaviour.downVelocity; return; } if (engineOn != 0) { AkSoundEngine.StopPlayingID(engineOn); engineOn = 0u; } if (engineOnHigh != 0) { AkSoundEngine.StopPlayingID(engineOnHigh); engineOnHigh = 0u; } ((GenericCharacterMain)this).ProcessJump(); } } internal class DeathState : DeathState { public override void OnEnter() { GameObject gameObject = ((Component)((EntityState)this).GetModelTransform()).gameObject; gameObject.SetActive(false); gameObject.SetActive(true); ((DeathState)this).OnEnter(); } } internal class MeleeSkillState : BaseSkillState { internal float hitPauseDuration; internal float hopVelocity = Assaulter.smallHopVelocity; internal string animParameter = ""; internal float hitPauseTimer; internal bool isInHitPause; internal HitStopCachedState hitStopCachedState; internal Animator animator; internal float stopwatch; internal OverlapAttack attack; internal bool hitCallback; internal float damage; internal GameObject hitEffectPrefab; internal HitBoxGroup hitBoxGroup; internal DamageType damageType = (DamageType)0; internal DamageColorIndex damageColor = (DamageColorIndex)0; internal Vector3 forceVector = Vector3.back * 100f; internal float attackStopwatch; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); isInHitPause = false; hitPauseDuration = GroundLight.hitPauseDuration / ((BaseState)this).attackSpeedStat; } internal OverlapAttack NewOverlapAttack() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) OverlapAttack val = new OverlapAttack(); val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; val.damage = ((EntityState)this).characterBody.damage * damage; val.forceVector = forceVector; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((EntityState)this).characterBody.RollCrit(); val.damageColorIndex = damageColor; val.damageType = damageType; val.maximumOverlapTargets = 100; val.hitBoxGroup = hitBoxGroup; return val; } public override void FixedUpdate() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitCallback && !isInHitPause) { if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } if (!Utility.IsNullOrWhiteSpace(animParameter)) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter); } hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } if (!Utility.IsNullOrWhiteSpace(animParameter) && hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } if (!isInHitPause) { attackStopwatch += Time.fixedDeltaTime; stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 1f; } } else if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 0f; } } } internal class Primary : BulmaBaseState { private float duration; private float baseDuration = 0.085f; private float damageCoefficient = 0.3f; public override void OnEnter() { //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0130: 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_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_017d: Unknown result type (might be due to invalid IL or missing references) //IL_0182: Unknown result type (might be due to invalid IL or missing references) //IL_0187: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_01c8: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: Unknown result type (might be due to invalid IL or missing references) //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_01fd: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); ((BaseState)this).StartAimMode(2f, true); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "FireSMG", "M1", duration + 0.2f / ((BaseState)this).attackSpeedStat); if (!((EntityState)this).GetModelAnimator().GetBool("isMoving")) { ((EntityState)this).PlayAnimation("FullBody, Override", "FireSMG", "M1", duration + 0.2f / ((BaseState)this).attackSpeedStat); } EffectManager.SimpleMuzzleFlash(Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/Muzzleflash1.prefab"), ((EntityState)this).gameObject, "smgMuzzle", false); float num = 1.2f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); ((EntityState)this).characterBody.AddSpreadBloom(2f); AkSoundEngine.PostEvent(Sounds.Play_Bulma_SMG_Fire, ((EntityState)this).gameObject); if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); float num2 = 0.0425f; new BulletAttack { bulletCount = 1u, aimVector = ((Ray)(ref aimRay)).direction, origin = ((Ray)(ref aimRay)).origin, damage = ((BaseState)this).damageStat * damageCoefficient, damageColorIndex = (DamageColorIndex)0, damageType = (DamageType)0, falloffModel = (FalloffModel)1, maxDistance = 250f, force = 20f, hitMask = CommonMasks.bullet, minSpread = 0f - num2, maxSpread = num2, isCrit = ((BaseState)this).RollCrit(), owner = ((EntityState)this).gameObject, muzzleName = "smgMuzzle", smartCollision = false, procChainMask = default(ProcChainMask), procCoefficient = 0.25f, radius = 0.08f, sniper = false, stopperMask = CommonMasks.bullet, weapon = null, tracerEffectPrefab = Prefabs.Load<GameObject>("RoR2/Base/Commando/TracerCommandoDefault.prefab"), spreadPitchScale = 1f, spreadYawScale = 1f, hitEffectPrefab = Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/OmniImpactVFX.prefab") }.Fire(); } } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector2 val = Util.Vector3XZToVector2XY(((Ray)(ref aimRay)).direction); if (val != Vector2.zero) { ((Vector2)(ref val)).Normalize(); Vector3 val2 = new Vector3(val.x, 0f, val.y); Vector3 normalized = ((Vector3)(ref val2)).normalized; ((EntityState)this).characterDirection.moveVector = normalized; } } ((EntityState)this).characterBody.isSprinting = false; ((EntityState)this).skillLocator.primary.rechargeStopwatch = 0f; if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class PrimaryHonk : BaseSkillState { private uint ID; public override void OnEnter() { ((BaseState)this).OnEnter(); ID = AkSoundEngine.PostEvent(Sounds.Play_Bulma_Horn_Loop, ((EntityState)this).gameObject); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && !((EntityState)this).inputBank.skill1.down) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { AkSoundEngine.StopPlayingID(ID); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class PrimaryRPG : BulmaBaseState { private float duration; private float baseDuration = 0.45f; private float damageCoefficient = 8f; public override void OnEnter() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_01b7: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Unknown result type (might be due to invalid IL or missing references) //IL_01ea: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_0234: Unknown result type (might be due to invalid IL or missing references) //IL_0236: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((EntityState)this).characterMotor.velocity = Vector3.zero; CharacterMotor characterMotor = ((EntityState)this).characterMotor; Vector3 velocity = characterMotor.velocity; Vector3 val; if (!((BaseState)this).isGrounded) { Ray aimRay = ((BaseState)this).GetAimRay(); val = -((Ray)(ref aimRay)).direction; } else { val = -((EntityState)this).characterDirection.forward; } characterMotor.velocity = velocity + val * 40f; float num = 8f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); ((EntityState)this).characterBody.AddSpreadBloom(12f); ((EntityState)this).PlayAnimation("RPG", "FireRMG", "M1", duration); Animator modelAnimator = ((EntityState)this).GetModelAnimator(); if (!modelAnimator.GetBool("isMoving")) { ((EntityState)this).PlayAnimation("RPG", "FireRMG", "M1", duration); } ((Component)childLocator.FindChild("rocket")).gameObject.SetActive(false); ((Component)childLocator.FindChild("rocketOutline")).gameObject.SetActive(false); EffectManager.SimpleMuzzleFlash(FireHook.muzzleflashEffectPrefab, ((EntityState)this).gameObject, "rpgMuzzle", false); if (((EntityState)this).isAuthority) { Ray aimRay2 = ((BaseState)this).GetAimRay(); ((EntityState)this).characterBody.AddSpreadBloom(2f); FireProjectileInfo val2 = default(FireProjectileInfo); val2.crit = ((BaseState)this).RollCrit(); val2.damage = ((BaseState)this).damageStat * damageCoefficient; val2.damageTypeOverride = (DamageType)32; val2.damageColorIndex = (DamageColorIndex)0; val2.force = 5000f; val2.owner = ((EntityState)this).gameObject; val2.position = ((Ray)(ref aimRay2)).origin; val2.procChainMask = default(ProcChainMask); val2.projectilePrefab = Prefabs.rpgProjectile; val2.rotation = Quaternion.LookRotation(((Ray)(ref aimRay2)).direction); val2.useSpeedOverride = true; ((FireProjectileInfo)(ref val2)).speedOverride = 125f; val2.useFuseOverride = false; val2.target = null; FireProjectileInfo val3 = val2; ProjectileManager.instance.FireProjectile(val3); } AkSoundEngine.PostEvent(Sounds.Play_Bulma_RPG_Fire, ((EntityState)this).gameObject); if (RoR2Application.rng.RangeInt(0, 100) <= 40) { AkSoundEngine.PostEvent(Sounds.Play_Bulma_ATK, ((EntityState)this).gameObject); } } public override void FixedUpdate() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: 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_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); if (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { Ray aimRay = ((BaseState)this).GetAimRay(); Vector2 val = Util.Vector3XZToVector2XY(((Ray)(ref aimRay)).direction); if (val != Vector2.zero) { ((Vector2)(ref val)).Normalize(); Vector3 val2 = new Vector3(val.x, 0f, val.y); Vector3 normalized = ((Vector3)(ref val2)).normalized; ((EntityState)this).characterDirection.moveVector = normalized; } } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { if (((EntityState)this).skillLocator.primary.HasSkillOverrideOfPriority((SkillOverridePriority)4)) { ((Component)childLocator.FindChild("rocket")).gameObject.SetActive(true); ((Component)childLocator.FindChild("rocketOutline")).gameObject.SetActive(true); EffectManager.SimpleMuzzleFlash(Prefabs.Load<GameObject>("RoR2/Base/Common/VFX/MuzzleflashSmokeRing.prefab"), ((EntityState)this).gameObject, "rpgMuzzle", false); } ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class SecondaryCast : CapsuleThrowState { public override float effectScale => 0.2f; public override EntityState State() { return (EntityState)(object)new Secondary(); } } internal class Secondary : BulmaBaseState { private float duration; private float baseDuration = 0.8f; private float fireFrequency; private float baseFireFrequency = 0.25f; private float damageCoefficient = 6.5f; private float stopwatch; private Transform laserMuzzle; private GameObject chargeEffect; private GameObject laserEffect; private Transform laserEffectEnd; private uint ID; public override void OnEnter() { //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0156: Unknown result type (might be due to invalid IL or missing references) //IL_0198: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; ((BaseState)this).StartAimMode(duration, true); behaviour.canExecute = false; ((Component)childLocator.FindChild("smg")).gameObject.SetActive(false); ((Component)childLocator.FindChild("smgOutline")).gameObject.SetActive(false); ((Component)childLocator.FindChild("blaster")).gameObject.SetActive(true); ((Component)childLocator.FindChild("blasterOutline")).gameObject.SetActive(true); fireFrequency = baseFireFrequency / ((BaseState)this).attackSpeedStat; ((EntityState)this).PlayAnimation("Gesture, Override", "FireSMG", "M1", duration + 0.2f / ((BaseState)this).attackSpeedStat); if (!((EntityState)this).GetModelAnimator().GetBool("isMoving")) { ((EntityState)this).PlayAnimation("FullBody, Override", "FireSMG", "M1", duration + 0.2f / ((BaseState)this).attackSpeedStat); } Transform val = (laserMuzzle = childLocator.FindChild("laserMuzzle")); if (Object.op_Implicit((Object)(object)val)) { chargeEffect = Object.Instantiate<GameObject>(Prefabs.rayChargeEffect, val.position, val.rotation, val); ScaleParticleSystemDuration component = chargeEffect.GetComponent<ScaleParticleSystemDuration>(); if (Object.op_Implicit((Object)(object)component)) { component.newDuration = 0.5f; } laserEffect = Object.Instantiate<GameObject>(Prefabs.rayEffect, laserMuzzle.position, laserMuzzle.rotation, laserMuzzle); laserEffectEnd = laserEffect.GetComponent<ChildLocator>().FindChild("LaserEnd"); laserEffectEnd.localPosition = Vector3.zero; } ID = AkSoundEngine.PostEvent(Sounds.Play_Bulma_Laser_In, ((EntityState)this).gameObject); AkSoundEngine.PostEvent(Sounds.Play_Bulma_Skill, ((EntityState)this).gameObject); } public override void Update() { //IL_0009: 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_001b: 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_0033: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).Update(); Ray aimRay = ((BaseState)this).GetAimRay(); float num = 18f; float num2 = 0f; RaycastHit val = default(RaycastHit); if (Physics.Raycast(CameraRigController.ModifyAimRayIfApplicable(aimRay, ((EntityState)this).gameObject, ref num2), ref val, num + num2, LayerMask.op_Implicit(((LayerIndex)(ref LayerIndex.world)).mask))) { if (!Object.op_Implicit((Object)(object)laserEffectEnd)) { } } else if (!Object.op_Implicit((Object)(object)laserEffectEnd)) { } } private void Fire() { //IL_002b: 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_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: 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_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) float num = 0.8f; ((BaseState)this).AddRecoil(-1f * num, -1.5f * num, -0.25f * num, 0.25f * num); Ray aimRay = ((BaseState)this).GetAimRay(); if (((EntityState)this).isAuthority) { new BulletAttack { maxDistance = 1000f, stopperMask = ((LayerIndex)(ref LayerIndex.world)).mask,