File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12322,20 +12322,12 @@ std::unique_ptr<expr_t> player_t::create_expression( util::string_view expressio
1232212322
1232312323 if ( splits.size() == 2 && splits[ 0 ] == "potion" )
1232412324 {
12325- std::string_view potion_view ;
12325+ std::string potion_name = potion_str.empty() ? default_potion() : potion_str ;
1232612326
12327- if ( !potion_str.empty() )
12328- {
12329- potion_view = potion_str;
12330- }
12331- else if ( default_potion().empty() )
12332- {
12333- potion_view = default_potion();
12334- }
12335- else
12336- {
12327+ if ( potion_name.empty() )
1233712328 return expr_t::create_constant( expression_str, false );
12338- }
12329+
12330+ std::string_view potion_view = potion_name;
1233912331
1234012332 if ( util::str_compare_ci( potion_view, splits[ 1 ] ) )
1234112333 return expr_t::create_constant( expression_str, true );
You can’t perform that action at this time.
0 commit comments