This repository has been archived on 2026-10-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

46 lines
1.9 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package routers
import (
"context"
"sync"
)
var _ = sync.Mutex{}
var _ = context.Background
//
// 敌人血条的显示时机 —— SyncAddUnitState / SyncRemoveUnitState 推
// UnitStateConfig.HideHp。
// ⛑⛑ 与 GameRouter.EnemyWarning.cs(detectionState 那条)是两条完全不同的路,
// 别再混为一谈。客户端判据在 EnemyHUDCtrl.lua:
// · RefreshHpVisible(:551) 决定血条 —— 看 cfg.ShowHPBar(模板配置,
// 服务端改不了)和 shouldShowHp 里的 UnitStateConfig.HideHp(我们能写)。
// · detectionState 只在 :85 绑到 OnShowDetectionEffect,动的是潜行警戒条,
// 跟血条无关。所以警戒状态机从 Idle 推到 Fight 血条也不会变。
// 结论:想让血条"不打不显示、打了才显示",唯一 per-unit 且服务端可写的开关就是 HideHp。
// 先例:GameRouter.HackerSummon.cs:341 用同一招关掉机械狗的敌人血条。
//
//
// spawn 之后调用:SyncAddUnitState(68026128) 把血条收起。
// 幂等 —— 已经挂着 HideHp 的单位不会再发一次。
//
func GameRouter_EnemyHpBar_HideLocalEnemyHpBarAsync(ctx context.Context, session *GameSession, uid uint64) any {
// Router implementation for GameRouter_EnemyHpBar_HideLocalEnemyHpBarAsync
var zero any; return zero
}
func GameRouter_EnemyHpBar_ReassertHiddenHpBarAsync(ctx context.Context, session *GameSession, uid uint64) any {
// Router implementation for GameRouter_EnemyHpBar_ReassertHiddenHpBarAsync
var zero any; return zero
}
//
// 第一次命中时调用:SyncRemoveUnitState(68566559) 撤掉 HideHp,血条出现。
// 只在 HpBarHidden 为真时发,之后自动变 no-op(不会每一下都刷包)。
//
func GameRouter_EnemyHpBar_RevealLocalEnemyHpBarAsync(ctx context.Context, session *GameSession, uid uint64) any {
// Router implementation for GameRouter_EnemyHpBar_RevealLocalEnemyHpBarAsync
var zero any; return zero
}