Пример #1
0
        public override bool OnDragDropInto( Mobile from, Item item, Point3D p, byte gridloc )
        {
            if ( !CheckHold( from, item, true, true ) )
                return false;

            var house = HousingHelper.FindHouseAt( this );

            if ( house != null && house.IsLockedDown( this ) )
            {
                if ( item is VendorRentalContract || ( item is Container && ( (Container) item ).FindItemByType( typeof( VendorRentalContract ) ) != null ) )
                {
                    from.SendLocalizedMessage( 1062492 ); // You cannot place a rental contract in a locked down container.
                    return false;
                }

                if ( !house.LockDown( from, item, false ) )
                    return false;
            }

            item.Location = new Point3D( p.X, p.Y, 0 );
            item.SetGridLocation( gridloc, this );
            AddItem( item );

            from.SendSound( GetDroppedSound( item ), GetWorldLocation() );

            return true;
        }