public JsonTrade(CurrencyTrade trade) { OccurredAt = new JsonDateTime(DateTime.UtcNow); ShopName = trade.WorldObjectItem.Name; ShopOwner = trade.ShopOwner.Name; BuyerName = trade.Buyer.Name; SellerName = trade.Seller.Name; NumberOfItems = trade.NumberOfItems; IsBuyAction = trade.BoughtOrSold == BoughtOrSold.Buying; ItemTraded = trade.ItemUsed.DisplayName; CurrencyAmount = trade.CurrencyAmount; CurrencyName = trade.Currency.Name; Time = trade.Time; }
public JsonHistCraftingTables(IEnumerable <CraftingComponent> craftingComponents) { Version = 2; CraftingTables = craftingComponents.Select(table => new Poco.JsonCraftingTable(table)).ToList(); ExportedAt = new JsonDateTime(DateTime.UtcNow); }
public JsonHistTrades(List <JsonTrade> trades) { Version = 2; Trades = trades; ExportedAt = new JsonDateTime(DateTime.UtcNow); }
public JsonHistStores(IEnumerable <StoreComponent> storeComponents) { Version = 2; Stores = storeComponents.Select(store => new Poco.JsonStore(store)).ToList(); ExportedAt = new JsonDateTime(DateTime.UtcNow); }