// Token: 0x06000052 RID: 82 RVA: 0x00003F98 File Offset: 0x00002198 public override void OnPostFired(PlayerController player, Gun gun) { try { gun.PreventNormalFireAudio = false; bool flag = this.combat == 1 && this.canSpawn == 0; if (flag) { this.KnightPlacer(player); this.canSpawn = 1; } if (nut.specRigidbody.UnitCenter != null && HasSynergy) { Gun gunnut = PickupObjectDatabase.GetById(380) as Gun; Gun currentGun = nut.CurrentGun; GameObject gameObject = gunnut.ObjectToInstantiateOnReload.gameObject; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject, nut.sprite.WorldCenter, Quaternion.identity); SingleSpawnableGunPlacedObject @interface = gameObject2.GetInterface <SingleSpawnableGunPlacedObject>(); BreakableShieldController component = gameObject2.GetComponent <BreakableShieldController>(); shield = component; bool flag3 = gameObject2; if (flag3) { component.maxDuration = 1.7f; @interface.Initialize(currentGun); component.Initialize(currentGun); } } } catch (Exception e) { Tools.Print("Copper OnPostFired", "FFFFFF", true); Tools.PrintException(e); } }
public override void OnReloadPressed(PlayerController player, Gun bruhgun, bool bSOMETHING) { if (gun.IsReloading && this.HasReloaded) { bool flag = this.HasReloaded && gun.ClipShotsRemaining == 0; if (flag) { bool flag2 = !EnforcersLaw.onCooldown; if (flag2) { bool flagA = player.PlayerHasActiveSynergy("Protect And Serve"); if (flagA) { Gun gun = PickupObjectDatabase.GetById(380) as Gun; Gun currentGun = player.CurrentGun; GameObject gameObject = gun.ObjectToInstantiateOnReload.gameObject; GameObject gameObject2 = UnityEngine.Object.Instantiate <GameObject>(gameObject, player.sprite.WorldCenter, Quaternion.identity); SingleSpawnableGunPlacedObject @interface = gameObject2.GetInterface <SingleSpawnableGunPlacedObject>(); BreakableShieldController component = gameObject2.GetComponent <BreakableShieldController>(); bool flag3 = gameObject2; if (flag3) { @interface.Initialize(currentGun); component.Initialize(currentGun); EnforcersLaw.onCooldown = true; GameManager.Instance.StartCoroutine(EnforcersLaw.StartCooldown()); } } } } AkSoundEngine.PostEvent("Stop_WPN_All", base.gameObject); HasReloaded = false; base.OnReloadPressed(player, gun, bSOMETHING); AkSoundEngine.PostEvent("Play_WPN_shotgun_reload", gameObject); } }
public static void BlankModHook(Action <SilencerInstance, BlankModificationItem, Vector2, PlayerController> orig, SilencerInstance silencer, BlankModificationItem bmi, Vector2 centerPoint, PlayerController user) { orig(silencer, bmi, centerPoint, user); if (user.HasPickupID(BarrierID)) { if (onCooldown == false) { Gun gun = PickupObjectDatabase.GetById(380) as Gun; Gun currentGun = user.CurrentGun; GameObject shield = gun.ObjectToInstantiateOnReload.gameObject; GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(shield, user.sprite.WorldCenter, Quaternion.identity); SingleSpawnableGunPlacedObject m_extantAmp = gameObject.GetInterface <SingleSpawnableGunPlacedObject>(); BreakableShieldController shieldOptions = gameObject.GetComponent <BreakableShieldController>(); if (gameObject) { m_extantAmp.Initialize(currentGun); shieldOptions.Initialize(currentGun); onCooldown = true; GameManager.Instance.StartCoroutine(StartCooldown()); } } } }