QTfrontend/campaign.cpp
changeset 14462 4c743ef80b1b
parent 13910 6c8d4e140f27
child 14633 c9d2a5a9f6ba
equal deleted inserted replaced
14461:9844450389a4 14462:4c743ef80b1b
    50     Returns true if the specified mission has been completed
    50     Returns true if the specified mission has been completed
    51     campaignName: Name of the campaign in question
    51     campaignName: Name of the campaign in question
    52     missionInList: QComboBox index of the mission as selected in the mission widget
    52     missionInList: QComboBox index of the mission as selected in the mission widget
    53     teamName: Name of the playing team
    53     teamName: Name of the playing team
    54 */
    54 */
    55 bool isMissionWon(QString & campaignName, int missionInList, QString & teamName)
    55 bool isCampMissionWon(QString & campaignName, int missionInList, QString & teamName)
    56 {
    56 {
    57     QSettings* teamfile = getCampTeamFile(campaignName, teamName);
    57     QSettings* teamfile = getCampTeamFile(campaignName, teamName);
    58     int progress = teamfile->value("Campaign " + campaignName + "/Progress", 0).toInt();
    58     int progress = teamfile->value("Campaign " + campaignName + "/Progress", 0).toInt();
    59     int unlockedMissions = teamfile->value("Campaign " + campaignName + "/UnlockedMissions", 0).toInt();
    59     int unlockedMissions = teamfile->value("Campaign " + campaignName + "/UnlockedMissions", 0).toInt();
    60     if(progress>0 && unlockedMissions==0)
    60     if(progress>0 && unlockedMissions==0)