Repository navigation
Conversation
A warrior profile without a main hand weapon hit an assert in warrior_auto_attack_t in debug builds. Release builds ran, but the unarmed swing had no base damage. Drop the assert and treat the empty main hand as an unarmed weapon: 2.0 swing time (the weapon_t default) and 1 base damage. Verified in game on build 1.60.1.70888: with no weapon equipped the character sheet shows 49.71 - 49.71 damage and 2.0 speed at 341 attack power, which is 1 + 341 / 14 * 2.0. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Collaborator
|
I'm not sure what value this brings. Its an assert so it only matters in debug builds, and someone with a debug build can just change the source if they really need to. Simming without a weapon is a highly abnormal use case. I'll let other maintainers chime in, but I'm not sure why we'd want to have robust support for weaponless sims. |
Author
|
Agreed, closing. |
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.
A warrior profile without a main hand weapon aborts in debug builds:
Reproduce with a profile that is just
warrior="T",level=31,race=dwarf. Release builds run it, but the unarmed swing has no base damage.Change
warrior_auto_attack_tno longer asserts. An empty main hand is treated as an unarmed weapon: 2.0 swing time (theweapon_tdefault) and 1 base damage.Verification
In game, build 1.60.1.70888, level 31 warrior with nothing in the main hand: the character sheet shows 49.71 - 49.71 damage at 2.0 speed with 341 attack power, which is
1 + 341 / 14 * 2.0.In sim the debug log for the unarmed swing now reads
base=(1 to 1) ... speed=2.000 power_damage=50.14286 ap=351, the same formula.Run on a clang C++23 debug build with
-fsanitize=address,undefined, same flags as CI:profiles/CI.simc): cleanNotes for review
sc_shaman.cpp:389), druid (sc_druid.cpp:923) and hunter for the ranged slot (sc_hunter.cpp:159) have the same assert. Not touched here: I only have game data for the warrior, and the druid module is being actively worked on.🤖 Generated with Claude Code