From aaaa1442612259da856915130677a61af9b2dcfc Mon Sep 17 00:00:00 2001 From: Wanne Date: Mon, 21 Apr 2014 07:24:19 +0000 Subject: [PATCH] Merged from revision: 7161 Show Bonus from traits and background/bonus from worn equipment (by anv) - Just hover the mouse over the camo value and you will see the value in the tooltip - see: http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/331780/%5BFeature_request%5D_Add_stealth_.html git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7162 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Panels.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index d0f253614..344ad466c 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -2928,6 +2928,40 @@ void RenderSMPanel( BOOLEAN *pfDirty ) wcscat( pStr, pStrCamo); swprintf( pStrCamo, L"" ); } + + // anv: display stealth together with camo + INT16 wornstealth = GetWornStealth(gpSMCurrentMerc) - gpSMCurrentMerc->GetBackgroundValue(BG_PERC_STEALTH); + INT16 bonusstealth = gpSMCurrentMerc->GetBackgroundValue(BG_PERC_STEALTH); + if ( gpSMCurrentMerc->ubBodyType == BLOODCAT ) + { + bonusstealth += 50; + } + // SANDRO - new/old traits + else if ( gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( gpSMCurrentMerc, STEALTHY_NT )) + { + bonusstealth += gSkillTraitValues.ubSTBonusToMoveQuietly; + } + else if ( !gGameOptions.fNewTraitSystem && HAS_SKILL_TRAIT( gpSMCurrentMerc, STEALTHY_OT )) + { + bonusstealth += 25 * NUM_SKILL_TRAITS( gpSMCurrentMerc, STEALTHY_OT ); + } + + if ( bonusstealth != 0 || wornstealth!= 0 ) + { + CHAR16 pStrBonusStealth[400]; + CHAR16 pStrWornStealth[400]; + if( bonusstealth < 0 ) + swprintf( pStrBonusStealth, L"%d", bonusstealth ); + else + swprintf( pStrBonusStealth, L"+%d", bonusstealth ); + if( wornstealth < 0 ) + swprintf( pStrWornStealth, L"%d", wornstealth ); + else + swprintf( pStrWornStealth, L"+%d", wornstealth ); + swprintf( pStrCamo, L"\n%s/%s %s", pStrBonusStealth, pStrWornStealth, gzMiscItemStatsFasthelp[ 25 ] ); + wcscat( pStr, pStrCamo); + swprintf( pStrCamo, L"" ); + } SetRegionFastHelpText( &(gSM_SELMERCCamoRegion), pStr ); SetRegionHelpEndCallback( &gSM_SELMERCCamoRegion, SkiHelpTextDoneCallBack );