diff --git a/CHANGELOG.md b/CHANGELOG.md index 2532db23..b401a777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,13 @@ ## HEAD +### Bug Fixes + +- Game loading fix where shops data was being read twice, and the second time + resulted in incorrect data. Oops! Broken during save game refactor: + https://github.com/dungeons-of-moria/umoria/commit/ce2c756 + + ## 5.7.6 (2017-11-05) ### Bug Fixes diff --git a/src/save.cpp b/src/save.cpp index 661ef515..c5be1abc 100644 --- a/src/save.cpp +++ b/src/save.cpp @@ -834,25 +834,6 @@ bool loadGame(bool &generate) { generate = false; // We have restored a cave - no need to generate. - for (auto &store : stores) { - store.turns_left_before_closing = rd_long(); - store.insults_counter = rd_short(); - store.owner_id = rd_byte(); - store.unique_items_counter = rd_byte(); - store.good_purchases = rd_short(); - store.bad_purchases = rd_short(); - if (store.unique_items_counter > STORE_MAX_DISCRETE_ITEMS) { - goto error; - } - for (int j = 0; j < store.unique_items_counter; j++) { - store.inventory[j].cost = rd_long(); - rd_item(store.inventory[j].item); - } - } - - // read the time that the file was saved - time_saved = rd_long(); - if (ferror(fileptr) != 0) { goto error; }