Decompiled source of Draven v1.0.3
Draven.dll
Decompiled 3 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using EntityStates; using EntityStates.Commando; using EntityStates.Merc; using KinematicCharacterController; using On.RoR2; using R2API; using R2API.Utils; using Rewired.ComponentControls.Effects; using RoR2; using RoR2.Orbs; using RoR2.Projectile; using RoR2.Skills; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.Rendering; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = "")] [assembly: AssemblyCompany("Draven")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Draven")] [assembly: AssemblyTitle("Draven")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Spearman.SkillStates { internal class MeleeSkillState : BaseSkillState { internal float hitPauseDuration; internal float hopVelocity = Assaulter.smallHopVelocity; internal string animParameter = ""; internal float hitPauseTimer; internal bool isInHitPause; internal HitStopCachedState hitStopCachedState; internal Animator animator; internal float stopwatch; internal OverlapAttack attack; internal bool hitCallback; internal float damage; internal GameObject hitEffectPrefab; internal HitBoxGroup hitBoxGroup; internal DamageType damageType = (DamageType)0; internal DamageColorIndex damageColor = (DamageColorIndex)0; internal Vector3 forceVector = Vector3.back * 100f; internal float attackStopwatch; public override void OnEnter() { ((BaseState)this).OnEnter(); animator = ((EntityState)this).GetModelAnimator(); isInHitPause = false; hitPauseDuration = GroundLight.hitPauseDuration / ((BaseState)this).attackSpeedStat; } internal OverlapAttack NewOverlapAttack() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) OverlapAttack val = new OverlapAttack(); val.procChainMask = default(ProcChainMask); val.procCoefficient = 1f; val.attacker = ((EntityState)this).gameObject; val.inflictor = ((EntityState)this).gameObject; val.teamIndex = ((EntityState)this).characterBody.teamComponent.teamIndex; val.damage = ((EntityState)this).characterBody.damage * damage; val.forceVector = forceVector; val.hitEffectPrefab = hitEffectPrefab; val.isCrit = ((EntityState)this).characterBody.RollCrit(); val.damageColorIndex = damageColor; val.damageType = DamageTypeCombo.op_Implicit(damageType); val.maximumOverlapTargets = 100; val.hitBoxGroup = hitBoxGroup; return val; } public override void FixedUpdate() { //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) ((EntityState)this).FixedUpdate(); hitPauseTimer -= Time.fixedDeltaTime; if (hitCallback && !isInHitPause) { if (!((BaseState)this).isGrounded) { ((BaseState)this).SmallHop(((EntityState)this).characterMotor, hopVelocity); } if (!Utility.IsNullOrWhiteSpace(animParameter)) { hitStopCachedState = ((BaseState)this).CreateHitStopCachedState(((EntityState)this).characterMotor, animator, animParameter); } hitPauseTimer = hitPauseDuration / ((BaseState)this).attackSpeedStat; isInHitPause = true; } if (!Utility.IsNullOrWhiteSpace(animParameter) && hitPauseTimer <= 0f && isInHitPause) { ((BaseState)this).ConsumeHitStopCachedState(hitStopCachedState, ((EntityState)this).characterMotor, animator); isInHitPause = false; } if (!isInHitPause) { attackStopwatch += Time.fixedDeltaTime; stopwatch += Time.fixedDeltaTime; if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 1f; } } else if (Object.op_Implicit((Object)(object)animator)) { animator.speed = 0f; } } } } namespace Draven { internal class Assets { public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Draven.AssetBundle.dravenassets"); MainAssetBundle = AssetBundle.LoadFromStream(stream); } using Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("Draven.Draven.bnk"); byte[] array = new byte[stream2.Length]; stream2.Read(array, 0, array.Length); SoundBanks.Add(array); } } internal class AxeDestroyOnCharacterCollision : MonoBehaviour, IProjectileImpactBehavior { public void OnProjectileImpact(ProjectileImpactInfo impactInfo) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)((Component)impactInfo.collider).GetComponent<HurtBox>())) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } internal class AxeOrb : Orb { public float speed = 65f; public GameObject orbPrefab; public override void Begin() { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Expected O, but got Unknown ((Orb)this).duration = ((Orb)this).distanceToTarget / speed; EffectData val = new EffectData { origin = base.origin, genericFloat = ((Orb)this).duration }; val.SetHurtBoxReference(base.target); EffectManager.SpawnEffect(orbPrefab, val, true); } public override void OnArrival() { if (Object.op_Implicit((Object)(object)base.target) && Object.op_Implicit((Object)(object)base.target.healthComponent) && Object.op_Implicit((Object)(object)base.target.healthComponent.body)) { int buffCount = base.target.healthComponent.body.GetBuffCount(Prefabs.axeBuff); if (buffCount < 2 && NetworkServer.active) { base.target.healthComponent.body.AddBuff(Prefabs.axeBuff); } AxeBehaviour component = ((Component)base.target.healthComponent.body).GetComponent<AxeBehaviour>(); if (Object.op_Implicit((Object)(object)component)) { component.Catch(); } } } } internal class AxeStickEvent : MonoBehaviour { private ProjectileGhostController ghostController; private void Start() { //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown ghostController = ((Component)this).GetComponent<ProjectileGhostController>(); if (Object.op_Implicit((Object)(object)ghostController) && Object.op_Implicit((Object)(object)ghostController.authorityTransform)) { ProjectileStickOnImpact component = ((Component)ghostController.authorityTransform).GetComponent<ProjectileStickOnImpact>(); if (Object.op_Implicit((Object)(object)component)) { component.stickEvent.AddListener(new UnityAction(Stick)); } } } private void Stick() { Object.Destroy((Object)(object)((Component)((Component)this).transform.GetChild(0)).GetComponent<RotateAroundAxis>()); } } internal class AxeBehaviour : MonoBehaviour { public GameObject ultProjectile; private Animator animator; public bool left; public bool right; public float stopwatch; public float minAxeTime = 8f; private CharacterBody body; public bool calledBack; public int skinIndex => (int)(Object.op_Implicit((Object)(object)body) ? body.skinIndex : 0); private uint ID { get { if (skinIndex == 11) { return Sounds.Play_Draven_Skin_Catch; } return Sounds.Play_Draven_Catch; } } private uint spinID { get { if (skinIndex == 11) { return Sounds.Play_Draven_Skin_Spin_Cast; } return Sounds.Play_Draven_Spin_Cast; } } private int buffCount => Object.op_Implicit((Object)(object)body) ? body.GetBuffCount(Prefabs.axeBuff) : 0; public void CallUltBack() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) calledBack = true; if (Object.op_Implicit((Object)(object)ultProjectile)) { ultProjectile.GetComponent<BoomerangProjectile>().boomerangState = (BoomerangState)2; } } public void Catch() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) AkSoundEngine.PostEvent(ID, ((Component)this).gameObject); if (skinIndex == 11) { EffectManager.SimpleEffect(Prefabs.catchEffectSkin, new Vector3(((Component)this).transform.position.x, ((Component)this).transform.position.y - 0.8f, ((Component)this).transform.position.z), Quaternion.identity, false); } else { EffectManager.SimpleEffect(Prefabs.catchEffect, new Vector3(((Component)this).transform.position.x, ((Component)this).transform.position.y - 0.8f, ((Component)this).transform.position.z), Quaternion.identity, false); } SetTrigger(); } public void SetTrigger() { if (Object.op_Implicit((Object)(object)animator)) { if (!right) { right = true; animator.SetTrigger("rightCatch"); } else if (buffCount > 1) { left = true; animator.SetTrigger("leftCatch"); } } } private void OnEnable() { body = ((Component)this).GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.modelLocator) && Object.op_Implicit((Object)(object)body.modelLocator.modelTransform)) { animator = ((Component)body.modelLocator.modelTransform).GetComponent<Animator>(); } } private void FixedUpdate() { if (buffCount < 2) { stopwatch += Time.fixedDeltaTime; if (stopwatch >= minAxeTime && Object.op_Implicit((Object)(object)body)) { stopwatch = 0f; AkSoundEngine.PostEvent(spinID, ((Component)this).gameObject); if (NetworkServer.active) { body.AddBuff(Prefabs.axeBuff); } SetTrigger(); } } else { stopwatch = 0f; } SetSpinBooleans(); } private void SetSpinBooleans() { if (Object.op_Implicit((Object)(object)animator)) { animator.SetBool("rightSpin", right); animator.SetBool("leftSpin", left); } } } internal class AxeProjectileIndexHolderComponent : MonoBehaviour { public int axeIndex = -1; } internal class DravenBoomerang : MonoBehaviour { public GameObject owner; public AxeBehaviour behaviour; public ProjectileController controller; public BoomerangProjectile boomer; public uint ID = Sounds.Play_Draven_R_Return; private uint id; private void Start() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) ((Component)this).transform.localScale = Vector3.one; ((Component)this).gameObject.GetComponent<ProjectileController>().ghost.transform.localScale = Vector3.one; boomer = ((Component)this).GetComponent<BoomerangProjectile>(); if (ID == Sounds.Play_Draven_R_Return) { id = AkSoundEngine.PostEvent(Sounds.Play_Draven_R_Mis, ((Component)this).gameObject); } else { id = AkSoundEngine.PostEvent(Sounds.Play_Draven_Skin_R_Mis, ((Component)this).gameObject); } } private void FixedUpdate() { //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Invalid comparison between Unknown and I4 if (!Object.op_Implicit((Object)(object)owner)) { controller = ((Component)this).GetComponent<ProjectileController>(); if (Object.op_Implicit((Object)(object)controller) && Object.op_Implicit((Object)(object)controller.owner)) { owner = controller.owner; if (Object.op_Implicit((Object)(object)owner)) { behaviour = owner.GetComponent<AxeBehaviour>(); if (Object.op_Implicit((Object)(object)behaviour)) { behaviour.ultProjectile = ((Component)this).gameObject; } } } } if (Object.op_Implicit((Object)(object)boomer) && (int)boomer.boomerangState == 2 && Object.op_Implicit((Object)(object)behaviour) && !behaviour.calledBack) { behaviour.calledBack = true; } } private void OnDisable() { AkSoundEngine.StopPlayingID(id); AkSoundEngine.PostEvent(ID, ((Component)this).gameObject); } } internal class SkinTextureSwapBehaviour : MonoBehaviour { public Material mat; private float stopwatch; private float delay = 0.2f; public Texture2D tex1; public Texture2D tex2; private void OnEnable() { tex1 = Assets.MainAssetBundle.LoadAsset<Texture2D>("skin39_d_1"); tex2 = Assets.MainAssetBundle.LoadAsset<Texture2D>("skin39_d_2"); } private void FixedUpdate() { stopwatch += Time.fixedDeltaTime; if (!(stopwatch >= delay)) { return; } stopwatch = 0f; if (Object.op_Implicit((Object)(object)mat)) { if ((Object)(object)mat.mainTexture == (Object)(object)tex1) { mat.mainTexture = (Texture)(object)tex2; } else { mat.mainTexture = (Texture)(object)tex1; } } } } internal class Hook { internal static void Hooks() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown RecalculateStatsAPI.GetStatCoefficients += new StatHookEventHandler(RecalculateStatsAPI_GetStatCoefficients); HealthComponent.TakeDamage += new hook_TakeDamage(HealthComponent_TakeDamage); } private static void HealthComponent_TakeDamage(orig_TakeDamage orig, HealthComponent self, DamageInfo damageInfo) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) if (Object.op_Implicit((Object)(object)damageInfo.inflictor) && DamageAPI.HasModdedDamageType(damageInfo, Prefabs.knockback)) { Rigidbody component = ((Component)self).gameObject.GetComponent<Rigidbody>(); RigidbodyMotor component2 = ((Component)self).gameObject.GetComponent<RigidbodyMotor>(); if (NetworkServer.active) { float num = 0f; if (Object.op_Implicit((Object)(object)component)) { num = component.mass; } else if (Object.op_Implicit((Object)(object)component2)) { num = component2.mass; } Vector3 val = damageInfo.position - damageInfo.inflictor.transform.position; self.TakeDamageForce(((Vector3)(ref val)).normalized * (15f * num), true, false); } } if (Object.op_Implicit((Object)(object)damageInfo.attacker) && ((Object)damageInfo.attacker).name.Contains("DravenBody") && Object.op_Implicit((Object)(object)damageInfo.inflictor) && Object.op_Implicit((Object)(object)self.body)) { CharacterBody component3 = damageInfo.attacker.GetComponent<CharacterBody>(); if (Object.op_Implicit((Object)(object)component3) && Object.op_Implicit((Object)(object)component3.mainHurtBox)) { AxeProjectileIndexHolderComponent component4 = damageInfo.inflictor.GetComponent<AxeProjectileIndexHolderComponent>(); if (Object.op_Implicit((Object)(object)component4)) { if (component4.axeIndex == -1) { AxeBehaviour component5 = ((Component)component3).GetComponent<AxeBehaviour>(); if (Object.op_Implicit((Object)(object)component5) && component3.HasBuff(Prefabs.speedBuff) && Object.op_Implicit((Object)(object)component5)) { component5.stopwatch += 1f; } } else if (NetworkServer.active) { AxeOrb axeOrb = new AxeOrb { origin = self.body.corePosition, target = component3.mainHurtBox }; switch (component4.axeIndex) { case 0: axeOrb.orbPrefab = Prefabs.doubleAxeBaseOrbEffect; break; case 1: axeOrb.orbPrefab = Prefabs.doubleAxeSkin01OrbEffect; break; case 2: axeOrb.orbPrefab = Prefabs.doubleAxeSkin02OrbEffect; break; case 3: axeOrb.orbPrefab = Prefabs.doubleAxeSkin03OrbEffect; break; case 4: axeOrb.orbPrefab = Prefabs.doubleAxeSkin04OrbEffect; break; case 5: axeOrb.orbPrefab = Prefabs.doubleAxeSkin05OrbEffect; break; case 6: axeOrb.orbPrefab = Prefabs.doubleAxeSkin06OrbEffect; break; case 7: axeOrb.orbPrefab = Prefabs.doubleAxeSkin07OrbEffect; break; case 8: axeOrb.orbPrefab = Prefabs.doubleAxeSkin08OrbEffect; break; case 9: axeOrb.orbPrefab = Prefabs.doubleAxeSkin09OrbEffect; break; case 10: axeOrb.orbPrefab = Prefabs.doubleAxeSkin10OrbEffect; break; case 11: axeOrb.orbPrefab = Prefabs.doubleAxeSkin11OrbEffect; break; } OrbManager.instance.AddOrb((Orb)(object)axeOrb); } } } } orig.Invoke(self, damageInfo); } internal static void RecalculateStatsAPI_GetStatCoefficients(CharacterBody sender, StatHookEventArgs args) { if (sender.HasBuff(Prefabs.speedBuff)) { args.attackSpeedMultAdd += 0.25f; args.moveSpeedMultAdd += 0.65f; } } } [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.*/)] [BepInPlugin("com.Dragonyck.Draven", "Draven", "1.0.3")] [NetworkCompatibility(/*Could not decode attribute arguments.*/)] public class MainPlugin : BaseUnityPlugin { public const string MODUID = "com.Dragonyck.Draven"; public const string MODNAME = "Draven"; public const string VERSION = "1.0.3"; public const string SURVIVORNAME = "Draven"; public const string SURVIVORNAMEKEY = "DRAVEN"; public static GameObject characterPrefab; private static readonly Color characterColor = Color32.op_Implicit(new Color32((byte)157, (byte)20, (byte)21, byte.MaxValue)); internal static SkillDef ultOverride; private void Awake() { Assets.PopulateAssets(); Prefabs.CreatePrefabs(); CreatePrefab(); RegisterStates(); RegisterCharacter(); Hook.Hooks(); } internal static void CreatePrefab() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_010b: 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_0121: Expected O, but got Unknown //IL_0148: 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_016a: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_0247: Unknown result type (might be due to invalid IL or missing references) //IL_0378: Unknown result type (might be due to invalid IL or missing references) //IL_03c3: Unknown result type (might be due to invalid IL or missing references) //IL_03c8: Unknown result type (might be due to invalid IL or missing references) //IL_042c: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_04f4: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Unknown result type (might be due to invalid IL or missing references) //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_07ca: Unknown result type (might be due to invalid IL or missing references) //IL_07e7: Unknown result type (might be due to invalid IL or missing references) //IL_0804: Unknown result type (might be due to invalid IL or missing references) //IL_0821: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_085b: Unknown result type (might be due to invalid IL or missing references) //IL_0878: Unknown result type (might be due to invalid IL or missing references) //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_08b2: Unknown result type (might be due to invalid IL or missing references) //IL_08d0: Unknown result type (might be due to invalid IL or missing references) //IL_08ee: Unknown result type (might be due to invalid IL or missing references) //IL_090c: Unknown result type (might be due to invalid IL or missing references) //IL_0adb: Unknown result type (might be due to invalid IL or missing references) //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_0bd5: Unknown result type (might be due to invalid IL or missing references) //IL_0c03: Unknown result type (might be due to invalid IL or missing references) //IL_0c08: Unknown result type (might be due to invalid IL or missing references) //IL_0c31: Unknown result type (might be due to invalid IL or missing references) //IL_0c36: Unknown result type (might be due to invalid IL or missing references) //IL_0c47: Unknown result type (might be due to invalid IL or missing references) //IL_0c4c: Unknown result type (might be due to invalid IL or missing references) characterPrefab = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody"), "DravenBody", true); characterPrefab.GetComponent<NetworkIdentity>().localPlayerAuthority = true; characterPrefab.AddComponent<AxeBehaviour>(); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("ModelBase")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("CameraPivot")).gameObject); Object.Destroy((Object)(object)((Component)characterPrefab.transform.Find("AimOrigin")).gameObject); GameObject val = Assets.MainAssetBundle.LoadAsset<GameObject>("draven"); GameObject val2 = new GameObject("ModelBase"); val2.transform.parent = characterPrefab.transform; val2.transform.localPosition = new Vector3(0f, -0.94f, 0f); val2.transform.localRotation = Quaternion.identity; val2.transform.localScale = new Vector3(1f, 1f, 1f); GameObject val3 = new GameObject("AimOrigin"); val3.transform.parent = val2.transform; val3.transform.localPosition = new Vector3(0f, 1.4f, 0f); val3.transform.localRotation = Quaternion.identity; val3.transform.localScale = Vector3.one; Transform transform = val.transform; transform.parent = val2.transform; transform.localPosition = Vector3.zero; transform.localScale = new Vector3(1f, 1f, 1f); transform.localRotation = Quaternion.identity; CharacterDirection component = characterPrefab.GetComponent<CharacterDirection>(); component.moveVector = Vector3.zero; component.targetTransform = val2.transform; component.overrideAnimatorForwardTransform = null; component.rootMotionAccumulator = null; component.modelAnimator = val.GetComponentInChildren<Animator>(); component.driveFromRootRotation = false; component.turnSpeed = 720f; CharacterBody component2 = characterPrefab.GetComponent<CharacterBody>(); ((Object)component2).name = "DravenBody"; component2.baseNameToken = "DRAVEN_NAME"; component2.subtitleNameToken = "DRAVEN_SUBTITLE"; component2.bodyFlags = (BodyFlags)16; component2.rootMotionInMainState = false; component2.mainRootSpeed = 0f; component2.baseMaxHealth = 110f; component2.levelMaxHealth = 35f; component2.baseRegen = 1f; component2.levelRegen = 0.33f; component2.baseMaxShield = 0f; component2.levelMaxShield = 0f; component2.baseMoveSpeed = 7f; component2.levelMoveSpeed = 0f; component2.baseAcceleration = 110f; component2.baseJumpPower = 15f; component2.levelJumpPower = 0f; component2.baseDamage = 12f; component2.levelDamage = 2.4f; component2.baseAttackSpeed = 1f; component2.levelAttackSpeed = 0f; component2.baseCrit = 1f; component2.levelCrit = 0f; component2.baseArmor = 0f; component2.levelArmor = 0f; component2.baseJumpCount = 1; component2.sprintingSpeedMultiplier = 1.45f; component2.wasLucky = false; component2.hideCrosshair = false; component2.aimOriginTransform = val3.transform; component2.hullClassification = (HullClassification)0; component2.portraitIcon = (Texture)(object)Assets.MainAssetBundle.LoadAsset<Sprite>("portrait").texture; component2.isChampion = false; component2.currentVehicle = null; component2.skinIndex = 0u; component2.preferredPodPrefab = LegacyResourcesAPI.Load<GameObject>("prefabs/networkedobjects/robocratepod"); component2.bodyColor = characterColor; CharacterMotor component3 = characterPrefab.GetComponent<CharacterMotor>(); component3.walkSpeedPenaltyCoefficient = 1f; component3.characterDirection = component; component3.muteWalkMotion = false; component3.mass = 160f; component3.airControl = 0.25f; component3.disableAirControlUntilCollision = false; component3.generateParametersOnAwake = true; InputBankTest component4 = characterPrefab.GetComponent<InputBankTest>(); component4.moveVector = Vector3.zero; CameraTargetParams component5 = characterPrefab.GetComponent<CameraTargetParams>(); component5.cameraParams = LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterBodies/CommandoBody").GetComponent<CameraTargetParams>().cameraParams; component5.cameraPivotTransform = null; component5.recoil = Vector2.zero; component5.dontRaycastToPivot = false; ModelLocator component6 = characterPrefab.GetComponent<ModelLocator>(); component6.modelTransform = transform; component6.modelBaseTransform = val2.transform; component6.dontReleaseModelOnDeath = false; component6.autoUpdateModelTransform = true; component6.dontDetatchFromParent = false; component6.noCorpse = false; component6.normalizeToFloor = false; component6.preserveModel = false; ChildLocator component7 = val.GetComponent<ChildLocator>(); CharacterModel val4 = val.AddComponent<CharacterModel>(); SkinnedMeshRenderer[] componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>(); List<RendererInfo> list = new List<RendererInfo>(); for (int i = 0; i < componentsInChildren.Length; i++) { list.Add(new RendererInfo { renderer = (Renderer)(object)componentsInChildren[i], defaultMaterial = Utils.InstantiateMaterial(((Renderer)componentsInChildren[i]).material.mainTexture), defaultShadowCastingMode = (ShadowCastingMode)1, ignoreOverlays = false }); } RendererInfo[] array = list.ToArray(); val4.body = component2; val4.baseRendererInfos = array; val4.autoPopulateLightInfos = true; val4.invisibilityCount = 0; val4.temporaryOverlays = new List<TemporaryOverlayInstance>(); Reflection.SetFieldValue<SkinnedMeshRenderer>((object)val4, "mainSkinnedMeshRenderer", componentsInChildren[0]); GameObject gameObject = ((Component)transform).gameObject; ModelSkinController val5 = gameObject.AddComponent<ModelSkinController>(); LanguageAPI.Add("DRAVENBODY_DEFAULT_SKIN_NAME", "Default"); LanguageAPI.Add("DRAVENBODY_SKIN01_NAME", "Soul Reaver"); LanguageAPI.Add("DRAVENBODY_SKIN02_NAME", "Gladiator"); LanguageAPI.Add("DRAVENBODY_SKIN03_NAME", "Primetime"); LanguageAPI.Add("DRAVENBODY_SKIN04_NAME", "Pool Party"); LanguageAPI.Add("DRAVENBODY_SKIN05_NAME", "Beast Hunter"); LanguageAPI.Add("DRAVENBODY_SKIN06_NAME", "Santa"); LanguageAPI.Add("DRAVENBODY_SKIN07_NAME", "Mecha Kingdoms"); LanguageAPI.Add("DRAVENBODY_SKIN08_NAME", "Ruined"); LanguageAPI.Add("DRAVENBODY_SKIN09_NAME", "Debonair"); LanguageAPI.Add("DRAVENBODY_SKIN10_NAME", "Fright Night"); LanguageAPI.Add("DRAVENBODY_SKIN11_NAME", "High Noon"); List<GameObject> list2 = new List<GameObject> { ((Component)component7.FindChild("base")).gameObject, ((Component)component7.FindChild("skin01")).gameObject, ((Component)component7.FindChild("skin02")).gameObject, ((Component)component7.FindChild("skin03")).gameObject, ((Component)component7.FindChild("skin04")).gameObject, ((Component)component7.FindChild("skin05")).gameObject, ((Component)component7.FindChild("skin06")).gameObject, ((Component)component7.FindChild("skin07")).gameObject, ((Component)component7.FindChild("skin08")).gameObject, ((Component)component7.FindChild("skin09")).gameObject, ((Component)component7.FindChild("skin10")).gameObject, ((Component)component7.FindChild("skin11")).gameObject }; list2[10].AddComponent<SkinTextureSwapBehaviour>().mat = array[10].defaultMaterial; val5.skins = (SkinDef[])(object)new SkinDef[12] { Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_DEFAULT_SKIN_NAME", "base", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN01_NAME", "skin01", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN02_NAME", "skin02", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN03_NAME", "skin03", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN04_NAME", "skin04", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN05_NAME", "skin05", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN06_NAME", "skin06", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN07_NAME", "skin07", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN08_NAME", "skin08", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN09_NAME", "skin09", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN10_NAME", "skin10", array)), Skins.CreateNewSkinDef(Utils.CreateNewSkinDefInfo(list2, gameObject, "DRAVENBODY_SKIN11_NAME", "skin11", array)) }; HealthComponent component8 = characterPrefab.GetComponent<HealthComponent>(); component8.health = 110f; component8.shield = 0f; component8.barrier = 0f; component8.magnetiCharge = 0f; component8.body = null; component8.dontShowHealthbar = false; component8.globalDeathEventChanceCoefficient = 1f; characterPrefab.GetComponent<Interactor>().maxInteractionDistance = 3f; characterPrefab.GetComponent<InteractionDriver>().highlightInteractor = true; SfxLocator component9 = characterPrefab.GetComponent<SfxLocator>(); component9.deathSound = "Play_ui_player_death"; component9.barkSound = ""; component9.openSound = ""; component9.landingSound = "Play_char_land"; component9.fallDamageSound = "Play_char_land_fall_damage"; component9.aliveLoopStart = ""; component9.aliveLoopStop = ""; Rigidbody component10 = characterPrefab.GetComponent<Rigidbody>(); component10.mass = 100f; component10.drag = 0f; component10.angularDrag = 0f; component10.useGravity = false; component10.isKinematic = true; component10.interpolation = (RigidbodyInterpolation)0; component10.collisionDetectionMode = (CollisionDetectionMode)0; component10.constraints = (RigidbodyConstraints)0; CapsuleCollider component11 = ((Component)component7.FindChild("collider")).GetComponent<CapsuleCollider>(); ((Collider)component11).isTrigger = false; ((Collider)component11).material = null; KinematicCharacterMotor component12 = characterPrefab.GetComponent<KinematicCharacterMotor>(); component12.CharacterController = (ICharacterController)(object)component3; component12.playerCharacter = true; HurtBoxGroup val6 = val.AddComponent<HurtBoxGroup>(); HurtBox val7 = ((Component)component11).gameObject.AddComponent<HurtBox>(); ((Component)val7).gameObject.layer = LayerIndex.entityPrecise.intVal; val7.healthComponent = component8; val7.isBullseye = true; val7.damageModifier = (DamageModifier)0; val7.hurtBoxGroup = val6; val7.indexInGroup = 0; val6.hurtBoxes = (HurtBox[])(object)new HurtBox[1] { val7 }; val6.mainHurtBox = val7; val6.bullseyeCount = 1; AimAnimator val8 = val.AddComponent<AimAnimator>(); val8.inputBank = component4; val8.directionComponent = component; val8.pitchRangeMax = 55f; val8.pitchRangeMin = -50f; val8.yawRangeMin = -44f; val8.yawRangeMax = 44f; val8.pitchGiveupRange = 30f; val8.yawGiveupRange = 10f; val8.giveupDuration = 8f; FootstepHandler val9 = val.AddComponent<FootstepHandler>(); val9.baseFootstepString = "Play_player_footstep"; val9.sprintFootstepOverrideString = ""; val9.enableFootstepDust = true; val9.footstepDustPrefab = LegacyResourcesAPI.Load<GameObject>("Prefabs/GenericFootstepDust"); EntityStateMachine component13 = ((Component)component2).GetComponent<EntityStateMachine>(); component13.mainStateType = new SerializableEntityStateType(typeof(CharacterMain)); CharacterDeathBehavior component14 = characterPrefab.GetComponent<CharacterDeathBehavior>(); component14.deathStateMachine = characterPrefab.GetComponent<EntityStateMachine>(); component14.deathState = new SerializableEntityStateType(typeof(DeathState)); EntityStateMachine val10 = characterPrefab.AddComponent<EntityStateMachine>(); val10.customName = "Dash"; val10.initialStateType = new SerializableEntityStateType(typeof(Idle)); val10.mainStateType = new SerializableEntityStateType(typeof(Idle)); NetworkStateMachine component15 = ((Component)component2).GetComponent<NetworkStateMachine>(); List<EntityStateMachine> list3 = component15.stateMachines.ToList(); list3.Add(val10); component15.stateMachines = list3.ToArray(); ContentAddition.AddBody(characterPrefab); } private void RegisterCharacter() { //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) string text = "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > " + Environment.NewLine + "<style=cSub>\r\n\r\n< ! > "; string text2 = "..and so he left."; string text3 = "..and so he vanished."; LanguageAPI.Add("DRAVEN_NAME", "Draven"); LanguageAPI.Add("DRAVEN_DESCRIPTION", text); LanguageAPI.Add("DRAVEN_SUBTITLE", "The Glorious Executioner"); LanguageAPI.Add("DRAVEN_OUTRO", text2); LanguageAPI.Add("DRAVEN_FAIL", text3); SurvivorDef val = ScriptableObject.CreateInstance<SurvivorDef>(); val.cachedName = "DRAVEN_NAME"; val.unlockableDef = null; val.descriptionToken = "DRAVEN_DESCRIPTION"; val.primaryColor = characterColor; val.bodyPrefab = characterPrefab; val.displayPrefab = Utils.NewDisplayModel(((Component)characterPrefab.GetComponent<ModelLocator>().modelBaseTransform).gameObject, "DravenDisplay"); val.outroFlavorToken = "DRAVEN_OUTRO"; val.desiredSortPosition = 4f; val.mainEndingEscapeFailureFlavorToken = "DRAVEN_FAIL"; ContentAddition.AddSurvivorDef(val); SkillSetup(); GameObject val2 = PrefabAPI.InstantiateClone(LegacyResourcesAPI.Load<GameObject>("Prefabs/CharacterMasters/CommandoMonsterMaster"), "DravenMaster", true); CharacterMaster component = val2.GetComponent<CharacterMaster>(); component.bodyPrefab = characterPrefab; ContentAddition.AddMaster(val2); } private void RegisterStates() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) bool flag = default(bool); ContentAddition.AddEntityState<DravenSkillState>(ref flag); ContentAddition.AddEntityState<Primary>(ref flag); ContentAddition.AddEntityState<PrimaryEnd>(ref flag); ContentAddition.AddEntityState<Secondary>(ref flag); ContentAddition.AddEntityState<Utility>(ref flag); ContentAddition.AddEntityState<Special>(ref flag); ContentAddition.AddEntityState<SpecialOverride>(ref flag); ContentAddition.AddEntityState<CharacterMain>(ref flag); OrbAPI.AddOrb<AxeOrb>(); } private void SkillSetup() { GenericSkill[] componentsInChildren = characterPrefab.GetComponentsInChildren<GenericSkill>(); foreach (GenericSkill val in componentsInChildren) { Object.DestroyImmediate((Object)(object)val); } PassiveSetup(); PrimarySetup(); SecondarySetup(); UtilitySetup(); SpecialSetup(); } private void PassiveSetup() { SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("DRAVEN_PASSIVE_NAME", "Spinning Axe"); LanguageAPI.Add("DRAVEN_PASSIVE_DESCRIPTION", "Every <style=cIsUtility>8s</style> gain a Spinning Axe. Spinning Axe deals <style=cIsDamage>245% damage</style> and inflicts <style=cIsDamage>Bleed</style>. Upon hitting the target, the axe then ricochets off of them, flying back to Draven, gaining Spinning Axe again."); component.passiveSkill.enabled = true; component.passiveSkill.skillNameToken = "DRAVEN_PASSIVE_NAME"; component.passiveSkill.skillDescriptionToken = "DRAVEN_PASSIVE_DESCRIPTION"; component.passiveSkill.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("axeBuff"); } private void PrimarySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("DRAVEN_M1", "Wicked Blades"); LanguageAPI.Add("DRAVEN_M1_DESCRIPTION", "Throw an axe for <style=cIsDamage>130% damage</style>."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Primary)); val.activationStateMachineName = "Weapon"; val.baseMaxStock = 0; val.baseRechargeInterval = 0f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = true; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = false; val.cancelSprintingOnActivation = false; val.rechargeStock = 0; val.requiredStock = 0; val.stockToConsume = 0; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("primary"); val.skillDescriptionToken = "DRAVEN_M1_DESCRIPTION"; val.skillName = "DRAVEN_M1"; val.skillNameToken = "DRAVEN_M1"; val.keywordTokens = new string[1] { "KEYWORD_AGILE" }; ContentAddition.AddSkillDef(val); component.primary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.primary, "_skillFamily", val2); SkillFamily skillFamily = component.primary.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void SecondarySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("DRAVEN_M2", "Stand Aside"); LanguageAPI.Add("DRAVEN_M2_DESCRIPTION", "Draven throws a fan of axes in a line in the target direction, dealing <style=cIsDamage>320% damage</style>, knocking them aside and <style=cIsUtility>Slows</style>."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Secondary)); val.activationStateMachineName = "Slide"; val.baseMaxStock = 1; val.baseRechargeInterval = 4f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = false; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("secondary"); val.skillDescriptionToken = "DRAVEN_M2_DESCRIPTION"; val.skillName = "DRAVEN_M2"; val.skillNameToken = "DRAVEN_M2"; val.keywordTokens = new string[1] { "KEYWORD_AGILE" }; ContentAddition.AddSkillDef(val); component.secondary = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.secondary, "_skillFamily", val2); SkillFamily skillFamily = component.secondary.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void UtilitySetup() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("DRAVEN_UTIL", "Blood Rush"); LanguageAPI.Add("DRAVEN_UTIL_DESCRIPTION", "Draven enters an adrenaline rush, gaining <style=cIsDamage>25% attack speed</style> as well as <style=cIsUtility>65% movement speed</style>. Hitting an enemy with Wicked Blades while Blood Rush is active, <style=cIsDamage>reduces</style> Spinning Axe <style=cIsUtility>cooldown</style> by <style=cIsUtility>1s</style>."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Utility)); val.activationStateMachineName = "Dash"; val.baseMaxStock = 1; val.baseRechargeInterval = 5f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = false; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("utility"); val.skillDescriptionToken = "DRAVEN_UTIL_DESCRIPTION"; val.skillName = "DRAVEN_UTIL"; val.skillNameToken = "DRAVEN_UTIL"; ContentAddition.AddSkillDef(val); component.utility = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.utility, "_skillFamily", val2); SkillFamily skillFamily = component.utility.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); } private void SpecialSetup() { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0186: Expected O, but got Unknown //IL_0187: 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_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_0208: Unknown result type (might be due to invalid IL or missing references) SkillLocator component = characterPrefab.GetComponent<SkillLocator>(); LanguageAPI.Add("DRAVEN_SPEC", "Whirling Death"); LanguageAPI.Add("DRAVEN_SPEC_DESCRIPTION", "Draven hurls two massive axes in the target direction that deal <style=cIsDamage>1100% damage</style>. Recast to force the axes to reverse direction, slowly coming to a stop before homing back to him, dealing the same damage to enemies hit."); LanguageAPI.Add("DRAVEN_SPECOVERRIDE", "Return"); LanguageAPI.Add("DRAVEN_SPECOVERRIDE_DESCRIPTION", "Press to return Whirling Death."); SkillDef val = ScriptableObject.CreateInstance<SkillDef>(); val.activationState = new SerializableEntityStateType(typeof(Special)); val.activationStateMachineName = "Slide"; val.baseMaxStock = 1; val.baseRechargeInterval = 12f; val.beginSkillCooldownOnSkillEnd = true; val.canceledFromSprinting = false; val.fullRestockOnAssign = false; val.interruptPriority = (InterruptPriority)0; val.isCombatSkill = true; val.mustKeyPress = true; val.cancelSprintingOnActivation = false; val.rechargeStock = 1; val.requiredStock = 1; val.stockToConsume = 1; val.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("special"); val.skillDescriptionToken = "DRAVEN_SPEC_DESCRIPTION"; val.skillName = "DRAVEN_SPEC"; val.skillNameToken = "DRAVEN_SPEC"; val.keywordTokens = new string[1] { "KEYWORD_AGILE" }; ContentAddition.AddSkillDef(val); component.special = characterPrefab.AddComponent<GenericSkill>(); SkillFamily val2 = ScriptableObject.CreateInstance<SkillFamily>(); val2.variants = (Variant[])(object)new Variant[1]; Reflection.SetFieldValue<SkillFamily>((object)component.special, "_skillFamily", val2); SkillFamily skillFamily = component.special.skillFamily; Variant[] variants = skillFamily.variants; Variant val3 = new Variant { skillDef = val }; ((Variant)(ref val3)).viewableNode = new Node(val.skillNameToken, false, (Node)null); variants[0] = val3; ContentAddition.AddSkillFamily(skillFamily); ultOverride = ScriptableObject.CreateInstance<SkillDef>(); ultOverride.activationState = new SerializableEntityStateType(typeof(SpecialOverride)); ultOverride.activationStateMachineName = "Dash"; ultOverride.baseMaxStock = 1; ultOverride.baseRechargeInterval = 0f; ultOverride.beginSkillCooldownOnSkillEnd = true; ultOverride.canceledFromSprinting = false; ultOverride.fullRestockOnAssign = false; ultOverride.interruptPriority = (InterruptPriority)0; ultOverride.isCombatSkill = true; ultOverride.mustKeyPress = true; ultOverride.cancelSprintingOnActivation = false; ultOverride.rechargeStock = 0; ultOverride.requiredStock = 0; ultOverride.stockToConsume = 0; ultOverride.icon = Assets.MainAssetBundle.LoadAsset<Sprite>("specialOverride"); ultOverride.skillDescriptionToken = "DRAVEN_SPECOVERRIDE_DESCRIPTION"; ultOverride.skillName = "DRAVEN_SPECOVERRIDE"; ultOverride.skillNameToken = "DRAVEN_SPECOVERRIDE"; ContentAddition.AddSkillDef(ultOverride); } } internal class Prefabs { internal static GameObject axeBaseProjectile; internal static GameObject axeSkin01Projectile; internal static GameObject axeSkin02Projectile; internal static GameObject axeSkin03Projectile; internal static GameObject axeSkin04Projectile; internal static GameObject axeSkin05Projectile; internal static GameObject axeSkin06Projectile; internal static GameObject axeSkin07Projectile; internal static GameObject axeSkin08Projectile; internal static GameObject axeSkin09Projectile; internal static GameObject axeSkin10Projectile; internal static GameObject axeSkin11Projectile; internal static GameObject doubleAxeBaseProjectile; internal static GameObject doubleAxeSkin01Projectile; internal static GameObject doubleAxeSkin02Projectile; internal static GameObject doubleAxeSkin03Projectile; internal static GameObject doubleAxeSkin04Projectile; internal static GameObject doubleAxeSkin05Projectile; internal static GameObject doubleAxeSkin06Projectile; internal static GameObject doubleAxeSkin07Projectile; internal static GameObject doubleAxeSkin08Projectile; internal static GameObject doubleAxeSkin09Projectile; internal static GameObject doubleAxeSkin10Projectile; internal static GameObject doubleAxeSkin11Projectile; internal static GameObject ultAxeBaseProjectile; internal static GameObject ultAxeSkin01Projectile; internal static GameObject ultAxeSkin02Projectile; internal static GameObject ultAxeSkin03Projectile; internal static GameObject ultAxeSkin04Projectile; internal static GameObject ultAxeSkin05Projectile; internal static GameObject ultAxeSkin06Projectile; internal static GameObject ultAxeSkin07Projectile; internal static GameObject ultAxeSkin08Projectile; internal static GameObject ultAxeSkin09Projectile; internal static GameObject ultAxeSkin10Projectile; internal static GameObject ultAxeSkin11Projectile; internal static GameObject doubleAxeBaseOrbEffect; internal static GameObject doubleAxeSkin01OrbEffect; internal static GameObject doubleAxeSkin02OrbEffect; internal static GameObject doubleAxeSkin03OrbEffect; internal static GameObject doubleAxeSkin04OrbEffect; internal static GameObject doubleAxeSkin05OrbEffect; internal static GameObject doubleAxeSkin06OrbEffect; internal static GameObject doubleAxeSkin07OrbEffect; internal static GameObject doubleAxeSkin08OrbEffect; internal static GameObject doubleAxeSkin09OrbEffect; internal static GameObject doubleAxeSkin10OrbEffect; internal static GameObject doubleAxeSkin11OrbEffect; internal static GameObject utilityAxeBaseProjectile; internal static GameObject utilityAxeSkin01Projectile; internal static GameObject utilityAxeSkin02Projectile; internal static GameObject utilityAxeSkin03Projectile; internal static GameObject utilityAxeSkin04Projectile; internal static GameObject utilityAxeSkin05Projectile; internal static GameObject utilityAxeSkin06Projectile; internal static GameObject utilityAxeSkin07Projectile; internal static GameObject utilityAxeSkin08Projectile; internal static GameObject utilityAxeSkin09Projectile; internal static GameObject utilityAxeSkin10Projectile; internal static GameObject utilityAxeSkin11Projectile; internal static GameObject smallImpactEffect; internal static GameObject mediumImpactEffect; internal static GameObject mediumImpactEffectSkin; internal static GameObject largeImpactEffect; internal static GameObject largeImpactEffectSkin; internal static GameObject heavyImpactEffect; internal static GameObject heavyImpactEffectSkin; internal static GameObject catchEffect; internal static GameObject catchEffectSkin; internal static GameObject sprintEffect; internal static BuffDef axeBuff; internal static BuffDef speedBuff; internal static ModdedDamageType knockback; internal static void CreatePrefabs() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_01ae: Unknown result type (might be due to invalid IL or missing references) //IL_01b3: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0222: Unknown result type (might be due to invalid IL or missing references) //IL_0227: Unknown result type (might be due to invalid IL or missing references) //IL_025c: Unknown result type (might be due to invalid IL or missing references) //IL_0261: 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_029b: 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_02d5: Unknown result type (might be due to invalid IL or missing references) //IL_0340: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) //IL_0632: Unknown result type (might be due to invalid IL or missing references) //IL_0637: Unknown result type (might be due to invalid IL or missing references) //IL_065a: Unknown result type (might be due to invalid IL or missing references) //IL_0684: Unknown result type (might be due to invalid IL or missing references) //IL_086a: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0950: Unknown result type (might be due to invalid IL or missing references) //IL_0955: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Unknown result type (might be due to invalid IL or missing references) //IL_09b1: Unknown result type (might be due to invalid IL or missing references) //IL_09bd: Unknown result type (might be due to invalid IL or missing references) //IL_09c7: Unknown result type (might be due to invalid IL or missing references) knockback = DamageAPI.ReserveDamageType(); axeBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)axeBuff).name = "Spinning Axe"; axeBuff.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("axeBuff"); axeBuff.buffColor = Color.white; axeBuff.canStack = true; axeBuff.isDebuff = false; axeBuff.eliteDef = null; axeBuff.isHidden = false; ContentAddition.AddBuffDef(axeBuff); speedBuff = ScriptableObject.CreateInstance<BuffDef>(); ((Object)speedBuff).name = "Blood Rush"; speedBuff.iconSprite = Assets.MainAssetBundle.LoadAsset<Sprite>("utility"); speedBuff.buffColor = Color.white; speedBuff.canStack = false; speedBuff.isDebuff = false; speedBuff.eliteDef = null; speedBuff.isHidden = false; ContentAddition.AddBuffDef(speedBuff); catchEffect = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("catchEffect"), "DravenCatchEffect", false); Utils.RegisterEffect(catchEffect, 1f); catchEffectSkin = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("catchEffectSkin"), "DravenCatchEffect", false); Utils.RegisterEffect(catchEffectSkin, 1f); smallImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFX.prefab").WaitForCompletion(), "DravenSmallImpactEffect", false); Utils.RegisterEffect(smallImpactEffect, 1f, "Play_Draven_Auto_Hit"); mediumImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXMedium.prefab").WaitForCompletion(), "DravenMediumImpactEffect", false); Utils.RegisterEffect(mediumImpactEffect, 1f, "Play_Draven_Q_Hit"); mediumImpactEffectSkin = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXMedium.prefab").WaitForCompletion(), "DravenMediumImpactEffect", false); Utils.RegisterEffect(mediumImpactEffectSkin, 1f, "Play_Draven_Skin_Q_Hit"); largeImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "DravenLargeImpactEffect", false); Utils.RegisterEffect(largeImpactEffect, 1f, "Play_Draven_R_Hit"); largeImpactEffectSkin = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXLarge.prefab").WaitForCompletion(), "DravenLargeImpactEffect", false); Utils.RegisterEffect(largeImpactEffectSkin, 1f, "Play_Draven_Skin_R_Hit"); heavyImpactEffect = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXSlash.prefab").WaitForCompletion(), "DravenHeavyImpactEffect", false); Utils.RegisterEffect(heavyImpactEffect, 1f, "Play_Draven_E_Hit"); heavyImpactEffectSkin = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Common/VFX/OmniImpactVFXSlash.prefab").WaitForCompletion(), "DravenHeavyImpactEffect", false); Utils.RegisterEffect(heavyImpactEffectSkin, 1f, "Play_Draven_Skin_E_Hit"); sprintEffect = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>("sprintBuff"), "DravenSprintEffect", false); Utils.RegisterEffect(sprintEffect, 5f); axeBaseProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Bandit2/Bandit2ShivProjectile.prefab").WaitForCompletion(), "DravenBaseProjectileSingle", true); ProjectileSingleTargetImpact component = axeBaseProjectile.GetComponent<ProjectileSingleTargetImpact>(); component.impactEffect = smallImpactEffect; component.enemyHitSoundString = ""; component.hitSoundString = ""; axeBaseProjectile.AddComponent<AxeProjectileIndexHolderComponent>(); ((Component)axeBaseProjectile.transform.GetChild(0)).gameObject.SetActive(false); axeBaseProjectile.GetComponent<ProjectileController>().ghostPrefab = Utils.NewProjectileGhost("baseProjectileSingle"); ProjectileStickOnImpact component2 = axeBaseProjectile.GetComponent<ProjectileStickOnImpact>(); component2.stickParticleSystem = null; ((UnityEventBase)component2.stickEvent).RemoveAllListeners(); axeBaseProjectile.GetComponent<SphereCollider>().radius = 0.7f; ContentAddition.AddProjectile(axeBaseProjectile); axeSkin01Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin01ProjectileSingle"); axeSkin02Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin02ProjectileSingle"); axeSkin03Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin03ProjectileSingle"); axeSkin04Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin04ProjectileSingle"); axeSkin05Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin05ProjectileSingle"); axeSkin06Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin06ProjectileSingle"); axeSkin07Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin07ProjectileSingle"); axeSkin08Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin08ProjectileSingle"); axeSkin09Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin09ProjectileSingle"); axeSkin10Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin10ProjectileSingle"); axeSkin11Projectile = Utils.SetupNewProjectile(axeBaseProjectile, "skin11ProjectileSingle"); doubleAxeBaseProjectile = Utils.SetupNewProjectile(axeBaseProjectile, "baseProjectile", 0, removeStick: true); doubleAxeBaseProjectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = mediumImpactEffect; doubleAxeSkin01Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin01Projectile", 1, removeStick: true); doubleAxeSkin02Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin02Projectile", 2, removeStick: true); doubleAxeSkin03Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin03Projectile", 3, removeStick: true); doubleAxeSkin04Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin04Projectile", 4, removeStick: true); doubleAxeSkin05Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin05Projectile", 5, removeStick: true); doubleAxeSkin06Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin06Projectile", 6, removeStick: true); doubleAxeSkin07Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin07Projectile", 7, removeStick: true); doubleAxeSkin08Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin08Projectile", 8, removeStick: true); doubleAxeSkin09Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin09Projectile", 9, removeStick: true); doubleAxeSkin10Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin10Projectile", 10, removeStick: true); doubleAxeSkin11Projectile = Utils.SetupNewProjectile(doubleAxeBaseProjectile, "skin11Projectile", 11, removeStick: true); doubleAxeSkin11Projectile.GetComponent<ProjectileSingleTargetImpact>().impactEffect = mediumImpactEffectSkin; ultAxeBaseProjectile = PrefabAPI.InstantiateClone(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Saw/Sawmerang.prefab").WaitForCompletion(), "DravenBaseRProjectile", true); ultAxeBaseProjectile.transform.localScale = Vector3.one; ultAxeBaseProjectile.transform.GetChild(0).localScale = new Vector3(4f, 4f, 5f); ProjectileController component3 = ultAxeBaseProjectile.GetComponent<ProjectileController>(); component3.ghostPrefab = Utils.NewProjectileGhost("baseRProjectile"); component3.flightSoundLoop = null; ultAxeBaseProjectile.GetComponent<ProjectileDotZone>().damageCoefficient = 0f; BoomerangProjectile component4 = ultAxeBaseProjectile.GetComponent<BoomerangProjectile>(); component4.travelSpeed = 160f; component4.charge = 10f; ultAxeBaseProjectile.AddComponent<DravenBoomerang>(); ProjectileOverlapAttack component5 = ultAxeBaseProjectile.GetComponent<ProjectileOverlapAttack>(); component5.damageCoefficient = 1f; component5.impactEffect = largeImpactEffect; Object.Destroy((Object)(object)ultAxeBaseProjectile.GetComponent<BoxCollider>()); ContentAddition.AddProjectile(ultAxeBaseProjectile); ultAxeSkin01Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin01RProjectile", -2); ultAxeSkin02Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin02RProjectile", -2); ultAxeSkin03Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin03RProjectile", -2); ultAxeSkin04Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin04RProjectile", -2); ultAxeSkin05Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin05RProjectile", -2); ultAxeSkin06Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin06RProjectile", -2); ultAxeSkin07Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin07RProjectile", -2); ultAxeSkin08Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin08RProjectile", -2); ultAxeSkin09Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin09RProjectile", -2); ultAxeSkin10Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin10RProjectile", -2); ultAxeSkin11Projectile = Utils.SetupNewProjectile(ultAxeBaseProjectile, "skin11RProjectile", -2); ultAxeSkin11Projectile.GetComponent<ProjectileOverlapAttack>().impactEffect = largeImpactEffectSkin; ultAxeSkin11Projectile.GetComponent<ProjectileController>().flightSoundLoop = null; ultAxeSkin11Projectile.GetComponent<DravenBoomerang>().ID = Sounds.Play_Draven_Skin_R_Return; OrbEffect component6 = Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/NovaOnHeal/DevilOrbEffect.prefab").WaitForCompletion().GetComponent<OrbEffect>(); doubleAxeBaseOrbEffect = Utils.SetupNewOrbEffect("baseProjectile", component6); doubleAxeSkin01OrbEffect = Utils.SetupNewOrbEffect("skin01Projectile", component6); doubleAxeSkin02OrbEffect = Utils.SetupNewOrbEffect("skin02Projectile", component6); doubleAxeSkin03OrbEffect = Utils.SetupNewOrbEffect("skin03Projectile", component6); doubleAxeSkin04OrbEffect = Utils.SetupNewOrbEffect("skin04Projectile", component6); doubleAxeSkin05OrbEffect = Utils.SetupNewOrbEffect("skin05Projectile", component6); doubleAxeSkin06OrbEffect = Utils.SetupNewOrbEffect("skin06Projectile", component6); doubleAxeSkin07OrbEffect = Utils.SetupNewOrbEffect("skin07Projectile", component6); doubleAxeSkin08OrbEffect = Utils.SetupNewOrbEffect("skin08Projectile", component6); doubleAxeSkin09OrbEffect = Utils.SetupNewOrbEffect("skin09Projectile", component6); doubleAxeSkin10OrbEffect = Utils.SetupNewOrbEffect("skin10Projectile", component6); doubleAxeSkin11OrbEffect = Utils.SetupNewOrbEffect("skin11Projectile", component6); utilityAxeBaseProjectile = Utils.SetupNewUtilityProjectile(Addressables.LoadAssetAsync<GameObject>((object)"RoR2/Base/Commando/FMJRamping.prefab").WaitForCompletion(), "baseRProjectile"); utilityAxeBaseProjectile.AddComponent<ModdedDamageTypeHolderComponent>().Add(knockback); utilityAxeBaseProjectile.GetComponent<ProjectileOverlapAttack>().impactEffect = heavyImpactEffect; Transform child = utilityAxeBaseProjectile.transform.GetChild(0); child.localScale = new Vector3(8f, child.localScale.y, child.localScale.z); utilityAxeBaseProjectile.GetComponent<ProjectileSimple>().lifetime = 1.2f; utilityAxeSkin01Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin01RProjectile"); utilityAxeSkin02Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin02RProjectile"); utilityAxeSkin03Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin03RProjectile"); utilityAxeSkin04Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin04RProjectile"); utilityAxeSkin05Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin05RProjectile"); utilityAxeSkin06Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin06RProjectile"); utilityAxeSkin07Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin07RProjectile"); utilityAxeSkin08Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin08RProjectile"); utilityAxeSkin09Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin09RProjectile"); utilityAxeSkin10Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin10RProjectile"); utilityAxeSkin11Projectile = Utils.SetupNewUtilityProjectile(utilityAxeBaseProjectile, "skin11RProjectile"); utilityAxeSkin11Projectile.GetComponent<ProjectileOverlapAttack>().impactEffect = heavyImpactEffectSkin; } } internal class CharacterMain : GenericCharacterMain { } internal class DravenSkillState : BaseSkillState { public AxeBehaviour behaviour; public bool hasAxeBuff => Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.HasBuff(Prefabs.axeBuff); public bool hasSkin => Object.op_Implicit((Object)(object)((EntityState)this).characterBody) && ((EntityState)this).characterBody.skinIndex == 11; public override void OnEnter() { ((BaseState)this).OnEnter(); behaviour = ((EntityState)this).GetComponent<AxeBehaviour>(); } } internal class Primary : DravenSkillState { private bool crit; private float duration; private float baseDuration = 0.75f; private static bool firedL; private bool hasFired; private float minFireDelay; private float baseMinFireDelay = 0.2f; private float damageCoefficient = 1.3f; private float axeDamageCoefficient = 2.45f; private GameObject projectilePrefab; private float damage; private DamageType damageType; public override void OnEnter() { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; minFireDelay = baseMinFireDelay / ((BaseState)this).attackSpeedStat; firedL = !firedL; crit = ((BaseState)this).RollCrit(); PlayAnim(); damage = (base.hasAxeBuff ? axeDamageCoefficient : damageCoefficient); damageType = (DamageType)0; if (crit || base.hasAxeBuff) { damageType = (DamageType)1024; } damageType = DamageTypeCombo.op_Implicit(DamageTypeCombo.op_Implicit(damageType) | DamageTypeCombo.GenericPrimary); projectilePrefab = PickAxeProjectile(); AkSoundEngine.PostEvent(Sounds.Play_Draven_Auto_Cast, ((EntityState)this).gameObject); } private void PlayAnim() { string text = "M1"; string text2 = ""; if (base.hasAxeBuff) { if (behaviour.right) { text2 = "right"; if (crit) { text2 = "rightcrit"; ((EntityState)this).PlayAnimation("FullBody, Override", text2, text, duration, 0f); return; } } else { text2 = "left"; if (crit) { text2 = "leftcrit"; ((EntityState)this).PlayAnimation("FullBody, Override", text2, text, duration, 0f); return; } } ((EntityState)this).PlayAnimation("Gesture, Override", text2, text, duration, 0f); } else if (crit) { text2 = ((!firedL) ? "leftcrit" : "rightcrit"); ((EntityState)this).PlayAnimation("FullBody, Override", text2, text, duration, 0f); } else { text2 = ((!firedL) ? "left" : "right"); ((EntityState)this).PlayAnimation("Gesture, Override", text2, text, duration, 0f); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= minFireDelay && !hasFired) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextState((EntityState)(object)new PrimaryEnd()); } } private GameObject PickAxeProjectile() { return (GameObject)((int)((EntityState)this).characterBody.skinIndex switch { 0 => base.hasAxeBuff ? Prefabs.doubleAxeBaseProjectile : Prefabs.axeBaseProjectile, 1 => base.hasAxeBuff ? Prefabs.doubleAxeSkin01Projectile : Prefabs.axeSkin01Projectile, 2 => base.hasAxeBuff ? Prefabs.doubleAxeSkin02Projectile : Prefabs.axeSkin02Projectile, 3 => base.hasAxeBuff ? Prefabs.doubleAxeSkin03Projectile : Prefabs.axeSkin03Projectile, 4 => base.hasAxeBuff ? Prefabs.doubleAxeSkin04Projectile : Prefabs.axeSkin04Projectile, 5 => base.hasAxeBuff ? Prefabs.doubleAxeSkin05Projectile : Prefabs.axeSkin05Projectile, 6 => base.hasAxeBuff ? Prefabs.doubleAxeSkin06Projectile : Prefabs.axeSkin06Projectile, 7 => base.hasAxeBuff ? Prefabs.doubleAxeSkin07Projectile : Prefabs.axeSkin07Projectile, 8 => base.hasAxeBuff ? Prefabs.doubleAxeSkin08Projectile : Prefabs.axeSkin08Projectile, 9 => base.hasAxeBuff ? Prefabs.doubleAxeSkin09Projectile : Prefabs.axeSkin09Projectile, 10 => base.hasAxeBuff ? Prefabs.doubleAxeSkin10Projectile : Prefabs.axeSkin10Projectile, 11 => base.hasAxeBuff ? Prefabs.doubleAxeSkin11Projectile : Prefabs.axeSkin11Projectile, _ => null, }); } private void Fire() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015f: 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) if (Object.op_Implicit((Object)(object)behaviour) && base.hasAxeBuff) { if (behaviour.right) { behaviour.right = false; } else { behaviour.left = false; } } if (base.hasAxeBuff && NetworkServer.active) { ((EntityState)this).characterBody.RemoveBuff(Prefabs.axeBuff); } if (Object.op_Implicit((Object)(object)behaviour) && ((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = crit; val.damage = ((EntityState)this).characterBody.damage * damage; val.damageColorIndex = (DamageColorIndex)0; val.force = 100f; val.owner = ((EntityState)this).gameObject; Ray aimRay = ((BaseState)this).GetAimRay(); val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = projectilePrefab; aimRay = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.damageTypeOverride = DamageTypeCombo.op_Implicit(damageType); val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)2; } } internal class PrimaryEnd : BaseSkillState { private float duration = 0.2f; public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class Secondary : DravenSkillState { private float duration; private float baseDuration = 0.75f; private float fireDelay = 0.15f; private bool hasFired; private float damageCoefficient = 3.2f; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; if (base.hasSkin) { AkSoundEngine.PostEvent(Sounds.Play_Draven_Skin_E_Cast, ((EntityState)this).gameObject); } else { AkSoundEngine.PostEvent(Sounds.Play_Draven_E_Cast, ((EntityState)this).gameObject); } ((EntityState)this).PlayAnimation("Gesture, Override", "utility", "Utility", duration, 0f); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDelay && !hasFired) { hasFired = true; Fire(); } if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: 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_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val.damageColorIndex = (DamageColorIndex)0; val.force = 500f; val.owner = ((EntityState)this).gameObject; Ray aimRay = ((BaseState)this).GetAimRay(); val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = PickAxeProjectile(); aimRay = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.damageTypeOverride = DamageTypeCombo.op_Implicit((DamageType)8) | DamageTypeCombo.GenericSecondary; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } private GameObject PickAxeProjectile() { return (GameObject)((int)((EntityState)this).characterBody.skinIndex switch { 0 => Prefabs.utilityAxeBaseProjectile, 1 => Prefabs.utilityAxeSkin01Projectile, 2 => Prefabs.utilityAxeSkin02Projectile, 3 => Prefabs.utilityAxeSkin03Projectile, 4 => Prefabs.utilityAxeSkin04Projectile, 5 => Prefabs.utilityAxeSkin05Projectile, 6 => Prefabs.utilityAxeSkin06Projectile, 7 => Prefabs.utilityAxeSkin07Projectile, 8 => Prefabs.utilityAxeSkin08Projectile, 9 => Prefabs.utilityAxeSkin09Projectile, 10 => Prefabs.utilityAxeSkin10Projectile, 11 => Prefabs.utilityAxeSkin11Projectile, _ => null, }); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class Special : DravenSkillState { private float duration = 0.55f; private float fireDelay = 0.25f; private bool hasFired; private float damageCoefficient = 11f; public override void OnEnter() { base.OnEnter(); ((EntityState)this).PlayAnimation("Ult, Override", "special", "Special", duration, 0f); if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special)) { ((EntityState)this).skillLocator.special.SetSkillOverride((object)((EntityState)this).gameObject, MainPlugin.ultOverride, (SkillOverridePriority)4); } if (base.hasSkin) { AkSoundEngine.PostEvent(Sounds.Play_Draven_Skin_R_Cast, ((EntityState)this).gameObject); } else { AkSoundEngine.PostEvent(Sounds.Play_Draven_R_Cast, ((EntityState)this).gameObject); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= fireDelay && !hasFired) { hasFired = true; Fire(); } if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special) && !((EntityState)this).skillLocator.special.HasSkillOverrideOfPriority((SkillOverridePriority)4) && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } private void Fire() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: Unknown result type (might be due to invalid IL or missing references) if (((EntityState)this).isAuthority) { FireProjectileInfo val = default(FireProjectileInfo); val.crit = ((BaseState)this).RollCrit(); val.damage = ((EntityState)this).characterBody.damage * damageCoefficient; val.damageColorIndex = (DamageColorIndex)0; val.force = 1500f; val.owner = ((EntityState)this).gameObject; Ray aimRay = ((BaseState)this).GetAimRay(); val.position = ((Ray)(ref aimRay)).origin; val.procChainMask = default(ProcChainMask); val.projectilePrefab = PickAxeProjectile(); aimRay = ((BaseState)this).GetAimRay(); val.rotation = Quaternion.LookRotation(((Ray)(ref aimRay)).direction); val.useFuseOverride = false; val.useSpeedOverride = false; val.damageTypeOverride = DamageTypeCombo.GenericSpecial; val.target = null; FireProjectileInfo val2 = val; ProjectileManager.instance.FireProjectile(val2); } } private GameObject PickAxeProjectile() { return (GameObject)((int)((EntityState)this).characterBody.skinIndex switch { 0 => Prefabs.ultAxeBaseProjectile, 1 => Prefabs.ultAxeSkin01Projectile, 2 => Prefabs.ultAxeSkin02Projectile, 3 => Prefabs.ultAxeSkin03Projectile, 4 => Prefabs.ultAxeSkin04Projectile, 5 => Prefabs.ultAxeSkin05Projectile, 6 => Prefabs.ultAxeSkin06Projectile, 7 => Prefabs.ultAxeSkin07Projectile, 8 => Prefabs.ultAxeSkin08Projectile, 9 => Prefabs.ultAxeSkin09Projectile, 10 => Prefabs.ultAxeSkin10Projectile, 11 => Prefabs.ultAxeSkin11Projectile, _ => null, }); } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class SpecialOverride : DravenSkillState { private float duration = 0.15f; public override void OnEnter() { base.OnEnter(); behaviour.CallUltBack(); if (Object.op_Implicit((Object)(object)((EntityState)this).skillLocator) && Object.op_Implicit((Object)(object)((EntityState)this).skillLocator.special)) { ((EntityState)this).skillLocator.special.UnsetSkillOverride((object)((EntityState)this).gameObject, MainPlugin.ultOverride, (SkillOverridePriority)4); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } } internal class Utility : DravenSkillState { private float duration; private float baseDuration = 0.35f; public override void OnEnter() { base.OnEnter(); duration = baseDuration / ((BaseState)this).attackSpeedStat; EffectManager.SimpleMuzzleFlash(Prefabs.sprintEffect, ((EntityState)this).gameObject, "ground", false); if (NetworkServer.active) { ((EntityState)this).characterBody.AddTimedBuff(Prefabs.speedBuff, 5f); } if (base.hasSkin) { AkSoundEngine.PostEvent(Sounds.Play_Draven_Skin_W_Cast, ((EntityState)this).gameObject); } else { AkSoundEngine.PostEvent(Sounds.Play_Draven_W_Cast, ((EntityState)this).gameObject); } } public override void FixedUpdate() { ((EntityState)this).FixedUpdate(); if (((EntityState)this).fixedAge >= duration && ((EntityState)this).isAuthority) { ((EntityState)this).outer.SetNextStateToMain(); } } public override void OnExit() { ((EntityState)this).OnExit(); } public override InterruptPriority GetMinimumInterruptPriority() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) return (InterruptPriority)1; } } internal class Sounds { public static readonly uint Play_Draven_Catch = 188414152u; public static readonly uint Play_Draven_Auto_Cast = 607319440u; public static readonly uint Play_Draven_W_Cast = 852214488u; public static readonly uint Play_Draven_R_Return = 1495917988u; public static readonly uint Play_Draven_E_Cast = 2218109966u; public static readonly uint Play_Draven_Auto_Hit = 2265887312u; public static readonly uint Play_Draven_E_Hit = 2593257050u; public static readonly uint Play_Draven_R_Mis = 2697799855u; public static readonly uint Play_Draven_R_Hit = 2764071745u; public static readonly uint Play_Draven_R_Cast = 3446501227u; public static readonly uint Play_Draven_Q_Hit = 3559995654u; public static readonly uint Play_Draven_Q_Cast = 3767443554u; public static readonly uint Play_Draven_Spin_Cast = 756365087u; public static readonly uint Play_Draven_Skin_R_Cast = 1511835475u; public static readonly uint Play_Draven_Skin_Catch = 1767898560u; public static readonly uint Play_Draven_Skin_R_Return = 1906252284u; public static readonly uint Play_Draven_Skin_W_Cast = 2835544448u; public static readonly uint Play_Draven_Skin_Q_Hit = 3525861214u; public static readonly uint Play_Draven_Skin_E_Cast = 2713129302u; public static readonly uint Play_Draven_Skin_R_Hit = 2735056825u; public static readonly uint Play_Draven_Skin_E_Hit = 86880626u; public static readonly uint Play_Draven_Skin_R_Mis = 2668784903u; public static readonly uint Play_Draven_Skin_Spin_Cast = 2494603223u; } internal class Utils { public static GameObject NewDisplayModel(GameObject model, string name) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(model, name, false); ((Behaviour)val.GetComponentInChildren<CharacterModel>()).enabled = false; Renderer[] componentsInChildren = val.GetComponentsInChildren<Renderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].material.shader = Addressables.LoadAssetAsync<Shader>((object)"RoR2/Base/Shaders/HGStandard.shader").WaitForCompletion(); componentsInChildren[i].material.shaderKeywords = null; } return val; } internal static GameObject SetupNewUtilityProjectile(GameObject target, string name) { string text = name.Replace("R", "Utility") + "Projectile"; GameObject ghostPrefab = CreateNewUtilityGhost(name); GameObject val = PrefabAPI.InstantiateClone(target, "Draven" + text, true); val.GetComponent<ProjectileController>().ghostPrefab = ghostPrefab; ContentAddition.AddProjectile(val); return val; } internal static GameObject CreateNewUtilityGhost(string name) { //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>(name), name.Replace("R", "Utility") + "ProjectileGhost", false); val.AddComponent<ProjectileGhostController>(); Transform child = val.transform.GetChild(0); AddScaleComponent(((Component)child).gameObject); Transform child2 = child.GetChild(0); ((Component)child2).transform.localRotation = Quaternion.Euler(0f, 0f, 90f); AddRotationComponent(((Component)child2).gameObject, addScale: false, -1440f, (RotationAxis)0); Transform child3 = child.GetChild(1); ((Component)child3).transform.localRotation = Quaternion.Euler(0f, 0f, 90f); AddRotationComponent(((Component)child3).gameObject, addScale: false, 1440f, (RotationAxis)0); return val; } internal static GameObject SetupNewOrbEffect(string name, OrbEffect targetOrb) { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_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_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) GameObject val = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>(name), "Draven" + name + "OrbEffect", true); val.AddComponent<NetworkIdentity>(); OrbEffect val2 = val.AddComponent<OrbEffect>(); val2.startVelocity1 = targetOrb.startVelocity1; val2.startVelocity2 = targetOrb.startVelocity2; val2.endVelocity1 = targetOrb.endVelocity1; val2.endVelocity2 = targetOrb.endVelocity2; val2.movementCurve = targetOrb.movementCurve; val2.faceMovement = true; val2.callArrivalIfTargetIsGone = false; val2.startEffect = null; val2.startEffectScale = 2f; val2.startEffectCopiesRotation = false; val2.endEffectScale = 1f; val2.endEffectCopiesRotation = false; val.AddComponent<Rigidbody>(); AddRotationComponent(((Component)val.transform.GetChild(0)).gameObject, addScale: false, 1440f, (RotationAxis)0); RegisterEffect(val, 99f, "", parentToReferencedTransform: false, positionAtReferencedTransform: false); return val; } internal static GameObject SetupNewProjectile(GameObject target, string name, int index = -1, bool removeStick = false) { GameObject val = PrefabAPI.InstantiateClone(target, "Draven" + name, true); val.GetComponent<ProjectileController>().ghostPrefab = NewProjectileGhost(name); if (removeStick) { val.AddComponent<AxeDestroyOnCharacterCollision>(); } AxeProjectileIndexHolderComponent component = val.GetComponent<AxeProjectileIndexHolderComponent>(); if (Object.op_Implicit((Object)(object)component)) { component.axeIndex = index; } ContentAddition.AddProjectile(val); return val; } internal static GameObject NewProjectileGhost(string name) { GameObject val = PrefabAPI.InstantiateClone(Assets.MainAssetBundle.LoadAsset<GameObject>(name), "Draven" + name + "ProjectileGhost", false); val.AddComponent<ProjectileGhostController>(); val.AddComponent<AxeStickEvent>(); AddRotationComponent(((Component)val.transform.GetChild(0)).gameObject, addScale: true, 1440f, (RotationAxis)0); return val; } internal static SkinDefInfo CreateNewSkinDefInfo(List<GameObject> childList, GameObject rootObject, string skinName, string objectToEnable, RendererInfo[] rendererInfos) { //IL_0003: 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_006b: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ed: Unknown result type (might be due to invalid IL or missing references) SkinDefInfo result = default(SkinDefInfo); result.BaseSkins = Array.Empty<SkinDef>(); result.MinionSkinReplacements = (MinionSkinReplacement[])(object)new MinionSkinReplacement[0]; result.ProjectileGhostReplacements = (ProjectileGhostReplacement[])(object)new ProjectileGhostReplacement[0]; List<GameObjectActivation> list = new List<GameObjectActivation>(); foreach (GameObject child in childList) { GameObjectActivation val = default(GameObjectActivation); val.gameObject = child; val.shouldActivate = ((Object)child).name == objectToEnable; GameObjectActivation item = val; list.Add(item); } result.GameObjectActivations = list.ToArray(); result.Icon = Assets.MainAssetBundle.LoadAsset<Sprite>(objectToEnable); result.MeshReplacements = (MeshReplacement[])(object)new MeshReplacement[0]; result.Name = skinName; result.NameToken = skinName; result.RendererInfos = rendererInfos; result.RootObject = rootObject; result.UnlockableDef = null; return result; } internal static void AddRotationComponent(GameObject target, bool addScale = true, float rotationSpeed = 1440f, RotationAxis axis = 0) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) RotateAroundAxis val = target.AddComponent<RotateAroundAxis>(); val.fastRotationSpeed = rotati