diff --git a/Laptop/mercs Files.cpp b/Laptop/mercs Files.cpp index 8bbda718..3e41ad50 100644 --- a/Laptop/mercs Files.cpp +++ b/Laptop/mercs Files.cpp @@ -1070,14 +1070,27 @@ void DisplayMercsStats( UINT8 ubMercID ) if (gubCurMercFilesTogglePage == MERC_FILES_INV_PAGE) { //Gear Cost - usPosY = usPosY + 145; + usPosY = usPosY + 148; DrawTextToScreen( MercInfo[MERC_FILES_GEAR], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_STATS_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED); - if ( (gMercProfiles[ ubMercID ].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS ) - && ( !(gMercProfiles[ ubMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable ) ) + if ( (gMercProfiles[ubMercID].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) + && (!(gMercProfiles[ubMercID].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID) || gGameExternalOptions.fGearKitsAlwaysAvailable) ) + { gMercProfiles[ ubMercID ].usOptionalGearCost = 0; + } +#ifdef JA2UB + if ( gSelectedMercKit == 0 ) // First kit is free, due to M.E.R.C special offer + { + gMercProfiles[ubMercID].usOptionalGearCost = 0; - swprintf(NsString, L"+ "); + // Special offer text above the gear cost + const auto y = usPosY - MERC_SPACE_BN_LINES + 2; + swprintf( NsString, MercInfo[MERC_FILES_SPECIAL_OFFER] ); + DrawTextToScreen( NsString, usPosX, y, 95, MERC_TITLE_FONT, MERC_TITLE_COLOR, FONT_MCOLOR_BLACK, FALSE, RIGHT_JUSTIFIED ); + } +#endif // JA2UB + + swprintf( NsString, L"+ " ); swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost); InsertCommasForDollarFigure( sTemp ); InsertDollarSignInToString( sTemp ); @@ -1089,7 +1102,11 @@ void DisplayMercsStats( UINT8 ubMercID ) DrawTextToScreen( MercInfo[MERC_FILES_TOTAL], MERC_STATS_SECOND_COL_X, usPosY, 0, MERC_NAME_FONT, MERC_STATIC_STATS_COLOR, FONT_MCOLOR_BLACK, FALSE, LEFT_JUSTIFIED); swprintf(N2sString, L"= "); +#ifdef JA2UB + swprintf( sTemp, L"%d", gMercProfiles[ubMercID].usOptionalGearCost + gMercProfiles[ubMercID].uiWeeklySalary ); +#else swprintf(sTemp, L"%d",gMercProfiles[ ubMercID ].usOptionalGearCost+gMercProfiles[ ubMercID ].sSalary); +#endif InsertCommasForDollarFigure( sTemp ); InsertDollarSignInToString( sTemp ); wcscat( N2sString, sTemp ); @@ -1207,16 +1224,25 @@ BOOLEAN MercFilesHireMerc(UINT8 ubMercID) AddTransactionToPlayersBook( HIRED_MERC, ubMercID, GetWorldTotalMin(), Namount ); } - #ifdef JA2UB +#ifdef JA2UB //add an entry in the finacial page for the hiring of the merc - AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -(INT32)( gMercProfiles[ubMercID].uiWeeklySalary ) ); - #endif + INT32 totalCost = gMercProfiles[ubMercID].uiWeeklySalary; + if ( gSelectedMercKit > 0 ) // First kit is included in the initial fee + { + totalCost += gMercProfiles[ubMercID].usOptionalGearCost; + } + AddTransactionToPlayersBook(PAY_SPECK_FOR_MERC, ubMercID, GetWorldTotalMin(), -totalCost ); +#endif //JMich_MMG: Setting the flag that we bought the gear and still haven't paid for it if we succesfully hired the merc if ( fMercBuyEquipment ) { gMercProfiles[ ubMercID ].ubMiscFlags |= PROFILE_MISC_FLAG_ALREADY_USED_ITEMS; +#ifdef JA2UB + // Gear cost gets added to initial hiring fee in UB +#else gMercProfiles[ ubMercID ].ubMiscFlags2 |= PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID; +#endif // JA2UB } return(TRUE); diff --git a/i18n/_ChineseText.cpp b/i18n/_ChineseText.cpp index 3b7f881c..56deb055 100644 --- a/i18n/_ChineseText.cpp +++ b/i18n/_ChineseText.cpp @@ -5478,6 +5478,7 @@ STR16 MercInfo[] = L"未结账单", //L"Unsettled Bills", L"生平", //L"Bio", L"物品", //L"Inv", + L"Special Offer!", }; diff --git a/i18n/_DutchText.cpp b/i18n/_DutchText.cpp index 976ea802..580bb33c 100644 --- a/i18n/_DutchText.cpp +++ b/i18n/_DutchText.cpp @@ -5481,6 +5481,7 @@ STR16 MercInfo[] = L"Unsettled Bills", // TODO.Translate L"Bio", // TODO.Translate L"Inv", + L"Special Offer!", }; diff --git a/i18n/_EnglishText.cpp b/i18n/_EnglishText.cpp index 0f5f947e..377ad755 100644 --- a/i18n/_EnglishText.cpp +++ b/i18n/_EnglishText.cpp @@ -5478,6 +5478,7 @@ STR16 MercInfo[] = L"Unsettled Bills", L"Bio", L"Inv", + L"Special Offer!", }; diff --git a/i18n/_FrenchText.cpp b/i18n/_FrenchText.cpp index 6a259577..fbd776a8 100644 --- a/i18n/_FrenchText.cpp +++ b/i18n/_FrenchText.cpp @@ -5485,6 +5485,7 @@ STR16 MercInfo[] = L"Payez sa solde", L"Biographie", L"Inventaire", + L"Special Offer!", }; diff --git a/i18n/_GermanText.cpp b/i18n/_GermanText.cpp index 53bb2601..4b66db3f 100644 --- a/i18n/_GermanText.cpp +++ b/i18n/_GermanText.cpp @@ -5429,6 +5429,7 @@ STR16 MercInfo[] = L"Offene Beträge", L"Bio", L"Inv", + L"Special Offer!", }; // For use at the M.E.R.C. web site. Text relating to opening an account with MERC diff --git a/i18n/_ItalianText.cpp b/i18n/_ItalianText.cpp index 6f9cbb10..0601468b 100644 --- a/i18n/_ItalianText.cpp +++ b/i18n/_ItalianText.cpp @@ -5468,6 +5468,7 @@ STR16 MercInfo[] = L"Unsettled Bills", // TODO.Translate L"Bio", // TODO.Translate L"Inv", + L"Special Offer!", }; diff --git a/i18n/_PolishText.cpp b/i18n/_PolishText.cpp index 8445de0d..f49fe637 100644 --- a/i18n/_PolishText.cpp +++ b/i18n/_PolishText.cpp @@ -5481,6 +5481,7 @@ STR16 MercInfo[] = L"Unsettled Bills", // TODO.Translate L"Bio", // TODO.Translate L"Inv", + L"Special Offer!", }; diff --git a/i18n/_RussianText.cpp b/i18n/_RussianText.cpp index 110c38e7..5b1a777e 100644 --- a/i18n/_RussianText.cpp +++ b/i18n/_RussianText.cpp @@ -5474,6 +5474,7 @@ STR16 MercInfo[] = L"Неоплаченные счета", L"Информация", L"Снаряжение", + L"Special Offer!", }; diff --git a/i18n/include/Text.h b/i18n/include/Text.h index 6d97672a..12584904 100644 --- a/i18n/include/Text.h +++ b/i18n/include/Text.h @@ -1262,6 +1262,7 @@ enum MERC_FILES_MERC_OUTSTANDING, MERC_FILES_BIO, //JMich_MMG: Adding two new texts for the small button, assuming we manage to add a silhouette with the gear, add it after this. MERC_FILES_INVENTORY, + MERC_FILES_SPECIAL_OFFER, TEXT_NUM_MERC_FILES, }; extern STR16 MercInfo[];