Skip to content

Commit

Permalink
inventory_multisel: toggle entries fixes
Browse files Browse the repository at this point in the history
use constructor character instead of player char
  • Loading branch information
andrei8l committed Nov 12, 2021
1 parent 256a93f commit 6c10749
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/inventory_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2621,10 +2621,10 @@ void inventory_multiselector::toggle_entries( int &count, const toggle_mode mode
selected = get_active_column().get_all_selected();
break;
case toggle_mode::NON_FAVORITE_NON_WORN: {
const auto filter_to_nonfavorite_and_nonworn = []( const inventory_entry & entry ) {
const auto filter_to_nonfavorite_and_nonworn = [this]( const inventory_entry & entry ) {
return entry.is_selectable() &&
!entry.any_item()->is_favorite &&
!get_player_character().is_worn( *entry.any_item() );
!u.is_worn( *entry.any_item() );
};

selected = get_active_column().get_entries( filter_to_nonfavorite_and_nonworn );
Expand Down

0 comments on commit 6c10749

Please sign in to comment.