public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (ValidLocation()) { list.Add(1060658, "location\t{0}", HouseRaffleStone.FormatLocation(m_PlotLocation, m_Facet, false)); // ~1_val~: ~2_val~ list.Add(1060659, "facet\t{0}", m_Facet); // ~1_val~: ~2_val~ } //list.Add( 1060660, "shard\t{0}", ServerList.ServerName ); // ~1_val~: ~2_val~ }
private static string FormatDescription(HouseRaffleDeed deed) { if (deed == null) { return(String.Empty); } if (deed.IsExpired) { return(String.Format( "<bodytextblack>" + "This deed once entitled the bearer to build a house on the plot of land " + "located at {0} on the {1} facet.<br><br>" + "The deed has expired, and now the indicated plot of land " + "is subject to normal house construction rules.<br><br>" + "This deed functions as a recall rune marked for the location of the plot it represents." + "</bodytextblack>", HouseRaffleStone.FormatLocation(deed.PlotLocation, deed.PlotFacet, false), deed.PlotFacet )); } else { int daysLeft = (int)Math.Ceiling((deed.Stone.Started + deed.Stone.Duration + HouseRaffleStone.ExpirationTime - DateTime.Now).TotalDays); return(String.Format( "<bodytextblack>" + "This deed entitles the bearer to build a house on the plot of land " + "located at {0} on the {1} facet.<br><br>" + "The deed will expire after {2} more day{3} have passed, and at that time the right to place " + "a house reverts to normal house construction rules.<br><br>" + "This deed functions as a recall rune marked for the location of the plot it represents.<br><br>" + "To place a house on the deeded plot, you must simply have this deed in your backpack " + "or bank box when using a House Placement Tool there." + "</bodytextblack>", HouseRaffleStone.FormatLocation(deed.PlotLocation, deed.PlotFacet, false), deed.PlotFacet, daysLeft, (daysLeft == 1) ? "" : "s" )); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (this.ValidLocation()) { list.Add(1060658, "location\t{0}", HouseRaffleStone.FormatLocation(this.m_PlotLocation, this.m_Facet, false)); // ~1_val~: ~2_val~ list.Add(1060659, "facet\t{0}", this.m_Facet); // ~1_val~: ~2_val~ list.Add(1150486); // [Marked Item] } if (this.IsExpired) { list.Add(1150487); // [Expired] } //list.Add( 1060660, "shard\t{0}", ServerList.ServerName ); // ~1_val~: ~2_val~ }
public HouseRaffleManagementGump( HouseRaffleStone stone, int page ) : base( 40, 40 ) { m_Stone = stone; m_Page = page; AddPage( 0 ); AddBackground( 0, 0, 618, 354, 9270 ); AddAlphaRegion( 10, 10, 598, 334 ); AddHtml( 10, 10, 598, 20, Color( Center( "Raffle Management" ), LabelColor ), false, false ); AddHtml( 45, 35, 100, 20, Color( "Location:", LabelColor ), false, false ); AddHtml( 145, 35, 250, 20, Color( m_Stone.FormatLocation(), LabelColor ), false, false ); AddHtml( 45, 55, 100, 20, Color( "Ticket Price:", LabelColor ), false, false ); AddHtml( 145, 55, 250, 20, Color( m_Stone.FormatPrice(), LabelColor ), false, false ); AddHtml( 45, 75, 100, 20, Color( "Total Entries:", LabelColor ), false, false ); AddHtml( 145, 75, 250, 20, Color( m_Stone.Entries.Count.ToString(), LabelColor ), false, false ); AddImageTiled( 13, 99, 592, 242, 9264 ); AddImageTiled( 14, 100, 590, 240, 9274 ); AddAlphaRegion( 14, 100, 590, 240 ); AddHtml( 14, 100, 590, 20, Color( Center( "Entries" ), LabelColor ), false, false ); if ( page > 0 ) AddButton( 567, 104, 0x15E3, 0x15E7, 2, GumpButtonType.Reply, 0 ); else AddImage( 567, 104, 0x25EA ); if ( (page + 1) * 10 < m_Stone.Entries.Count ) AddButton( 584, 104, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0 ); else AddImage( 584, 104, 0x25E6 ); AddHtml( 14, 120, 30, 20, Color( Center( "DEL" ), LabelColor ), false, false ); AddHtml( 47, 120, 250, 20, Color( "Name", LabelColor ), false, false ); AddHtml( 295, 120, 100, 20, Color( Center( "Address" ), LabelColor ), false, false ); AddHtml( 395, 120, 150, 20, Color( Center( "Date" ), LabelColor ), false, false ); AddHtml( 545, 120, 60, 20, Color( Center( "Num" ), LabelColor ), false, false ); int idx = 0; for ( int i = page * 10; i >= 0 && i < m_Stone.Entries.Count && i < (page + 1) * 10; ++i, ++idx ) { RaffleEntry entry = m_Stone.Entries[i]; AddButton( 13, 138 + (idx * 20), 4002, 4004, 4 + i, GumpButtonType.Reply, 0 ); int x = 45; string name; Account acc = entry.From.Account as Account; if ( acc != null ) name = String.Format( "{0} ({1})", entry.From.Name, acc ); else name = entry.From.Name; AddHtml( x + 2, 140 + (idx * 20), 250, 20, Color( name, LabelColor ), false, false ); x += 250; AddHtml( x, 140 + (idx * 20), 100, 20, Color( Center( entry.Address.ToString() ), LabelColor ), false, false ); x += 100; AddHtml( x, 140 + (idx * 20), 150, 20, Color( Center( entry.Date.ToString() ), LabelColor ), false, false ); x += 150; AddHtml( x, 140 + (idx * 20), 60, 20, Color( Center( "1" ), LabelColor ), false, false ); x += 60; } }