try to save correctly SHOPSTOCK...

This commit is contained in:
ALONSO Laurent
2022-07-14 13:47:08 +02:00
committed by Celtic Minstrel
parent 271f198ff8
commit d1cb01e263
2 changed files with 2 additions and 1 deletions

View File

@@ -732,7 +732,7 @@ void cParty::writeTo(std::ostream& file) const {
file << "QUEST " << p.first << ' ' << p.second.status << ' ' << p.second.start << ' ' << p.second.source << '\n';
for(auto p : store_limited_stock) {
for(auto p2 : p.second) {
file << "SHOPSTOCK " << p.first << p2.first << p2.second;
file << "SHOPSTOCK " << p.first << ' ' << p2.first << ' ' << p2.second << '\n';
}
}
for(auto iter = campaign_flags.begin(); iter != campaign_flags.end(); iter++){

View File

@@ -1350,6 +1350,7 @@ void cUniverse::enter_scenario(const std::string& name) {
pop.which_town = 200;
for(short i = 0; i < 10; i++)
party.out_c[i].exists = false;
party.store_limited_stock.clear();
party.magic_store_items.clear();
// TODO: Now uncertain if the journal should really persist
// univ.party.journal.clear();