Add enemy level display on nameplates#150
Open
itsDNNS wants to merge 2 commits intoEllesmereGaming:mainfrom
Open
Add enemy level display on nameplates#150itsDNNS wants to merge 2 commits intoEllesmereGaming:mainfrom
itsDNNS wants to merge 2 commits intoEllesmereGaming:mainfrom
Conversation
Show unit level as a colored prefix before the enemy name, using WoW's GetCreatureDifficultyColor for difficulty-based coloring (gray/green/yellow/orange/red). Bosses show as "??". Controlled via two new settings: - showLevel (default: true) - levelDifficultyColor (default: true)
- Boss (level -1): hardcode red instead of passing -1 to GetCreatureDifficultyColor which misinterprets it as low level - Skip level display for critters/level-0 units (level <= 0) - Add 25px width compensation in UpdateNameWidth when showLevel is enabled to prevent name truncation - Cache GetCreatureDifficultyColor at file scope for consistency
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
GetCreatureDifficultyColorfor difficulty-based coloring (gray/green/yellow/orange/red)showLevel(default: true),levelDifficultyColor(default: true)Implementation
GetLevelPrefix(unit)helper that builds a WoW color-coded string (|cffRRGGBB)UpdateName()— level is prepended to the name text_displayPresetKeysfor per-spec preset supportTest plan
showLevel = falsehides the level prefixlevelDifficultyColor = falsefalls back to gold color