// 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); } }
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); }
public PickupIndex(EquipmentIndex equipmentIndex) { this.value = PickupCatalog.FindPickupIndex(equipmentIndex).value; }
public PickupIndex(ItemIndex itemIndex) { this.value = PickupCatalog.FindPickupIndex(itemIndex).value; }
public static PickupIndex Find(string name) { return(PickupCatalog.FindPickupIndex(name)); }