diff --git a/source/Changelog.txt b/source/Changelog.txt index 96e72bfff..b1bfc9ba4 100644 --- a/source/Changelog.txt +++ b/source/Changelog.txt @@ -7,6 +7,9 @@ 12/08/2024 - Dragon Slayer Fixed an issue where Imbuing and Mysticism skills were listed in wrong order in skills.dfn and enums.h +16/07/2024 - Dragon Slayer + Added fallback in 'add menu for older clients that don't support buttontileart (Thanks Xuri)(gumps.cpp) + 7/07/2024 - Dragon Slayer Added Requirement to drink potion hand has to be free, This can be disabled within the potion.js file by switching the reqfreehand to false. (js potion). diff --git a/source/gumps.cpp b/source/gumps.cpp index c655634d2..3b2d56cb0 100644 --- a/source/gumps.cpp +++ b/source/gumps.cpp @@ -669,10 +669,21 @@ void BuildAddMenuGump( CSocket *s, UI16 m ) if( tag.data()[0] != '<' && tag.data()[0] != ' ' ) // it actually has a picture, well bugger me! :> { // Draw a frame for the item to make it stand out a touch more. - toSend.addCommand( oldstrutil::format( "checkertrans %u %u %u %u", xOffset + 7, yOffset + 9, 110, 110 )); - toSend.addCommand( oldstrutil::format( "buttontileart %u %u 0x0a9f 0x0aa1 %u %u %u %u %u %u %u", xOffset, yOffset, 1, 0, buttonnum, std::stoi( tag, nullptr, 0 ), 0, 25, 25 )); - toSend.addCommand( oldstrutil::format( "tooltip 1042971 @%s@", data.c_str() )); - toSend.addCommand( oldstrutil::format( "croppedtext %u %u %u %u %u %u", xOffset + 15, yOffset + 85, 100, 20, 50, linenum++ )); + if( s->ClientVerShort() <= CVS_70160 ) + { + // Fallback for older clients that don't support buttontileart + toSend.addCommand( oldstrutil::format("resizepic %u %u %u %u %u", xOffset, yOffset, 0x53, 65, 100 )); + toSend.addCommand( oldstrutil::format("checkertrans %u %u %u %u", xOffset + 7, yOffset + 9, 52, 82 )); + toSend.addCommand( oldstrutil::format("tilepic %u %u %i", xOffset + 5, yOffset + 10, std::stoi(tag, nullptr, 0) )); + toSend.addCommand( oldstrutil::format("croppedtext %u %u %u %u %u %u", xOffset, yOffset + 65, 65, 20, 55, linenum++ )); + } + else + { + toSend.addCommand( oldstrutil::format( "checkertrans %u %u %u %u", xOffset + 7, yOffset + 9, 110, 110 )); + toSend.addCommand( oldstrutil::format( "buttontileart %u %u 0x0a9f 0x0aa1 %u %u %u %u %u %u %u", xOffset, yOffset, 1, 0, buttonnum, std::stoi( tag, nullptr, 0 ), 0, 25, 25 )); + toSend.addCommand( oldstrutil::format( "tooltip 1042971 @%s@", data.c_str() )); + toSend.addCommand( oldstrutil::format( "croppedtext %u %u %u %u %u %u", xOffset + 15, yOffset + 85, 100, 20, 50, linenum++ )); + } toSend.addText( data ); xOffset += XOFFSET; if( xOffset > 640 )