package routers import ( "context" "sync" ) var _ = sync.Mutex{} var _ = context.Background // // Server-authoritative player vitals: HP ledger, damage settlement, knock-out and respawn. // Why this lives on the server and not in the client's local settlement: enemy casts are // fabricated by us (GameRouter.EnemyAiActions), so nothing on the client ever resolves a real // hit against the player — the "damage" is animation only. Without this file the player's HP // bar is decoration, which is exactly why the knocked-out HUD could sit at 100% forever with // nothing able to write a full value back. // Damage only lands when the GM panel releases the vitals lock (default: locked). // // // Settles one enemy hit on the player. // Called from the attack AI at the moment a cast goes out (delayed into the animation window, // because the client never reports a hit). The bar always moves — that is the whole point of // making the HP server-authoritative. What the vitals lock changes is whether it can reach // zero: locked, the drain stops at PlayerVitalsLockFloorHp and the player never // goes down; unlocked, zero means knock-out and the respawn timer. // func GameRouter_PlayerVitals_ApplyEnemyHitToPlayerAsync(ctx context.Context, session *GameSession, state any, enemyUid uint64, skillId uint32) any { // Router implementation for GameRouter_PlayerVitals_ApplyEnemyHitToPlayerAsync var zero any; return zero } // // Writes the authoritative HP onto every id that can own a vitals bar, attribute table first // (hard rule 52) so the value is not clamped against a stale max. // func GameRouter_PlayerVitals_PublishPlayerHpAsync(ctx context.Context, session *GameSession, state any, hp float32) any { // Router implementation for GameRouter_PlayerVitals_PublishPlayerHpAsync var zero any; return zero } // // The unit every packet to the player is addressed to. There is only one observable id space: // AskUseSkill (Releaser), AskMultipleSkillHit2 (ReleaserId) and AskReportLogicAgentSyncData // (AgentId) all report Profile.InitialUnitId, so this is the single target for vitals writes. // func GameRouter_PlayerVitals_PlayerVitalsUnits(ctx context.Context, state any) []any { // Router implementation for GameRouter_PlayerVitals_PlayerVitalsUnits return nil } // // HP reached zero: put the player into the knocked-out state the client already knows how to // render, and schedule the revive. Nothing here walks the retail death pipeline // (AskExitFallingDownToDeath) — that path has been observed black-screening on this build. // func GameRouter_PlayerVitals_EnterPlayerDownedAsync(ctx context.Context, session *GameSession, state any) any { // Router implementation for GameRouter_PlayerVitals_EnterPlayerDownedAsync var zero any; return zero }