[Player] fix default potion expressions#11461
Open
Harmenszoon wants to merge 1 commit into
Open
Conversation
Default potion expressions only checked class defaults when the default string was empty, so potion.<default> 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
potion.<name>expressions so they use a player's class default potion whenpotion=is not explicitly set.std::string_view.Cause
player_t::create_expression()only consulteddefault_potion()when the default was empty, so common expressions such aspotion.lights_potential_2returned false for profiles relying on class defaults. The same code path also assigned a temporarystd::stringreturn value into astd::string_view.Validation
build-codex\simc.exewith MSVC/CMake.actions=potion,if=potion.lights_potential_2did not showlights_potential.potion=lights_potential_2runs both showlights_potentialandTotalEvents=59withthreads=1 target_error=0 deterministic=1 seed=12345.actions=potion,if=potion.tempered_potion_3remains false and does not show the potion buff.actions=potion,if=potion.lights_potentialstill reaches the suffix-stripping path and shows the potion buff.profiles/CI.simc iterations=10 cleanup_threads=1 output=NULexits 0. Existing baseline warnings about Frostbane, Static Charge, Fury default talents, and runeforges remain unchanged.Generated files
None.