mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
New feature: The M.E.R.C. website now also has gearkits (by JMich)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5490 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -212,6 +212,11 @@ INT32 GetNumberOfHiredMercs()
|
||||
#else
|
||||
uiContractCharge = gMercProfiles[ usMercID ].sSalary * gMercProfiles[ usMercID ].iMercMercContractLength;
|
||||
#endif
|
||||
//JMich_MMG: If gearkit unpaid for, add it to cost
|
||||
if ( gMercProfiles[ usMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID)
|
||||
{
|
||||
uiContractCharge += gMercProfiles[ usMercID ].usOptionalGearCost;
|
||||
}
|
||||
giMercTotalContractCharge += uiContractCharge;
|
||||
|
||||
count++;
|
||||
@@ -579,6 +584,11 @@ void DisplayHiredMercs()
|
||||
#else
|
||||
uiContractCharge = gMercProfiles[ usMercID ].sSalary * gMercProfiles[ usMercID ].iMercMercContractLength;
|
||||
#endif
|
||||
//JMich_MMG: If gearkit unpaid for, add its cost
|
||||
if ( gMercProfiles[ usMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID)
|
||||
{
|
||||
uiContractCharge += gMercProfiles[ usMercID ].usOptionalGearCost;
|
||||
}
|
||||
swprintf(sTemp, L"$%6d", uiContractCharge );
|
||||
DrawTextToScreen(sTemp, MERC_AC_FOURTH_COLUMN_X, usPosY, MERC_AC_FOURTH_COLUMN_WIDTH, MERC_ACCOUNT_DYNAMIC_TEXT_FONT, ubFontColor, FONT_MCOLOR_BLACK, FALSE, CENTER_JUSTIFIED);
|
||||
|
||||
@@ -621,15 +631,20 @@ void SettleMercAccounts()
|
||||
#else
|
||||
iContractCharge = gMercProfiles[ ubMercID ].sSalary * gMercProfiles[ ubMercID ].iMercMercContractLength;
|
||||
#endif
|
||||
|
||||
//JMich_MMG: If gearkit unpaid for, add its cost
|
||||
if (gMercProfiles[ ubMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID)
|
||||
{
|
||||
iContractCharge += gMercProfiles[ ubMercID ].usOptionalGearCost;
|
||||
}
|
||||
//if the player can afford to pay this merc
|
||||
if( LaptopSaveInfo.iCurrentBalance >= iPartialPayment + iContractCharge )
|
||||
{
|
||||
//Increment the counter that keeps track of the of the number of days the player has paid for merc services
|
||||
LaptopSaveInfo.guiNumberOfMercPaymentsInDays += gMercProfiles[ ubMercID ].iMercMercContractLength;
|
||||
|
||||
//Then reset the merc contract counter
|
||||
//Then reset the merc contract counter (and remove the unpaid gearkit flag)
|
||||
gMercProfiles[ ubMercID ].iMercMercContractLength = 0;
|
||||
gMercProfiles[ ubMercID ].ubMiscFlags2 &= (~PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID);
|
||||
|
||||
//Add this mercs contract charge to the total
|
||||
iPartialPayment += iContractCharge;
|
||||
@@ -814,8 +829,13 @@ UINT32 CalculateHowMuchPlayerOwesSpeck()
|
||||
#else
|
||||
uiContractCharge += gMercProfiles[ usMercID ].sSalary * gMercProfiles[ usMercID ].iMercMercContractLength;
|
||||
#endif
|
||||
//JMich_MMG: If gearkit unpaid for, add its cost
|
||||
if ( gMercProfiles[ usMercID ].ubMiscFlags2 & PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID)
|
||||
{
|
||||
uiContractCharge += gMercProfiles[ usMercID ].usOptionalGearCost;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return( uiContractCharge );
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -38,6 +38,8 @@
|
||||
#define PROFILE_MISC_FLAG2_NEEDS_TO_SAY_HOSTILE_QUOTE 0x10
|
||||
#define PROFILE_MISC_FLAG2_MARRIED_TO_HICKS 0x20
|
||||
#define PROFILE_MISC_FLAG2_ASKED_BY_HICKS 0x40
|
||||
//JMich_MMG: Flag to see if gearkit cost is still unpaid for
|
||||
#define PROFILE_MISC_FLAG2_MERC_GEARKIT_UNPAID 0x80
|
||||
|
||||
#define PROFILE_MISC_FLAG3_PLAYER_LEFT_MSG_FOR_MERC_AT_AIM 0x01 // In the aimscreen, the merc was away and the player left a message
|
||||
#define PROFILE_MISC_FLAG3_PERMANENT_INSERTION_CODE 0x02
|
||||
|
||||
@@ -923,6 +923,8 @@ enum
|
||||
MERC_FILES_HIRE_TO_MANY_PEOPLE_WARNING,
|
||||
|
||||
MERC_FILES_MERC_UNAVAILABLE,
|
||||
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,
|
||||
TEXT_NUM_MERC_FILES,
|
||||
};
|
||||
extern STR16 MercInfo[];
|
||||
|
||||
@@ -4224,6 +4224,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"看起来你雇佣了太多的佣兵。最多只能雇18人。", //"Looks like you're trying to hire too many mercs. Your limit is 18.",
|
||||
L"不可雇佣", //"Unavailable",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4224,6 +4224,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Lijkt erop dat je teveel huurlingen wil recruteren. Limiet is 18.",
|
||||
L"Niet beschikbaar",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4222,6 +4222,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Looks like you're trying to hire too many mercs. Your limit is 18.",
|
||||
L"Unavailable",
|
||||
L"Bio",
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4214,6 +4214,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Vous ne pouvez engager plus de 18 mercenaires.",
|
||||
L"Indisponible",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4149,6 +4149,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Sie versuchen, zu viele Söldner anzuheuern. Sie haben die Maximalanzahl erreicht.",
|
||||
L"nicht da",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
// For use at the M.E.R.C. web site. Text relating to opening an account with MERC
|
||||
|
||||
@@ -4212,6 +4212,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Sembra che state arruolando troppi mercenari. Il vostro limite è di 18.",
|
||||
L"Non disponibile",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4220,6 +4220,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Wygląda na to, że chcesz wynająć zbyt wielu najemników. Limit wynosi 18.",
|
||||
L"Niedostępny",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4211,6 +4211,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Похоже, вы пытаетесь нанять более 18 наемников, а это недопустимо.",
|
||||
L"Недоступно",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4225,6 +4225,8 @@ STR16 MercInfo[] =
|
||||
|
||||
L"Looks like you're trying to hire too many mercs. Your limit is 18.",
|
||||
L"Unavailable",
|
||||
L"Bio", //TODO.Translate
|
||||
L"Inv",
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user