private IEnumerable<ShopItem> GetItemsForBBC(List<AdvertType> listOfAdvertTypes, bool isMilitary) { var shopItems = new List<ShopItem>(); RNG.SwitchMode(true, ZFrontier.Galaxy.RandomSeed); for (var i = 0; i < GameConfig.AdvertCount-1 + RNG.GetDiceDiv2Zero(); i++) { var advert = Advert.Create(listOfAdvertTypes.Get_Random(), CurrentSystem, Player, isMilitary); if (isMilitary && advert.Mission.MissionTypeData.MilitaryRatingNeeded > Player.MilitaryRanks[CurrentSystem.Allegiance].Rating) continue; shopItems.Add(new ShopItem( Lang[advert.Caption], advert.Price, Player.Missions.All(a => advert.Mission == null || a.Id != advert.Mission.Id), advert)); } RNG.SwitchMode(false); return shopItems; }