Fix use of a static bitset to record whether items (in a dynamic vector) have been taken

This commit is contained in:
2019-11-23 12:28:41 -05:00
parent c1a3ff2a44
commit 4ad85936d3
6 changed files with 27 additions and 6 deletions

View File

@@ -248,7 +248,7 @@ short dist_from_party(location where) {
void set_item_flag(cItem* item) {
if((item->is_special > 0) && (item->is_special < 65)) {
item->is_special--;
univ.town->item_taken.set(item->is_special);
univ.town->set_item_taken(item->is_special);
item->is_special = 0;
}
}

View File

@@ -383,7 +383,7 @@ void start_town_mode(short which_town, short entry_dir) {
continue;
}
// Don't place the item if the party already took it, unless it's always there
if(univ.town->item_taken[i] && !preset.always_there) {
if(univ.town->is_item_taken(i) && !preset.always_there) {
univ.town.items.pop_back();
continue;
}