예제 #1
0
        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
        }
예제 #2
0
파일: ShopMap.cs 프로젝트: dpisanu/xrunuo
 public ReturnFromVendorSpell(Mobile caster, ShopMap map)
     : base(caster, map)
 {
 }
예제 #3
0
파일: ShopMap.cs 프로젝트: dpisanu/xrunuo
 public VendorTeleportSpell(Mobile caster, ShopMap shopMap)
     : base(caster, shopMap)
 {
 }
예제 #4
0
파일: ShopMap.cs 프로젝트: dpisanu/xrunuo
 public BaseVendorTeleportSpell(Mobile caster, ShopMap map)
     : base(caster, null)
 {
     m_Map = map;
 }
예제 #5
0
파일: ShopMap.cs 프로젝트: dpisanu/xrunuo
 public TeleportEntry(Mobile mobile, ShopMap map)
     : base(map.Used ? 1154636 : 1154558, 1)
 {
     m_Mobile = mobile;
     m_Map    = map;
 }
예제 #6
0
파일: ShopMap.cs 프로젝트: dpisanu/xrunuo
 public OpenMapEntry(Mobile mobile, ShopMap map)
     : base(6150, 1)                   // Open Map
 {
     m_Mobile = mobile;
     m_Map    = map;
 }
예제 #7
0
파일: ShopMap.cs 프로젝트: Crome696/ServUO
 public ReturnFromVendorSpell(Mobile caster, ShopMap map)
     : base(caster, map)
 {
 }
예제 #8
0
파일: ShopMap.cs 프로젝트: Crome696/ServUO
 public VendorTeleportSpell(Mobile caster, ShopMap shopMap)
     : base(caster, shopMap)
 {
 }
예제 #9
0
파일: ShopMap.cs 프로젝트: Crome696/ServUO
 protected BaseVendorTeleportSpell(Mobile caster, ShopMap map) : base(caster, null)
 {
     m_Map = map;
 }
예제 #10
0
파일: ShopMap.cs 프로젝트: Crome696/ServUO
 public TeleportEntry(Mobile mobile, ShopMap map)
     : base(map.Used ? 1154636 : 1154558, 1)
 {
     m_Mobile = mobile;
     m_Map = map;
 }
예제 #11
0
파일: ShopMap.cs 프로젝트: Crome696/ServUO
 public OpenMapEntry(Mobile mobile, ShopMap map)
     : base(6150, 1) // Open Map
 {
     m_Mobile = mobile;
     m_Map = map;
 }
예제 #12
0
        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 ) );
            }
        }