Decompiled source of Driver v2.0.0
DriverMod.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using AncientScepter; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using ClassicItemsReturns.Items; using ClassicItemsReturns.Items.Uncommon; using EntityStates; using EntityStates.AI; using EntityStates.BrotherMonster.Weapon; using EntityStates.Commando; using EntityStates.Commando.CommandoWeapon; using EntityStates.GlobalSkills.LunarDetonator; using EntityStates.GlobalSkills.LunarNeedle; using EntityStates.GolemMonster; using EntityStates.Huntress; using EntityStates.LemurianBruiserMonster; using EntityStates.Mage.Weapon; using Grumpy; using HG; using HG.BlendableTypes; using HG.Reflection; using HunkMod.Modules; using KinematicCharacterController; using LostInTransit; using MaterialHud; using Microsoft.CodeAnalysis; using On.EntityStates.AI; using On.EntityStates.GlobalSkills.LunarDetonator; using On.EntityStates.GlobalSkills.LunarNeedle; using On.RoR2; using On.RoR2.UI; using R2API; using R2API.Networking; using R2API.Networking.Interfaces; using R2API.Utils; using RiskOfOptions; using RiskOfOptions.OptionConfigs; using RiskOfOptions.Options; using RoR2; using RoR2.Achievements; using RoR2.Audio; using RoR2.CharacterAI; using RoR2.ContentManagement; using RoR2.HudOverlay; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using RoR2.Stats; using RoR2.UI; using RobDriver.Modules; using RobDriver.Modules.Achievements; using RobDriver.Modules.Components; using RobDriver.Modules.Components.UI; using RobDriver.Modules.Survivors; using RobDriver.Modules.Weapons; using RobDriver.SkillStates; using RobDriver.SkillStates.BaseStates; using RobDriver.SkillStates.Compat.ArmCannon; using RobDriver.SkillStates.Compat.NemmandoGun; using RobDriver.SkillStates.Compat.NemmandoSword; using RobDriver.SkillStates.Compat.NemmercGun; using RobDriver.SkillStates.Compat.RavSword; using RobDriver.SkillStates.Compat.Scepter; using RobDriver.SkillStates.Compat.Scepter.SupplyDrop; using RobDriver.SkillStates.Driver; using RobDriver.SkillStates.Driver.ArmBFG; using RobDriver.SkillStates.Driver.ArtiGauntlet; using RobDriver.SkillStates.Driver.BadassShotgun; using RobDriver.SkillStates.Driver.Bazooka; using RobDriver.SkillStates.Driver.BeetleShield; using RobDriver.SkillStates.Driver.GoldenGun; using RobDriver.SkillStates.Driver.GolemGun; using RobDriver.SkillStates.Driver.GrenadeLauncher; using RobDriver.SkillStates.Driver.HeavyMachineGun; using RobDriver.SkillStates.Driver.LunarGrenade; using RobDriver.SkillStates.Driver.LunarHammer; using RobDriver.SkillStates.Driver.LunarPistol; using RobDriver.SkillStates.Driver.LunarRifle; using RobDriver.SkillStates.Driver.MachineGun; using RobDriver.SkillStates.Driver.PlasmaCannon; using RobDriver.SkillStates.Driver.PyriteGun; using RobDriver.SkillStates.Driver.Revolver; using RobDriver.SkillStates.Driver.RiotShotgun; using RobDriver.SkillStates.Driver.RocketLauncher; using RobDriver.SkillStates.Driver.SMG; using RobDriver.SkillStates.Driver.Shotgun; using RobDriver.SkillStates.Driver.Skateboard; using RobDriver.SkillStates.Driver.SlugShotgun; using RobDriver.SkillStates.Driver.SniperRifle; using RobDriver.SkillStates.Driver.SupplyDrop; using RobDriver.SkillStates.Driver.SupplyDrop.Nerfed; using RobDriver.SkillStates.Driver.VoidPistol; using RobDriver.SkillStates.Driver.VoidRifle; using RobDriver.SkillStates.Emote; using SS2; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: OptIn] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyInformationalVersion("1.0.0+87565723d855abe5c306a3ea645f857c4533e4c1")] [assembly: AssemblyProduct("DriverMod")] [assembly: AssemblyTitle("DriverMod")] [assembly: AssemblyCompany("DriverMod")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] [CompilerGenerated] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } internal static class Log { internal static ManualLogSource _logSource; internal static void Init(ManualLogSource logSource) { _logSource = logSource; } internal static void Debug(object data) { _logSource.LogDebug(data); } internal static void Error(object data) { _logSource.LogError(data); } internal static void Fatal(object data) { _logSource.LogFatal(data); } internal static void Info(object data) { _logSource.LogInfo(data); } internal static void Message(object data) { _logSource.LogMessage(data); } internal static void Warning(object data) { _logSource.LogWarning(data); } } internal enum DriverCameraParams { DEFAULT, AIM_PISTOL, AIM_SNIPER, EMOTE } public class StupidFuckingBullshit : MonoBehaviour { public ParticleSystem faggot; private void Awake() { faggot = ((Component)this).GetComponentInChildren<ParticleSystem>(); ((Component)faggot).transform.SetParent((Transform)null); } private void FixedUpdate() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) ((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation); } } [CreateAssetMenu(fileName = "blt", menuName = "ScriptableObjects/BulletDef", order = 2)] public class DriverBulletDef : ScriptableObject { [Header("General")] public string nameToken = ""; public DriverWeaponTier tier = DriverWeaponTier.Common; [Header("Visuals")] public Color trailColor = Color.black; [HideInInspector] public ushort index; public bool enabled; public DamageTypeCombo bulletType; public static DriverBulletDef CreateBulletDefFromInfo(DriverBulletDefInfo bulletDefInfo) { //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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) DriverBulletDef driverBulletDef = ScriptableObject.CreateInstance<DriverBulletDef>(); ((Object)driverBulletDef).name = bulletDefInfo.nameToken; driverBulletDef.nameToken = bulletDefInfo.nameToken; driverBulletDef.tier = bulletDefInfo.tier; driverBulletDef.trailColor = bulletDefInfo.trailColor; driverBulletDef.bulletType = new DamageTypeCombo { damageType = bulletDefInfo.damageType.GetValueOrDefault(), damageTypeExtended = bulletDefInfo.damageTypeExtended.GetValueOrDefault(), damageSource = (DamageSource)1 }; DamageAPI.AddModdedDamageType(ref driverBulletDef.bulletType, (ModdedDamageType)(((??)bulletDefInfo.moddedDamageType) ?? DriverDamageTypes.Generic)); return driverBulletDef; } } [Serializable] public struct DriverBulletDefInfo { public string nameToken; public DamageType? damageType; public DamageTypeExtended? damageTypeExtended; public ModdedDamageType? moddedDamageType; public DriverWeaponTier tier; public Color trailColor; } [CreateAssetMenu(fileName = "wpn", menuName = "ScriptableObjects/WeaponDef", order = 1)] public class DriverWeaponDef : ScriptableObject { public enum AnimationSet { Default, TwoHanded, BigMelee } public enum BuffType { Crit, Damage, AttackSpeed } [Header("General")] public string nameToken = ""; public string descriptionToken = ""; public Texture icon; public DriverWeaponTier tier = DriverWeaponTier.Common; public AnimationSet animationSet; public BuffType buffType = BuffType.Damage; public int shotCount = 8; [Header("Skills")] public SkillDef primarySkillDef; public SkillDef secondarySkillDef; public SkillDef arsenalSkillDef; [Header("Visuals")] public Mesh mesh; public Material material; public GameObject crosshairPrefab; public GameObject pickupPrefab; public Color? color; [Header("Other")] public string configIdentifier = ""; public string calloutSoundString = ""; public float dropChance; [HideInInspector] public ushort index; [HideInInspector] public bool enabled; public string equipAnimationString { get { if (animationSet != 0) { return "BufferEmpty"; } return "EquipPistol"; } } public static DriverWeaponDef CreateWeaponDefFromInfo(DriverWeaponDefInfo weaponDefInfo) { DriverWeaponDef driverWeaponDef = ScriptableObject.CreateInstance<DriverWeaponDef>(); ((Object)driverWeaponDef).name = weaponDefInfo.nameToken; driverWeaponDef.nameToken = weaponDefInfo.nameToken; driverWeaponDef.descriptionToken = weaponDefInfo.descriptionToken; driverWeaponDef.icon = weaponDefInfo.icon; driverWeaponDef.tier = weaponDefInfo.tier; driverWeaponDef.animationSet = weaponDefInfo.animationSet; driverWeaponDef.buffType = weaponDefInfo.buffType; driverWeaponDef.shotCount = weaponDefInfo.shotCount; driverWeaponDef.primarySkillDef = weaponDefInfo.primarySkillDef; driverWeaponDef.secondarySkillDef = weaponDefInfo.secondarySkillDef; driverWeaponDef.arsenalSkillDef = weaponDefInfo.arsenalSkillDef; driverWeaponDef.mesh = weaponDefInfo.mesh; driverWeaponDef.material = weaponDefInfo.material; driverWeaponDef.crosshairPrefab = weaponDefInfo.crosshairPrefab; driverWeaponDef.pickupPrefab = weaponDefInfo.pickupPrefab; driverWeaponDef.color = weaponDefInfo.color; driverWeaponDef.configIdentifier = weaponDefInfo.configIdentifier; driverWeaponDef.calloutSoundString = weaponDefInfo.calloutSoundString; driverWeaponDef.dropChance = weaponDefInfo.dropChance; return driverWeaponDef; } } [Serializable] public struct DriverWeaponDefInfo { public string nameToken; public string descriptionToken; public Texture icon; public DriverWeaponTier tier; public DriverWeaponDef.AnimationSet animationSet; public DriverWeaponDef.BuffType buffType; public int shotCount; public SkillDef primarySkillDef; public SkillDef secondarySkillDef; public SkillDef arsenalSkillDef; public Mesh mesh; public Material material; public GameObject crosshairPrefab; public GameObject pickupPrefab; public Color? color; public string configIdentifier; public string calloutSoundString; public float dropChance; } public enum DriverWeaponTier { NoTier, Common, Uncommon, Legendary, Unique, Void, Lunar } [CreateAssetMenu(fileName = "rsd", menuName = "ScriptableObjects/DriverWeaponSkinDef", order = 3)] public class DriverWeaponSkinDef : ScriptableObject { [Serializable] public struct DriverWeaponSkinDefInfo { public string nameToken; public string mainSkinName; public ushort weaponDefIndex; public Mesh weaponSkinMesh; public Material weaponSkinMaterial; } [Header("General")] public string nameToken = ""; public string mainSkinName = ""; public ushort weaponDefIndex; public Mesh weaponSkinMesh; public Material weaponSkinMaterial; public static DriverWeaponSkinDef CreateWeaponSkinDefFromInfo(DriverWeaponSkinDefInfo skinDefInfo) { DriverWeaponSkinDef obj = (DriverWeaponSkinDef)(object)ScriptableObject.CreateInstance(typeof(DriverWeaponSkinDef)); obj.nameToken = skinDefInfo.nameToken; obj.mainSkinName = skinDefInfo.mainSkinName; obj.weaponDefIndex = skinDefInfo.weaponDefIndex; obj.weaponSkinMesh = skinDefInfo.weaponSkinMesh; obj.weaponSkinMaterial = skinDefInfo.weaponSkinMaterial; return obj; } } internal class BodyInfo { internal string bodyName = ""; internal string bodyNameToken = ""; internal string subtitleNameToken = ""; internal Color bodyColor = Color.white; internal Texture characterPortrait; internal GameObject crosshair; internal GameObject podPrefab; internal float maxHealth = 100f; internal float healthGrowth = 2f; internal float healthRegen; internal float shield; internal float shieldGrowth; internal float moveSpeed = 7f; internal float moveSpeedGrowth; internal float acceleration = 80f; internal float jumpPower = 15f; internal float jumpPowerGrowth; internal float damage = 12f; internal float attackSpeed = 1f; internal float attackSpeedGrowth; internal float armor; internal float armorGrowth; internal float crit = 1f; internal float critGrowth; internal int jumpCount = 1; } internal class CustomRendererInfo { internal string childName; internal Material material; internal bool ignoreOverlays; } internal class SkillDefInfo { public string skillName; public string skillNameToken; public string skillDescriptionToken; public string[] keywordTokens = new string[0]; public Sprite skillIcon; public SerializableEntityStateType activationState; public InterruptPriority interruptPriority; public string activationStateMachineName; public float baseRechargeInterval; public int baseMaxStock = 1; public int rechargeStock = 1; public int requiredStock = 1; public int stockToConsume = 1; public bool isCombatSkill = true; public bool canceledFromSprinting; public bool forceSprintDuringState; public bool cancelSprintingOnActivation = true; public bool beginSkillCooldownOnSkillEnd; public bool fullRestockOnAssign = true; public bool resetCooldownTimerOnUse; public bool mustKeyPress; public bool autoHandleLuminousShot = true; public bool hideStockCount; public SkillDefInfo() { } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; this.skillIcon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; this.interruptPriority = interruptPriority; this.isCombatSkill = isCombatSkill; this.baseRechargeInterval = baseRechargeInterval; } public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false) { //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) this.skillName = skillName; this.skillNameToken = skillNameToken; this.skillDescriptionToken = skillDescriptionToken; this.skillIcon = skillIcon; this.activationState = activationState; this.activationStateMachineName = activationStateMachineName; interruptPriority = (InterruptPriority)0; isCombatSkill = true; baseRechargeInterval = 0f; requiredStock = 0; stockToConsume = 0; cancelSprintingOnActivation = !agile; if (agile) { keywordTokens = new string[1] { "KEYWORD_AGILE" }; } } } namespace RobDriver { [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.rob.Driver", "Driver", "2.0.0")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class DriverPlugin : BaseUnityPlugin { public const string MODUID = "com.rob.Driver"; public const string MODNAME = "Driver"; public const string MODVERSION = "2.0.0"; public const string developerPrefix = "ROB"; public static DriverPlugin instance; public static bool StarstormInstalled => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm"); public static bool ScepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter"); public static bool RooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions"); public static bool LitInstalled => Chainloader.PluginInfos.ContainsKey("com.ContactLight.LostInTransit"); public static bool ClassicItemsInstalled => Chainloader.PluginInfos.ContainsKey("com.RiskySleeps.ClassicItemsReturns"); public static bool RiskUIInstalled => Chainloader.PluginInfos.ContainsKey("bubbet.riskui"); public static bool ExtendedLoadoutInstalled => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ExtendedLoadout"); public static bool GreenAlienHeadInstalled => Chainloader.PluginInfos.ContainsKey("com.Borbo.GreenAlienHead"); public static bool RavagerInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Ravager"); public static bool HunkInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk"); private void Awake() { instance = this; Log.Init(((BaseUnityPlugin)this).Logger); Config.ReadConfig(((BaseUnityPlugin)this).Config); Assets.PopulateAssets(); CameraParams.InitializeParams(); States.RegisterStates(); Buffs.RegisterBuffs(); Projectiles.RegisterProjectiles(); Tokens.AddTokens(); ItemDisplays.PopulateDisplays(); NetMessages.RegisterNetworkMessages(); Unlockables.Init(); new Driver().CreateCharacter(); new ContentPacks().Initialize(); CreateWeapons(); } private void CreateWeapons() { new ArmBFG().Init(); new CrabGun().Init(); new LunarGrenade().Init(); new ScavGun().Init(); new ArtiGauntlet().Init(); new BanditRevolver().Init(); new CommandoSMG().Init(); new Revolver().Init(); new SMG().Init(); new RavSword().Init(); new NemSword().Init(); } public static float GetICBMDamageMult(CharacterBody body) { float num = 1f; if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory)) { int num2 = body.inventory.GetItemCount(Items.MoreMissile) - 1; if (num2 > 0) { num += (float)num2 * 0.5f; } } return num; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool CheckIfBodyIsTerminal(CharacterBody body) { return body.HasBuff(Buffs.BuffTerminationVFX); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void AddHunkFlashbang(GameObject prefab) { prefab.AddComponent<FlashbangNearby>(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool IsItemGoldenGun(ItemIndex itemIndex) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) ItemDef goldenGun = Items.GoldenGun; if (!Object.op_Implicit((Object)(object)goldenGun)) { return false; } return goldenGun.itemIndex == itemIndex; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool IsItemGoldenGun2(ItemIndex itemIndex) { //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) GoldenGun val = ItemBase<GoldenGun>.Instance; if (!Object.op_Implicit((Object)(object)((ItemBase)(val?)).ItemDef)) { return false; } return ((ItemBase)val).ItemDef.itemIndex == itemIndex; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool IsItemScepter(ItemIndex itemIndex) { //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) AncientScepterItem val = ItemBase<AncientScepterItem>.instance; if (!Object.op_Implicit((Object)(object)((val != null) ? ((ItemBase)val).ItemDef : null))) { return false; } return ((ItemBase)val).ItemDef.itemIndex == itemIndex; } } public static class DriverBulletCatalog { public static DriverBulletDef[] bulletDefs = Array.Empty<DriverBulletDef>(); public static DriverBulletDef Default; internal static DriverBulletDef Stunning; internal static DriverBulletDef Incendiary; internal static DriverBulletDef Serrated; internal static DriverBulletDef Poison; internal static DriverBulletDef Weakening; internal static DriverBulletDef Executing; internal static DriverBulletDef Blighting; internal static DriverBulletDef Resetting; internal static DriverBulletDef Crippling; internal static DriverBulletDef Fruitful; internal static DriverBulletDef Frostbite; internal static DriverBulletDef Nullifying; internal static DriverBulletDef Coin; internal static DriverBulletDef Explosive; internal static DriverBulletDef Missile; internal static DriverBulletDef Flaming; internal static DriverBulletDef Icy; internal static DriverBulletDef Sticky; internal static DriverBulletDef Mystery; internal static DriverBulletDef Hemorrhaging; internal static DriverBulletDef Helfire; internal static DriverBulletDef Infernal; internal static DriverBulletDef Dagger; internal static DriverBulletDef Lightning; internal static DriverBulletDef Fireball; internal static DriverBulletDef Hook; internal static DriverBulletDef Ruinous; internal static DriverBulletDef GiantSlayer; internal static DriverBulletDef Disabling; internal static DriverBulletDef Amputating; internal static DriverBulletDef Gouging; internal static DriverBulletDef VoidMissile; internal static DriverBulletDef VoidLightning; internal static DriverBulletDef Collapse; internal static void InitBulletDefs() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0061: 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_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) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: 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_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_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_01b2: 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_01d3: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_0209: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_0232: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0274: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_02bd: Unknown result type (might be due to invalid IL or missing references) //IL_02c2: Unknown result type (might be due to invalid IL or missing references) //IL_02c7: Unknown result type (might be due to invalid IL or missing references) //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_02ef: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Unknown result type (might be due to invalid IL or missing references) //IL_030b: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_032a: Unknown result type (might be due to invalid IL or missing references) //IL_033f: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_036a: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0374: Unknown result type (might be due to invalid IL or missing references) //IL_039a: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a4: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Unknown result type (might be due to invalid IL or missing references) //IL_03be: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: 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_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_0400: Unknown result type (might be due to invalid IL or missing references) //IL_0405: Unknown result type (might be due to invalid IL or missing references) //IL_041a: Unknown result type (might be due to invalid IL or missing references) //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_0450: Unknown result type (might be due to invalid IL or missing references) //IL_0455: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Unknown result type (might be due to invalid IL or missing references) //IL_0482: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Unknown result type (might be due to invalid IL or missing references) //IL_04b3: Unknown result type (might be due to invalid IL or missing references) Default = CreateBulletType("Default", DriverWeaponTier.NoTier, Color.white, (DamageType)0); Stunning = CreateBulletType("Stunning", DriverWeaponTier.Common, Color.gray, (DamageType)32); Incendiary = CreateBulletType("Incendiary", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), (DamageType)128); Serrated = CreateBulletType("Serrated", DriverWeaponTier.Common, DamageColor.FindColor((DamageColorIndex)2), (DamageType)1024); Poison = CreateBulletType("Poison", DriverWeaponTier.Common, Color.green, (DamageType)4096); Weakening = CreateBulletType("Weakening", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)220, (byte)237, (byte)159, byte.MaxValue)), (DamageType)16384); Executing = CreateBulletType("Executing", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)11), (DamageType)524288); Blighting = CreateBulletType("Blighting", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)222, (byte)85, (byte)230, byte.MaxValue)), (DamageType)1048576); Coin = CreateBulletType("Coin", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)212, (byte)94, byte.MaxValue)), DriverDamageTypes.CoinShot); Mystery = CreateBulletType("Mystery", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)30, (byte)51, (byte)45, byte.MaxValue)), DriverDamageTypes.MysteryShot); Fruitful = CreateBulletType("Fruity", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)191, (byte)225, byte.MaxValue)), (DamageType)536870912); Crippling = CreateBulletType("Crippling", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)48, (byte)205, (byte)217, byte.MaxValue)), (DamageType)4194304); Nullifying = CreateBulletType("Nullifying", DriverWeaponTier.Common, DamageColor.FindColor((DamageColorIndex)9), (DamageType)32768); Collapse = CreateBulletType("Collapse", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)9), DriverDamageTypes.Collapse); Resetting = CreateBulletType("Resetting", DriverWeaponTier.Uncommon, Color.red, (DamageType)4); VoidMissile = CreateBulletType("Void Missile", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32((byte)122, (byte)69, (byte)173, byte.MaxValue)), DriverDamageTypes.VoidMissileShot); Explosive = CreateBulletType("Explosive", DriverWeaponTier.Uncommon, Color.yellow, DriverDamageTypes.ExplosiveRounds); Sticky = CreateBulletType("Sticky", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)117, (byte)48, byte.MaxValue)), DriverDamageTypes.StickyShot); Disabling = CreateBulletType("Disabling", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)15), (DamageTypeExtended)1073741824); Flaming = CreateBulletType("Elemental Flame", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.FlameTornadoShot); Infernal = CreateBulletType("Infernal", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.BetterBurn); Ruinous = CreateBulletType("Ruinous", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)13), (DamageType)1073741824); Icy = CreateBulletType("Elemental Ice", DriverWeaponTier.Uncommon, Color.cyan, DriverDamageTypes.IceBlastShot); Hook = CreateBulletType("Hook", DriverWeaponTier.Uncommon, Color.grey, DriverDamageTypes.HookShot); VoidLightning = CreateBulletType("Void Lightning", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32((byte)194, (byte)115, byte.MaxValue, byte.MaxValue)), DriverDamageTypes.VoidLightning); Missile = CreateBulletType("Missile", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32((byte)219, (byte)132, (byte)11, byte.MaxValue)), DriverDamageTypes.MissileShot); Dagger = CreateBulletType("Dagger", DriverWeaponTier.Legendary, Color.black, DriverDamageTypes.DaggerShot); Lightning = CreateBulletType("Lightning", DriverWeaponTier.Legendary, Color.cyan, DriverDamageTypes.LightningStrikeRounds); Fireball = CreateBulletType("Fireball", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.FireballRounds); Frostbite = CreateBulletType("Frostbite", DriverWeaponTier.Legendary, Color.cyan, (DamageType)256); Gouging = CreateBulletType("Gouging", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)8), DriverDamageTypes.Gouge); Hemorrhaging = CreateBulletType("Hemorrhaging", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)8), DriverDamageTypes.Hemorrhage); Helfire = CreateBulletType("Helfire", DriverWeaponTier.Unique, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)127, byte.MaxValue)), DriverDamageTypes.Helfire); GiantSlayer = CreateBulletType("Giant Slayer", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)7), (DamageTypeExtended)268435456); Amputating = CreateBulletType("Amputating", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)7), (DamageTypeExtended)33554432); } public static DriverBulletDef CreateBulletType(string nameToken, DriverWeaponTier tier, Color color, DamageType damageType) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) return CreateBulletType(nameToken, tier, color, damageType, null, null); } public static DriverBulletDef CreateBulletType(string nameToken, DriverWeaponTier tier, Color color, DamageTypeExtended damageType) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) return CreateBulletType(nameToken, tier, color, null, damageType, null); } public static DriverBulletDef CreateBulletType(string nameToken, DriverWeaponTier tier, Color color, ModdedDamageType damageType) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) return CreateBulletType(nameToken, tier, color, null, null, damageType); } public static DriverBulletDef CreateBulletType(string nameToken, DriverWeaponTier tier, Color color, DamageType? damageType, DamageTypeExtended? damageTypeExtended, ModdedDamageType? moddedDamageType) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) DriverBulletDefInfo bulletDefInfo = default(DriverBulletDefInfo); bulletDefInfo.nameToken = nameToken; bulletDefInfo.damageType = damageType; bulletDefInfo.damageTypeExtended = damageTypeExtended; bulletDefInfo.moddedDamageType = moddedDamageType; bulletDefInfo.tier = tier; bulletDefInfo.trailColor = color; return CreateBulletType(bulletDefInfo); } public static DriverBulletDef CreateBulletType(DriverBulletDefInfo bulletDefInfo) { DriverBulletDef driverBulletDef = DriverBulletDef.CreateBulletDefFromInfo(bulletDefInfo); Array.Resize(ref bulletDefs, bulletDefs.Length + 1); int num = bulletDefs.Length - 1; driverBulletDef.index = (ushort)num; bulletDefs[num] = driverBulletDef; Config.InitBulletConfig(driverBulletDef); Log.Debug("Added " + driverBulletDef.nameToken + " to catalog with tier: " + driverBulletDef.tier); return driverBulletDef; } public static DriverBulletDef GetBulletFromIndex(int index) { return ArrayUtils.GetSafe<DriverBulletDef>(bulletDefs, index, ref Default); } public static DriverBulletDef GetWeightedRandomBullet(DriverWeaponTier tier) { int num = 60; int num2 = ((tier >= DriverWeaponTier.Uncommon) ? 35 : 0); int num3 = ((tier >= DriverWeaponTier.Legendary) ? 2 : 0); int num4 = ((tier >= DriverWeaponTier.Unique) ? 1 : 0); int num5 = Random.Range(0, num + num2 + num3 + num4); if (num5 < num) { tier = DriverWeaponTier.Common; } else if (num5 < num + num2) { tier = DriverWeaponTier.Uncommon; } else if (num5 < num + num2 + num3) { tier = DriverWeaponTier.Legendary; } return GetRandomBulletFromTier(tier); } public static DriverBulletDef GetRandomBulletFromTier(DriverWeaponTier tier) { List<DriverBulletDef> list = new List<DriverBulletDef>(); DriverBulletDef[] array = bulletDefs; foreach (DriverBulletDef driverBulletDef in array) { if (driverBulletDef.enabled && driverBulletDef.tier != 0) { if (driverBulletDef.tier == tier) { list.Add(driverBulletDef); } if (Config.uniqueDropsAreLegendary.Value && tier == DriverWeaponTier.Legendary && driverBulletDef.tier > DriverWeaponTier.Legendary) { list.Add(driverBulletDef); } } } if (list.Count <= 0) { return Default; } return list[Random.Range(0, list.Count)]; } } public static class DriverWeaponCatalog { public struct WeaponDrop { public ushort weaponIndex; public float dropChance; public WeaponDrop(ushort weaponIndex, float dropChance) { this.weaponIndex = weaponIndex; this.dropChance = dropChance; } } public static Dictionary<BodyIndex, WeaponDrop> weaponDrops = new Dictionary<BodyIndex, WeaponDrop>(); public static DriverWeaponDef[] weaponDefs = Array.Empty<DriverWeaponDef>(); internal static DriverWeaponDef Pistol; internal static DriverWeaponDef LunarPistol; internal static DriverWeaponDef VoidPistol; internal static DriverWeaponDef Needler; internal static DriverWeaponDef GoldenGun; internal static DriverWeaponDef PyriteGun; internal static DriverWeaponDef BeetleShield; internal static DriverWeaponDef Shotgun; internal static DriverWeaponDef RiotShotgun; internal static DriverWeaponDef SlugShotgun; internal static DriverWeaponDef MachineGun; internal static DriverWeaponDef HeavyMachineGun; internal static DriverWeaponDef Sniper; internal static DriverWeaponDef Bazooka; internal static DriverWeaponDef GrenadeLauncher; internal static DriverWeaponDef RocketLauncher; internal static DriverWeaponDef Behemoth; internal static DriverWeaponDef PrototypeRocketLauncher; internal static DriverWeaponDef ArmCannon; internal static DriverWeaponDef PlasmaCannon; internal static DriverWeaponDef BadassShotgun; internal static DriverWeaponDef LunarRifle; internal static DriverWeaponDef LunarHammer; internal static DriverWeaponDef NemmandoGun; internal static DriverWeaponDef NemmercGun; internal static DriverWeaponDef GolemRifle; internal static void InitWeaponDefs() { //IL_0097: 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_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016b: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_034c: Unknown result type (might be due to invalid IL or missing references) //IL_043b: Unknown result type (might be due to invalid IL or missing references) //IL_0440: Unknown result type (might be due to invalid IL or missing references) //IL_0b61: Unknown result type (might be due to invalid IL or missing references) //IL_0b66: Unknown result type (might be due to invalid IL or missing references) //IL_0bbb: Unknown result type (might be due to invalid IL or missing references) //IL_0bc0: Unknown result type (might be due to invalid IL or missing references) //IL_0f35: Unknown result type (might be due to invalid IL or missing references) //IL_0f3a: Unknown result type (might be due to invalid IL or missing references) //IL_0fcc: Unknown result type (might be due to invalid IL or missing references) //IL_100e: Unknown result type (might be due to invalid IL or missing references) //IL_1013: Unknown result type (might be due to invalid IL or missing references) //IL_1240: Unknown result type (might be due to invalid IL or missing references) //IL_1245: Unknown result type (might be due to invalid IL or missing references) DriverWeaponDefInfo weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_PISTOL_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_PISTOL_DESC"; weaponDefInfo.icon = Assets.pistolWeaponIcon; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit; weaponDefInfo.shotCount = 26; weaponDefInfo.primarySkillDef = null; weaponDefInfo.secondarySkillDef = null; weaponDefInfo.arsenalSkillDef = null; weaponDefInfo.mesh = Assets.pistolMesh; weaponDefInfo.material = Assets.pistolMat; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.commonPickupModel; weaponDefInfo.color = Helpers.uniqueItemColor; weaponDefInfo.calloutSoundString = ""; weaponDefInfo.configIdentifier = "Pistol"; weaponDefInfo.dropChance = 0f; Pistol = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_LUNAR_PISTOL_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNAR_PISTOL_DESC"; weaponDefInfo.icon = Assets.lunarPistolWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.lunarPickupModel; weaponDefInfo.color = Helpers.lunarItemColor; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.shotCount = 52; weaponDefInfo.primarySkillDef = Skills.lunarPistolPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.lunarPistolSecondarySkillDef; weaponDefInfo.mesh = Assets.lunarPistolMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarGolem/matLunarGolem.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.configIdentifier = "Lunar Pistol"; LunarPistol = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_VOID_PISTOL_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_VOID_PISTOL_DESC"; weaponDefInfo.icon = Assets.voidPistolWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.uniquePickupModel; weaponDefInfo.color = Helpers.voidItemColor; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.shotCount = 52; weaponDefInfo.primarySkillDef = Skills.voidPistolPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.voidPistolSecondarySkillDef; weaponDefInfo.mesh = Assets.voidPistolMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidJailer/matVoidJailer.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.configIdentifier = "Void Pistol"; VoidPistol = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_NEEDLER_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_NEEDLER_DESC"; weaponDefInfo.icon = Assets.needlerWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.needlerCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.lunarPickupModel; weaponDefInfo.color = Helpers.lunarItemColor; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.shotCount = 28; weaponDefInfo.primarySkillDef = null; weaponDefInfo.secondarySkillDef = null; weaponDefInfo.mesh = Assets.needlerMesh; weaponDefInfo.material = Assets.needlerMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.configIdentifier = "Needler"; Needler = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_PYRITEGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_PYRITEGUN_DESC"; weaponDefInfo.icon = Assets.pyriteGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.uniquePickupModel; weaponDefInfo.color = Helpers.uniqueItemColor; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.shotCount = 18; weaponDefInfo.primarySkillDef = Skills.pyriteGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.pyriteGunSecondarySkillDef; weaponDefInfo.mesh = Assets.goldenGunMesh; weaponDefInfo.material = Assets.pyriteGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.configIdentifier = "Pyrite Gun"; PyriteGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_BEETLESHIELD_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_BEETLESHIELD_DESC"; weaponDefInfo.icon = Assets.beetleShieldWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.uniquePickupModel; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 32; weaponDefInfo.primarySkillDef = Skills.beetleShieldPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.beetleShieldSecondarySkillDef; weaponDefInfo.mesh = Assets.beetleShieldMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Beetle/matBeetle.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.configIdentifier = "Chitin Shield"; weaponDefInfo.dropChance = 0.1f; BeetleShield = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_GOLDENGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_GOLDENGUN_DESC"; weaponDefInfo.icon = Assets.goldenGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 6; weaponDefInfo.primarySkillDef = Skills.goldenGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.goldenGunSecondarySkillDef; weaponDefInfo.mesh = Assets.goldenGunMesh; weaponDefInfo.material = Assets.goldenGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.configIdentifier = "Golden Gun"; weaponDefInfo.dropChance = 100f; GoldenGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_SHOTGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_SHOTGUN_DESC"; weaponDefInfo.icon = Assets.shotgunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Common; weaponDefInfo.shotCount = 8; weaponDefInfo.primarySkillDef = Skills.shotgunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.shotgunSecondarySkillDef; weaponDefInfo.mesh = Assets.shotgunMesh; weaponDefInfo.material = Assets.shotgunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun"; weaponDefInfo.configIdentifier = "Shotgun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; Shotgun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_RIOT_SHOTGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_RIOT_SHOTGUN_DESC"; weaponDefInfo.icon = Assets.riotShotgunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Common; weaponDefInfo.shotCount = 8; weaponDefInfo.primarySkillDef = Skills.riotShotgunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.riotShotgunSecondarySkillDef; weaponDefInfo.mesh = Assets.riotShotgunMesh; weaponDefInfo.material = Assets.riotShotgunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun"; weaponDefInfo.configIdentifier = "Riot Shotgun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; RiotShotgun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_SLUG_SHOTGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_SLUG_SHOTGUN_DESC"; weaponDefInfo.icon = Assets.slugShotgunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Common; weaponDefInfo.shotCount = 8; weaponDefInfo.primarySkillDef = Skills.slugShotgunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.slugShotgunSecondarySkillDef; weaponDefInfo.mesh = Assets.slugShotgunMesh; weaponDefInfo.material = Assets.slugShotgunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun"; weaponDefInfo.configIdentifier = "Slug Shotgun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; SlugShotgun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_MACHINEGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_MACHINEGUN_DESC"; weaponDefInfo.icon = Assets.machineGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Common; weaponDefInfo.shotCount = 48; weaponDefInfo.primarySkillDef = Skills.machineGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.machineGunSecondarySkillDef; weaponDefInfo.mesh = Assets.machineGunMesh; weaponDefInfo.material = Assets.machineGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_machine_gun"; weaponDefInfo.configIdentifier = "Machine Gun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; MachineGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_HEAVY_MACHINEGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_HEAVY_MACHINEGUN_DESC"; weaponDefInfo.icon = Assets.heavyMachineGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Common; weaponDefInfo.shotCount = 44; weaponDefInfo.primarySkillDef = Skills.heavyMachineGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.heavyMachineGunSecondarySkillDef; weaponDefInfo.mesh = Assets.heavyMachineGunMesh; weaponDefInfo.material = Assets.heavyMachineGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_hmg"; weaponDefInfo.configIdentifier = "Heavy Machine Gun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; HeavyMachineGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_SNIPER_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_SNIPER_DESC"; weaponDefInfo.icon = Assets.sniperWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Uncommon; weaponDefInfo.shotCount = 6; weaponDefInfo.primarySkillDef = Skills.sniperPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.sniperSecondarySkillDef; weaponDefInfo.mesh = Assets.sniperMesh; weaponDefInfo.material = Assets.sniperMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_sniper"; weaponDefInfo.configIdentifier = "Sniper Rifle"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; Sniper = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_BAZOOKA_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_BAZOOKA_DESC"; weaponDefInfo.icon = Assets.bazookaWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.bazookaCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Uncommon; weaponDefInfo.shotCount = 8; weaponDefInfo.primarySkillDef = Skills.bazookaPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.bazookaSecondarySkillDef; weaponDefInfo.mesh = Assets.bazookaMesh; weaponDefInfo.material = Assets.bazookaMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher"; weaponDefInfo.configIdentifier = "Bazooka"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; Bazooka = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_GRENADELAUNCHER_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_GRENADELAUNCHER_DESC"; weaponDefInfo.icon = Assets.grenadeLauncherWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.grenadeLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Uncommon; weaponDefInfo.shotCount = 16; weaponDefInfo.primarySkillDef = Skills.grenadeLauncherPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.grenadeLauncherSecondarySkillDef; weaponDefInfo.mesh = Assets.grenadeLauncherMesh; weaponDefInfo.material = Assets.grenadeLauncherMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_grenade_launcher"; weaponDefInfo.configIdentifier = "Grenade Launcher"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; GrenadeLauncher = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_ROCKETLAUNCHER_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_ROCKETLAUNCHER_DESC"; weaponDefInfo.icon = Assets.rocketLauncherWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Legendary; weaponDefInfo.shotCount = 20; weaponDefInfo.primarySkillDef = Skills.rocketLauncherPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.rocketLauncherSecondarySkillDef; weaponDefInfo.mesh = Assets.rocketLauncherMesh; weaponDefInfo.material = Assets.rocketLauncherMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher"; weaponDefInfo.configIdentifier = "Rocket Launcher"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; RocketLauncher = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_BEHEMOTH_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_BEHEMOTH_DESC"; weaponDefInfo.icon = Addressables.LoadAssetAsync<Texture>((object)"RoR2/Base/Behemoth/texBehemothIcon.png").WaitForCompletion(); weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 20; weaponDefInfo.primarySkillDef = Skills.behemothPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.behemothSecondarySkillDef; weaponDefInfo.mesh = Assets.behemothMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Behemoth/matBehemoth.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher"; weaponDefInfo.configIdentifier = "Brilliant Behemoth"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; Behemoth = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_ROCKETLAUNCHER_ALT_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_ROCKETLAUNCHER_ALT_DESC"; weaponDefInfo.icon = Assets.rocketLauncherAltWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 10; weaponDefInfo.primarySkillDef = Skills.rocketLauncherAltPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.rocketLauncherAltSecondarySkillDef; weaponDefInfo.mesh = Assets.rocketLauncherMesh; weaponDefInfo.material = Assets.rocketLauncherAltMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher"; weaponDefInfo.configIdentifier = "Prototype Rocket Launcher"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; PrototypeRocketLauncher = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_ARMCANNON_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_ARMCANNON_DESC"; weaponDefInfo.icon = Assets.armCannonWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 20; weaponDefInfo.primarySkillDef = Skills.armCannonPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.armCannonSecondarySkillDef; weaponDefInfo.mesh = Assets.armCannonMesh; weaponDefInfo.material = Assets.armCannonMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.configIdentifier = "Arm Cannon"; weaponDefInfo.dropChance = 25f; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; ArmCannon = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_PLASMACANNON_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_PLASMACANNON_DESC"; weaponDefInfo.icon = Assets.plasmaCannonWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Void; weaponDefInfo.shotCount = 30; weaponDefInfo.primarySkillDef = Skills.plasmaCannonPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.plasmaCannonSecondarySkillDef; weaponDefInfo.mesh = Assets.plasmaCannonMesh; weaponDefInfo.material = Assets.plasmaCannonMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_laser"; weaponDefInfo.configIdentifier = "Super Plasma Cannon"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; PlasmaCannon = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_BADASS_SHOTGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_BADASS_SHOTGUN_DESC"; weaponDefInfo.icon = Assets.badassShotgunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.LoadCrosshair("SMG"); weaponDefInfo.tier = DriverWeaponTier.Legendary; weaponDefInfo.shotCount = 10; weaponDefInfo.primarySkillDef = Skills.badassShotgunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.badassShotgunSecondarySkillDef; weaponDefInfo.mesh = Assets.badassShotgunMesh; weaponDefInfo.material = Assets.badassShotgunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun"; weaponDefInfo.configIdentifier = "Badass Shotgun"; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; BadassShotgun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_LUNARRIFLE_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNARRIFLE_DESC"; weaponDefInfo.icon = Assets.lunarRifleWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Lunar; weaponDefInfo.shotCount = 48; weaponDefInfo.primarySkillDef = Skills.lunarRiflePrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.lunarRifleSecondarySkillDef; weaponDefInfo.mesh = Assets.lunarRifleMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarGolem/matLunarGolem.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.configIdentifier = "Chimeric Cannon"; weaponDefInfo.dropChance = 10f; weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed; LunarRifle = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_LUNARHAMMER_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNARHAMMER_DESC"; weaponDefInfo.icon = Assets.lunarHammerWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.needlerCrosshairPrefab; weaponDefInfo.pickupPrefab = Assets.lunarPickupModel; weaponDefInfo.color = Helpers.lunarItemColor; weaponDefInfo.tier = DriverWeaponTier.NoTier; weaponDefInfo.primarySkillDef = Skills.lunarHammerPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.lunarHammerSecondarySkillDef; weaponDefInfo.mesh = Assets.lunarHammerMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Brother/matBrotherHammer.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.BigMelee; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.dropChance = 100f; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; weaponDefInfo.configIdentifier = "Lunar Hammer"; LunarHammer = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_NEMMANDO_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_NEMMANDO_DESC"; weaponDefInfo.icon = Assets.nemmandoGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Void; weaponDefInfo.shotCount = 64; weaponDefInfo.primarySkillDef = Skills.nemmandoGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.nemmandoGunSecondarySkillDef; weaponDefInfo.mesh = Assets.nemmandoGunMesh; weaponDefInfo.material = Assets.nemmandoGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.dropChance = 100f; weaponDefInfo.configIdentifier = "Nemesis Commando SMG"; NemmandoGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_NEMMERC_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_NEMMERC_DESC"; weaponDefInfo.icon = Assets.nemmercGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.LoadCrosshair("SMG"); weaponDefInfo.tier = DriverWeaponTier.Void; weaponDefInfo.shotCount = 48; weaponDefInfo.primarySkillDef = Skills.nemmercGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.nemmercGunSecondarySkillDef; weaponDefInfo.mesh = Assets.nemmercGunMesh; weaponDefInfo.material = Assets.nemmercGunMat; weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun"; weaponDefInfo.dropChance = 100f; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; weaponDefInfo.configIdentifier = "Nemesis Mercenary Shotgun"; NemmercGun = CreateAndAddWeapon(weaponDefInfo); weaponDefInfo = default(DriverWeaponDefInfo); weaponDefInfo.nameToken = "ROB_DRIVER_GOLEMGUN_NAME"; weaponDefInfo.descriptionToken = "ROB_DRIVER_GOLEMGUN_DESC"; weaponDefInfo.icon = Assets.golemGunWeaponIcon; weaponDefInfo.crosshairPrefab = Assets.circleCrosshairPrefab; weaponDefInfo.tier = DriverWeaponTier.Unique; weaponDefInfo.shotCount = 48; weaponDefInfo.primarySkillDef = Skills.golemGunPrimarySkillDef; weaponDefInfo.secondarySkillDef = Skills.golemGunSecondarySkillDef; weaponDefInfo.mesh = Assets.golemGunMesh; weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Golem/matGolem.mat").WaitForCompletion(); weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded; weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic"; weaponDefInfo.configIdentifier = "Stone Cannon"; weaponDefInfo.dropChance = 1f; weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage; GolemRifle = CreateAndAddWeapon(weaponDefInfo); AddWeaponDrop("Beetle", BeetleShield); AddWeaponDrop("Golem", GolemRifle); AddWeaponDrop("Titan", GolemRifle, 10f); AddWeaponDrop("LunarGolem", LunarRifle); AddWeaponDrop("TitanGold", GoldenGun); AddWeaponDrop("Brother", LunarRifle, 100f); AddWeaponDrop("TimeCrystal", LunarRifle, 100f); AddWeaponDrop("BrotherGlass", LunarRifle, 100f); AddWeaponDrop("BrotherHurt", LunarHammer, 100f); AddWeaponDrop("BrotherHurtBodyP3", LunarHammer, 100f, autoComplete: false); AddWeaponDrop("Mechorilla", ArmCannon); AddWeaponDrop("SS2UNemmando", NemmandoGun); AddWeaponDrop("NemMerc", NemmercGun); } public static DriverWeaponDef CreateAndAddWeapon(DriverWeaponDefInfo weaponDefInfo) { //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_011e: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_01cc: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_027f: 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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_01e0: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_028e: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0296: Unknown result type (might be due to invalid IL or missing references) //IL_02cb: Unknown result type (might be due to invalid IL or missing references) //IL_02d0: Unknown result type (might be due to invalid IL or missing references) //IL_02df: Unknown result type (might be due to invalid IL or missing references) //IL_02e4: Unknown result type (might be due to invalid IL or missing references) //IL_02e7: Unknown result type (might be due to invalid IL or missing references) DriverWeaponDef driverWeaponDef = DriverWeaponDef.CreateWeaponDefFromInfo(weaponDefInfo); Array.Resize(ref weaponDefs, weaponDefs.Length + 1); int num = weaponDefs.Length - 1; driverWeaponDef.index = (ushort)num; weaponDefs[num] = driverWeaponDef; Config.InitWeaponConfig(driverWeaponDef); switch (driverWeaponDef.tier) { case DriverWeaponTier.NoTier: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.badColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponGrey"); } break; } case DriverWeaponTier.Common: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.commonItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponGrey"); } break; } case DriverWeaponTier.Uncommon: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.uncommonItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponGreen"); } break; } case DriverWeaponTier.Legendary: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.legendaryItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponRed"); } break; } case DriverWeaponTier.Unique: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.uncommonItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponYellow"); } break; } case DriverWeaponTier.Void: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.voidItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponPurple"); } break; } case DriverWeaponTier.Lunar: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Helpers.lunarItemColor; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponBlue"); } break; } default: { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; Color valueOrDefault = driverWeaponDef2.color.GetValueOrDefault(); if (!driverWeaponDef2.color.HasValue) { valueOrDefault = Color.black; driverWeaponDef2.color = valueOrDefault; } driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.icon == null) { driverWeaponDef2.icon = Assets.mainAssetBundle.LoadAsset<Texture>("texGenericWeaponGrey"); } break; } } if (Config.enableArsenal.Value) { DriverWeaponDef driverWeaponDef2 = driverWeaponDef; if (driverWeaponDef2.arsenalSkillDef == null) { driverWeaponDef2.arsenalSkillDef = Skills.CreateWeaponSkillDef(driverWeaponDef); } DriverArsenal.passiveSkills.Add(driverWeaponDef.arsenalSkillDef); } Log.Debug("Added " + driverWeaponDef.nameToken + " to catalog with rarity: " + Enum.GetName(typeof(DriverWeaponTier), driverWeaponDef.tier)); return driverWeaponDef; } public static void AddWeaponDrop(string bodyName, DriverWeaponDef weaponDef, float dropChance = 0f, bool autoComplete = true) { if (string.IsNullOrWhiteSpace(bodyName)) { return; } if (autoComplete) { bodyName = bodyName.Replace("(Clone)", ""); if (!bodyName.EndsWith("Body")) { bodyName += "Body"; } } ((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)delegate { //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_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Invalid comparison between Unknown and I4 //IL_0015: Unknown result type (might be due to invalid IL or missing references) BodyIndex val = BodyCatalog.FindBodyIndex(bodyName); if ((int)val != -1) { weaponDrops[val] = new WeaponDrop(weaponDef.index, Mathf.Max(dropChance, weaponDef.dropChance)); Log.Debug("Added " + weaponDef.nameToken + " to drop list for " + bodyName); } else { Log.Warning("Failed to add " + weaponDef.nameToken + " to drop list for " + bodyName + " because the body index was not found."); } }); } public static SkillDef[] GetSkillOverrides(bool primary) { List<SkillDef> list = new List<SkillDef>(); for (int i = 0; i < weaponDefs.Length; i++) { DriverWeaponDef driverWeaponDef = weaponDefs[i]; if (driverWeaponDef.enabled) { SkillDef val = (primary ? driverWeaponDef.primarySkillDef : driverWeaponDef.secondarySkillDef); if (Object.op_Implicit((Object)(object)val)) { list.Add(val); } } } return list.ToArray(); } public static DriverWeaponDef GetWeaponFromIndex(int index) { return ArrayUtils.GetSafe<DriverWeaponDef>(weaponDefs, index, ref Pistol); } public static bool IsWeaponPistol(DriverWeaponDef weaponDef) { if (!((Object)(object)weaponDef == (Object)(object)Pistol) && !((Object)(object)weaponDef == (Object)(object)VoidPistol) && !((Object)(object)weaponDef == (Object)(object)LunarPistol) && !((Object)(object)weaponDef == (Object)(object)Needler) && !((Object)(object)weaponDef == (Object)(object)PyriteGun)) { return (Object)(object)weaponDef == (Object)(object)BeetleShield; } return true; } public static DriverWeaponDef GetRandomWeapon() { List<DriverWeaponDef> list = new List<DriverWeaponDef>(); for (int i = 0; i < weaponDefs.Length; i++) { DriverWeaponDef driverWeaponDef = weaponDefs[i]; if (driverWeaponDef.enabled && driverWeaponDef.shotCount > 0 && driverWeaponDef.tier != 0) { list.Add(driverWeaponDef); } } if (list.Count == 0) { return Pistol; } return list[Random.Range(0, list.Count)]; } public static DriverWeaponDef GetWeightedRandomWeapon(DriverWeaponTier tier) { int num = 60; int num2 = ((tier >= DriverWeaponTier.Uncommon) ? 35 : 0); int num3 = ((tier >= DriverWeaponTier.Legendary) ? 2 : 0); int num4 = ((tier >= DriverWeaponTier.Unique) ? 1 : 0); int num5 = Random.Range(0, num + num2 + num3 + num4); if (num5 < num) { tier = DriverWeaponTier.Common; } else if (num5 < num + num2) { tier = DriverWeaponTier.Uncommon; } else if (num5 < num + num2 + num3) { tier = DriverWeaponTier.Legendary; } return GetRandomWeaponFromTier(tier); } public static DriverWeaponDef GetRandomWeaponFromTier(DriverWeaponTier tier) { List<DriverWeaponDef> list = new List<DriverWeaponDef>(); for (int i = 0; i < weaponDefs.Length; i++) { DriverWeaponDef driverWeaponDef = weaponDefs[i]; if (driverWeaponDef.enabled && driverWeaponDef.shotCount > 0 && driverWeaponDef.tier != 0) { if (driverWeaponDef.tier == tier) { list.Add(driverWeaponDef); } if (Config.uniqueDropsAreLegendary.Value && tier == DriverWeaponTier.Legendary && driverWeaponDef.tier > DriverWeaponTier.Legendary) { list.Add(driverWeaponDef); } } } if (list.Count == 0) { return Pistol; } return list[Random.Range(0, list.Count)]; } } public static class DriverWeaponSkinCatalog { internal static Dictionary<SkinIndex, DriverWeaponSkinDef[]> driverSkinDefs = new Dictionary<SkinIndex, DriverWeaponSkinDef[]>(); public static void AddSkin(SkinIndex index, IEnumerable<DriverWeaponSkinDef> skinDefs) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Invalid comparison between Unknown and I4 //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (skinDefs.Any() && (int)index != -1) { Dictionary<SkinIndex, DriverWeaponSkinDef[]> dictionary = driverSkinDefs; List<DriverWeaponSkinDef> list = new List<DriverWeaponSkinDef>(); list.AddRange(skinDefs); dictionary.Add(index, list.ToArray()); } } public static void GetWeaponSkin(this ModelSkinController skinController, DriverWeaponDef weaponDef, out Mesh mesh, out Material material) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) material = null; mesh = null; if (skinController != null && skinController.skins?.Length > 0) { SkinDef safe = ArrayUtils.GetSafe<SkinDef>(skinController.skins, skinController.currentSkinIndex); if (Object.op_Implicit((Object)(object)safe) && driverSkinDefs.TryGetValue(safe.skinIndex, out var value)) { foreach (DriverWeaponSkinDef driverWeaponSkinDef in value) { if (driverWeaponSkinDef.weaponDefIndex == weaponDef.index) { material = driverWeaponSkinDef.weaponSkinMaterial; mesh = driverWeaponSkinDef.weaponSkinMesh; } } } } if (material == null) { material = weaponDef.material; } if (mesh == null) { Mesh val = weaponDef.mesh; if (val == null) { val = (Mesh)(weaponDef.animationSet switch { DriverWeaponDef.AnimationSet.TwoHanded => DriverWeaponCatalog.Behemoth.mesh, DriverWeaponDef.AnimationSet.BigMelee => DriverWeaponCatalog.LunarHammer.mesh, _ => DriverWeaponCatalog.Pistol.mesh, }); } mesh = val; } } } } namespace RobDriver.SkillStates { public class FuckMyAss : GenericCharacterDeath { public override bool shouldAutoDestroy => false; public override void OnEnter() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) ((GenericCharacterDeath)this).OnEnter(); Vector3 val = Vector3.up * 3f; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor)) { val += ((EntityState)this).characterMotor.velocity; ((Behaviour)((EntityState)this).characterMotor).enabled = false; } if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform)) { return; } RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>(); if (!Object.op_Implicit((Object)(object)component)) { return; } Transform[] bones = component.bones; foreach (Transform val2 in bones) { if (Object.op_Implicit((Object)(object)val2)) { ((Component)val2).gameObject.layer = LayerIndex.ragdoll.intVal; ((Component)val2).gameObject.SetActive(true); } } component.BeginRagdoll(val); } public override void PlayDeathAnimation(float crossfadeDuration = 0.1f) { } public override void FixedUpdate() { ((GenericCharacterDeath)this).FixedUpdate(); if (NetworkServer.active && ((EntityState)this).fixedAge > 4f) { EntityState.Destroy((Object)(object)((EntityState)this).gameObject); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)7; } } } namespace RobDriver.SkillStates.Emote { public class BaseEmote : BaseState { private CameraParamsOverrideHandle camOverrideHandle; private Animator animator; private ChildLocator childLocator; private float duration; private uint activePlayID; public LocalUser localUser; public override void OnEnter() { //IL_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) ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); childLocator = ((EntityState)this).GetModelChildLocator(); FindLocalUser(); ((EntityState)this).characterBody.hideCrosshair = true; camOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, DriverCameraParams.EMOTE); } private void FindLocalUser() { if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody)) { return; } foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList) { if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody) { localUser = readOnlyLocalUsers; break; } } } protected void PlayEmote(string animString, string soundString = "", float animDuration = 0f) { PlayEmote(animString, soundString, ((EntityState)this).GetModelAnimator(), animDuration); } protected void PlayEmote(string animString, string soundString, Animator animator, float animDuration = 0f) { if (animDuration >= 0f && duration != 0f) { animDuration = duration; } if (duration > 0f) { EntityState.PlayAnimationOnAnimator(animator, "FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f); } else { animator.SetFloat("Emote.playbackRate", 1f); EntityState.PlayAnimationOnAnimator(animator, "FullBody, Override", animString); } if (!string.IsNullOrEmpty(soundString)) { activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject); } } public override void Update() { ((EntityState)this).Update(); if (((EntityState)this).isAuthority) { CheckEmote<Rest>(Config.restKey); CheckEmote<Taunt>(Config.tauntKey); CheckEmote<Dance>(Config.danceKey); } } private void CheckEmote(KeyCode keybind, EntityState state) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) if (Input.GetKeyDown(keybind) && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0); } } private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new() { if (Config.GetKeyPressed(keybind)) { FindLocalUser(); if (localUser != null && !localUser.isUIFocused) { ((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0); } } } public override void FixedUpdate() { //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); bool flag = false; if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded) { flag = true; } if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank)) { if (((EntityState)this).inputBank.skill1.down) { flag = true; } if (((EntityState)this).inputBank.skill2.down) { flag = true; } if (((EntityState)this).inputBank.skill3.down) { flag = true; } if (((EntityState)this).inputBank.skill4.down) { flag = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero) { flag = true; } } if (duration > 0f && ((EntityState)this).fixedAge >= duration) { flag = true; } if (flag && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).OnExit(); ((EntityState)this).characterBody.hideCrosshair = false; ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); if (activePlayID != 0) { AkSoundEngine.StopPlayingID(activePlayID); } ((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)0; } } public class Dance : BaseEmote { public override void OnEnter() { base.OnEnter(); if (((EntityState)this).characterBody.skinIndex == 1) { PlayEmote("Dance", "sfx_jacket_dance"); } else if (((EntityState)this).characterBody.skinIndex == 2) { PlayEmote("Dance", "sfx_slugger_dance"); } else { PlayEmote("Dance", "sfx_driver_dance"); } ((Component)((BaseState)this).FindModelChild("Boombox")).gameObject.SetActive(true); } public override void OnExit() { base.OnExit(); ((Component)((BaseState)this).FindModelChild("Boombox")).gameObject.SetActive(false); } } public class Rest : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("RestEmote", "", 1.5f); } } public class Taunt : BaseEmote { public override void OnEnter() { base.OnEnter(); PlayEmote("Taunt", "", 1.5f); Util.PlaySound("sfx_driver_boom", ((EntityState)this).gameObject); } } } namespace RobDriver.SkillStates.Driver { public class Coin : BaseSkillState { private float baseDuration = 0.5f; private float duration; public virtual GameObject projectilePrefab => Projectiles.coinProjectile; public override void OnEnter() { ((BaseState)this).OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; Util.PlaySound("sfx_driver_coin", ((EntityState)this).gameObject); ((EntityState)this).PlayAnimation("LeftArm, Override", "FireShard"); FireProjectile(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } private void FireProjectile() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0039: 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_004a: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_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_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { Ray aimRay = ((BaseState)this).GetAimRay(); ((Ray)(ref aimRay)).direction = Util.ApplySpread(((Ray)(ref aimRay)).direction, 0f, 0f, 1f, 1f, 0f, -10f); Vector3 direction = ((Ray)(ref aimRay)).direction; Vector3 val = direction; Vector3 velocity = ((EntityState)this).rigidbody.velocity; direction = val * Mathf.Clamp(((Vector3)(ref velocity)).magnitude, 1f, 20f); direction.y += Mathf.Max(((EntityState)this).rigidbody.velocity.y, 0f); ProjectileManager.instance.FireProjectile(new FireProjectileInfo { projectilePrefab = projectilePrefab, position = ((Ray)(ref aimRay)).origin, rotation = Util.QuaternionSafeLookRotation(direction), owner = ((EntityState)this).gameObject }); } } public override InterruptPriority GetMinimumInterruptPriority() { if (!((double)((EntityState)this).fixedAge < (double)duration * 0.5)) { return (InterruptPriority)1; } return (InterruptPriority)3; } } public class Dash : BaseState { protected Vector3 slipVector = Vector3.zero; public float duration = 0.3f; public float speedCoefficient = 7f; private Vector3 cachedForward; public override void OnEnter() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0031: 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_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: 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_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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) ((BaseState)this).OnEnter(); Vector3 val = ((((EntityState)this).inputBank.moveVector == Vector3.zero) ? ((EntityState)this).characterDirection.forward : ((EntityState)this).inputBank.moveVector); slipVector = ((Vector3)(ref val)).normalized; cachedForward = ((EntityState)this).characterDirection.forward; Animator modelAnimator = ((EntityState)this).GetModelAnimator(); Vector3 val2 = (Object.op_Implicit((Object)(object)((EntityState)this).characterDirection) ? ((EntityState)this).characterDirection.forward : slipVector); Vector3 val3 = Vector3.Cross(Vector3.up, val2); float num = Vector3.Dot(slipVector, val2); float num2 = Vector3.Dot(slipVector, val3); modelAnimator.SetFloat("dashF", num); modelAnimator.SetFloat("dashR", num2); ((EntityState)this).PlayCrossfade("FullBody, Override", "Dash", "Dash.playbackRate", duration * 1.5f, 0.05f); ((EntityState)this).PlayAnimation("Gesture, Override", "BufferEmpty"); Util.PlaySound("sfx_driver_dash", ((EntityState)this).gameObject); ApplyBuff(); CreateDashEffect(); } public virtual void ApplyBuff() { } public virtual void CreateDashEffect() { } public override void FixedUpdate() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0057: 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) ((EntityState)this).FixedUpdate(); ((EntityState)this).characterMotor.velocity = Vector3.zero; ((EntityState)this).characterMotor.rootMotion = slipVector * (base.moveSpeedStat * speedCoefficient * Time.fixedDeltaTime) * Mathf.Cos(((EntityState)this).fixedAge / duration * (MathF.PI / 2f)); if (((EntityState)this).isAuthority && Object.op_Implicit((Object)(object)((EntityState)this).characterDirection)) { ((EntityState)this).characterDirection.forward = cachedForward; } if (((EntityState)this).isAuthority && ((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public virtual void DampenVelocity() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) CharacterMotor characterMotor = ((EntityState)this).characterMotor; characterMotor.velocity *= 0.8f; } public override void OnExit() { DampenVelocity(); ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)5; } } public class DiscardWeapon : BaseDriverSkillState { private float duration = 0.5f; public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration) { ((EntityState)this).outer.SetNextStateToMain(); } } public override InterruptPriority GetMinimumInterruptPriority() { return (InterruptPriority)2; } } public class Heal : BaseDriverSkillState { public float startupDelay = 0.65f; public float healPercentPerTick = 0.01f; public float tickStopwatch = 0.25f; private float stopwatch; protected override string showProp => "MedkitModel"; protected override bool holsterGun => true; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayCrossfade("FullBody, Override", "Heal", "Action.playbackRate", startupDelay, 0.1f); } public override void OnExit() { base.OnExit(); ((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty"); } public override void FixedUpdate() { //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); ((BaseState)this).attackSpeedStat = ((EntityState)this).characterBody.attackSpeed; if (((EntityState)this).fixedAge >= startupDelay / ((BaseState)this).attackSpeedStat) { HandleHeal(); } if (((EntityState)this).isAuthority) { if (!((BaseState)this).isGrounded) { cancelling = true; } if (((EntityState)this).healthComponent.health >= ((EntityState)this).healthComponent.fullHealth || (((ButtonState)(ref ((EntityState)this).inputBank.skill4)).justPressed && ((EntityState)this).fixedAge >= 0.1f)) { cancelling = true; } if (((EntityState)this).inputBank.moveVector != Vector3.zero && ((EntityState)this).fixedAge >= 0.1f) { cancelling = true; } if (cancelling) { ((EntityState)this).outer.SetNextStateToMain(); } } } protected virtual void HandleHeal() { stopwatch += Time.fixedDeltaTime; if (stopwatch >= tickStopwatch / ((BaseState)this).attackSpeedStat) { TryHeal(); } } protected virtual void TryHeal() { //IL_002c: Unknown result type (might be due to i