In RunUO 2.3 whenever I lock a container down it shows secure to others. I want locked down containers to be accessible to everyone and only secure containers secure. I have been playing with the BaseHouse.cs trying to make this work. Would this be the right place to fix this problem?
Code:
public static bool CheckAccessible( Mobile m, Item item )
        {
            if ( m.AccessLevel >= AccessLevel.GameMaster )
                return true; // Staff can access anything

            BaseHouse house = FindHouseAt( item );

            if ( house == null )
                return true;

            SecureAccessResult res = house.CheckSecureAccess( m, item );

            switch ( res )
            {
                case SecureAccessResult.Insecure: break;
                case SecureAccessResult.Accessible: return true;
                case SecureAccessResult.Inaccessible: return false;
            }

            if ( house.IsLockedDown( item ) )
                return house.IsCoOwner( m ) && item is Container;

            return true;
        }
 
if I am not wrong all you will have to do is change
Code:
if ( house.IsLockedDown( item ) )
    return house.IsCoOwner( m ) && item is Container;
to
Code:
if ( house.IsLockedDown( item ) )
    return item is Container;
 
if I am not wrong all you will have to do is change
Code:
if ( house.IsLockedDown( item ) )
    return house.IsCoOwner( m ) && item is Container;
to
Code:
if ( house.IsLockedDown( item ) )
    return item is Container;

I tried this and locked down bag still shows secure when you try to doubleclick it and wont let you open it.

Ill post the whole script
[doublepost=1491532800][/doublepost]Got it to work. A little further down you'll see
Code:
else if ( item is Container ) return IsCoOwner( from );
change it to
Code:
return true;
[doublepost=1491535845][/doublepost]Now that that is fixed, I have a small issue with locked down containers. Whenever you drop or have an item in the locked down container the item is locked down as well. How can I prevent the item from locking down. I just want the container locked down.
 

Attachments

  • BaseHouse.cs
    70.1 KB · Views: 7
Now that that is fixed, I have a small issue with locked down containers. Whenever you drop or have an item in the locked down container the item is locked down as well. How can I prevent the item from locking down. I just want the container locked down.

Found the fix for this also it was in container.cs. In case anyone ever has this problem also.
Edit this out:
Code:
if ( house != null && house.IsLockedDown( this ) )
            {
                if ( !house.LockDown( from, item, false ) )
                    return false;
 
Back