private bool Util_CheckRoll_float_CharacterMaster(On.RoR2.Util.orig_CheckRoll_float_CharacterMaster orig, float percentChance, CharacterMaster master)
 {
     if (master && master.hasBody)
     {
         var body      = master.GetBody();
         var component = body.GetComponent <MysticsItemsVyraelCommandmentsHelper>();
         if (component && component.bonusActive > 0)
         {
             percentChance *= chanceIncreaseOnProc;
         }
     }
     return(orig(percentChance, master));
 }
 private bool Util_CheckRoll_float_CharacterMaster(On.RoR2.Util.orig_CheckRoll_float_CharacterMaster orig, float percentChance, CharacterMaster effectOriginMaster)
 {
     if (percentChance >= 1f)
     {
         if (effectOriginMaster)
         {
             Inventory inventory = effectOriginMaster.inventory;
             if (inventory)
             {
                 int itemCount = inventory.GetItemCount(itemDef);
                 if (itemCount > 0)
                 {
                     percentChance = ApplyPercentBonus(itemCount, percentChance);
                 }
             }
         }
     }
     return(orig(percentChance, effectOriginMaster));
 }