1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-15 13:33:36 +02:00

save results only if from set

This commit is contained in:
Laserlicht 2023-09-20 22:28:45 +02:00 committed by GitHub
parent dfb5ccbeaf
commit 48231f5f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -683,8 +683,11 @@ void CServerHandler::startCampaignScenario(std::shared_ptr<CampaignState> cs)
auto & epilogue = ourCampaign->scenario(*ourCampaign->lastScenario()).epilog;
auto finisher = [=]()
{
Settings entry = persistent.write["campaign"][ourCampaign->campaignSet][ourCampaign->getFilename()]["completed"];
entry->Bool() = true;
if(ourCampaign->campaignSet != "")
{
Settings entry = persistent.write["campaign"][ourCampaign->campaignSet][ourCampaign->getFilename()]["completed"];
entry->Bool() = true;
}
if(!ourCampaign->isCampaignFinished())
{