mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Features by rftr (http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=12557&goto=362288&#msg_362288)
New option BOBBY_RAY_TOOLTIPS_SHOW_LBE_DETAILS. Stop Speck from spamming your email when multiple new mercs are available on the same day. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8926 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+23
-12
@@ -3172,25 +3172,28 @@ BOOLEAN CanMercBeAvailableYet( UINT8 ubMercToCheck )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
void NewMercsAvailableAtMercSiteCallBack( )
|
||||
void NewMercsAvailableAtMercSiteCallBack()
|
||||
{
|
||||
for(UINT8 i=0; i<NUM_PROFILES; i++)
|
||||
{
|
||||
if ( gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE )
|
||||
// rftr: don't spam the user's email when MERC has multiple new personnel available on the same day
|
||||
bool sentNewMercsEmail = false;
|
||||
|
||||
for (UINT8 i = 0; i < NUM_PROFILES; i++)
|
||||
{
|
||||
if (gConditionsForMercAvailability[i].ProfilId != 0 && gConditionsForMercAvailability[i].NewMercsAvailable == FALSE && gConditionsForMercAvailability[i].StartMercsAvailable == FALSE)
|
||||
{
|
||||
if( CanMercBeAvailableYet( gConditionsForMercAvailability[i].uiIndex ) )
|
||||
if (CanMercBeAvailableYet(gConditionsForMercAvailability[i].uiIndex))
|
||||
{
|
||||
gConditionsForMercAvailability[i].NewMercsAvailable = TRUE;
|
||||
|
||||
|
||||
//if ( gConditionsForMercAvailability[ gConditionsForMercAvailability[i].uiIndex ].Drunk == TRUE )
|
||||
if ( gConditionsForMercAvailability[i].Drunk == TRUE )
|
||||
if (gConditionsForMercAvailability[i].Drunk == TRUE)
|
||||
{
|
||||
LaptopSaveInfo.gubLastMercIndex = gConditionsForMercAvailability[gConditionsForMercAvailability[i].uiAlternateIndex].uiIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If Previous merc has alternate index
|
||||
if (i > 0 && gConditionsForMercAvailability[ gConditionsForMercAvailability[i - 1].uiIndex ].uiAlternateIndex != 255)
|
||||
if (i > 0 && gConditionsForMercAvailability[gConditionsForMercAvailability[i - 1].uiIndex].uiAlternateIndex != 255)
|
||||
{
|
||||
// Previous merc has alternate (drunk) merc, skip his one!
|
||||
//LaptopSaveInfo.gubLastMercIndex = LaptopSaveInfo.gubLastMercIndex + 2;
|
||||
@@ -3205,14 +3208,22 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
||||
gConditionsForMercAvailability[i].StartMercsAvailable = TRUE;
|
||||
|
||||
#ifdef JA2UB
|
||||
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
if (!sentNewMercsEmail)
|
||||
{
|
||||
sentNewMercsEmail = true;
|
||||
AddEmail(NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
}
|
||||
|
||||
//new mercs are available
|
||||
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
|
||||
#else
|
||||
if( IsSpeckComAvailable() )
|
||||
if (IsSpeckComAvailable())
|
||||
{
|
||||
AddEmail( NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
if (!sentNewMercsEmail)
|
||||
{
|
||||
sentNewMercsEmail = true;
|
||||
AddEmail(NEW_MERCS_AT_MERC, NEW_MERCS_AT_MERC_LENGTH, SPECK_FROM_MERC, GetWorldTotalMin(), -1, -1, TYPE_EMAIL_EMAIL_EDT);
|
||||
}
|
||||
|
||||
//new mercs are available
|
||||
LaptopSaveInfo.fNewMercsAvailableAtMercSite = TRUE;
|
||||
@@ -3220,7 +3231,7 @@ void NewMercsAvailableAtMercSiteCallBack( )
|
||||
else
|
||||
{
|
||||
// anv: Have speck inform player personally
|
||||
TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE, TRUE ), SPECK_PLAYABLE_QUOTE_NEW_MERCS_AVAILABLE );
|
||||
TacticalCharacterDialogue(FindSoldierByProfileID(SPECK_PLAYABLE, TRUE), SPECK_PLAYABLE_QUOTE_NEW_MERCS_AVAILABLE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user