private void AddWindedDebuff(On.RoR2.CharacterBody.orig_RemoveBuff orig, CharacterBody self, BuffIndex buffType)
 {
     orig(self, buffType);
     if (buffType == SecondWindBuff)
     {
         self.AddTimedBuffAuthority(WindedDebuff, windedDebuffDuration);
     }
 }
Beispiel #2
0
 private void CharacterBody_Update(On.RoR2.CharacterBody.orig_Update orig, CharacterBody self)
 {
     orig(self);
     if (self.hasAuthority && self.isPlayerControlled &&
         !LocalUserManager.readOnlyLocalUsersList[0].isUIFocused)
     {
         if (Input.GetKey(keyToDrop) && self.inventory?.currentEquipmentIndex == RoR2Content.Equipment.Fruit.equipmentIndex)
         {
             self.AddTimedBuffAuthority(modifierKeyBuff.buffIndex, 0.5f);
         }
     }
 }
        protected override bool PerformEquipmentAction(EquipmentSlot slot)
        {
            CharacterBody body = slot.characterBody;

            if (!body)
            {
                return(false);
            }

            GameObject GameObject = slot.gameObject;

            Util.PlaySound(FireMines.throwMineSoundString, GameObject);

            body.AddTimedBuffAuthority(BuffIndex.Cloak, CloakDuration);

            return(true);
        }
Beispiel #4
0
 private void CharacterBody_Update(On.RoR2.CharacterBody.orig_Update orig, CharacterBody self)
 {
     orig(self);
     if (self.hasAuthority && self.isPlayerControlled && self.master &&
         !LocalUserManager.readOnlyLocalUsersList[0].isUIFocused &&
         Input.GetKeyDown(keyToDrop))
     {
         if (NetworkServer.active)
         {
             if (preventMoneyDrops)
             {
                 return;
             }
             ReleaseMoney(self.master);
         }
         else
         {
             self.AddTimedBuffAuthority(DoshContent.pendingDoshBuff.buffIndex, 1000000f);
         }
     }
 }