private void Doublinator(PlayerController arg1, ShopItemController arg2) { if (arg1 && arg2 && arg2.item) { if (arg2.item.quality != ItemQuality.COMMON && arg2.item.quality != ItemQuality.SPECIAL && arg2.item.quality != ItemQuality.EXCLUDED && BoxOTools.BasicRandom(0.4f)) { LootEngine.GivePrefabToPlayer(BoxOTools.GetTotallyRandomItem(arg2.item.quality, false).gameObject, arg1); } } }
public void MoreItems(Chest chest) { if (!GameStatsManager.Instance.IsRainbowRun && chest && !chest.IsMimic) { chest.PredictContents(Owner); List <PickupObject> items = new List <PickupObject>(); List <Tuple <int, int> > choices = new List <Tuple <int, int> >(); foreach (PickupObject pickup in chest.contents) { PickupObject awesome = BoxOTools.GetTotallyRandomItem(pickup.quality, false); choices.Add(new Tuple <int, int>(pickup.PickupObjectId, awesome.PickupObjectId)); items.Add(awesome); } god.Add(chest, choices); chest.contents.AddRange(items); } }