void Campaigns::loadCampaign(const Campaign &campaign) { unload(false); try { _currentCampaign = getCampaign(campaign.getUID()); if (!_currentCampaign) throw Common::Exception("Campaign does not exist in this context"); _currentCampaign->load(); } catch (Common::Exception &e) { unload(false); e.add("Failed loading campaign \"%s\" (\"%s\")", campaign.getUID().c_str(), campaign.getName().getString().c_str()); throw e; } _hasCampaign = true; }
void Campaigns::changeCampaign(const Campaign &campaign) { _newCampaign = campaign.getUID(); }