public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int page, int price ) : base(100, 200) { m_From = from; m_Book = book; m_Object = obj; m_Price = price; m_Page = page; AddPage( 0 ); AddBackground( 100, 10, 300, 150, 5054 ); AddHtmlLocalized( 125, 20, 250, 24, 1019070, false, false ); // You have agreed to purchase: AddHtmlLocalized( 125, 45, 250, 24, 1045151, false, false ); // a bulk order deed AddHtmlLocalized( 125, 70, 250, 24, 1019071, false, false ); // for the amount of: AddLabel( 125, 95, 0, price.ToString() ); AddButton( 250, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 282, 130, 100, 24, 1011012, false, false ); // CANCEL AddButton( 120, 130, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 152, 130, 100, 24, 1011036, false, false ); // OKAY }
public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int page, int price ) : base(100, 200) { m_From = from; m_Book = book; m_Object = obj; m_Price = price; m_Page = page; AddPage( 0 ); AddBackground(100, 10, 300, 150, 9270); AddHtml(125, 20, 250, 24, "Voce está comprando este item", false, false); // You have agreed to purchase: AddHtml(125, 45, 250, 24, "Odem de Compra", false, false); // a bulk order deed AddHtml(125, 70, 250, 24, "pela quantia de:", false, false); // for the amount of: AddLabel( 125, 95, 0, price.ToString() ); AddButton( 250, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtml(282, 130, 100, 24, "Cancelar", false, false); // CANCEL AddButton( 120, 130, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtml(152, 130, 100, 24, "Confirmar", false, false); // OKAY }
public BOBFilterGump( PlayerMobile from, BulkOrderBook book ) : base(12, 24) { from.CloseGump( typeof( BOBGump ) ); from.CloseGump( typeof( BOBFilterGump ) ); m_From = from; m_Book = book; BOBFilter f = ( from.UseOwnFilter ? from.BOBFilter : book.Filter ); AddPage( 0 ); AddBackground( 10, 10, 600, 439, 5054 ); AddImageTiled( 18, 20, 583, 420, 2624 ); AddAlphaRegion( 18, 20, 583, 420 ); AddImage( 5, 5, 10460 ); AddImage( 585, 5, 10460 ); AddImage( 5, 424, 10460 ); AddImage( 585, 424, 10460 ); AddHtmlLocalized( 270, 32, 200, 32, 1062223, LabelColor, false, false ); // Filter Preference AddHtmlLocalized( 26, 64, 120, 32, 1062228, LabelColor, false, false ); // Bulk Order Type AddFilterList( 25, 96, m_XOffsets_Type, 40, m_TypeFilters, m_XWidths_Small, f.Type, 0 ); AddHtmlLocalized( 320, 64, 50, 32, 1062215, LabelColor, false, false ); // Quality AddFilterList( 320, 96, m_XOffsets_Quality, 40, m_QualityFilters, m_XWidths_Small, f.Quality, 1 ); AddHtmlLocalized( 26, 160, 120, 32, 1062232, LabelColor, false, false ); // Material Type AddFilterList( 25, 192, m_XOffsets_Material, 40, m_MaterialFilters, m_XWidths_Large, f.Material, 2 ); // *** Changed the Y cord *** AddHtmlLocalized(26, 340, 120, 32, 1062217, LabelColor, false, false); // Amount AddFilterList(25, 372, m_XOffsets_Amount, 40, m_AmountFilters, m_XWidths_Small, f.Quantity, 3); // *** *** AddHtmlLocalized( 75, 416, 120, 32, 1062477, ( from.UseOwnFilter ? LabelColor : 16927 ), false, false ); // Set Book Filter AddButton( 40, 416, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 235, 416, 120, 32, 1062478, ( from.UseOwnFilter ? 16927 : LabelColor ), false, false ); // Set Your Filter AddButton( 200, 416, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 405, 416, 120, 32, 1062231, LabelColor, false, false ); // Clear Filter AddButton( 370, 416, 4005, 4007, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 540, 416, 50, 32, 1011046, LabelColor, false, false ); // APPLY AddButton( 505, 416, 4017, 4018, 0, GumpButtonType.Reply, 0 ); }
public NameBookPrompt( BulkOrderBook book ) { m_Book = book; }
public NameBookEntry( Mobile from, BulkOrderBook book ) : base( 6216 ) { m_From = from; m_Book = book; }
public BOBGump( PlayerMobile from, BulkOrderBook book, int page, ArrayList list ) : base( 12, 24 ) { from.CloseGump( typeof( BOBGump ) ); from.CloseGump( typeof( BOBFilterGump ) ); m_From = from; m_Book = book; m_Page = page; if ( list == null ) { list = new ArrayList( book.Entries.Count ); for ( int i = 0; i < book.Entries.Count; ++i ) { object obj = book.Entries[i]; if ( CheckFilter( obj ) ) list.Add( obj ); } } m_List = list; int index = GetIndexForPage( page ); int count = GetCountForIndex( index ); int tableIndex = 0; PlayerVendor pv = book.RootParent as PlayerVendor; bool canDrop = book.IsChildOf( from.Backpack ); bool canBuy = ( pv != null ); bool canPrice = ( canDrop || canBuy ); if ( canBuy ) { VendorItem vi = pv.GetVendorItem( book ); canBuy = ( vi != null && !vi.IsForSale ); } int width = 600; if ( !canPrice ) width = 516; X = (624 - width) / 2; AddPage( 0 ); AddBackground( 10, 10, width, 439, 5054 ); AddImageTiled( 18, 20, width - 17, 420, 2624 ); if ( canPrice ) { AddImageTiled( 573, 64, 24, 352, 200 ); AddImageTiled( 493, 64, 78, 352, 1416 ); } if ( canDrop ) AddImageTiled( 24, 64, 32, 352, 1416 ); AddImageTiled( 58, 64, 36, 352, 200 ); AddImageTiled( 96, 64, 133, 352, 1416 ); AddImageTiled( 231, 64, 80, 352, 200 ); AddImageTiled( 313, 64, 100, 352, 1416 ); AddImageTiled( 415, 64, 76, 352, 200 ); for ( int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i ) { object obj = list[i]; if ( !CheckFilter( obj ) ) continue; AddImageTiled( 24, 94 + (tableIndex * 32), canPrice ? 573 : 489, 2, 2624 ); if ( obj is BOBLargeEntry ) tableIndex += ((BOBLargeEntry)obj).Entries.Length; else if ( obj is BOBSmallEntry ) ++tableIndex; } AddAlphaRegion( 18, 20, width - 17, 420 ); AddImage( 5, 5, 10460 ); AddImage( width - 15, 5, 10460 ); AddImage( 5, 424, 10460 ); AddImage( width - 15, 424, 10460 ); AddHtmlLocalized( canPrice ? 266 : 224, 32, 200, 32, 1062220, LabelColor, false, false ); // Bulk Order Book AddHtmlLocalized( 63, 64, 200, 32, 1062213, LabelColor, false, false ); // Type AddHtmlLocalized( 147, 64, 200, 32, 1062214, LabelColor, false, false ); // Item AddHtmlLocalized( 246, 64, 200, 32, 1062215, LabelColor, false, false ); // Quality AddHtmlLocalized( 336, 64, 200, 32, 1062216, LabelColor, false, false ); // Material AddHtmlLocalized( 429, 64, 200, 32, 1062217, LabelColor, false, false ); // Amount AddButton( 35, 32, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 70, 32, 200, 32, 1062476, LabelColor, false, false ); // Set Filter BOBFilter f = ( from.UseOwnFilter ? from.BOBFilter : book.Filter ); if ( f.IsDefault ) AddHtmlLocalized( canPrice ? 470 : 386, 32, 120, 32, 1062475, 16927, false, false ); // Using No Filter else if ( from.UseOwnFilter ) AddHtmlLocalized( canPrice ? 470 : 386, 32, 120, 32, 1062451, 16927, false, false ); // Using Your Filter else AddHtmlLocalized( canPrice ? 470 : 386, 32, 120, 32, 1062230, 16927, false, false ); // Using Book Filter AddButton( 375, 416, 4017, 4018, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 410, 416, 120, 20, 1011441, LabelColor, false, false ); // EXIT if ( canDrop ) AddHtmlLocalized( 26, 64, 50, 32, 1062212, LabelColor, false, false ); // Drop if ( canPrice ) { AddHtmlLocalized( 516, 64, 200, 32, 1062218, LabelColor, false, false ); // Price if ( canBuy ) { AddHtmlLocalized( 576, 64, 200, 32, 1062219, LabelColor, false, false ); // Buy } else { AddHtmlLocalized( 576, 64, 200, 32, 1062227, LabelColor, false, false ); // Set AddButton( 450, 416, 4005, 4007, 4, GumpButtonType.Reply, 0 ); AddHtml( 485, 416, 120, 20, "<BASEFONT COLOR=#FFFFFF>Price all</FONT>", false, false ); } } tableIndex = 0; if ( page > 0 ) { AddButton( 75, 416, 4014, 4016, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 110, 416, 150, 20, 1011067, LabelColor, false, false ); // Previous page } if ( GetIndexForPage( page + 1 ) < list.Count ) { AddButton( 225, 416, 4005, 4007, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 260, 416, 150, 20, 1011066, LabelColor, false, false ); // Next page } for ( int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i ) { object obj = list[i]; if ( !CheckFilter( obj ) ) continue; if ( obj is BOBLargeEntry ) { BOBLargeEntry e = (BOBLargeEntry)obj; int y = 96 + (tableIndex * 32); if ( canDrop ) AddButton( 35, y + 2, 5602, 5606, 5 + (i * 2), GumpButtonType.Reply, 0 ); if ( canDrop || (canBuy && e.Price > 0) ) { AddButton( 579, y + 2, 2117, 2118, 6 + (i * 2), GumpButtonType.Reply, 0 ); AddLabel( 495, y, 1152, e.Price.ToString() ); } AddHtmlLocalized( 61, y, 50, 32, 1062225, LabelColor, false, false ); // Large for ( int j = 0; j < e.Entries.Length; ++j ) { BOBLargeSubEntry sub = e.Entries[j]; AddHtmlLocalized( 103, y, 130, 32, sub.Number, LabelColor, false, false ); if ( e.RequireExceptional ) AddHtmlLocalized( 235, y, 80, 20, 1060636, LabelColor, false, false ); // exceptional else AddHtmlLocalized( 235, y, 80, 20, 1011542, LabelColor, false, false ); // normal object name = GetMaterialName( e.Material, e.DeedType, sub.ItemType ); if ( name is int ) AddHtmlLocalized( 316, y, 100, 20, (int)name, LabelColor, false, false ); else if ( name is string ) AddLabel( 316, y, 1152, (string)name ); AddLabel( 421, y, 1152, String.Format( "{0} / {1}", sub.AmountCur, e.AmountMax ) ); ++tableIndex; y += 32; } } else if ( obj is BOBSmallEntry ) { BOBSmallEntry e = (BOBSmallEntry)obj; int y = 96 + (tableIndex++ * 32); if ( canDrop ) AddButton( 35, y + 2, 5602, 5606, 5 + (i * 2), GumpButtonType.Reply, 0 ); if ( canDrop || (canBuy && e.Price > 0) ) { AddButton( 579, y + 2, 2117, 2118, 6 + (i * 2), GumpButtonType.Reply, 0 ); AddLabel( 495, y, 1152, e.Price.ToString() ); } AddHtmlLocalized( 61, y, 50, 32, 1062224, LabelColor, false, false ); // Small AddHtmlLocalized( 103, y, 130, 32, e.Number, LabelColor, false, false ); if ( e.RequireExceptional ) AddHtmlLocalized( 235, y, 80, 20, 1060636, LabelColor, false, false ); // exceptional else AddHtmlLocalized( 235, y, 80, 20, 1011542, LabelColor, false, false ); // normal object name = GetMaterialName( e.Material, e.DeedType, e.ItemType ); if ( name is int ) AddHtmlLocalized( 316, y, 100, 20, (int)name, LabelColor, false, false ); else if ( name is string ) AddLabel( 316, y, 1152, (string)name ); AddLabel( 421, y, 1152, String.Format( "{0} / {1}", e.AmountCur, e.AmountMax ) ); } } }
public SetPricePrompt( BulkOrderBook book, object obj, int page, ArrayList list ) { m_Book = book; m_Object = obj; m_Page = page; m_List = list; }
public BOBGump( PlayerMobile from, BulkOrderBook book ) : this( from, book, 0, null ) { }
public BOBGump(PlayerMobile from, BulkOrderBook book, int page, ArrayList list) : base(12, 24) { from.CloseGump <BOBGump>(); from.CloseGump <BOBFilterGump>(); m_From = from; m_Book = book; m_Page = page; if (list == null) { list = new ArrayList(book.Entries.Count); for (int i = 0; i < book.Entries.Count; ++i) { object obj = book.Entries[i]; if (CheckFilter(obj)) { list.Add(obj); } } } m_List = list; int index = GetIndexForPage(page); int count = GetCountForIndex(index); int tableIndex = 0; PlayerVendor pv = book.RootParent as PlayerVendor; bool canDrop = book.IsChildOf(from.Backpack); bool canBuy = (pv != null); bool canPrice = (canDrop || canBuy); if (canBuy) { VendorItem vi = pv.GetVendorItem(book); canBuy = (vi != null && !vi.IsForSale); } int width = 600; if (!canPrice) { width = 516; } X = (624 - width) / 2; AddPage(0); AddBackground(10, 10, width, 439, 5054); AddImageTiled(18, 20, width - 17, 420, 2624); if (canPrice) { AddImageTiled(573, 64, 24, 352, 200); AddImageTiled(493, 64, 78, 352, 1416); } if (canDrop) { AddImageTiled(24, 64, 32, 352, 1416); } AddImageTiled(58, 64, 36, 352, 200); AddImageTiled(96, 64, 133, 352, 1416); AddImageTiled(231, 64, 80, 352, 200); AddImageTiled(313, 64, 100, 352, 1416); AddImageTiled(415, 64, 76, 352, 200); for (int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i) { object obj = list[i]; if (!CheckFilter(obj)) { continue; } AddImageTiled(24, 94 + (tableIndex * 32), canPrice ? 573 : 489, 2, 2624); if (obj is BOBLargeEntry) { tableIndex += ((BOBLargeEntry)obj).Entries.Length; } else if (obj is BOBSmallEntry) { ++tableIndex; } } AddAlphaRegion(18, 20, width - 17, 420); AddImage(5, 5, 10460); AddImage(width - 15, 5, 10460); AddImage(5, 424, 10460); AddImage(width - 15, 424, 10460); AddHtmlLocalized(canPrice ? 266 : 224, 32, 200, 32, 1062220, LabelColor, false, false); // Bulk Order Book AddHtmlLocalized(63, 64, 200, 32, 1062213, LabelColor, false, false); // Type AddHtmlLocalized(147, 64, 200, 32, 1062214, LabelColor, false, false); // Item AddHtmlLocalized(246, 64, 200, 32, 1062215, LabelColor, false, false); // Quality AddHtmlLocalized(336, 64, 200, 32, 1062216, LabelColor, false, false); // Material AddHtmlLocalized(429, 64, 200, 32, 1062217, LabelColor, false, false); // Amount AddHtmlLocalized(70, 32, 200, 32, 1062476, LabelColor, false, false); // Set Filter BOBFilter f = (from.UseOwnFilter ? from.BOBFilter : book.Filter); if (f.IsDefault) { // Using No Filter AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062475, 16927, false, false); } else if (from.UseOwnFilter) { // Using Your Filter AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062451, 16927, false, false); } else { // Using Book Filter AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062230, 16927, false, false); } AddButton(35, 32, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(410, 416, 120, 20, 1011441, LabelColor, false, false); // EXIT AddButton(375, 416, 4017, 4018, 0, GumpButtonType.Reply, 0); if (canDrop) { // Drop AddHtmlLocalized(26, 64, 50, 32, 1062212, LabelColor, false, false); } if (canPrice) { AddHtmlLocalized(516, 64, 200, 32, 1062218, LabelColor, false, false); // Price if (canBuy) { // Buy AddHtmlLocalized(576, 64, 200, 32, 1062219, LabelColor, false, false); } else { // Set AddHtmlLocalized(576, 64, 200, 32, 1062227, LabelColor, false, false); } } tableIndex = 0; for (int i = index; i < (index + count) && i >= 0 && i < list.Count; ++i) { object obj = list[i]; if (!CheckFilter(obj)) { continue; } if (obj is BOBLargeEntry) { BOBLargeEntry e = (BOBLargeEntry)obj; int y = 96 + (tableIndex * 32); if (canDrop) { AddButton(35, y + 2, 5602, 5606, 4 + (i * 2), GumpButtonType.Reply, 0); } if (canDrop || (canBuy && e.Price > 0)) { AddButton(579, y + 2, 2117, 2118, 5 + (i * 2), GumpButtonType.Reply, 0); AddLabel(495, y, 1152, e.Price.ToString()); } AddHtmlLocalized(61, y, 50, 32, 1062225, LabelColor, false, false); // Large for (int j = 0; j < e.Entries.Length; ++j) { BOBLargeSubEntry sub = e.Entries[j]; AddHtmlLocalized(103, y, 130, 32, sub.Number, LabelColor, false, false); if (e.RequireExceptional) { // exceptional AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor, false, false); } else { // normal AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor, false, false); } object name = GetMaterialName(e.Material, e.DeedType, sub.ItemType); if (name is int) { AddHtmlLocalized(316, y, 100, 20, (int)name, LabelColor, false, false); } else if (name is string) { AddLabel(316, y, 1152, (string)name); } AddLabel(421, y, 1152, String.Format("{0} / {1}", sub.AmountCur, e.AmountMax)); ++tableIndex; y += 32; } } else if (obj is BOBSmallEntry) { BOBSmallEntry e = (BOBSmallEntry)obj; int y = 96 + (tableIndex++ *32); if (canDrop) { AddButton(35, y + 2, 5602, 5606, 4 + (i * 2), GumpButtonType.Reply, 0); } if (canDrop || (canBuy && e.Price > 0)) { AddButton(579, y + 2, 2117, 2118, 5 + (i * 2), GumpButtonType.Reply, 0); AddLabel(495, y, 1152, e.Price.ToString()); } AddHtmlLocalized(61, y, 50, 32, 1062224, LabelColor, false, false); // Small AddHtmlLocalized(103, y, 130, 32, e.Number, LabelColor, false, false); if (e.RequireExceptional) { // exceptional AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor, false, false); } else { // normal AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor, false, false); } object name = GetMaterialName(e.Material, e.DeedType, e.ItemType); if (name is int) { AddHtmlLocalized(316, y, 100, 20, (int)name, LabelColor, false, false); } else if (name is string) { AddLabel(316, y, 1152, (string)name); } AddLabel(421, y, 1152, String.Format("{0} / {1}", e.AmountCur, e.AmountMax)); } } if (GetIndexForPage(page + 1) < list.Count) { AddHtmlLocalized(260, 416, 150, 20, 1011066, LabelColor, false, false); // Next page AddButton(225, 416, 4005, 4007, 3, GumpButtonType.Reply, 0); } if (page > 0) { AddHtmlLocalized(110, 416, 150, 20, 1011067, LabelColor, false, false); // Previous page AddButton(75, 416, 4014, 4016, 2, GumpButtonType.Reply, 0); } }
public BOBGump(PlayerMobile from, BulkOrderBook book) : this(from, book, 0, null) { }
public NameBookPrompt(BulkOrderBook book) { m_Book = book; }
public NameBookEntry(Mobile from, BulkOrderBook book) : base(6216) { m_From = from; m_Book = book; }
public BOBGump(PlayerMobile from, BulkOrderBook book, int page = 0, List <IBOBEntry> list = null) : base(12, 24) { from.CloseGump <BOBGump>(); from.CloseGump <BOBFilterGump>(); m_From = from; m_Book = book; m_Page = page; if (list == null) { list = new List <IBOBEntry>(book.Entries.Count); for (var i = 0; i < book.Entries.Count; ++i) { var entry = book.Entries[i]; if (CheckFilter(entry)) { list.Add(entry); } } } m_List = list; var index = GetIndexForPage(page); var count = GetCountForIndex(index); var tableIndex = 0; var pv = book.RootParent as PlayerVendor; var canDrop = book.IsChildOf(from.Backpack); var canBuy = pv != null; var canPrice = canDrop || canBuy; if (canBuy) { var vi = pv.GetVendorItem(book); canBuy = vi?.IsForSale == false; } var width = 600; if (!canPrice) { width = 516; } X = (624 - width) / 2; AddPage(0); AddBackground(10, 10, width, 439, 5054); AddImageTiled(18, 20, width - 17, 420, 2624); if (canPrice) { AddImageTiled(573, 64, 24, 352, 200); AddImageTiled(493, 64, 78, 352, 1416); } if (canDrop) { AddImageTiled(24, 64, 32, 352, 1416); } AddImageTiled(58, 64, 36, 352, 200); AddImageTiled(96, 64, 133, 352, 1416); AddImageTiled(231, 64, 80, 352, 200); AddImageTiled(313, 64, 100, 352, 1416); AddImageTiled(415, 64, 76, 352, 200); for (var i = index; i < index + count && i >= 0 && i < list.Count; ++i) { var entry = list[i]; if (!CheckFilter(entry)) { continue; } AddImageTiled(24, 94 + tableIndex * 32, canPrice ? 573 : 489, 2, 2624); tableIndex += entry is BOBLargeEntry largeEntry ? largeEntry.Entries.Length : 1; } AddAlphaRegion(18, 20, width - 17, 420); AddImage(5, 5, 10460); AddImage(width - 15, 5, 10460); AddImage(5, 424, 10460); AddImage(width - 15, 424, 10460); AddHtmlLocalized(canPrice ? 266 : 224, 32, 200, 32, 1062220, LabelColor); // Bulk Order Book AddHtmlLocalized(63, 64, 200, 32, 1062213, LabelColor); // Type AddHtmlLocalized(147, 64, 200, 32, 1062214, LabelColor); // Item AddHtmlLocalized(246, 64, 200, 32, 1062215, LabelColor); // Quality AddHtmlLocalized(336, 64, 200, 32, 1062216, LabelColor); // Material AddHtmlLocalized(429, 64, 200, 32, 1062217, LabelColor); // Amount AddButton(35, 32, 4005, 4007, 1); AddHtmlLocalized(70, 32, 200, 32, 1062476, LabelColor); // Set Filter var f = from.UseOwnFilter ? from.BOBFilter : book.Filter; if (f.IsDefault) { AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062475, 16927); // Using No Filter } else if (from.UseOwnFilter) { AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062451, 16927); // Using Your Filter } else { AddHtmlLocalized(canPrice ? 470 : 386, 32, 120, 32, 1062230, 16927); // Using Book Filter } AddButton(375, 416, 4017, 4018, 0); AddHtmlLocalized(410, 416, 120, 20, 1011441, LabelColor); // EXIT if (canDrop) { AddHtmlLocalized(26, 64, 50, 32, 1062212, LabelColor); // Drop } if (canPrice) { AddHtmlLocalized(516, 64, 200, 32, 1062218, LabelColor); // Price if (canBuy) { AddHtmlLocalized(576, 64, 200, 32, 1062219, LabelColor); // Buy } else { AddHtmlLocalized(576, 64, 200, 32, 1062227, LabelColor); // Set AddButton(450, 416, 4005, 4007, 4); AddHtml(485, 416, 120, 20, "<BASEFONT COLOR=#FFFFFF>Price all</FONT>"); } } tableIndex = 0; if (page > 0) { AddButton(75, 416, 4014, 4016, 2); AddHtmlLocalized(110, 416, 150, 20, 1011067, LabelColor); // Previous page } if (GetIndexForPage(page + 1) < list.Count) { AddButton(225, 416, 4005, 4007, 3); AddHtmlLocalized(260, 416, 150, 20, 1011066, LabelColor); // Next page } for (var i = index; i < index + count && i >= 0 && i < list.Count; ++i) { var entry = list[i]; if (!CheckFilter(entry)) { continue; } if (entry is BOBLargeEntry largeEntry) { var y = 96 + tableIndex * 32; if (canDrop) { AddButton(35, y + 2, 5602, 5606, 5 + i * 2); } if (canDrop || canBuy && entry.Price > 0) { AddButton(579, y + 2, 2117, 2118, 6 + i * 2); AddLabel(495, y, 1152, entry.Price.ToString()); } AddHtmlLocalized(61, y, 50, 32, 1062225, LabelColor); // Large for (var j = 0; j < largeEntry.Entries.Length; ++j) { var sub = largeEntry.Entries[j]; AddHtmlLocalized(103, y, 130, 32, sub.Number, LabelColor); if (entry.RequireExceptional) { AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor); // exceptional } else { AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor); // normal } var name = GetMaterialName(entry.Material, entry.DeedType, sub.ItemType); if (name.Number > 0) { AddHtmlLocalized(316, y, 100, 20, name, LabelColor); } else { AddLabel(316, y, 1152, name); } AddLabel(421, y, 1152, $"{sub.AmountCur} / {entry.AmountMax}"); ++tableIndex; y += 32; } } else { var smallEntry = (BOBSmallEntry)entry; var y = 96 + tableIndex++ *32; if (canDrop) { AddButton(35, y + 2, 5602, 5606, 5 + i * 2); } if (canDrop || canBuy && smallEntry.Price > 0) { AddButton(579, y + 2, 2117, 2118, 6 + i * 2); AddLabel(495, y, 1152, smallEntry.Price.ToString()); } AddHtmlLocalized(61, y, 50, 32, 1062224, LabelColor); // Small AddHtmlLocalized(103, y, 130, 32, smallEntry.Number, LabelColor); if (smallEntry.RequireExceptional) { AddHtmlLocalized(235, y, 80, 20, 1060636, LabelColor); // exceptional } else { AddHtmlLocalized(235, y, 80, 20, 1011542, LabelColor); // normal } var name = GetMaterialName(smallEntry.Material, smallEntry.DeedType, smallEntry.ItemType); if (name.Number > 0) { AddHtmlLocalized(316, y, 100, 20, name, LabelColor); } else { AddLabel(316, y, 1152, name); } AddLabel(421, y, 1152, $"{smallEntry.AmountCur} / {smallEntry.AmountMax}"); } } }
public OWLTRBobFilterGump(PlayerMobile from, BulkOrderBook book) : base(12, 24) { from.CloseGump( typeof( BOBGump ) ); from.CloseGump( typeof( BOBFilterGump ) ); m_From = from; m_Book = book; BOBFilter f = ( from.UseOwnFilter ? from.BOBFilter : book.Filter ); AddPage( 0 ); //daat99 OWLTR start - bigger gump AddBackground( 10, 10, 630, 439, 5054 ); AddImageTiled( 18, 20, 613, 420, 2624 ); AddAlphaRegion( 18, 20, 613, 420 ); AddImage( 5, 5, 10460 ); AddImage( 615, 5, 10460 ); AddImage( 5, 424, 10460 ); AddImage( 615, 424, 10460 ); AddHtmlLocalized( 270, 20, 200, 32, 1062223, LabelColor, false, false ); // Filter Preference AddHtmlLocalized( 26, 35, 120, 32, 1062228, LabelColor, false, false ); // Bulk Order Type AddFilterList( 25, 61, m_XOffsets_Type, 40, m_TypeFilters, m_XWidths_Small, f.Type, 0 ); AddHtmlLocalized( 320, 35, 50, 32, 1062215, LabelColor, false, false ); // Quality AddFilterList( 320, 61, m_XOffsets_Quality, 40, m_QualityFilters, m_XWidths_Small, f.Quality, 1 ); if (f.Material > (int) BulkMaterialType.Barbed) { AddHtmlLocalized(26, 100, 120, 32, 1062232, LabelColor, false, false); // Material Type AddFilterList(25, 132, m_XOffsets_Material, 40, m_MaterialFilters, m_XWidths_Large, f.Material, 2); } else { AddHtmlLocalized(26, 100, 120, 32, 1062232, LabelColor, false, false); // Material Type AddFilterList(25, 132, m_XOffsets_Material, 40, m_OwltrMaterialFilters, m_XWidths_Large, GetFilterValue(f.Material), 2); } AddHtmlLocalized( 26, 350, 120, 32, 1062217, LabelColor, false, false ); // Amount AddFilterList( 25, 372, m_XOffsets_Amount, 40, m_AmountFilters, m_XWidths_Small, f.Quantity, 3 ); //daat99 OWLTR end - bigger gump AddHtmlLocalized( 75, 416, 120, 32, 1062477, ( from.UseOwnFilter ? LabelColor : 16927 ), false, false ); // Set Book Filter AddButton( 40, 416, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 235, 416, 120, 32, 1062478, ( from.UseOwnFilter ? 16927 : LabelColor ), false, false ); // Set Your Filter AddButton( 200, 416, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 405, 416, 120, 32, 1062231, LabelColor, false, false ); // Clear Filter AddButton( 370, 416, 4005, 4007, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 540, 416, 50, 32, 1011046, LabelColor, false, false ); // APPLY AddButton( 505, 416, 4017, 4018, 0, GumpButtonType.Reply, 0 ); }