Skip to content

Commit

Permalink
Added Int & Dex
Browse files Browse the repository at this point in the history
Added Int and Dex Tooltips
DragonSlayer62 committed Jan 25, 2025
1 parent e44fbef commit 0070ce2
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion source/CPacketSend.cpp
Original file line number Diff line number Diff line change
@@ -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~%

0 comments on commit 0070ce2

Please sign in to comment.