From 53523d8ccb0734efd2b7c162638df43083b90ad9 Mon Sep 17 00:00:00 2001 From: panw Date: Wed, 15 Apr 2026 16:39:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=8B=B1=E9=9B=84=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E7=BB=84=E4=BB=B6):=20=E5=86=B0=E5=86=BB=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E4=B8=8B=E6=9A=82=E5=81=9C=E6=8A=80=E8=83=BD=E5=86=B7=E5=8D=B4?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复英雄处于冰冻状态时技能冷却时间仍然减少的问题。在 updateCD 方法开始时检查冰冻状态,若为冰冻则直接返回,确保技能 CD 暂停刷新。 --- assets/script/game/hero/HeroAttrsComp.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/script/game/hero/HeroAttrsComp.ts b/assets/script/game/hero/HeroAttrsComp.ts index dbe7b3c1..5157faf8 100644 --- a/assets/script/game/hero/HeroAttrsComp.ts +++ b/assets/script/game/hero/HeroAttrsComp.ts @@ -121,6 +121,9 @@ export class HeroAttrsComp extends ecs.Comp { } updateCD(dt: number){ + // 如果处于冰冻状态,则技能 CD 暂停刷新 + if (this.isFrost()) return; + for (const key in this.skills) { const skill = this.skills[key]; if (!skill) continue;