Example #1
0
        public HouseRegion( BaseHouse house )
            : base(null, house.Map, HousePriority, GetArea( house ))
        {
            m_House = house;

            Point3D ban = house.RelativeBanLocation;

            this.GoLocation = new Point3D( house.X + ban.X, house.Y + ban.Y, house.Z + ban.Z );
        }
Example #2
0
        public HouseDemolishGump( Mobile mobile, BaseHouse house )
            : base(110, 100)
        {
            m_Mobile = mobile;
            m_House = house;

            mobile.CloseGump( typeof( HouseDemolishGump ) );

            Closable = false;

            AddPage( 0 );

            AddBackground( 0, 0, 420, 280, 5054 );

            AddImageTiled( 10, 10, 400, 20, 2624 );
            AddAlphaRegion( 10, 10, 400, 20 );

            AddHtmlLocalized( 10, 10, 400, 20, 1060635, 30720, false, false ); // <CENTER>WARNING</CENTER>

            AddImageTiled( 10, 40, 400, 200, 2624 );
            AddAlphaRegion( 10, 40, 400, 200 );

            AddHtmlLocalized( 10, 40, 400, 200, 1061795, 32512, false, true ); /* You are about to demolish your house.
                                                                                * You will be refunded the house's value directly to your bank box.
                                                                                * All items in the house will remain behind and can be freely picked up by anyone.
                                                                                * Once the house is demolished, anyone can attempt to place a new house on the vacant land.
                                                                                * This action will not un-condemn any other houses on your account, nor will it end your 7-day waiting period (if it applies to you).
                                                                                * Are you sure you wish to continue?
                                                                                */

            AddImageTiled( 10, 250, 400, 20, 2624 );
            AddAlphaRegion( 10, 250, 400, 20 );

            AddButton( 10, 250, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddButton( 210, 250, 4005, 4007, 0, GumpButtonType.Reply, 0 );

            AddHtmlLocalized( 40, 250, 170, 20, 1011036, 32767, false, false ); // OKAY
            AddHtmlLocalized( 240, 250, 170, 20, 1011012, 32767, false, false ); // CANCEL
        }
Example #3
0
        public ConfirmHouseResize( Mobile mobile, BaseHouse house )
            : base(110, 100)
        {
            m_Mobile = mobile;
            m_House = house;

            mobile.CloseGump( typeof( ConfirmHouseResize ) );

            Closable = false;

            AddPage( 0 );

            AddBackground( 0, 0, 420, 280, 0x13BE );
            AddImageTiled( 10, 10, 400, 20, 0xA40 );
            AddAlphaRegion( 10, 10, 400, 20 );
            AddHtmlLocalized( 10, 10, 400, 20, 1060635, 0x7800, false, false ); // <CENTER>WARNING</CENTER>
            AddImageTiled( 10, 40, 400, 200, 0xA40 );
            AddAlphaRegion( 10, 40, 400, 200 );

            /*
             * You are attempting to resize your house. You will be refunded the house's
             * value directly to your bank box. All items in the house will *remain behind*
             * and can be *freely picked up by anyone*. Once the house is demolished, however,
             * only this account will be able to place on the land for one hour. This *will*
             * circumvent the normal 7-day waiting period (if it applies to you). This action
             * will not un-condemn any other houses on your account. If you have other,
             * grandfathered houses, this action *WILL* condemn them. Are you sure you wish
             * to continue?
             */
            AddHtmlLocalized( 10, 40, 400, 200, 1080196, 0x7F00, false, true );

            AddImageTiled( 10, 250, 400, 20, 0xA40 );
            AddAlphaRegion( 10, 250, 400, 20 );
            AddButton( 10, 250, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
            AddButton( 210, 250, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 40, 250, 170, 20, 1011036, 0x7FFF, false, false ); // OKAY
            AddHtmlLocalized( 240, 250, 170, 20, 1011012, 0x7FFF, false, false ); // CANCEL
        }
Example #4
0
        private static Rectangle3D[] GetArea( BaseHouse house )
        {
            int x = house.X;
            int y = house.Y;
            int z = house.Z;

            Rectangle2D[] houseArea = house.Area;
            Rectangle3D[] area = new Rectangle3D[houseArea.Length];

            for ( int i = 0; i < area.Length; i++ )
            {
                Rectangle2D rect = houseArea[i];
                area[i] = Region.ConvertTo3D( new Rectangle2D( x + rect.Start.X, y + rect.Start.Y, rect.Width, rect.Height ) );
            }

            return area;
        }