public static void CreateStockHeld(ulong sellerId, string goodsTypeId, string goodsSubtypeName, decimal quantity, decimal price) { var order = new OrderBookStruct { Created = DateTime.Now, TraderId = sellerId, TypeId = goodsTypeId, SubtypeName = goodsSubtypeName, TradeState = TradeState.Holding, Quantity = quantity, Price = price, OptionalId = "" }; EconomyScript.Instance.Data.OrderBook.Add(order); }
public static void CreateTradeOffer(ulong sellerId, string goodsTypeId, string goodsSubtypeName, decimal quantity, decimal price, ulong targetPlayer) { var order = new OrderBookStruct { Created = DateTime.Now, TraderId = sellerId, TypeId = goodsTypeId, SubtypeName = goodsSubtypeName, TradeState = TradeState.SellDirectPlayer, Quantity = quantity, Price = price, OptionalId = targetPlayer.ToString() }; EconomyScript.Instance.Data.OrderBook.Add(order); }