move all_items_identified into cParty
This commit is contained in:
@@ -1006,7 +1006,7 @@ void handle_item_shop_action(short item_hit) {
|
||||
target.ident = true;
|
||||
shopper.combine_things();
|
||||
if(overall_mode == MODE_ITEM_TARGET) {
|
||||
if(all_items_identified()){
|
||||
if(univ.party.all_items_identified()){
|
||||
overall_mode = MODE_TOWN;
|
||||
stat_screen_mode = MODE_INVEN;
|
||||
ASB("Identify: All of your items are identified.");
|
||||
|
@@ -579,7 +579,7 @@ void do_mage_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
break;
|
||||
|
||||
case eSpell::IDENTIFY:{
|
||||
bool all_identified = all_items_identified();
|
||||
bool all_identified = univ.party.all_items_identified();
|
||||
|
||||
// Cancel without spending points if there are no unidentified items
|
||||
if(!(freebie || all_identified))
|
||||
@@ -2629,12 +2629,3 @@ short party_size(bool only_living) {
|
||||
return num_pcs;
|
||||
|
||||
}
|
||||
|
||||
bool all_items_identified() {
|
||||
bool all_identified = true;
|
||||
for(cPlayer& pc : univ.party)
|
||||
for(cItem& item : pc.items)
|
||||
if (item.variety != eItemType::NO_ITEM)
|
||||
all_identified &= item.ident;
|
||||
return all_identified;
|
||||
}
|
Reference in New Issue
Block a user