public ConfirmRemovalGump(VinyardGroundAddon vgaddon) : base(50, 50) { m_VGAddon = vgaddon; AddBackground(0, 0, 450, 260, 9270); AddAlphaRegion(12, 12, 426, 22); AddTextEntry(13, 13, 379, 20, 32, 0, @"Warning!"); AddAlphaRegion(12, 39, 426, 209); AddHtml(15, 50, 420, 185, "<BODY>" + "<BASEFONT COLOR=YELLOW>You are about to remove your vinyard ground addon!<BR><BR>" + "<BASEFONT COLOR=YELLOW>Before removing, be sure to use your grapevine placement tool " + "<BASEFONT COLOR=YELLOW>to delete any grapevines that you have placed.<BR><BR>" + "<BASEFONT COLOR=YELLOW>Upon removal of this addon, a replacement vinyard ground addon deed " + "<BASEFONT COLOR=YELLOW>will be placed in your backpack.<BR><BR>" + "<BASEFONT COLOR=YELLOW>Are you sure you want to remove this addon?<BR><BR>" + "</BODY>", false, false); AddButton(13, 220, 0xFA5, 0xFA6, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(47, 222, 150, 20, 1052072, 0x7FFF, false, false); AddButton(350, 220, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(385, 222, 100, 20, 1060051, 0x7FFF, false, false); }
public ConfirmRemovalGump(VinyardGroundAddon vgaddon) : base(50, 50) { m_VGAddon = vgaddon; AddBackground(0, 0, 450, 260, 9270); AddAlphaRegion(12, 12, 426, 22); AddTextEntry(13, 13, 379, 20, 32, 0, @"Warning!"); AddAlphaRegion(12, 39, 426, 209); AddHtml(15, 50, 420, 185, "<BODY>" + "<BASEFONT COLOR=YELLOW>You are about to remove your vinyard ground addon!<BR><BR>" + "<BASEFONT COLOR=YELLOW>Before removing, be sure to use your grapevine placement tool "+ "<BASEFONT COLOR=YELLOW>to delete any grapevines that you have placed.<BR><BR>" + "<BASEFONT COLOR=YELLOW>Upon removal of this addon, a replacement vinyard ground addon deed " + "<BASEFONT COLOR=YELLOW>will be placed in your backpack.<BR><BR>" + "<BASEFONT COLOR=YELLOW>Are you sure you want to remove this addon?<BR><BR>" + "</BODY>", false, false); AddButton(13, 220, 0xFA5, 0xFA6, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(47, 222, 150, 20, 1052072, 0x7FFF, false, false); AddButton(350, 220, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(385, 222, 100, 20, 1060051, 0x7FFF, false, false); }
public override void OnResponse( NetState sender, RelayInfo info ) { Mobile from = sender.Mobile; if ( info.ButtonID >= 1 ) { BaseAddon addon = new VinyardGroundAddon( info.ButtonID-1, m_Width, m_Height ); Server.Spells.SpellHelper.GetSurfaceTop( ref m_P3D ); BaseHouse house = null; AddonFitResult res = addon.CouldFit( m_P3D, m_Map, from, ref house ); if ( res == AddonFitResult.Valid ) addon.MoveToWorld( new Point3D( m_P3D ), m_Map ); else if ( res == AddonFitResult.Blocked ) from.SendLocalizedMessage( 500269 ); // You cannot build that there. else if ( res == AddonFitResult.NotInHouse ) from.SendLocalizedMessage( 500274 ); // You can only place this in a house that you own! //else if ( res == AddonFitResult.DoorsNotClosed ) //from.SendMessage( "You must close all house doors before placing this." ); if ( res == AddonFitResult.Valid ) { m_Deed.Delete(); house.Addons.Add(addon); } else { addon.Delete(); } } }