// Token: 0x06000595 RID: 1429 RVA: 0x0001727C File Offset: 0x0001547C
 private void GenerateWeightedSelection()
 {
     this.weightedSelection.Clear();
     foreach (ExplicitPickupDropTable.Entry entry in this.entries)
     {
         this.weightedSelection.AddChoice(PickupCatalog.FindPickupIndex(entry.pickupName), entry.pickupWeight);
     }
 }
Exemplo n.º 2
0
        public void RollItem()
        {
            if (!NetworkServer.active)
            {
                Debug.LogWarning("[Server] function 'System.Void RoR2.ChestBehavior::RollItem()' called on client");
                return;
            }
            ChestBehavior.< > c__DisplayClass14_0 CS$ < > 8__locals1 = new ChestBehavior.< > c__DisplayClass14_0();
            CS$ < > 8__locals1.< > 4__this = this;
            CS$ < > 8__locals1.selector    = new WeightedSelection <List <PickupIndex> >(8);
            List <PickupIndex> list = new List <PickupIndex>();

            list.Add(PickupCatalog.FindPickupIndex("LunarCoin.Coin0"));
            CS$ < > 8__locals1.< RollItem > g__Add | 1 (Run.instance.availableTier1DropList, this.tier1Chance);
            CS$ < > 8__locals1.< RollItem > g__Add | 1 (Run.instance.availableTier2DropList, this.tier2Chance);
            CS$ < > 8__locals1.< RollItem > g__Add | 1 (Run.instance.availableTier3DropList, this.tier3Chance);
            CS$ < > 8__locals1.< RollItem > g__Add | 1 (Run.instance.availableLunarDropList, this.lunarChance);
            CS$ < > 8__locals1.< RollItem > g__Add | 1 (list, this.lunarCoinChance);
            List <PickupIndex> dropList = CS$ < > 8__locals1.selector.Evaluate(Run.instance.treasureRng.nextNormalizedFloat);

            this.PickFromList(dropList);
        }
Exemplo n.º 3
0
 public PickupIndex(EquipmentIndex equipmentIndex)
 {
     this.value = PickupCatalog.FindPickupIndex(equipmentIndex).value;
 }
Exemplo n.º 4
0
 public PickupIndex(ItemIndex itemIndex)
 {
     this.value = PickupCatalog.FindPickupIndex(itemIndex).value;
 }
Exemplo n.º 5
0
 public static PickupIndex Find(string name)
 {
     return(PickupCatalog.FindPickupIndex(name));
 }