From 6c10749c5cdf384cf33aeefd1a85dbb8ccac44f0 Mon Sep 17 00:00:00 2001 From: andrei Date: Tue, 2 Nov 2021 14:00:50 +0200 Subject: [PATCH] inventory_multisel: toggle entries fixes use constructor character instead of player char --- src/inventory_ui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index a69913fcae95e..86e89d1a25da6 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -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 );