public VendorTeleportGump( ShopMap map )
            : base(10, 10)
        {
            m_ShopMap = map;
            m_Used = map.Used;

            AddPage( 0 );

            AddBackground( 0, 0, 414, 214, 0x7752 );

            if ( m_Used )
            {
                /**
                 * Please select 'Accept' if you would like to return to ~1_loc~ (~2_facet~).  This map will be deleted after use.
                 */
                AddHtmlLocalized( 27, 47, 380, 80, 1154637, string.Format( "{0}\t#{1}", ShopMap.GetLocationFormatted( map.PreviousLocation, map.PreviousMap ), map.PreviousMap.GetNameCliloc() ), 0x4E73, false, false );
            }
            else
            {
                /**
                 * 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.
                 */
                AddHtmlLocalized( 27, 47, 380, 80, 1154635, string.Format( "{0}\t{1}\t{2}", ShopMap.TeleportCost, map.VendorName, ShopMap.DeleteDelayMinutes ), 0x4E73, false, false );
            }

            AddButton( 377, 167, 0x7746, 0x7746, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 267, 167, 100, 40, 1114514, "#1150299", 0x4E73, false, false ); // <DIV ALIGN=RIGHT>ACCEPT</DIV>

            AddButton( 7, 167, 0x7747, 0x7747, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 47, 167, 100, 40, 1150300, 0x4E73, false, false ); // CANCEL
        }
Exemple #2
0
 public ReturnFromVendorSpell(Mobile caster, ShopMap map)
     : base(caster, map)
 {
 }
Exemple #3
0
 public VendorTeleportSpell(Mobile caster, ShopMap shopMap)
     : base(caster, shopMap)
 {
 }
Exemple #4
0
 public BaseVendorTeleportSpell(Mobile caster, ShopMap map)
     : base(caster, null)
 {
     m_Map = map;
 }
Exemple #5
0
 public TeleportEntry(Mobile mobile, ShopMap map)
     : base(map.Used ? 1154636 : 1154558, 1)
 {
     m_Mobile = mobile;
     m_Map    = map;
 }
Exemple #6
0
 public OpenMapEntry(Mobile mobile, ShopMap map)
     : base(6150, 1)                   // Open Map
 {
     m_Mobile = mobile;
     m_Map    = map;
 }
Exemple #7
0
 public ReturnFromVendorSpell(Mobile caster, ShopMap map)
     : base(caster, map)
 {
 }
Exemple #8
0
 public VendorTeleportSpell(Mobile caster, ShopMap shopMap)
     : base(caster, shopMap)
 {
 }
Exemple #9
0
 protected BaseVendorTeleportSpell(Mobile caster, ShopMap map) : base(caster, null)
 {
     m_Map = map;
 }
Exemple #10
0
 public TeleportEntry(Mobile mobile, ShopMap map)
     : base(map.Used ? 1154636 : 1154558, 1)
 {
     m_Mobile = mobile;
     m_Map = map;
 }
Exemple #11
0
 public OpenMapEntry(Mobile mobile, ShopMap map)
     : base(6150, 1) // Open Map
 {
     m_Mobile = mobile;
     m_Map = map;
 }
        public override void OnResponse( GameClient sender, RelayInfo info )
        {
            Mobile from = sender.Mobile;

            if ( info.ButtonID == 2 )
            {
                VendorSearchQueryGump.StartSearch( from, m_Criteria, m_Page + 1 );
                return;
            }

            int index = info.ButtonID - 100;

            if ( !from.BeginAction( typeof( ShopMap ) ) )
            {
                from.SendLocalizedMessage( 500119 ); // You must wait to perform another action
                return;
            }

            Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), () => from.EndAction( typeof( ShopMap ) ) );

            if ( index >= 0 && index < m_Items.Length )
            {
                IVendorSearchItem item = m_Items[index];

                var mapItem = new ShopMap( item.Vendor, item.Container );

                if ( from.AddToBackpack( mapItem ) )
                {
                    from.SendLocalizedMessage( 1154690 ); // The vendor map has been placed in your backpack.
                }
                else
                {
                    from.SendLocalizedMessage( 502385 ); // Your pack cannot hold this item.
                    mapItem.Delete();
                }

                from.SendGump( new VendorSearchResultsGump( m_Items, m_Criteria, m_Page ) );
            }
        }