fix: 修正特殊卡牌名称显示和等级标识问题
修复特殊升级/刷新卡牌名称显示逻辑,将等级后缀改为前缀,并使用★符号表示等级。 同时修复高等级卡牌边框节点激活逻辑,确保HB节点正确显示。
This commit is contained in:
@@ -394,7 +394,7 @@ export class CardComp extends CCComp {
|
||||
const isHighLevel = (this.cardData.hero_lv ?? 0) > 1 || card_lv_val > 1;
|
||||
if (this.HF_node) this.HF_node.active = isHighLevel;
|
||||
if (this.NF_node) this.NF_node.active = !isHighLevel;
|
||||
|
||||
this.node.getChildByName("HB").active = isHighLevel;
|
||||
const activeFrameNode = isHighLevel ? this.HF_node : this.NF_node;
|
||||
if (activeFrameNode) {
|
||||
activeFrameNode.children.forEach(child => {
|
||||
@@ -415,9 +415,9 @@ export class CardComp extends CCComp {
|
||||
const specialCard = this.card_type === CardType.SpecialUpgrade
|
||||
? SpecialUpgradeCardList[this.card_uuid]
|
||||
: SpecialRefreshCardList[this.card_uuid];
|
||||
const poolLv = Math.max(1, Math.floor(this.cardData.pool_lv ?? 1));
|
||||
const spSuffix = poolLv >= 2 ? "+".repeat(poolLv - 1) : "";
|
||||
this.setLabel(this.name_node, `${specialCard?.name || ""}${spSuffix}`);
|
||||
const card_lv = Math.max(1, Math.floor(this.cardData.card_lv ?? 1));
|
||||
const spSuffix = card_lv >= 2 ? "★".repeat(card_lv - 1) : "";
|
||||
this.setLabel(this.name_node, `${spSuffix}${specialCard?.name || ""}${spSuffix}`);
|
||||
this.info_node.active = false;
|
||||
this.oinfo_node.active = true;
|
||||
this.oinfo_node.getChildByName("info").getComponent(Label).string = `${specialCard?.info || ""}`;
|
||||
|
||||
Reference in New Issue
Block a user