Exemplo n.º 1
0
        public AuctionMap(IAuctionItem auctionsafe)
            : base(auctionsafe.Map)
        {
            AuctionSafe  = auctionsafe;
            AuctionItem  = auctionsafe.Auction.AuctionItem;
            SafeLocation = auctionsafe.Location;
            SafeMap      = auctionsafe.Map;

            BaseHouse house = GetHouse();

            if (house != null)
            {
                HouseName = house.Sign.GetName();
            }
            else
            {
                HouseName = "Unknown";
            }

            Hue      = RecallRune.CalculateHue(auctionsafe.Map, null, true);
            LootType = LootType.Blessed;

            Width  = 400;
            Height = 400;

            Bounds = new Rectangle2D(auctionsafe.X - 100, auctionsafe.Y - 100, 200, 200);
            AddWorldPin(auctionsafe.X, auctionsafe.Y);
        }
Exemplo n.º 2
0
 public SearchItem(IAuctionItem auctionsafe, Item item, int price, bool isChild)
 {
     AuctionSafe = auctionsafe;
     Item        = item;
     Price       = price;
     IsChild     = isChild;
     IsAuction   = true;
 }
Exemplo n.º 3
0
        public Auction(Mobile owner, IAuctionItem item)
        {
            Safe  = item;
            Owner = owner;
            Bids  = new List <BidEntry>();

            Duration = DefaultDuration;
        }
Exemplo n.º 4
0
        public BaseAuctionGump(PlayerMobile p, IAuctionItem safe)
            : base(100, 100)
        {
            Safe    = safe;
            Auction = safe.Auction;
            User    = p;

            AddGumpLayout();
        }
Exemplo n.º 5
0
        public void BuyProduct(IAuctionItem product, int productPrice)
        {
            Cash -= productPrice;
            _ownedProducts.Add(product);
            PrintToPersonalScreen($"You now have {Cash}$ left");
            string ownProducts = string.Join(", ", (_ownedProducts.Select(p => p.Name).ToList()));

            PrintToPersonalScreen($"Owned prodcts: {ownProducts}");
        }
Exemplo n.º 6
0
        public Auction(IAuctionItem auctionItem, DateTime startDate, int startPrice, int minimunJumpPrice)
        {
            Item = auctionItem;

            IsActive     = false;
            IsOver       = false;
            StartDate    = startDate;
            AuctionStage = 1;
            CurrentBet   = new AuctionBet(startPrice, minimunJumpPrice, startDate);
        }
        public AuctionRunner CreateAuctionRunner(IAuctionItem auctionItem, DateTime startDate, int startPrice, int minimunJumpPrice)
        {
            Auction auc = _auctionFactory.CreateAuction(auctionItem, startDate, startPrice, minimunJumpPrice);

            return(new AuctionRunner(auc));
        }
Exemplo n.º 8
0
 public AuctionBidGump(PlayerMobile pm, IAuctionItem safe)
     : base(pm, safe)
 {
 }
Exemplo n.º 9
0
 public AuctionOwnerGump(PlayerMobile pm, IAuctionItem safe)
     : base(pm, safe)
 {
     Owner = true;
 }
Exemplo n.º 10
0
 public AuctionItemController(IAuctionItem auctionItemService, IMapper mapper)
 {
     _auctionItemService = auctionItemService;
     _mapper             = mapper;
 }
Exemplo n.º 11
0
 public void CreateAuction(IAuctionItem auctionItem, DateTime startDate, int startPrice, int minimunJumpPrice)
 {
     AuctionRunners.Add(_auctionRunnerFactory.CreateAuctionRunner(auctionItem, startDate, startPrice, minimunJumpPrice));
 }
Exemplo n.º 12
0
 public Auction CreateAuction(IAuctionItem auctionItem, DateTime startDate, int startPrice, int minimunJumpPrice)
 {
     return(new Auction(auctionItem, startDate, startPrice, minimunJumpPrice));
 }
Exemplo n.º 13
0
        public override bool DoJoin(IAuctionItem item, int currentBid, int startPrice)
        {
            Random rand = new Random();

            return((rand.Next(0, 100) < 60) && (currentBid <= Cash * 0.6) && (startPrice <= Cash));
        }
Exemplo n.º 14
0
        public Auction(IAuctionItem safe, GenericReader reader)
        {
            Safe = safe;

            int version = reader.ReadInt();

            switch (version)
            {
            case 2:
                ClaimPeriod = reader.ReadDateTime();
                goto case 1;

            case 1:
                Owner       = reader.ReadMobile();
                AuctionItem = reader.ReadItem();
                CurrentBid  = reader.ReadLong();
                StartBid    = reader.ReadLong();
                Buyout      = reader.ReadLong();
                Description = reader.ReadString();
                Duration    = reader.ReadInt();

                StartTime = reader.ReadDateTime();
                OnGoing   = reader.ReadBool();

                Bids = new List <BidEntry>();

                int count = reader.ReadInt();
                for (int i = 0; i < count; i++)
                {
                    PlayerMobile m     = reader.ReadMobile() as PlayerMobile;
                    BidEntry     entry = new BidEntry(m, reader);

                    if (m != null)
                    {
                        Bids.Add(entry);

                        if (entry.CurrentBid > 0 && (HighestBid == null || entry.CurrentBid > HighestBid.CurrentBid))
                        {
                            HighestBid = entry;
                        }
                    }
                }

                count = reader.ReadInt();

                if (count > 0)
                {
                    BidHistory = new List <HistoryEntry>();
                }

                for (int i = 0; i < count; i++)
                {
                    BidHistory.Add(new HistoryEntry(reader));
                }

                break;
            }

            if (HasBegun)
            {
                Auctions.Add(this);
            }
        }
Exemplo n.º 15
0
 public abstract bool DoJoin(IAuctionItem item, int currentBid, int startPrice);