New Feature: Campaign History collects combat data and displays battle reports on the website.

requires GameDir >= r1901.

For more info, see http://www.bears-pit.com/board/ubbthreads.php/topics/329205.html#Post329205

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6705 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-12-22 23:22:45 +00:00
parent b3df6f55b5
commit f4dcc15ffa
57 changed files with 5074 additions and 220 deletions
+11
View File
@@ -69,6 +69,7 @@
#include "interface Dialogue.h"
#include "AIInternals.h" // added by SANDRO
#include "Bullets.h" // HEADROCK HAM 5, for use with Bullet Impact.
#include "CampaignStats.h" // added by Flugente
#endif
#include "Reinforcement.h"
@@ -1693,6 +1694,9 @@ UINT32 VirtualSoldierDressWound( SOLDIERTYPE *pSoldier, SOLDIERTYPE *pVictim, OB
pVictim->iHealableInjury = ((pVictim->stats.bLifeMax - pVictim->stats.bLife)*100);
else if (pVictim->iHealableInjury < 0)
pVictim->iHealableInjury = 0;
// Flugente: campaign stats
gCurrentIncident.usIncidentFlags |= INCIDENT_SURGERY;
}
// if any healing points remain, apply that to any remaining bleeding (1/1)
@@ -4603,6 +4607,10 @@ void AttackTarget( SOLDIERCELL *pAttacker, SOLDIERCELL *pTarget )
}
if( iNewLife <= 0 )
{ //soldier has been killed
// Flugente: campaign stats
gCurrentIncident.AddStat( pTarget->pSoldier, CAMPAIGNHISTORY_TYPE_KILL );
if( pAttacker->uiFlags & CELL_MERC )
{ //Player killed the enemy soldier -- update his stats as well as any assisters.
/////////////////////////////////////////////////////////////////////////////////////
@@ -4798,6 +4806,9 @@ void TargetHitCallback( SOLDIERCELL *pTarget, INT32 index )
{
if( pKiller->uiFlags & CELL_MERC )
{
// Flugente: campaign stats
gCurrentIncident.AddStat( pTarget->pSoldier, CAMPAIGNHISTORY_TYPE_KILL );
/////////////////////////////////////////////////////////////////////////////////////
// SANDRO - new mercs' records
switch(pTarget->pSoldier->ubSoldierClass)