Ejemplo n.º 1
0
 public TeleportEntry(Mobile from, VendorSearchMap map)
     : base(1154558, -1) // Teleport To Vendor
 {
     VendorMap = map;
     Clicker   = from;
     Enabled   = VendorMap.IsSale();
 }
Ejemplo n.º 2
0
            public OpenContainerEntry(Mobile from, VendorSearchMap map)
                : base(1154699, -1) // Open Container Containing Item
            {
                VendorMap = map;
                Clicker   = from;
                Container = VendorMap.SearchItem.ParentEntity as Container;

                Enabled = IsAccessible();
            }
Ejemplo n.º 3
0
            public OpenContainerEntry(Mobile from, VendorSearchMap map)
                : base(1154699, -1) // Open Container Containing Item
            {
                VendorMap = map;
                Clicker   = from;

                BaseHouse h1 = BaseHouse.FindHouseAt(VendorMap.Vendor);
                BaseHouse h2 = BaseHouse.FindHouseAt(Clicker);

                Enabled = h1 != null && h1 == h2;
            }
Ejemplo n.º 4
0
 public TeleportEntry(Mobile from, VendorSearchMap map)
     : base(map.SetLocation == Point3D.Zero ? 1154558 : 1154636, -1) // Teleport To Vendor : Return to Previous Location
 {
     VendorMap = map;
     Clicker   = from;
 }
Ejemplo n.º 5
0
 public OpenMapEntry(Mobile from, VendorSearchMap map)
     : base(3006150, 1) // Open Map
 {
     VendorMap = map;
     Clicker   = from;
 }
Ejemplo n.º 6
0
 public ReturnTeleportEntry(Mobile from, VendorSearchMap map)
     : base(1154636, -1) // Return to Previous Location
 {
     VendorMap = map;
     Clicker   = from;
 }
Ejemplo n.º 7
0
            public OpenContainerEntry(Mobile from, VendorSearchMap map)
                : base(1154699, -1) // Open Container Containing Item
            {
                VendorMap = map;
                Clicker = from;

                BaseHouse h1 = BaseHouse.FindHouseAt(VendorMap.Vendor);
                BaseHouse h2 = BaseHouse.FindHouseAt(Clicker);

                Enabled = h1 != null && h1 == h2;
            }
Ejemplo n.º 8
0
 public TeleportEntry(Mobile from, VendorSearchMap map)
     : base(map.SetLocation == Point3D.Zero ? 1154558 : 1154636, -1) // teleport to vendor : return to previous location
 {
     VendorMap = map;
     Clicker = from;
 }
Ejemplo n.º 9
0
 public OpenMapEntry(Mobile from, VendorSearchMap map)
     : base(3006150, -1) // open map
 {
     VendorMap = map;
     Clicker = from;
 }
Ejemplo n.º 10
0
        public ConfirmTeleportGump(VendorSearchMap map, Mobile pm)
            : base(50, 50)
        {
            VendorMap = map;
            User = pm;

            AddBackground(0, 0, 500, 300, 30546);

            if (VendorMap.Vendor != null && VendorMap.SetLocation != Point3D.Zero)
                AddHtmlLocalized(40, 50, 420, 200, 1154637, String.Format("{0}\t{1}", VendorMap.GetCoords(), VendorMap.Vendor.Map.ToString()), 0xFFFF, false, false); // Please select 'Accept' if you would like to return to ~1_loc~ (~2_facet~).  This map will be deleted after use.
            else
                AddHtmlLocalized(40, 50, 420, 200, 1154635, String.Format("{0}\t{1}\t{2}", Cost.ToString(), VendorMap.Vendor.Name, VendorMap.TimeRemaining.ToString()), 0xFFFF, false, false); // Please select 'Accept' if you would like to pay ~1_cost~ gold to teleport to vendor ~2_name~.  For this price you will also be able to teleport back to this location within the next ~3_minutes~ minutes.

            AddButton(40, 260, 30535, 30535, 0, GumpButtonType.Reply, 0);
            AddHtmlLocalized(90, 260, 150, 20, 1153439, 0xFFFF, false, false);

            AddButton(433, 260, 30534, 30534, 1, GumpButtonType.Reply, 0);
            AddHtmlLocalized(300, 260, 120, 20, 1114514, "#1073996", 0xFFFF, false, false);
        }
Ejemplo n.º 11
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            switch (info.ButtonID)
            {
                case 0: break;
                default: // Buy Map
                    VendorItem item = Items[info.ButtonID - 100];
                    PlayerVendor vendor = item.Item.RootParentEntity as PlayerVendor;

                    if(vendor != null)
                    {
                        if (_GivenTo == null)
                            _GivenTo = new Dictionary<VendorItem, List<PlayerMobile>>();

                        if (!_GivenTo.ContainsKey(item))
                            _GivenTo[item] = new List<PlayerMobile>();

                        if (!_GivenTo[item].Contains(User))
                        {
                            VendorSearchMap map = new VendorSearchMap(vendor, item.Item);

                            if (User.Backpack == null || !User.Backpack.TryDropItem(User, map, false))
                                map.Delete();
                            else
                            {
                                User.SendLocalizedMessage(1154690); // The vendor map has been placed in your backpack.
                                _GivenTo[item].Add(User);
                            }
                        }
                    }
                    else
                        User.SendLocalizedMessage(1154700); // Item no longer for sale.
                    break;
                case 2: // Next Page
                    Index += PerPage;
                    Refresh();
                    break;
                case 3: // Prev Page
                    Index -= PerPage;
                    Refresh();
                    break;
            }
        }