Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add menu fix #295

Merged
merged 7 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
16/07/2024 - Dragon Slayer
Fixed Fallback for older clients that don't support buttontileart (Thanks Xuri)(gumps.cpp)

13/05/2024 - Dragon Slayer
Added New Shield Type 107 so shield ID's no longer have to be in hard code for shields to work properly

Expand All @@ -6,6 +9,7 @@
-ARTIFACTRARITY=#
-Artifact Rarity is an item property that is visible on some artifacts and meant to give players an idea of how rare the item is. Items with rarity 1 are supposed to be common while rarity 12 are extremely scarce.


1/05/2024 - Dragon Slayer/Xuri
Fixed AutoUnequipAttempt function in clumsy.js, createfood.js level1target.js, will no longer fail on casting and return to hardcode.
Fixed createfood to check for reagents on cast.
Expand Down
19 changes: 15 additions & 4 deletions source/gumps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++ ));
}
DragonSlayer62 marked this conversation as resolved.
Show resolved Hide resolved
toSend.addText( data );
xOffset += XOFFSET;
if( xOffset > 640 )
Expand Down
Loading