Ejemplo n.º 1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!from.InRange(GetWorldLocation(), 3))
            {
                from.SendLocalizedMessage(500332); // I am too far away to do that.
            }
            else
            {
                var pm = from as PlayerMobile;

                if (pm != null && _Auction != null)
                {
                    if (_Auction.InClaimPeriod)
                    {
                        if (_Auction.HighestBid != null && pm == Auction.HighestBid.Mobile)
                        {
                            _Auction.ClaimPrize(pm);
                        }
                        else if (!pm.HasGump(typeof(AuctionBidGump)))
                        {
                            pm.SendGump(new AuctionBidGump(pm, this));
                        }
                    }
                    else if (Auction.OnGoing && !pm.HasGump(typeof(AuctionBidGump)))
                    {
                        pm.SendGump(new AuctionBidGump(pm, this));
                    }
                }
            }
        }