public StallLeasingGump(Mobile from, MaginciaBazaarPlot plot) { m_Plot = plot; AddHtmlLocalized(195, 5, 150, 18, 1150385, RedColor16, false, false); // New Magincia Bazaar AddHtmlLocalized(217, 40, 150, 18, 1150386, RedColor16, false, false); // Stall Leasing AddButton(225, 90, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(265, 90, 150, 18, 1150392, OrangeColor16, false, false); // INFORMATION AddHtmlLocalized(192, 135, 150, 18, 1150534, RedColor16, false, false); // This Stall: AddHtmlLocalized(265, 135, 150, 18, 1150530, m_Plot.PlotDef.ID, BlueColor16, false, false); // Stall ~1_NAME AddHtmlLocalized(158, 160, 150, 18, 1150536, RedColor16, false, false); // Current Tenant: if(m_Plot.Owner == null) AddHtmlLocalized(265, 160, 150, 18, 1150542, BlueColor16, false, false); // Stall is Not Occupied else if(from == m_Plot.Owner) AddHtmlLocalized(265, 160, 200, 18, 1150539, BlueColor16, false, false); // You are leasing this stall else AddHtmlLocalized(265, 160, 150, 18, 1150541, m_Plot.Owner.Name, BlueColor16, false, false); // ~1_TOKEN~ AddHtmlLocalized(184, 189, 150, 18, 1150332, RedColor16, false, false); // Shop Name: if(m_Plot.ShopName != null && m_Plot.ShopName.Length > 0) AddHtmlLocalized(265, 185, 200, 18, 1150312, m_Plot.ShopName, BlueColor16, false, false); // "~1_NAME~" else AddHtmlLocalized(265, 185, 200, 18, 1150314, BlueColor16, false, false); // This Shop Has No Name AddHtmlLocalized(160, 210, 150, 18, 1150388, RedColor16, false, false); // Lease Duration: AddHtmlLocalized(265, 210, 150, 18, 1150543, ((int)MaginciaBazaar.GetLongAuctionTime.TotalDays).ToString(), BlueColor16, false, false); // ~1_DAYS~ Days AddButton(225, 250, 4005, 4007, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(265, 250, 200, 18, 1150555, OrangeColor16, false, false); // SEE TOP BIDS bool isOwner = m_Plot.IsOwner(from); AddButton(225, 274, 4005, 4007, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(265, 274, 200, 18, 1150557, isOwner ? OrangeColor16 : GrayColor16, false, false); // MY STALL LEASE AddButton(225, 298, 4005, 4007, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(265, 298, 200, 18, 1150556, OrangeColor16, false, false); // MY STALL BID AddButton(225, 322, 4005, 4007, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(265, 322, 200, 18, 1150540, isOwner ? OrangeColor16 : GrayColor16, false, false); // MY BID MATCHING }
public StallBidGump(Mobile from, MaginciaBazaarPlot plot) { m_Plot = plot; MaginciaBazaarPlot biddingPlot = MaginciaBazaar.GetBiddingPlot(from); int bidAmount = biddingPlot != null ? biddingPlot.GetBid(from) : MaginciaBazaar.GetNextAvailableBid(from); AddHtmlLocalized(195, 5, 150, 18, 1150385, RedColor16, false, false); // New Magincia Bazaar AddHtmlLocalized(217, 40, 150, 18, 1150386, RedColor16, false, false); // Stall Leasing AddHtmlLocalized(86, 135, 200, 18, 1150389, RedColor16, false, false); // You are bidding on: if(biddingPlot != null) AddHtmlLocalized(215, 135, 100, 18, 1150541, biddingPlot.PlotDef.ID, BlueColor16, false, false); // ~1_TOKEN~ else if(MaginciaBazaar.IsBiddingNextAvailable(from)) AddHtmlLocalized(215, 135, 100, 18, 1150538, BlueColor16, false, false); // Next Available Stall else AddHtmlLocalized(215, 135, 100, 18, 1150396, BlueColor16, false, false); // NONE AddHtmlLocalized(135, 160, 150, 18, 1150407, RedColor16, false, false); // Bid Amount: AddHtml(215, 160, 100, 18, Color(FormatAmt(bidAmount), BlueColor), false, false); AddButton(260, 220, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(300, 220, 150, 18, 1150566, OrangeColor16, false, false); // INSTRUCTIONS AddHtmlLocalized(125, 265, 200, 18, 1150560, RedColor16, false, false); // BID AMOUNT AddBackground(215, 265, 295, 22, 9350); AddTextEntry(216, 267, 295, 20, 0, 0, ""); bool isOwner = m_Plot.IsOwner(from); AddHtmlLocalized(215, 304, 250, 18, 1150568, m_Plot.PlotDef.ID, isOwner ? GrayColor16 : BlueColor16, false, false); // BID ON THIS STALL (Stall ~1_STALLID~) if(!isOwner) AddButton(175, 304, 4005, 4007, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(215, 328, 250, 18, 1150569, BlueColor16, false, false); // BID ON FIRST AVAILABLE AddButton(175, 328, 4005, 4007, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(10, 360, 500, 40, 1150792, RedColor16, false, false); // Minimum bid 1,000gp. Bids are rounded down to nearest 1,000gp (1,999gp becomes 1,000gp). AddButton(10, 490, 4014, 4016, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(50, 490, 200, 18, 1149777, BlueColor16, false, false); // MAIN MENU }