예제 #1
0
 static ObservableList <HarborOrderLine> CreateOrderLines(Trader harbor, Trader player)
 {
     return(harbor.Inventory.Convert(item => {
         var playerItem = player.Inventory.Find(x => x.Name == item.Name);
         return new HarborOrderLine(
             item,
             Prices.GetPrice(item, harbor.PriceFactor),
             Prices.GetPrice(item, player.PriceFactor),
             item.Count,
             (playerItem == null) ? 0 : playerItem.Count
             );
     }));
 }
예제 #2
0
 ObservableList <JRPGOrderLine> CreateOrderLines(Trader trader)
 {
     return(trader.Inventory.Convert(item => {
         return new JRPGOrderLine(item, Prices.GetPrice(item, trader.PriceFactor));
     }));
 }
예제 #3
0
 /// <summary>
 /// Create OrderLines.
 /// </summary>
 /// <param name="items">Items.</param>
 /// <returns>OrderLines.</returns>
 static protected ObservableList <JRPGOrderLine> CreateOrderLines(List <Item> items)
 {
     return(items.Convert(item => new JRPGOrderLine(item, Prices.GetPrice(item, 1f))).ToObservableList());
 }