From 81a56c1313e023ddb191ded57ac109e94fa40e9f Mon Sep 17 00:00:00 2001 From: Harmenszoon <25753539+Harmenszoon@users.noreply.github.com> Date: Mon, 11 May 2026 15:47:53 -0400 Subject: [PATCH] [Player] fix default potion expressions Default potion expressions only checked class defaults when the default string was empty, so potion. stayed false unless a profile explicitly set potion=. Store the generated default string before viewing it and use the same non-empty default behavior as consumable selection. Validated with a Beast Mastery Hunter minimal action list for default, explicit, alias, and wrong-potion expressions; also ran profiles/CI.simc iterations=10 cleanup_threads=1 output=NUL. --- engine/player/player.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/engine/player/player.cpp b/engine/player/player.cpp index c4cc379832c..2c390c8d9a9 100644 --- a/engine/player/player.cpp +++ b/engine/player/player.cpp @@ -12568,19 +12568,22 @@ std::unique_ptr player_t::create_expression( util::string_view expressio if ( splits.size() == 2 && splits[ 0 ] == "potion" ) { + std::string default_potion_str; std::string_view potion_view; if ( !potion_str.empty() ) { potion_view = potion_str; } - else if ( default_potion().empty() ) - { - potion_view = default_potion(); - } else { - return expr_t::create_constant( expression_str, false ); + default_potion_str = default_potion(); + if ( default_potion_str.empty() ) + { + return expr_t::create_constant( expression_str, false ); + } + + potion_view = default_potion_str; } if ( util::str_compare_ci( potion_view, splits[ 1 ] ) )