// Token: 0x06001364 RID: 4964 RVA: 0x00052FCC File Offset: 0x000511CC public void SelectMonsterCard() { WeightedSelection <DirectorCard> weightedSelection = Util.CreateReasonableDirectorCardSpawnList(this.monsterCredit, this.combatDirector.maximumNumberToSpawnBeforeSkipping, 1); if (weightedSelection.Count == 0) { if (this.chosenDirectorCard == null) { Debug.Log("Could not find appropriate spawn card for Combat Shrine"); this.purchaseInteraction.SetAvailable(false); } return; } this.chosenDirectorCard = weightedSelection.Evaluate(this.rng.nextNormalizedFloat); }
public override void OnStartServer() { if (!NetworkServer.active) { Debug.LogWarning("[Server] function 'System.Void RoR2.ArenaMissionController::OnStartServer()' called on client"); return; } base.OnStartServer(); this.cachedDifficultyCoefficient = Run.instance.difficultyCoefficient; this.rng = new Xoroshiro128Plus((ulong)Run.instance.stageRng.nextUint); this.InitCombatDirectors(); Util.ShuffleArray <GameObject>(this.nullWards, this.rng); this.ReadyNextNullWard(); this.availableMonsterCards = Util.CreateReasonableDirectorCardSpawnList(this.baseMonsterCredit * this.cachedDifficultyCoefficient, this.maximumNumberToSpawnBeforeSkipping, this.minimumNumberToSpawnPerMonsterType); this.availableTier1DropList = Run.instance.availableTier1DropList.Where(new Func <PickupIndex, bool>(ArenaMissionController.IsPickupAllowedForMonsters)).ToList <PickupIndex>(); this.availableTier2DropList = Run.instance.availableTier2DropList.Where(new Func <PickupIndex, bool>(ArenaMissionController.IsPickupAllowedForMonsters)).ToList <PickupIndex>(); this.availableTier3DropList = Run.instance.availableTier3DropList.Where(new Func <PickupIndex, bool>(ArenaMissionController.IsPickupAllowedForMonsters)).ToList <PickupIndex>(); if (this.availableMonsterCards.Count == 0) { Debug.Log("No reasonable monsters could be found."); return; } }