[FIXED] interior Decorating tool Bug

Found a bug in UOX3? Or experienced a server crash? Perhaps you've noticed a broken feature? Post the details here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

interior Decorating tool Bug

Post by dragon slayer »

You can open the gump and run out side the house and still be able to still use the gump. on items locked down because it couldn't check it.

also you could do this and run to a house not owned and stand out side and move there items up and down.
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Post by dragon slayer »

Okay to fix this problem here is the fix

here is the current code
function onGumpPress( socket, pButton, gumpData )
{
    var pUser = socket.currentChar;
    switch( pButton )
    {
        case 0:
            break;//close
        case 1: // Turn
            var targMsg3 = GetDictionaryEntry( 2068, socket.language ); // Select an object to turn.
            socket.CustomTarget( 3, targMsg3 );
            var ret = displaygump( socket, pUser );
            break;
        case 2: // Up
            var targMsg2 = GetDictionaryEntry( 2069, socket.language ); // Select an object to increase its height.
            socket.CustomTarget( 2, targMsg2 );
            var ret = displaygump( socket, pUser );
            break;
        case 3: // Down
            var targMsg1 = GetDictionaryEntry( 2070, socket.language ); // Select an object to lower its height.
            socket.CustomTarget( 1, targMsg1 );
            var ret = displaygump( socket, pUser );
            break;
        default:
            break;
    }
}
Here is the new code
function onGumpPress( socket, pButton, gumpData )
{
    var pUser = socket.currentChar;
    var pMulti = pUser.multi;
    if (ValidateObject(pMulti) && pMulti.owner == pUser)
    {
        switch (pButton)
        {
            case 0:
                break;//close
            case 1: // Turn
                var targMsg3 = GetDictionaryEntry(2068, socket.language); // Select an object to turn.
                socket.CustomTarget(3, targMsg3);
                var ret = displaygump(socket, pUser);
                break;
            case 2: // Up
                var targMsg2 = GetDictionaryEntry(2069, socket.language); // Select an object to increase its height.
                socket.CustomTarget(2, targMsg2);
                var ret = displaygump(socket, pUser);
                break;
            case 3: // Down
                var targMsg1 = GetDictionaryEntry(2070, socket.language); // Select an object to lower its height.
                socket.CustomTarget(1, targMsg1);
                var ret = displaygump(socket, pUser);
                break;
            default:
                break;
        }
    }
    else
        pUser.SysMessage( GetDictionaryEntry( 2067, socket.language ) ); // You must be in your house to do this.
}
User avatar
Xuri
Site Admin
Posts: 3704
Joined: Mon Jun 02, 2003 9:11 am
Location: Norway
Has thanked: 48 times
Been thanked: 8 times
Contact:

Post by Xuri »

Fix pushed to develop branch on GitHub.
-= Ho Eyo He Hum =-
Post Reply