Exemplo n.º 1
0
        public AuctionMap(AuctionSafe 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 VendorSearchMap(SearchItem item)
            : base(item.Map)
        {
            var map = item.Map;

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

            SearchItem  = item.Item;
            Vendor      = item.Vendor;
            AuctionSafe = item.AuctionSafe;

            Point3D p;

            if (IsAuction)
            {
                p = AuctionSafe.Location;
            }
            else
            {
                p = Vendor.Location;
            }

            const int width  = 300;
            const int height = 300;

            SetDisplay(p.X - (width / 2), p.Y - (height / 2), p.X + (width / 2), p.Y + (height / 2), width, height);
            AddWorldPin(p.X, p.Y);

            DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(DeleteDelayMinutes);
            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
Exemplo n.º 3
0
        public VendorSearchMap(Item item, bool auction)
            : base(item.Map)
        {
            LootType = LootType.Blessed;
            Hue      = RecallRune.CalculateHue(item.Map, null, true);

            IsAuction  = auction;
            SearchItem = item;

            Point3D p;

            if (IsAuction)
            {
                AuctionSafe = Auction.Auctions.Find(x => x.AuctionItem == item).Safe;
                p           = AuctionSafe.Location;
            }
            else
            {
                Vendor = item.RootParentEntity as PlayerVendor;
                p      = Vendor.Location;
            }

            Width  = 300;
            Height = 300;
            int size = item.Map == Map.Tokuno ? 300 : item.Map == Map.TerMur ? 200 : 600;

            Bounds = new Rectangle2D(p.X - size / 2, p.Y - size / 2, size, size);
            AddWorldPin(p.X, p.Y);

            DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(DeleteDelayMinutes);
            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
Exemplo n.º 4
0
        public VendorSearchMap(SearchItem item)
            : base(item.Map)
        {
            var map = item.Map;

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

            SearchItem  = item.Item;
            Vendor      = item.Vendor;
            AuctionSafe = item.AuctionSafe;

            Point3D p;

            if (IsAuction)
            {
                p = AuctionSafe.Location;
            }
            else
            {
                p = Vendor.Location;
            }

            Width  = 300;
            Height = 300;
            int size = map == Map.Tokuno ? 300 : map == Map.TerMur ? 200 : 600;

            Bounds = new Rectangle2D(p.X - size / 2, p.Y - size / 2, size, size);
            AddWorldPin(p.X, p.Y);

            DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(DeleteDelayMinutes);
            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
Exemplo n.º 5
0
        public VendorSearchMap(PlayerVendor vendor, Item item)
            : base(vendor.Map)
        {
            Vendor     = vendor;
            SearchItem = item;

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

            Width  = 300;
            Height = 300;

            Bounds = new Rectangle2D(vendor.X - 300, vendor.Y - 300, 600, 600);
            AddWorldPin(vendor.X, vendor.Y);

            DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(DeleteDelayMinutes);
            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
Exemplo n.º 6
0
        public ShopMap(PlayerVendor vendor, Container container)
        {
            m_DestLocation = vendor.House.BanLocation;
            m_DestMap      = vendor.Map;
            m_VendorName   = vendor.Name;
            m_ShopName     = vendor.ShopName;
            m_Container    = container;

            Hue = RecallRune.CalculateHue(m_DestMap);

            const int width  = 400;
            const int height = 400;

            SetDisplay(vendor.X - (width / 2), vendor.Y - (height / 2), vendor.X + (width / 2), vendor.Y + (height / 2), width, height);
            AddWorldPin(vendor.X, vendor.Y);

            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
Exemplo n.º 7
0
        public void DropRune(Mobile from, RunebookEntry e, int index)
        {
            if (m_DefaultIndex > index)
            {
                m_DefaultIndex -= 1;
            }
            else if (m_DefaultIndex == index)
            {
                m_DefaultIndex = -1;
            }

            m_Entries.RemoveAt(index);

            if (e.Galleon != null)
            {
                if (e.Galleon.Deleted)
                {
                    from.SendMessage("You discard the rune as the galleon is no longer available.");
                    return;
                }
                else
                {
                    ShipRune rune = new ShipRune(e.Galleon);
                    from.AddToBackpack(rune);
                }
            }
            else
            {
                RecallRune rune = new RecallRune();

                rune.Target      = e.Location;
                rune.TargetMap   = e.Map;
                rune.Description = e.Description;
                rune.House       = e.House;
                rune.Marked      = true;
                rune.Hue         = RecallRune.CalculateHue(e.Map, e.House, true);

                from.AddToBackpack(rune);
            }

            from.SendLocalizedMessage(502421); // You have removed the rune.
        }
Exemplo n.º 8
0
 private static RunebookEntry CreateRunebookEntry(string name, Point3D loc, Map map)
 {
     return(new RunebookEntry(loc, map, name, null, RecallRune.CalculateHue(map)));
 }