private static void EliteBuffsOnYellow(On.RoR2.CharacterBody.orig_RecalculateStats orig, RoR2.CharacterBody self) { for (int i = 0; i < NewDefsList.Count; i++) { if (self.inventory && self.inventory.GetItemCount(NewDefsList[i].itemIndex) > 0) { self.AddBuff(OldDefsList[i].passiveBuffDef); } } orig(self); }
// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250 public void Awake() { On.RoR2.PickupPickerController.CreatePickup_PickupIndex += delegate(On.RoR2.PickupPickerController.orig_CreatePickup_PickupIndex orig, RoR2.PickupPickerController self, RoR2.PickupIndex PickupIndex) { orig.Invoke(self, PickupIndex); Time.timeScale = 1f; }; On.RoR2.UI.PickupPickerPanel.Awake += delegate(On.RoR2.UI.PickupPickerPanel.orig_Awake orig, RoR2.UI.PickupPickerPanel self) { MethodInfo methodCached = Reflection.GetMethodCached(typeof(RoR2.CharacterMaster), "ToggleGod"); bool flag = true; foreach (RoR2.PlayerCharacterMasterController playerCharacterMasterController in RoR2.PlayerCharacterMasterController.instances) { methodCached.Invoke(playerCharacterMasterController.master, null); bool flag2 = flag; if (flag2) { flag = false; } } //RoR2.CharacterBody.AddBuff(RoR2.LocalUserManager.GetFirstLocalUser ,RoR2.RoR2Content.Buffs.Cloak); RoR2.LocalUser user = RoR2.LocalUserManager.GetFirstLocalUser(); RoR2.CharacterBody body = user.cachedBody; body.AddBuff(RoR2.RoR2Content.Buffs.Cloak); orig.Invoke(self); }; On.RoR2.PickupPickerController.OnDisplayEnd += delegate(On.RoR2.PickupPickerController.orig_OnDisplayEnd orig, RoR2.PickupPickerController self, RoR2.NetworkUIPromptController NetworkUIPromptController, RoR2.LocalUser LocalUser, RoR2.CameraRigController CameraRigController) { orig.Invoke(self, NetworkUIPromptController, LocalUser, CameraRigController); new WaitForSeconds(5); MethodInfo methodCached = Reflection.GetMethodCached(typeof(RoR2.CharacterMaster), "ToggleGod"); bool flag = false; foreach (RoR2.PlayerCharacterMasterController playerCharacterMasterController in RoR2.PlayerCharacterMasterController.instances) { methodCached.Invoke(playerCharacterMasterController.master, null); bool flag2 = flag; if (flag2) { flag = false; } } //base.characterBody.RemoveBuff(RoR2.RoR2Content.Buffs.CloakSpeed); RoR2.LocalUser user = RoR2.LocalUserManager.GetFirstLocalUser(); RoR2.CharacterBody body = user.cachedBody; body.RemoveBuff(RoR2.RoR2Content.Buffs.Cloak); }; }
private void ApplyBuffAsIndicatorForReady(On.RoR2.CharacterBody.orig_FixedUpdate orig, RoR2.CharacterBody self) { var InventoryCount = GetCount(self); if (InventoryCount > 0) { if (self.healthComponent.combinedHealthFraction >= 1 && !self.HasBuff(BlasterSwordActiveBuff)) { self.AddBuff(BlasterSwordActiveBuff); } if (self.healthComponent.combinedHealthFraction < 1 && self.HasBuff(BlasterSwordActiveBuff)) { self.RemoveBuff(BlasterSwordActiveBuff); } } else { if (self.HasBuff(BlasterSwordActiveBuff)) { self.RemoveBuff(BlasterSwordActiveBuff); } } orig(self); }