Ejemplo n.º 1
0
        private static void SendAuctionSuccessfullMail(Auction auction)
        {
            if (auction == null)
            {
                return;
            }
            uint   num  = CalcAuctionCut(auction.HouseFaction, auction.CurrentBid);
            string body = string.Format("{0,16:X}:{1,16:D}:0:{2,16:D}:{3,16:D}", (object)auction.BidderLowId,
                                        (object)auction.CurrentBid, (object)auction.Deposit, (object)num);
            uint money = auction.CurrentBid + auction.Deposit - num;

            auction.SendMail(MailAuctionAnswers.Successful, money, body);
        }
Ejemplo n.º 2
0
        private static void SendAuctionWonMail(Auction auction)
        {
            if (auction == null)
            {
                return;
            }
            var body   = String.Format("{0,16:X}:{1,16:D}:{2,16:D}", auction.OwnerLowId, auction.CurrentBid, auction.BuyoutPrice);
            var record = ItemRecord.GetRecordByID(auction.ItemLowId);

            if (record != null)
            {
                auction.SendMail(MailAuctionAnswers.Won, 0, record, body);
                // log it?
            }
        }
Ejemplo n.º 3
0
        private static void SendOutbidMail(Auction auction, uint newBid)
        {
            if (auction == null)
            {
                return;
            }
            Character character = World.GetCharacter(auction.BidderLowId);

            if (character != null)
            {
                AuctionHandler.SendAuctionOutbidNotification(character.Client, auction, newBid,
                                                             GetMinimumNewBidIncrement(auction));
            }
            auction.SendMail(MailAuctionAnswers.Outbid, auction.CurrentBid);
        }
Ejemplo n.º 4
0
        private static void SendAuctionWonMail(Auction auction)
        {
            if (auction == null)
            {
                return;
            }
            string body = string.Format("{0,16:X}:{1,16:D}:{2,16:D}", auction.OwnerLowId,
                                        auction.CurrentBid, auction.BuyoutPrice);
            ItemRecord recordById = ItemRecord.GetRecordByID(auction.ItemLowId);

            if (recordById == null)
            {
                return;
            }
            auction.SendMail(MailAuctionAnswers.Won, 0U, recordById, body);
        }
Ejemplo n.º 5
0
        private static void SendAuctionSuccessfullMail(Auction auction)
        {
            if (auction == null)
            {
                return;
            }

            var auctionhouseCut = CalcAuctionCut(auction.HouseFaction, auction.CurrentBid);
            var body            = String.Format("{0,16:X}:{1,16:D}:0:{2,16:D}:{3,16:D}",
                                                auction.BidderLowId,
                                                auction.CurrentBid,
                                                auction.Deposit,
                                                auctionhouseCut);
            var profit = auction.CurrentBid + auction.Deposit - auctionhouseCut;

            auction.SendMail(MailAuctionAnswers.Successful, profit, body);
        }