mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Merge branch 'master' into ExtraMercs
This commit is contained in:
+4
-17
@@ -5633,28 +5633,15 @@ void EnableWeaponKitSelectionButtons()
|
||||
{
|
||||
if ( !(gMercProfiles[gbCurrentSoldier].ubMiscFlags & PROFILE_MISC_FLAG_ALREADY_USED_ITEMS) || gGameExternalOptions.fGearKitsAlwaysAvailable )
|
||||
{
|
||||
bool bShow;
|
||||
INT16 usItem;
|
||||
for(int i=0; i<NUM_MERCSTARTINGGEAR_KITS; ++i)
|
||||
{
|
||||
bShow = false;
|
||||
for(int j=INV_START_POS; j<NUM_INV_SLOTS; ++j)
|
||||
{
|
||||
usItem = gMercProfileGear[gbCurrentSoldier][i].inv[j];
|
||||
if(usItem != NONE)
|
||||
if(gMercProfileGear[gbCurrentSoldier][i].inv[j] != NONE)
|
||||
{
|
||||
bShow = true;
|
||||
//shadooow: if any of the item in kit is limited to specific system and this system isn't enabled then disable the whole kit from selection
|
||||
if (((Item[usItem].usLimitedToSystem & FOOD_SYSTEM_FLAG) && !UsingFoodSystem()) || ((Item[usItem].usLimitedToSystem & DISEASE_SYSTEM_FLAG) && !gGameExternalOptions.fDisease))
|
||||
{
|
||||
bShow = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (bShow)
|
||||
{
|
||||
ShowButton(giWeaponboxSelectionButton[i]);
|
||||
ShowButton( giWeaponboxSelectionButton[i] );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+77
-96
@@ -362,6 +362,29 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber );
|
||||
void HandleBobbyRGunsKeyBoardInput();
|
||||
void HandleBobbyRayMouseWheel(void);
|
||||
|
||||
// Appends source STR16 to target STR16 using decorators ("\n" and "...").
|
||||
// Returns TRUE if everything fits target, FALSE otherwise.
|
||||
static BOOLEAN DecorateAppendString(STR16 target, size_t targetCapacity, STR16 source, UINT32 frontDecoratorsCnt = 1)
|
||||
{
|
||||
const CHAR16 DECORATOR0[] = L"\n";
|
||||
const CHAR16 DECORATOR1[] = L"\n...";
|
||||
BOOLEAN result = FALSE;
|
||||
size_t decoratorLen = wcslen(DECORATOR0) * frontDecoratorsCnt;
|
||||
|
||||
if (wcslen(target) + decoratorLen + wcslen(source) + 1 < targetCapacity)
|
||||
{
|
||||
for (UINT32 i = 0; i < frontDecoratorsCnt; i++)
|
||||
wcscat(target, DECORATOR0);
|
||||
wcscat(target, source);
|
||||
result = TRUE;
|
||||
}
|
||||
else if (wcslen(target) + wcslen(DECORATOR1) + 1 < targetCapacity)
|
||||
{
|
||||
wcscat(target, DECORATOR1);
|
||||
} // otherwise don't even touch the target
|
||||
return result;
|
||||
}
|
||||
|
||||
void GameInitBobbyRGuns()
|
||||
{
|
||||
guiTempCurrentMode=0;
|
||||
@@ -1742,11 +1765,11 @@ BOOLEAN DisplayItemInfo(UINT32 uiItemClass, INT32 iFilter, INT32 iSubFilter)
|
||||
{
|
||||
if ( iSubFilter > -1 ) // Madd: new BR filters
|
||||
{
|
||||
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & iSubFilter )
|
||||
if (ItemIsAttachment(usItemIndex) && Item[usItemIndex].attachmentclass & iSubFilter )
|
||||
bAddItem = TRUE;
|
||||
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && ItemIsAttachment(usItemIndex))
|
||||
bAddItem = TRUE;
|
||||
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment)
|
||||
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !ItemIsAttachment(usItemIndex))
|
||||
bAddItem = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -2630,11 +2653,11 @@ void SetFirstLastPagesForNew( UINT32 uiClassMask, INT32 iFilter, INT32 iSubFilte
|
||||
{
|
||||
if (iSubFilter > -1 )
|
||||
{
|
||||
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & iSubFilter)
|
||||
if (ItemIsAttachment(usItemIndex) && Item[usItemIndex].attachmentclass & iSubFilter)
|
||||
bCntNumItems = TRUE;
|
||||
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||
else if (iSubFilter == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && ItemIsAttachment(usItemIndex))
|
||||
bCntNumItems = TRUE;
|
||||
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment )
|
||||
else if (iSubFilter == BR_MISC_FILTER_NO_ATTACHMENTS && !ItemIsAttachment(usItemIndex))
|
||||
bCntNumItems = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -3618,11 +3641,11 @@ void CalcFirstIndexForPage( STORE_INVENTORY *pInv, UINT32 uiItemClass )
|
||||
{
|
||||
if (guiCurrentMiscSubFilterMode > -1) // Madd: new BR filter options
|
||||
{
|
||||
if (Item[usItemIndex].attachment && Item[usItemIndex].attachmentclass & guiCurrentMiscSubFilterMode)
|
||||
if (ItemIsAttachment(usItemIndex) && Item[usItemIndex].attachmentclass & guiCurrentMiscSubFilterMode)
|
||||
bCntItem = TRUE;
|
||||
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && Item[usItemIndex].attachment)
|
||||
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_OTHER_ATTACHMENTS && !(Item[usItemIndex].attachmentclass & BR_MISC_FILTER_STD_ATTACHMENTS) && ItemIsAttachment(usItemIndex))
|
||||
bCntItem = TRUE;
|
||||
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_NO_ATTACHMENTS && !Item[usItemIndex].attachment)
|
||||
else if (guiCurrentMiscSubFilterMode == BR_MISC_FILTER_NO_ATTACHMENTS && !ItemIsAttachment(usItemIndex))
|
||||
bCntItem = TRUE;
|
||||
}
|
||||
else
|
||||
@@ -4088,7 +4111,8 @@ void HandleBobbyRayMouseWheel(void)
|
||||
}
|
||||
|
||||
void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
|
||||
{
|
||||
{
|
||||
const size_t ATTACHMENTS_STRBUF_SIZE = 3800;
|
||||
CHAR16 zItemName[ SIZE_ITEM_NAME ];
|
||||
UINT8 ubItemCount=0;
|
||||
|
||||
@@ -4115,12 +4139,9 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
|
||||
// HEADROCK HAM 3: Variables for "Possible Attachment List"
|
||||
BOOLEAN fAttachmentsFound = FALSE;
|
||||
// Contains entire string of attachment names
|
||||
CHAR16 attachStr[3900];
|
||||
// Contains current attachment string
|
||||
CHAR16 attachStr2[100];
|
||||
CHAR16 attachStr[ATTACHMENTS_STRBUF_SIZE];
|
||||
// Contains temporary attachment list before added to string constant from text.h
|
||||
CHAR16 attachStr3[3900];
|
||||
UINT16 usAttachment;
|
||||
CHAR16 attachStr3[ATTACHMENTS_STRBUF_SIZE];
|
||||
|
||||
CreateItem(usItemNumber, 100, &pObject);
|
||||
INT16 ubAttackAPs = BaseAPsToShootOrStab( APBPConstants[DEFAULT_APS], APBPConstants[DEFAULT_AIMSKILL], &pObject, NULL );
|
||||
@@ -4146,109 +4167,69 @@ void GetHelpTextForItemInLaptop( STR16 pzStr, UINT16 usItemNumber )
|
||||
else
|
||||
wcscat( apStr, L" / -" );
|
||||
|
||||
// HEADROCK HAM 3: Empty these strings first, to avoid crashes. Please keep this here.
|
||||
swprintf( attachStr, L"" );
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
attachStr[0] = 0;
|
||||
attachStr3[0] = 0;
|
||||
|
||||
// HEADROCK HAM 3: Generate list of possible attachments to a gun (Guns only!)
|
||||
if (gGameExternalOptions.fBobbyRayTooltipsShowAttachments)
|
||||
{
|
||||
UINT16 iLoop = 0;
|
||||
// Check entire attachment list
|
||||
while( 1 )
|
||||
if (UsingNewAttachmentSystem())
|
||||
{
|
||||
//Madd: Common Attachment Framework
|
||||
//TODO: Note that the items in this list will be duplicated if they are present in both the CAF and the old attachment method
|
||||
//need to refactor this to work more like the NAS attachment slots method
|
||||
usAttachment = 0;
|
||||
if ( IsAttachmentPointAvailable(Item[usItemNumber].uiIndex, iLoop) )
|
||||
{
|
||||
usAttachment = iLoop;
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Is the weapon we're checking the same as the one we're tooltipping?
|
||||
usAttachment = 0;
|
||||
if (Attachment[iLoop][1] == Item[usItemNumber].uiIndex)
|
||||
std::pair<std::multimap<UINT16, AttachmentStruct>::iterator, std::multimap<UINT16, AttachmentStruct>::iterator> range;
|
||||
std::multimap<UINT16, AttachmentStruct>::iterator it;
|
||||
range = AttachmentBackmap.equal_range(Item[usItemNumber].uiIndex);
|
||||
for (it = range.first; it != range.second; it++)
|
||||
{
|
||||
usAttachment = Attachment[iLoop][0];
|
||||
}
|
||||
|
||||
// If the attachment is not hidden
|
||||
if (usAttachment > 0 && !Item[ usAttachment ].hiddenaddon && !Item[ usAttachment ].hiddenattachment)
|
||||
{
|
||||
if (wcslen( attachStr3 ) + wcslen(Item[usAttachment].szItemName) > 3800)
|
||||
UINT16 attachmentId = it->second.attachmentIndex;
|
||||
if (!ItemIsHiddenAddon(attachmentId) && !ItemIsHiddenAttachment(attachmentId) && ItemIsLegal(attachmentId, TRUE))
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{// Add the attachment's name to the list.
|
||||
fAttachmentsFound = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ usAttachment ].szItemName );
|
||||
wcscat( attachStr3, attachStr2);
|
||||
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[attachmentId].szItemName) == FALSE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
iLoop++;
|
||||
if (Attachment[iLoop][0] == 0 && Item[iLoop].usItemClass == 0)
|
||||
{
|
||||
// Reached end of list
|
||||
break;
|
||||
}
|
||||
}
|
||||
else // old attachment system
|
||||
{
|
||||
for (UINT32 itemId = 1; itemId < gMAXITEMS_READ; itemId++)
|
||||
{
|
||||
// If the attachment is not hidden and attachable to the gun (usItemNumber)
|
||||
if (!ItemIsHiddenAddon(itemId) && !ItemIsHiddenAttachment(itemId) &&
|
||||
ItemIsLegal(itemId, TRUE) && IsAttachmentPointAvailable(Item[usItemNumber].uiIndex, itemId))
|
||||
{
|
||||
fAttachmentsFound = TRUE;
|
||||
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[itemId].szItemName) == FALSE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fAttachmentsFound)
|
||||
{
|
||||
// Add extra empty line and attachment list title
|
||||
swprintf( attachStr, L"\n \n%s", gWeaponStatsDesc[ 14 ] );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, gWeaponStatsDesc[14], 2); // 2 new lines and "Attachments:" title
|
||||
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, attachStr3, 0); // no new line, list of attachments (starts with new line)
|
||||
}
|
||||
}
|
||||
|
||||
//Sum up default attachments.
|
||||
BOOLEAN fFoundDefault = FALSE;
|
||||
swprintf( attachStr2, L"" );
|
||||
swprintf( attachStr3, L"" );
|
||||
for(UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++){
|
||||
if(Item[usItemNumber].defaultattachments[cnt] != 0){
|
||||
if (wcslen( attachStr ) + wcslen(attachStr3) + wcslen(Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName) > 3800)
|
||||
{
|
||||
// End list early to avoid stack overflow
|
||||
wcscat( attachStr3, L"\n..." );
|
||||
attachStr3[0] = 0;
|
||||
for (UINT8 cnt = 0; cnt < MAX_DEFAULT_ATTACHMENTS; cnt++)
|
||||
{
|
||||
if (Item[usItemNumber].defaultattachments[cnt] != 0)
|
||||
{
|
||||
if (DecorateAppendString(attachStr3, ATTACHMENTS_STRBUF_SIZE, Item[Item[usItemNumber].defaultattachments[cnt]].szItemName) == FALSE)
|
||||
break;
|
||||
}
|
||||
fFoundDefault = TRUE;
|
||||
swprintf( attachStr2, L"\n%s", Item[ Item[usItemNumber].defaultattachments[cnt] ].szItemName );
|
||||
wcscat( attachStr3, attachStr2 );
|
||||
} else {
|
||||
//If we found an empty entry, we can assume the rest will be empty too.
|
||||
break;
|
||||
}
|
||||
else // If we found an empty entry, we can assume the rest will be empty too.
|
||||
break;
|
||||
}
|
||||
if(fFoundDefault){
|
||||
//Found at least one default attachment, write it to the attachment string.
|
||||
CHAR16 defaultStr[50];
|
||||
swprintf( defaultStr, L"\n \n%s", gWeaponStatsDesc[ 17 ] );
|
||||
wcscat( attachStr, defaultStr );
|
||||
wcscat( attachStr, attachStr3 );
|
||||
|
||||
if (fFoundDefault)
|
||||
{
|
||||
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, gWeaponStatsDesc[17], 2); // 2 new lines and "Default:" title
|
||||
DecorateAppendString(attachStr, ATTACHMENTS_STRBUF_SIZE, attachStr3, 0); // no new line, list of attachments (starts with new line)
|
||||
}
|
||||
|
||||
// HEADROCK HAM 3: Added last string (attachStr), for display of the possible attachment list.
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "QuestText.h" //quest: name
|
||||
#include "laptop.h" //ui positions
|
||||
#include "Utilities.h"
|
||||
#include "Utils/Cursors.h"
|
||||
#include "Cursors.h"
|
||||
#include "sysutil.h" //extra Buffer for scaling image
|
||||
#include "vsurface.h" //fill extra buffer with black color
|
||||
#include "Text.h"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "laptop.h"//UI dimensions, mouse regions
|
||||
#include "Utilities.h"//file names
|
||||
#include "vobject.h"//video objects
|
||||
#include "Utils/Cursors.h"
|
||||
#include "Cursors.h"
|
||||
#include "Text.h"//button text
|
||||
#include "Button System.h"
|
||||
#include "Encyclopedia_new.h"
|
||||
|
||||
+229
-46
@@ -15,6 +15,9 @@
|
||||
#include "CharProfile.h"
|
||||
#include "soldier profile type.h"
|
||||
#include "IMP Compile Character.h"
|
||||
#include "IMP Disability Trait.h"
|
||||
#include "IMP Character Trait.h"
|
||||
#include "IMP Minor Trait.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Interface.h"
|
||||
|
||||
@@ -600,81 +603,187 @@ void ResetDisplaySkills()
|
||||
|
||||
extern INT32 SkillsList[ ATTITUDE_LIST_SIZE ];
|
||||
|
||||
BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
|
||||
extern BOOLEAN gfSkillTraitQuestions[20];
|
||||
extern BOOLEAN gfSkillTraitQuestions2[20];
|
||||
|
||||
extern BOOLEAN gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS];
|
||||
|
||||
BOOLEAN IsBackGroundAllowed(UINT16 ubNumber)
|
||||
{
|
||||
if ( !ubNumber )
|
||||
if (!ubNumber)
|
||||
return FALSE;
|
||||
|
||||
// some backgrounds are only allowed to specific genders. Set both to forbid a background from ever showing up in IMP creation (for merc-specific backgrounds)
|
||||
if ( fCharacterIsMale && zBackground[ ubNumber ].uiFlags & BACKGROUND_NO_MALE )
|
||||
if (fCharacterIsMale && zBackground[ubNumber].uiFlags & BACKGROUND_NO_MALE)
|
||||
return FALSE;
|
||||
else if ( !fCharacterIsMale && zBackground[ ubNumber ].uiFlags & BACKGROUND_NO_FEMALE )
|
||||
else if (!fCharacterIsMale && zBackground[ubNumber].uiFlags & BACKGROUND_NO_FEMALE)
|
||||
return FALSE;
|
||||
|
||||
if ( SkillsList[0] == HEAVY_WEAPONS_NT || SkillsList[1] == HEAVY_WEAPONS_NT || SkillsList[2] == HEAVY_WEAPONS_NT )
|
||||
// added new ini-options and accompanying background-tag
|
||||
// choices in skills/character-traits/disabilities determine available backgrounds if true in ja2options.ini
|
||||
// new tag <alt_impcreation> has been added to backgrounds.xml
|
||||
|
||||
if (!gGameExternalOptions.fAltIMPCreation)
|
||||
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_ARTILLERY] > 0 )
|
||||
if (zBackground[ubNumber].uiFlags & BACKGROUND_ALT_IMP_CREATION) // don't show BG with tag <alt_impcreation> if Alt_Imp_Creation isn't true in ja2options.ini
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
// show BG with tag <alt_impcreation>,
|
||||
// but don't show BG whose tags would contradict with a main bonus/penalty gained by skill/char-trait/disability
|
||||
|
||||
if (gGameExternalOptions.fAltIMPCreation)
|
||||
|
||||
// define which tags are considered contradicting for major traits, minor traits, disablities and character traits
|
||||
|
||||
// major traits (single-trait and dual-trait)
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_HEAVY_WEAPONS])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_ARTILLERY] > 0) //dual trait (expert)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_ARTILLERY] > 10) //single trait
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_PROF_SNIPER] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_PROF_SNIPER])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_PROF_SNIPER] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_PROF_SNIPER])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_PERC_CTH_MAX] < 0 || zBackground[ubNumber].value[BG_MARKSMANSHIP] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_PERC_CTH_MAX] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_MARTIAL_ARTS])
|
||||
{
|
||||
|
||||
if (zBackground[ubNumber].value[BG_RESI_PHYSICAL] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_RESI_PHYSICAL] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_TECHNICIAN] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_TECHNICIAN])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_TECHNICIAN] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_TECHNICIAN])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_MECHANICAL] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_MECHANICAL] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_DOCTOR] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_DOCTOR])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_DOCTOR] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_DOCTOR])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_PERC_BANDAGING] < 0 || zBackground[ubNumber].value[BG_MEDICAL] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_PERC_BANDAGING] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_SQUADLEADER] || gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_SQUADLEADER])
|
||||
{
|
||||
|
||||
if (gfSkillTraitQuestions[IMP_SKILL_TRAITS_NEW_SQUADLEADER] && gfSkillTraitQuestions2[IMP_SKILL_TRAITS_NEW_SQUADLEADER])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_RESI_SUPPRESSION] < 0 || zBackground[ubNumber].value[BG_RESI_FEAR] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_RESI_SUPPRESSION] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Minor Traits (single trait only)
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_MELEE])
|
||||
{
|
||||
if (zBackground[ubNumber].value[BG_PERC_CTH_BLADE] < 0 || zBackground[ubNumber].value[BG_PERC_DAMAGE_MELEE] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == SNIPER_NT || SkillsList[1] == SNIPER_NT || SkillsList[2] == SNIPER_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_STEALTHY])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_CTH_MAX] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_PERC_STEALTH] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == SURVIVAL_NT || SkillsList[1] == SURVIVAL_NT || SkillsList[2] == SURVIVAL_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_DEMOLITIONS])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_CAMO] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == MARTIAL_ARTS_NT || SkillsList[1] == MARTIAL_ARTS_NT || SkillsList[2] == MARTIAL_ARTS_NT )
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_DAMAGE_MELEE] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_BONUS_BREACHINGCHARGE] < 0 || zBackground[ubNumber].value[BG_EXPLOSIVE_ASSIGN] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == TECHNICIAN_NT || SkillsList[1] == TECHNICIAN_NT || SkillsList[2] == TECHNICIAN_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_SURVIVAL])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_MECHANICAL] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_TRAVEL_FOOT] < 0 || zBackground[ubNumber].value[BG_TRAVEL_CAR] <0 || zBackground[ubNumber].value[BG_TRAVEL_AIR] <0 ||
|
||||
zBackground[ubNumber].value[BG_RESI_DISEASE] < 0 || zBackground[ubNumber].value[BG_SNAKEDEFENSE] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == DOCTOR_NT || SkillsList[1] == DOCTOR_NT || SkillsList[2] == DOCTOR_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_BODYBUILDING])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_MEDICAL] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_PERC_CARRYSTRENGTH] < 0)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == MELEE_NT || SkillsList[1] == MELEE_NT || SkillsList[2] == MELEE_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_AMBIDEXTROUS])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_CTH_BLADE] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_INVENTORY] > 0)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == STEALTHY_NT || SkillsList[1] == STEALTHY_NT || SkillsList[2] == STEALTHY_NT )
|
||||
if (gfMinorTraitQuestions[IMP_SKILL_TRAITS_NEW_NIGHT_OPS])
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_STEALTH] < 0 )
|
||||
if (zBackground[ubNumber].value[BG_PERC_SLEEP] > 0 || zBackground[ubNumber].value[BG_PERC_HEARING_NIGHT] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == ATHLETICS_NT || SkillsList[1] == ATHLETICS_NT || SkillsList[2] == ATHLETICS_NT )
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_PERC_SPEED_RUNNING] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( SkillsList[0] == DEMOLITIONS_NT || SkillsList[1] == DEMOLITIONS_NT || SkillsList[2] == DEMOLITIONS_NT )
|
||||
{
|
||||
if ( zBackground[ ubNumber ].value[BG_EXPLOSIVE_ASSIGN] < 0 )
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch ( iPersonality )
|
||||
// Disabiliies
|
||||
switch (iChosenDisabilityTrait())
|
||||
{
|
||||
case HEAT_INTOLERANT:
|
||||
if ( zBackground[ ubNumber ].value[BG_DESERT] > 0 )
|
||||
if (zBackground[ubNumber].value[BG_DESERT] > 0 || zBackground[ubNumber].value[BG_TROPICAL] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case NERVOUS:
|
||||
@@ -684,7 +793,7 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
|
||||
return FALSE;
|
||||
break;
|
||||
case NONSWIMMER:
|
||||
if ( zBackground[ ubNumber ].value[BG_RIVER] > 0 || zBackground[ ubNumber ].value[BG_COASTAL] > 0 || zBackground[ ubNumber ].value[BG_SWIMMING] > 0 )
|
||||
if ( zBackground[ ubNumber ].value[BG_RIVER] > 0 || zBackground[ ubNumber ].value[BG_COASTAL] > 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case FEAR_OF_INSECTS:
|
||||
@@ -692,35 +801,109 @@ BOOLEAN IsBackGroundAllowed( UINT16 ubNumber )
|
||||
return FALSE;
|
||||
break;
|
||||
case FORGETFUL:
|
||||
if ( zBackground[ ubNumber ].value[BG_LEADERSHIP] > 0 )
|
||||
if (zBackground[ubNumber].value[BG_INVENTORY] < 0 || zBackground[ubNumber].value[BG_ASSAULT] < 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case PSYCHO:
|
||||
if ( zBackground[ ubNumber ].value[BG_LEADERSHIP] > 0 )
|
||||
if (zBackground[ubNumber].value[BG_LEADERSHIP] > 5)
|
||||
return FALSE;
|
||||
break;
|
||||
case DEAF:
|
||||
if (zBackground[ ubNumber ].value[BG_PERC_HEARING_NIGHT] > 0 || zBackground[ ubNumber ].value[BG_PERC_HEARING_DAY] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case SHORTSIGHTED:
|
||||
if (zBackground[ ubNumber ].value[BG_PERC_CTH_MAX] > 0 || zBackground[ubNumber].value[BG_PERC_SPOTTER] > 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case HEMOPHILIAC:
|
||||
if (zBackground[ubNumber].value[BG_RESI_DISEASE] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case AFRAID_OF_HEIGHTS:
|
||||
if ( zBackground[ubNumber].value[BG_HEIGHT] > 0 )
|
||||
if ( zBackground[ ubNumber ].value[BG_HEIGHT] > 0 || zBackground[ubNumber].value[BG_AIRDROP] > 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case SELF_HARM:
|
||||
if (zBackground[ubNumber].value[BG_RESI_DISEASE] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( iAttitude )
|
||||
// Character Traits
|
||||
switch (iChosenCharacterTrait())
|
||||
{
|
||||
case CHAR_TRAIT_SOCIABLE:
|
||||
if ( zBackground[ ubNumber ].uiFlags & BACKGROUND_XENOPHOBIC )
|
||||
if (zBackground[ubNumber].uiFlags & BACKGROUND_XENOPHOBIC || zBackground[ubNumber].value[BG_PERC_SPOTTER] < 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_LONER:
|
||||
if ( zBackground[ ubNumber ].value[BG_LEADERSHIP] > 0 )
|
||||
if (zBackground[ubNumber].value[BG_LEADERSHIP] > 0 || zBackground[ubNumber].value[BG_PERC_SPOTTER] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_OPTIMIST:
|
||||
if (zBackground[ubNumber].uiFlags & BACKGROUND_TRAPLEVEL)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_ASSERTIVE:
|
||||
if (zBackground[ubNumber].value[BG_PERC_INTERROGATION] < 0 || zBackground[ubNumber].value[BG_PERC_APPROACH_THREATEN] < 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_INTELLECTUAL:
|
||||
if (zBackground[ubNumber].value[BG_ADMINISTRATION_ASSIGNMENT] < 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_PRIMITIVE:
|
||||
if (zBackground[ubNumber].value[BG_ADMINISTRATION_ASSIGNMENT] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_AGGRESSIVE:
|
||||
if (zBackground[ubNumber].uiFlags & BACKGROUND_TRAPLEVEL || zBackground[ubNumber].value[BG_PERC_DISARM] > 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_PHLEGMATIC:
|
||||
if (zBackground[ubNumber].value[BG_ASSAULT] > 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_DAUNTLESS:
|
||||
if (zBackground[ubNumber].value[BG_CROUCHEDDEFENSE] < 0 )
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_PACIFIST:
|
||||
break;
|
||||
case CHAR_TRAIT_MALICIOUS:
|
||||
if (zBackground[ubNumber].value[BG_PERC_APPROACH_FRIENDLY] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
case CHAR_TRAIT_SHOWOFF:
|
||||
break;
|
||||
case CHAR_TRAIT_COWARD:
|
||||
if (zBackground[ubNumber].value[BG_PERC_CAPITULATION] > 0)
|
||||
return FALSE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// show exclusivly the BG's with tag <alt_impcreation> if Reduced_Imp_Creation is true in ja2options.ini
|
||||
// requires Alt_Imp_Creation to be true in ja2options.ini (otherwise BG's with tag <alt_impcreation> won't be shown)
|
||||
|
||||
if (gGameExternalOptions.fReducedIMPCreation)
|
||||
|
||||
{
|
||||
|
||||
if (zBackground[ubNumber].uiFlags & BACKGROUND_ALT_IMP_CREATION)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -807,4 +990,4 @@ void BtnIMPBackgroundPreviousCallback(GUI_BUTTON *btn,INT32 reason)
|
||||
usBackground = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-16
@@ -526,7 +526,7 @@ void DistributeInitialGear(MERCPROFILESTRUCT *pProfile)
|
||||
if(iOrder[i]!=-1)
|
||||
{
|
||||
// skip if this item is an attachment
|
||||
if(Item[tInv[iOrder[i]].inv].attachment)
|
||||
if(ItemIsAttachment(tInv[iOrder[i]].inv))
|
||||
continue;
|
||||
iSet = FALSE;
|
||||
number = tInv[iOrder[i]].iNumber;
|
||||
@@ -1103,7 +1103,7 @@ INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHow
|
||||
return HELMETPOS;
|
||||
if ( pProfile->inv[VESTPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_VEST )
|
||||
return VESTPOS;
|
||||
if ( pProfile->inv[LEGPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_LEGGINGS && !(Item[usItem].attachment))
|
||||
if ( pProfile->inv[LEGPOS] == NONE && Armour[Item[usItem].ubClassIndex].ubArmourClass == ARMOURCLASS_LEGGINGS && !ItemIsAttachment(usItem) )
|
||||
return LEGPOS;
|
||||
break;
|
||||
case IC_BLADE:
|
||||
@@ -1132,7 +1132,7 @@ INT32 SpecificFreePocket(MERCPROFILESTRUCT *pProfile, UINT16 usItem, UINT8 ubHow
|
||||
case IC_GUN:
|
||||
if ( pProfile->inv[HANDPOS] == NONE )
|
||||
return HANDPOS;
|
||||
if ( pProfile->inv[SECONDHANDPOS] == NONE && !(Item[pProfile->inv[HANDPOS]].twohanded))
|
||||
if ( pProfile->inv[SECONDHANDPOS] == NONE && !(ItemIsTwoHanded(pProfile->inv[HANDPOS])))
|
||||
return SECONDHANDPOS;
|
||||
if((UsingNewInventorySystem() == true))
|
||||
if ( pProfile->inv[GUNSLINGPOCKPOS] == NONE && pProfile->inv[BPACKPOCKPOS] == NONE && LBEPocketType[1].ItemCapacityPerSize[Item[usItem].ItemSize]!=0)
|
||||
@@ -1336,16 +1336,6 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("WriteOutCurrentImpCharacter: Nickname.dat"));
|
||||
|
||||
#ifndef USE_VFS
|
||||
char zFileName[13];
|
||||
char temp;
|
||||
|
||||
for(int i=0;i < 9;i++) // Madd: I couldn't get strcpy or anything to work here... weird... if s/o wants to fix it, go ahead
|
||||
{
|
||||
temp = (char) gMercProfiles[iProfileId].zNickname[i];
|
||||
zFileName[i] = temp;
|
||||
}
|
||||
#else
|
||||
char zFileName[32];
|
||||
if(vfs::Settings::getUseUnicode())
|
||||
{
|
||||
@@ -1355,7 +1345,6 @@ void WriteOutCurrentImpCharacter( INT32 iProfileId )
|
||||
{
|
||||
vfs::String::narrow(gMercProfiles[iProfileId].zNickname, 10, zFileName, 32);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Changed by ADB, rev 1513
|
||||
//strcat(zFileName,IMP_FILENAME_SUFFIX);
|
||||
@@ -1692,7 +1681,7 @@ void GiveIMPRandomItems( MERCPROFILESTRUCT *pProfile, UINT8 typeIndex )
|
||||
|
||||
// give ammo for guns
|
||||
Assert( usItem < gMAXITEMS_READ );
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !Item[usItem].rocketlauncher )
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !ItemIsRocketLauncher(usItem) )
|
||||
{
|
||||
usItem = DefaultMagazine(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPRandomItems: give ammo typeIndex = %d, usItem = %d ",typeIndex, usItem ));
|
||||
@@ -1737,7 +1726,7 @@ void GiveIMPItems( MERCPROFILESTRUCT *pProfile, INT8 abilityValue, UINT8 typeInd
|
||||
MakeProfileInvItemAnySlot(pProfile,usItem,100,1);
|
||||
|
||||
// give ammo for guns
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !Item[usItem].rocketlauncher )
|
||||
if ( Item[usItem].usItemClass == IC_GUN && !ItemIsRocketLauncher(usItem) )
|
||||
{
|
||||
usItem = DefaultMagazine(usItem);
|
||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,String("GiveIMPItems: give ammo typeIndex = %d, usItem = %d",typeIndex, usItem ));
|
||||
|
||||
@@ -8,7 +8,7 @@ void RenderIMPDisabilityTrait( void );
|
||||
void ExitIMPDisabilityTrait( void );
|
||||
void HandleIMPDisabilityTrait( void );
|
||||
|
||||
INT8 iChosenDisabilityTrait();
|
||||
INT8 iChosenDisabilityTrait();
|
||||
INT8 iPlayersAttributePointsBonusForDisabilitySelected();
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -1285,7 +1285,7 @@ void DistributePossibleItemsToVectors(void)
|
||||
{
|
||||
gIMPPossibleItems[HANDPOS].push_back(std::make_pair(usItem, Item[usItem].szItemName));
|
||||
|
||||
if (Item[usItem].twohanded) {
|
||||
if (ItemIsTwoHanded(usItem)) {
|
||||
gIMPPossibleItems[GUNSLINGPOCKPOS].push_back(std::make_pair(usItem, Item[usItem].szItemName));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -80,7 +80,7 @@ UINT8 gusNewMinorTraitRemap[IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS] =
|
||||
|
||||
BOOLEAN gfIMT_Redraw=FALSE;
|
||||
|
||||
BOOLEAN gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS ];
|
||||
BOOLEAN gfMinorTraitQuestions[ IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS ];
|
||||
|
||||
// these are the buttons for the questions
|
||||
INT32 giIMPMinorTraitAnswerButton[ IMP_SKILL_TRAITS_NEW_NUMBER_MINOR_SKILLS ];
|
||||
|
||||
@@ -98,8 +98,8 @@ UINT8 gusOldMajorTraitRemap[IMP_SKILL_TRAITS__NUMBER_SKILLS] =
|
||||
// Global Variables
|
||||
//
|
||||
//*******************************************************************
|
||||
BOOLEAN gfSkillTraitQuestions[ 20 ];
|
||||
BOOLEAN gfSkillTraitQuestions2[ 20 ];
|
||||
BOOLEAN gfSkillTraitQuestions[ 20 ];
|
||||
BOOLEAN gfSkillTraitQuestions2[ 20 ];
|
||||
|
||||
|
||||
BOOLEAN gfIST_Redraw=FALSE;
|
||||
|
||||
@@ -476,7 +476,6 @@ void GameInitFiles( )
|
||||
{
|
||||
if ( FileExists( FILES_DAT_FILE ) == TRUE )
|
||||
{
|
||||
FileClearAttributes( FILES_DAT_FILE );
|
||||
FileDelete( FILES_DAT_FILE );
|
||||
}
|
||||
|
||||
|
||||
@@ -460,7 +460,6 @@ void GameInitFinances()
|
||||
// unlink Finances data file
|
||||
if( (FileExists( FINANCES_DATA_FILE ) ) )
|
||||
{
|
||||
FileClearAttributes( FINANCES_DATA_FILE );
|
||||
FileDelete( FINANCES_DATA_FILE );
|
||||
}
|
||||
GetBalanceFromDisk( );
|
||||
|
||||
@@ -227,7 +227,6 @@ void GameInitHistory()
|
||||
if( ( FileExists( HISTORY_DATA_FILE ) ) )
|
||||
{
|
||||
// unlink history file
|
||||
FileClearAttributes( HISTORY_DATA_FILE );
|
||||
FileDelete( HISTORY_DATA_FILE );
|
||||
}
|
||||
|
||||
|
||||
@@ -7136,28 +7136,24 @@ void ClearOutTempLaptopFiles( void )
|
||||
// file file
|
||||
if ( (FileExists( "files.dat" ) == TRUE ) )
|
||||
{
|
||||
FileClearAttributes( "files.dat" );
|
||||
FileDelete( "files.dat" );
|
||||
}
|
||||
|
||||
// finances
|
||||
if ( (FileExists( "finances.dat" ) == TRUE ) )
|
||||
{
|
||||
FileClearAttributes( "finances.dat" );
|
||||
FileDelete( "finances.dat" );
|
||||
}
|
||||
|
||||
// email
|
||||
if ( (FileExists( "email.dat" ) == TRUE ) )
|
||||
{
|
||||
FileClearAttributes( "email.dat" );
|
||||
FileDelete( "email.dat" );
|
||||
}
|
||||
|
||||
// history
|
||||
if ( (FileExists( "history.dat" ) == TRUE ) )
|
||||
{
|
||||
FileClearAttributes( "history.dat" );
|
||||
FileDelete( "history.dat" );
|
||||
}
|
||||
}
|
||||
|
||||
+204
-30
@@ -2170,7 +2170,7 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
|
||||
|
||||
for ( int i = APPROACH_FRIENDLY; i <= APPROACH_RECRUIT; ++i )
|
||||
{
|
||||
mprintf( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), szLaptopStatText[7 + i] );
|
||||
mprintf( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), szLaptopStatText[LAPTOP_STAT_TEXT_FRIENDLY_APPROACH-1 + i] ); // APPROACH_FRIENDLY is 1 so fix the offset
|
||||
|
||||
CHAR16 sStr[200];
|
||||
swprintf( sStr, L"" );
|
||||
@@ -2180,7 +2180,7 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
|
||||
|
||||
swprintf( sStr, L"%d", val );
|
||||
|
||||
FindFontRightCoordinates( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH - 20, 0, sStr, PERS_FONT, &sX, &sY );
|
||||
FindFontRightCoordinates( (INT16)(pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, sStr, PERS_FONT, &sX, &sY );
|
||||
mprintf( sX, (pPersonnelScreenPoints[loc].y + 15), sStr );
|
||||
|
||||
// Add specific region for fast help window
|
||||
@@ -2205,10 +2205,10 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
|
||||
if ( (gMercProfiles[pSoldier->ubProfile].ubMiscFlags3 & PROFILE_MISC_FLAG3_GOODGUY) )
|
||||
{
|
||||
CHAR16 sStr1[200];
|
||||
swprintf( sStr1, szLaptopStatText[6] );
|
||||
swprintf( sStr1, szLaptopStatText[LAPTOP_STAT_TEXT_GOOD_GUY] );
|
||||
|
||||
CHAR16 sStr2[200];
|
||||
swprintf( sStr2, szLaptopStatText[7], pSoldier->GetName( ) );
|
||||
swprintf( sStr2, szLaptopStatText[LAPTOP_STAT_TEXT_REFUSES_TO_ATTACK_NON_HOSTILES], pSoldier->GetName( ) );
|
||||
|
||||
sX = pPersonnelScreenPoints[loc].x + (iSlot*TEXT_BOX_WIDTH);
|
||||
|
||||
@@ -2233,15 +2233,189 @@ void DisplayCharPersonality(INT32 iId, INT32 iSlot)
|
||||
++region;
|
||||
}
|
||||
|
||||
if ( !gGameExternalOptions.bDisableEvolution )
|
||||
if (gGameExternalOptions.fMercGrowthModifiersEnabled)
|
||||
{
|
||||
CHAR16 sStr2[200];
|
||||
swprintf( sStr2, szLaptopStatText[12 + gMercProfiles[pSoldier->ubProfile].bEvolution], pSoldier->GetName() );
|
||||
if (gMercProfiles[pSoldier->ubProfile].fRegresses)
|
||||
{
|
||||
CHAR16 sStr2[200];
|
||||
swprintf(sStr2, szLaptopStatText[LAPTOP_STAT_TEXT_MERC_REGRESSES]);
|
||||
|
||||
mprintf( (INT16)( pPersonnelScreenPoints[loc].x + ( iSlot*TEXT_BOX_WIDTH ) ), ( pPersonnelScreenPoints[loc].y + 15 ), sStr2 );
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + 15), sStr2);
|
||||
|
||||
++loc;
|
||||
++region;
|
||||
++loc;
|
||||
++region;
|
||||
}
|
||||
else
|
||||
{
|
||||
const int THRESHOLD_FAST = -3; // this value and below: "fast"
|
||||
const int THRESHOLD_SLOW = 3; // this value and above: "slow"
|
||||
int yOffset = 15;
|
||||
CHAR16 statTxt[200];
|
||||
// health
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_HEALTH_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLife <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLife >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// strength
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_STRENGTH_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierStrength <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierStrength >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// agility
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_AGILITY_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierAgility <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierAgility >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// dexterity
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_DEXTERITY_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierDexterity <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierDexterity >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// wisdom
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_WISDOM_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierWisdom <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierWisdom >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// marksmanship
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MARKSMANSHIP_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMarksmanship <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMarksmanship >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// explosives
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_EXPLOSIVES_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExplosive <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExplosive >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// leadership
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_LEADERSHIP_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLeadership <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierLeadership >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// medical
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MEDICAL_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMedical <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMedical >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// mechanical
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_MECHANICAL_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMechanical <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierMechanical >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
yOffset += 10;
|
||||
}
|
||||
// exp level
|
||||
{
|
||||
swprintf(statTxt, szLaptopStatText[LAPTOP_STAT_TEXT_EXPERIENCE_SPEED]);
|
||||
mprintf((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
|
||||
if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExpLevel <= THRESHOLD_FAST)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_FAST]);
|
||||
else if (gMercProfiles[pSoldier->ubProfile].bGrowthModifierExpLevel >= THRESHOLD_SLOW)
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_SLOW]);
|
||||
else
|
||||
swprintf(statTxt, L"%s", szLaptopStatText[LAPTOP_STAT_TEXT_AVERAGE]);
|
||||
FindFontRightCoordinates((INT16)(pPersonnelScreenPoints[loc].x + (iSlot * TEXT_BOX_WIDTH)), 0, TEXT_BOX_WIDTH, 0, statTxt, PERS_FONT, &sX, &sY);
|
||||
mprintf(sX, (pPersonnelScreenPoints[loc].y + yOffset), statTxt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7991,6 +8165,21 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[10], gSkillTraitValues.ubTHAPsNeededToThrowGrenadesReduction, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubTHMaxRangeToThrowGrenades != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[11], gSkillTraitValues.ubTHMaxRangeToThrowGrenades, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubTHCtHWhenThrowingGrenades != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsThrowing[12], gSkillTraitValues.ubTHCtHWhenThrowingGrenades, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NIGHT_OPS_NT:
|
||||
@@ -8096,44 +8285,29 @@ void AssignPersonnelSkillTraitHelpText( UINT8 ubTraitNumber, BOOLEAN fExpertLeve
|
||||
case DEMOLITIONS_NT:
|
||||
{
|
||||
swprintf( apStr, L"" );
|
||||
if( gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[0], gSkillTraitValues.ubDEAPsNeededToThrowGrenadesReduction, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEMaxRangeToThrowGrenades != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[1], gSkillTraitValues.ubDEMaxRangeToThrowGrenades, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDECtHWhenThrowingGrenades != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[2], gSkillTraitValues.ubDECtHWhenThrowingGrenades, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEDamageOfBombsAndMines != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[3], gSkillTraitValues.ubDEDamageOfBombsAndMines, sSpecialCharacters[0]);
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[0], gSkillTraitValues.ubDEDamageOfBombsAndMines, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEAttachDetonatorCheckBonus != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[4], gSkillTraitValues.ubDEAttachDetonatorCheckBonus, sSpecialCharacters[0]);
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[1], gSkillTraitValues.ubDEAttachDetonatorCheckBonus, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[5], gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus, sSpecialCharacters[0]);
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[2], gSkillTraitValues.ubDEPlantAndRemoveBombCheckBonus, sSpecialCharacters[0]);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEPlacedBombLevelBonus != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[6], gSkillTraitValues.ubDEPlacedBombLevelBonus);
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[3], gSkillTraitValues.ubDEPlacedBombLevelBonus);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
if( gSkillTraitValues.ubDEShapedChargeDamageMultiplier != 0 )
|
||||
{
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[7], gSkillTraitValues.ubDEShapedChargeDamageMultiplier);
|
||||
swprintf( atStr, gzIMPMinorTraitsHelpTextsDemolitions[4], gSkillTraitValues.ubDEShapedChargeDamageMultiplier);
|
||||
wcscat( apStr, atStr );
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user