mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
Added Speck as a playable merc (by anv)
o Speck can be hired by M.E.R.C o From now on, as long as Speck is hired (or dead, or POW, or travelling), he won't be sitting on Speck Com nor sending you emails. However, is he's able to, he'll comment on current situation from battlefield: player owing money, Flo getting married, MERC merc dying, etc., so keeping him alive might be a good idea o GameDir data revision >= 1701 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6215 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
#endif
|
||||
|
||||
#include "email.h"
|
||||
#include "mercs.h"
|
||||
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
@@ -2044,7 +2045,8 @@ void MERCMercWentUpALevelSendEmail( UINT8 ubMercMercIdValue )
|
||||
else
|
||||
pMerc = 0;
|
||||
if ( gProfilesMERC[ubMercMercIdValue].ProfilId == ubMercMercIdValue )
|
||||
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_MERC_LEVEL_UP);
|
||||
if( IsSpeckComAvailable() )// anv: only send level up email if Speck is available at website
|
||||
AddEmailTypeXML( pMerc, iMerc, iMerc, GetWorldTotalMin(), -1 , TYPE_EMAIL_MERC_LEVEL_UP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -94,6 +94,10 @@
|
||||
#include "Ja25Update.h"
|
||||
#endif
|
||||
|
||||
// anv: for playable Speck
|
||||
#include "Speck Quotes.h"
|
||||
#include "mercs.h"
|
||||
|
||||
//forward declarations of common classes to eliminate includes
|
||||
class OBJECTTYPE;
|
||||
class SOLDIERTYPE;
|
||||
@@ -2724,6 +2728,14 @@ void HandleNPCDoAction( UINT8 ubTargetNPC, UINT16 usActionCode, UINT8 ubQuoteNum
|
||||
if( pSoldier->ubProfile == FLO )
|
||||
{
|
||||
SetFactTrue( FACT_PC_MARRYING_DARYL_IS_FLO );
|
||||
// anv: make Speck whine about it immediately if on team
|
||||
if( !IsMercDead(BIFF) && !IsSpeckComAvailable() )
|
||||
{
|
||||
TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_FLO_MARRIED_A_COUSIN_BIFF_IS_ALIVE );
|
||||
// don't bring this up again
|
||||
LaptopSaveInfo.fSpeckSaidFloMarriedCousinQuote = TRUE;
|
||||
MakeBiffAwayForCoupleOfDays();
|
||||
}
|
||||
}
|
||||
|
||||
HandleMoraleEvent( pSoldier, MORALE_MERC_MARRIED, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
|
||||
@@ -123,6 +123,9 @@
|
||||
#include "ub_config.h"
|
||||
#endif
|
||||
|
||||
// anv: for playable Speck
|
||||
#include "mercs.h"
|
||||
|
||||
// OJW - 20090419
|
||||
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_MERCS = CODE_MAXIMUM_NUMBER_OF_PLAYER_MERCS;
|
||||
UINT8 giMAXIMUM_NUMBER_OF_PLAYER_VEHICLES = CODE_MAXIMUM_NUMBER_OF_PLAYER_VEHICLES;
|
||||
@@ -3359,6 +3362,9 @@ void HandlePlayerTeamMemberDeath( SOLDIERTYPE *pSoldier )
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// anv: handle Speck witnessing his employee death
|
||||
if( pTeamSoldier->ubProfile == SPECK_PLAYABLE && pSoldier->ubWhatKindOfMercAmI == MERC_TYPE__MERC )
|
||||
HandleSpeckWitnessingEmployeeDeath( pSoldier );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
#include "ub_config.h"
|
||||
#include "XML.h"
|
||||
|
||||
// anv: for playable Speck
|
||||
#include "Speck Quotes.h"
|
||||
#include "LaptopSave.h"
|
||||
|
||||
#include "connect.h"
|
||||
#ifdef JA2EDITOR
|
||||
extern BOOLEAN gfProfileDataLoaded;
|
||||
@@ -2342,6 +2346,13 @@ SOLDIERTYPE * SwapLarrysProfiles( SOLDIERTYPE * pSoldier )
|
||||
if ( pSoldier->ubProfile == LARRY_DRUNK )
|
||||
{
|
||||
SetFactTrue( FACT_LARRY_CHANGED );
|
||||
// anv: make speck whine about it immediately if on team
|
||||
if( !IsSpeckComAvailable() )
|
||||
{
|
||||
TacticalCharacterDialogue( FindSoldierByProfileID( SPECK_PLAYABLE , TRUE ), SPECK_PLAYABLE_QUOTE_LARRY_RELAPSED );
|
||||
// don't bring this up again
|
||||
LaptopSaveInfo.uiSpeckQuoteFlags |= SPECK_QUOTE__ALREADY_TOLD_PLAYER_THAT_LARRY_RELAPSED;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -87,6 +87,7 @@ extern BOOLEAN LoadNewSystemMercsToSaveGameFile( HWFILE hFile );
|
||||
|
||||
enum NPCIDs
|
||||
{
|
||||
VICKI = 4,// anv: check when hiring Speck
|
||||
BIFF = 40,
|
||||
HAYWIRE,
|
||||
GASKET,
|
||||
@@ -240,6 +241,7 @@ enum NPCIDs
|
||||
NPC169,
|
||||
#endif
|
||||
NPC170 = NPC169 + 84,
|
||||
SPECK_PLAYABLE = 191,// anv
|
||||
} ;
|
||||
|
||||
BOOLEAN LoadMercProfiles(void);
|
||||
|
||||
Reference in New Issue
Block a user