public override void OnExit() { if (base.isAuthority) { base.characterBody.RemoveBuff(RoR2Content.Buffs.Slow50); GenericSkill specialSkill = this.skillLocator.special; int stockCount = specialSkill.stock; Ray aimRay = this.GetAimRay(); Vector3[] array = new Vector3[stockCount]; Vector3 up = Vector3.up; Vector3 axis = Vector3.Cross(up, aimRay.direction); int num = 0; while ((long)num < (long)((ulong)stockCount)) { float x = UnityEngine.Random.Range(this.minSpread, this.maxSpread); float z = UnityEngine.Random.Range(0f, 360f); Vector3 vector = Quaternion.Euler(0f, 0f, z) * (Quaternion.Euler(x, 0f, 0f) * Vector3.forward); float y = vector.y; vector.y = 0f; float angle = (Mathf.Atan2(vector.z, vector.x) * 57.29578f - 90f) * this.spreadYawScale; float angle2 = Mathf.Atan2(y, vector.magnitude) * 57.29578f * this.spreadPitchScale; array[num] = Quaternion.AngleAxis(angle, up) * (Quaternion.AngleAxis(angle2, axis) * aimRay.direction); num++; } bool crit = base.RollCrit(); GameObject target = this.targetHurtbox != null ? this.targetHurtbox.gameObject : null; float damage = (this.damageCoefficient + stockCount * stockExtraDamage) * this.damageStat; for (int i = 0; i != stockCount; ++i) { ProjectileManager.instance.FireProjectile(ContentPacks.specialProjectile, aimRay.origin, Util.QuaternionSafeLookRotation(array[i]), base.gameObject, damage, this.force, crit, DamageColorIndex.Default, target, this.projectileVelocity); } specialSkill.DeductStock(stockCount); base.characterBody.characterMotor.velocity = aimRay.direction.normalized * -(this.recoilBase + this.recoilPerFire * stockCount); if (this.trackingIndicator) { Destroy(this.trackingIndicator.gameObject); } this.trackingIndicator = null; } base.OnExit(); }
// Token: 0x06001EA8 RID: 7848 RVA: 0x00084658 File Offset: 0x00082858 private void DeductOwnerStock() { if (base.ownerValid && base.owner.hasEffectiveAuthority) { SkillLocator component = base.owner.gameObject.GetComponent <SkillLocator>(); if (component) { GenericSkill secondary = component.secondary; if (secondary) { secondary.DeductStock(1); } } } }
// Token: 0x06003136 RID: 12598 RVA: 0x000D3F50 File Offset: 0x000D2150 public override void FixedUpdate() { base.FixedUpdate(); if (base.isAuthority) { this.entryCountdown -= Time.fixedDeltaTime; if (this.exitPending) { this.exitCountdown -= Time.fixedDeltaTime; if (this.exitCountdown <= 0f) { this.outer.SetNextStateToMain(); return; } } else if (base.inputBank && this.entryCountdown <= 0f) { if ((base.inputBank.skill1.down || base.inputBank.skill4.justPressed) && this.currentPlacementInfo.ok) { if (base.characterBody) { base.characterBody.SendConstructTurret(base.characterBody, this.currentPlacementInfo.position, this.currentPlacementInfo.rotation, MasterCatalog.FindMasterIndex(this.turretMasterPrefab)); if (base.skillLocator) { GenericSkill skill = base.skillLocator.GetSkill(SkillSlot.Special); if (skill) { skill.DeductStock(1); } } } Util.PlaySound(this.placeSoundString, base.gameObject); this.DestroyBlueprints(); this.exitPending = true; } if (base.inputBank.skill2.justPressed) { this.DestroyBlueprints(); this.exitPending = true; } } } }
// Token: 0x06000549 RID: 1353 RVA: 0x00017B58 File Offset: 0x00015D58 public override void FixedUpdate() { base.FixedUpdate(); this.stopwatch += Time.fixedDeltaTime; if (this.animator.GetFloat("FireGauntlet.fire") > 0f && !this.hasFiredGauntlet) { this.FireGauntlet(); } if (this.stopwatch < this.duration || !base.isAuthority) { return; } GenericSkill primary = base.skillLocator.primary; if (base.inputBank.skill1.down && primary.CanExecute()) { primary.DeductStock(1); FireBolt fireBolt = new FireBolt(); fireBolt.gauntlet = ((this.gauntlet == FireBolt.Gauntlet.Left) ? FireBolt.Gauntlet.Right : FireBolt.Gauntlet.Left); this.outer.SetNextState(fireBolt); return; } this.outer.SetNextStateToMain(); }