From 0070ce2deb947fbfdf458ea28632e0bfa4a3b556 Mon Sep 17 00:00:00 2001 From: Dragon Slayer <85514184+DragonSlayer62@users.noreply.github.com> Date: Sat, 25 Jan 2025 10:24:37 -0600 Subject: [PATCH] Added Int & Dex Added Int and Dex Tooltips --- source/CPacketSend.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/CPacketSend.cpp b/source/CPacketSend.cpp index 4f7ae8872..7abc58253 100644 --- a/source/CPacketSend.cpp +++ b/source/CPacketSend.cpp @@ -7665,7 +7665,9 @@ void CPToolTip::CopyItemData( CItem& cItem, size_t &totalStringLen, bool addAmou FinalizeData( tempEntry, totalStringLen ); } - const SI16 strReq = (cItem.GetStrength() * (100 - cItem.GetLowerStatReq())) / 100; + const SI16 strReq = ( cItem.GetStrength() * ( 100 - cItem.GetLowerStatReq() )) / 100; + const SI16 dexReq = ( cItem.GetDexterity() * ( 100 - cItem.GetLowerStatReq() )) / 100; + const SI16 intReq = ( cItem.GetIntelligence() * ( 100 - cItem.GetLowerStatReq() )) / 100; if( strReq > 0 ) { @@ -7674,6 +7676,20 @@ void CPToolTip::CopyItemData( CItem& cItem, size_t &totalStringLen, bool addAmou FinalizeData( tempEntry, totalStringLen ); } + if( dexReq > 0 ) + { + tempEntry.stringNum = 1042971; // ~1_NOTHING~ + tempEntry.ourText = oldstrutil::format( "dexterity requirement %s", oldstrutil::number( cItem.GetDexterity()).c_str() ); + FinalizeData( tempEntry, totalStringLen ); + } + + if( intReq > 0 ) + { + tempEntry.stringNum = 1042971; // ~1_NOTHING~ + tempEntry.ourText = oldstrutil::format( "intelligence requirement %s", oldstrutil::number( cItem.GetIntelligence()).c_str() ); + FinalizeData( tempEntry, totalStringLen ); + } + if( cItem.GetLowerStatReq() > 0 ) { tempEntry.stringNum = 1060435; // lower requirements ~1_val~%