Page 1 of 1

interior Decorating tool Bug

Posted: Sat Oct 02, 2021 7:51 pm
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.

Re: interior Decorating tool Bug

Posted: Sun Oct 31, 2021 1:20 am
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.
}

Re: interior Decorating tool Bug

Posted: Sun Oct 31, 2021 4:14 am
by Xuri
Fix pushed to develop branch on GitHub.