Esempio n. 1
0
        public void Outbid(SubscribeItem sub, SaveAuction auction, SaveBids bid)
        {
            var outBidBy = auction.HighestBidAmount - bid.Amount;
            var text     = $"You were outbid on {auction.ItemName} by {PlayerSearch.Instance.GetNameWithCache(auction.Bids.FirstOrDefault().Bidder)} by {outBidBy}";

            Task.Run(() => Send(sub.UserId, "Outbid", text, AuctionUrl(auction), ItemIconUrl(auction.Tag), FormatAuction(auction))).ConfigureAwait(false);
        }
 private static BidResult NewBidResult(SaveAuction a, SaveBids highestOwn)
 {
     return(new BidResult()
     {
         AuctionId = a.Uuid,
         HighestBid = a.Bids.Last().Amount,
         HighestOwnBid = highestOwn.Amount,
         ItemName = a.ItemName,
         End = a.End
     });
 }
Esempio n. 3
0
        public void NewBid(SubscribeItem sub, SaveAuction auction, SaveBids bid)
        {
            var text = $"New bid on {auction.ItemName} by {PlayerSearch.Instance.GetNameWithCache(auction.Bids.FirstOrDefault().Bidder)} for {auction.HighestBidAmount}";

            Task.Run(() => Send(sub.UserId, "New bid", text, AuctionUrl(auction), ItemIconUrl(auction.Tag), auction)).ConfigureAwait(false);
        }