fix(map): 统一英雄相关提示的弹窗逻辑与文案

1. 调整出售英雄时的提示方式,复用smalltip气泡弹窗而非独立toast
2. 优化MissionCardComp的smalltip提示方法,支持自定义文案和多负载格式
3. 补充英雄满员提示的自定义文案,与出售限制提示保持统一提示样式
This commit is contained in:
panFD
2026-08-02 10:17:10 +08:00
parent 401a5daf77
commit 67c2a53211
3 changed files with 1455 additions and 1199 deletions

View File

@@ -189,9 +189,9 @@ export class HeroBoxComp extends CCComp {
*/
private onSellHeroClick() {
if (!this.eid || !this.model) return;
// 场上仅剩 1 个英雄时不允许出售(至少保留一个作战单位
// 场上仅剩 1 个英雄时不允许出售:复用英雄栏 smalltip 气泡提示(与满员同一挂载点
if (HeroBoxComp.getAliveHeroCount() <= 1) {
oops.gui.toast("至少保留 1 个英雄");
oops.message.dispatchEvent(GameEvent.ShowSmallTip, { type: "hero_full", text: "至少保留 1 个英雄" });
return;
}
oops.audio.playEffect("music/button");