mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
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:
@@ -47,6 +47,7 @@
|
||||
// added by SANDRO
|
||||
#include "Tactical Save.h"
|
||||
#include "message.h"
|
||||
#include "CampaignStats.h" // added by Flugente
|
||||
#endif
|
||||
|
||||
#ifdef JA2UB
|
||||
@@ -2157,6 +2158,9 @@ void LogBattleResults( UINT8 ubVictoryCode)
|
||||
AddHistoryToPlayersLog( HISTORY_SLAUGHTEREDBLOODCATS, 0, GetWorldTotalMin(), sSectorX, sSectorY );
|
||||
break;
|
||||
}
|
||||
|
||||
// Flugente: campaign stats
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_WIN;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2183,6 +2187,29 @@ void LogBattleResults( UINT8 ubVictoryCode)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch( gubEnemyEncounterCode )
|
||||
{
|
||||
case ENEMY_INVASION_CODE:
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACK_ENEMY;
|
||||
break;
|
||||
case ENEMY_ENCOUNTER_CODE:
|
||||
case ENTERING_ENEMY_SECTOR_CODE:
|
||||
case CREATURE_ATTACK_CODE:
|
||||
case ENTERING_BLOODCAT_LAIR_CODE:
|
||||
case FIGHTING_CREATURES_CODE:
|
||||
case HOSTILE_CIVILIANS_CODE:
|
||||
case HOSTILE_BLOODCATS_CODE:
|
||||
gCurrentIncident.usIncidentFlags |= INCIDENT_ATTACK_PLAYERSIDE;
|
||||
break;
|
||||
case ENEMY_AMBUSH_CODE:
|
||||
case BLOODCAT_AMBUSH_CODE:
|
||||
gCurrentIncident.usIncidentFlags |= (INCIDENT_ATTACK_ENEMY|INCIDENT_AMBUSH);
|
||||
break;
|
||||
}
|
||||
|
||||
// Flugente: if battle has ended, close this incident, add it to the global incidents, and clear it
|
||||
FinishIncident(gWorldSectorX, gWorldSectorY, gbWorldSectorZ);
|
||||
}
|
||||
|
||||
void HandlePreBattleInterfaceStates()
|
||||
|
||||
Reference in New Issue
Block a user