feat:自动圣遗物转化功能可识别并标记未激活副词条 #2258
Merged
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.
english
feat: Auto Artifact Salvage function recognizes and marks an unactivated affix
Currently, when using JavaScript matching rules, there is no way to detect if the fourth affix is unactivated (a feature introduced after the Version 6.0 update).
This PR implements a quick but inefficient fix: it calculates a histogram of each line's ROI to determine if the grayed-out foreground text color of the unactivated affix exists and is one of the top colors in the histogram. The
ArtifactAffixclass will have a new field,IsUnactivated.Background:
Artifact affix lines can now span two lines in some Latin-based languages because the "unactivated" note is appended. This complicates text segmentation. Fortunately, this only occurs on five-star artifacts, there is only one unactivated affix per artifact, and it is always the last affix. There are more efficient ways to implement this, so this PR is a workaround at best.
Chinese AI translation:
功能:自动圣遗物转化功能可识别并标记未激活副词条
目前,在使用 JavaScript 匹配规则时,无法检测第四个副词条是否为未激活状态(这是 6.0 版本更新后引入的特性)。
本 PR 实现了一个快速但低效的修复方法:计算每行 ROI 的直方图,以判断未激活副词条的灰色前景文本颜色是否存在,并且是否为直方图中的主要颜色之一。
ArtifactAffix类将新增一个字段IsUnactivated。背景:
在某些拉丁语系的语言中,由于附加了“未激活”的注释,圣遗物副词条的文字现在可能会显示为两行。这使文本分割变得复杂。幸运的是,这种情况只出现在五星圣遗物上,每个圣遗物只有一个未激活副词条,并且它总是最后一个词条。存在更高效的实现方法,因此本 PR 充其量只是一个临时解决方案。
sample images