示例#1
0
        public void Add(Auction auction, long settlementPrice, Item item)
        {
            long price;
            _spendByOwner.TryGetValue(auction.Owner, out price);
            _spendByOwner[auction.Owner] = price + settlementPrice;

            if (_item == null)
            {
                _item = item;
            }
            else
            {
                _item.Quantity += item.Quantity;
            }
        }
示例#2
0
文件: BuyOrder.cs 项目: andy-uq/Echo
        private bool GetBlockSize(Auction auction, out uint blockSize)
        {
            blockSize = BlockSize;
            while (blockSize < Quantity && blockSize < auction.Quantity)
            {
                if (blockSize%auction.BlockSize == 0)
                {
                    return true;
                }

                blockSize += BlockSize;
            }

            return false;
        }
示例#3
0
 public void Remove(Auction auction)
 {
     _auctions.Remove(auction);
 }
示例#4
0
 public void Add(Auction auction)
 {
     auction.Expires = AuctionLength;
     _auctions.Add(auction);
 }
示例#5
0
文件: Auction.cs 项目: andy-uq/Echo
 public bool OutOfRange(Auction auction)
 {
     var vector = Location.Position - auction.Location.Position;
     return vector.Magnitude > Range;
 }