fix(CardComp): 修复升级卡动画加载竞态校验逻辑
移除了对card_uuid、card_type的错误竞态校验,仅保留token判断,解决升级卡动画加载被误丢弃的问题
This commit is contained in:
@@ -982,8 +982,10 @@ export class CardComp extends CCComp {
|
|||||||
mLogger.log(this.debugMode, "CardComp", `load hero animation failed ${uuid}`, err);
|
mLogger.log(this.debugMode, "CardComp", `load hero animation failed ${uuid}`, err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 竞态保护:若加载期间卡面已变更则丢弃
|
// 竞态保护:仅靠 token 判断。
|
||||||
if (token !== this.iconVisualToken || !this.cardData || this.card_type !== CardType.Hero || this.card_uuid !== uuid) {
|
// 升级卡的 card_uuid(7001) / card_type(SpecialUpgrade) 与实际渲染的
|
||||||
|
// hero uuid / Hero 类型不一致,不能用这些字段做校验,token 已足够。
|
||||||
|
if (token !== this.iconVisualToken) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.clearAnimationClips(anim);
|
this.clearAnimationClips(anim);
|
||||||
|
|||||||
Reference in New Issue
Block a user