fix(CardComp): 修复升级卡动画加载竞态校验逻辑

移除了对card_uuid、card_type的错误竞态校验,仅保留token判断,解决升级卡动画加载被误丢弃的问题
This commit is contained in:
pan
2026-07-21 09:44:50 +08:00
parent c228542213
commit 011446acc6

View File

@@ -982,8 +982,10 @@ export class CardComp extends CCComp {
mLogger.log(this.debugMode, "CardComp", `load hero animation failed ${uuid}`, err);
return;
}
// 竞态保护:若加载期间卡面已变更则丢弃
if (token !== this.iconVisualToken || !this.cardData || this.card_type !== CardType.Hero || this.card_uuid !== uuid) {
// 竞态保护:仅靠 token 判断。
// 升级卡的 card_uuid(7001) / card_type(SpecialUpgrade) 与实际渲染的
// hero uuid / Hero 类型不一致不能用这些字段做校验token 已足够。
if (token !== this.iconVisualToken) {
return;
}
this.clearAnimationClips(anim);