Added new records: diseases caught, interrogations, total damage taken, total damage dealt

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8376 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-01-26 20:46:26 +00:00
parent e643c1ea57
commit 5f2da3707c
12 changed files with 96 additions and 16 deletions
+19
View File
@@ -9930,6 +9930,14 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
VehicleTakeDamage( this->bVehicleID, ubReason, sLifeDeduct, this->sGridNo, ubAttacker );
HandleTakeDamageDeath( this, bOldLife, ubReason );
// add to our records.
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && MercPtrs[ubAttacker]->ubProfile != NO_PROFILE )
gMercProfiles[MercPtrs[ubAttacker]->ubProfile].records.usDamageDealt += sLifeDeduct;
if ( this->ubProfile != NO_PROFILE )
gMercProfiles[this->ubProfile].records.usDamageTaken += sLifeDeduct;
return(0);
}
@@ -10096,6 +10104,13 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sBr
this->usPendingAnimation = NO_PENDING_ANIMATION;
}
// add to our records.
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && MercPtrs[ubAttacker]->ubProfile != NO_PROFILE )
gMercProfiles[MercPtrs[ubAttacker]->ubProfile].records.usDamageDealt += sLifeDeduct;
if ( this->ubProfile != NO_PROFILE )
gMercProfiles[this->ubProfile].records.usDamageTaken += sLifeDeduct;
if ( fShowDamage )
{
this->sDamage += sLifeDeduct;
@@ -18478,6 +18493,10 @@ void SOLDIERTYPE::AnnounceDisease( UINT8 aDisease )
if ( this->bTeam == gbPlayerNum )
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, szDiseaseText[TEXT_DISEASE_DIAGNOSE_GENERAL], this->GetName( ), Disease[aDisease].szName );
// add to our records.
if ( this->ubProfile != NO_PROFILE )
gMercProfiles[this->ubProfile].records.usTimesInfected += 1;
}
// do we have any disease? fDiagnosedOnly: check for wether we know of this infection fHealableOnly: check wether it can be healed