|
|
@@ -673,13 +673,13 @@ void CServerHandler::startGameplay(VCMI_LIB_WRAP_NAMESPACE(CGameState) * gameSta
|
|
|
setState(EClientState::GAMEPLAY);
|
|
|
}
|
|
|
|
|
|
-void CServerHandler::showHighScoresAndEndGameplay(PlayerColor player, bool victory)
|
|
|
+void CServerHandler::showHighScoresAndEndGameplay(PlayerColor player, bool victory, StatisticDataSet statistic)
|
|
|
{
|
|
|
HighScoreParameter param = HighScore::prepareHighScores(client->gameState(), player, victory);
|
|
|
|
|
|
if(victory && client->gameState()->getStartInfo()->campState)
|
|
|
{
|
|
|
- startCampaignScenario(param, client->gameState()->getStartInfo()->campState);
|
|
|
+ startCampaignScenario(param, client->gameState()->getStartInfo()->campState, statistic);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -690,7 +690,7 @@ void CServerHandler::showHighScoresAndEndGameplay(PlayerColor player, bool victo
|
|
|
endGameplay();
|
|
|
GH.defActionsDef = 63;
|
|
|
CMM->menu->switchToTab("main");
|
|
|
- GH.windows().createAndPushWindow<CHighScoreInputScreen>(victory, scenarioHighScores);
|
|
|
+ GH.windows().createAndPushWindow<CHighScoreInputScreen>(victory, scenarioHighScores, statistic);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -723,7 +723,7 @@ void CServerHandler::restartGameplay()
|
|
|
logicConnection->enterLobbyConnectionMode();
|
|
|
}
|
|
|
|
|
|
-void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared_ptr<CampaignState> cs)
|
|
|
+void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared_ptr<CampaignState> cs, StatisticDataSet statistic)
|
|
|
{
|
|
|
std::shared_ptr<CampaignState> ourCampaign = cs;
|
|
|
|
|
|
@@ -739,7 +739,7 @@ void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared
|
|
|
endGameplay();
|
|
|
|
|
|
auto & epilogue = ourCampaign->scenario(*ourCampaign->lastScenario()).epilog;
|
|
|
- auto finisher = [ourCampaign, campaignScoreCalculator]()
|
|
|
+ auto finisher = [ourCampaign, campaignScoreCalculator, statistic]()
|
|
|
{
|
|
|
if(ourCampaign->campaignSet != "" && ourCampaign->isCampaignFinished())
|
|
|
{
|
|
|
@@ -755,7 +755,7 @@ void CServerHandler::startCampaignScenario(HighScoreParameter param, std::shared
|
|
|
else
|
|
|
{
|
|
|
CMM->openCampaignScreen(ourCampaign->campaignSet);
|
|
|
- GH.windows().createAndPushWindow<CHighScoreInputScreen>(true, *campaignScoreCalculator);
|
|
|
+ GH.windows().createAndPushWindow<CHighScoreInputScreen>(true, *campaignScoreCalculator, statistic);
|
|
|
}
|
|
|
};
|
|
|
|