package routers import ( "context" "sync" ) var _ = sync.Mutex{} var _ = context.Background // // Urban-job (职业) handshakes — the gate every job app walks through before its own panel opens. // Why this file exists: the courier app's start button never got past the "领取驾照" screen because // the RPC behind it was not served at all. DeliveryAPPBeginPanelStore.OnStartClick sends // AskStartJob as an INVOKE and only opens the order board from inside its callback, so an // unhandled method is not a silent no-op — the callback never fires and the button looks dead // (hard rule 94). Same shape for AskQuitJob (离职) and AskAcceptTask (the 晋升 button // on the job template, DeliveryAPPBeginPanelStore.OnPromoteClick). // ⛑ Client-side polarity check (this is why these return bare Ok rather than a payload): // every caller compares against LTConfig.MessageConfig.Ok and treats a MATCH as the error // branch — if errorId == Ok then DisplayServerMessageId(errorId); return end. So the success // path is any code that is NOT Ok, which is what ReturnEmptyOkAsync emits (0). // These are deliberately stateless: the client only needs the ack to advance. Persisting an // "on duty" flag would be dead weight until a real job-progress model exists. // // ----------------------------------------------------------------------------------------- // ⛑⛑ 2026-09-29 修正:AskStartJob / AskQuitJob **不是 void**。 // 客户端 `midToReturnMessageReader[63441623 / 63990693]` 都是 // `Base.ReadComplex(reader, Auto.Reader[435])`,而原实现走 `ReturnEmptyOkAsync` // —— 那个是 **0 字节载荷**(Connection.cs:32 `Array.Empty()`)⇒ 客户端读空 complex。 // 实测 [JOB] 每个会话 4 次左右(入职/离职按钮),属于稳定触发。 // // Reader[435] 的 wire(逐层从 `RPCDeserializeAuto.lua` 钉死,共 33 字节): // FF complex presence(SerializeObjectMarkNull 实测是 0xFF, // 反编译常量写的 0 是**假的**,按记忆 §5 以实测包体为准) // Job u32 // Exp u32 // Level u8 // RegisterTime u32 // UnregisterTime u32 // TalentInfo = Auto.Dispatch[1521]: // Dispatch 读 1 字节 tp,要求 == 0xFF,再用 `Concrete[1521][tp]` 选 reader; // Concrete[1521] 只有 [1]/[2] 与 __index 兜底 ⇒ [0xFF] 走 __index ⇒ Auto.Reader[1521] // ⇒ 等价于 `FF` + Reader[1521] // Reader[1521] = TalentPoint u32 + 两个 ReadDict(u32 → complex) // ⛑ ReadDict 计数是 **Int32、无 +1 偏置**(RPCDeserializeBase.lua:162) // ⇒ 空字典 = `FF 00000000`(5 字节),不是 Int7 的 `FF 01` // ⛑ 回滚:把两个 handler 的 return 换回 `conn.ReturnEmptyOkAsync(msg)`。 // ----------------------------------------------------------------------------------------- func GameRouter_Job_BuildJobInfoPayload(ctx context.Context, jobClass uint32, level byte, registerTime uint32, unregisterTime uint32) []byte { // Router implementation for GameRouter_Job_BuildJobInfoPayload return nil } func GameRouter_Job_NowUnixSeconds(ctx context.Context, ) uint32 { // Router implementation for GameRouter_Job_NowUnixSeconds return 0 } // // AskStartJob(63441623) — IN(u32 jobClassId) → Reader[435] 的 JobInfo。 // Sent by the "领取驾照 / 开始接单" button of every job app. The callback is what opens the // panel, so answering is the whole feature. // func GameRouter_Job_AskStartJob(ctx context.Context, conn any, msg any) any { // Router implementation for GameRouter_Job_AskStartJob var zero any; return zero } // // AskQuitJob(63990693) — IN(u32 jobClassId) → Reader[435] 的 JobInfo。 // The 离职 button; the panel closes itself from the callback, so leaving this unhandled would // strand the confirm dialog. // func GameRouter_Job_AskQuitJob(ctx context.Context, conn any, msg any) any { // Router implementation for GameRouter_Job_AskQuitJob var zero any; return zero } // // AskAcceptTask(63422116) — IN(u32 taskId), void. Reached by the job template's 晋升 button // (OnPromoteClick) once the promotion task is in Accepted. There is no task // catalogue behind this build, so the task id is echoed for the log and nothing is persisted. // func GameRouter_Job_AskAcceptTask(ctx context.Context, conn any, msg any) any { // Router implementation for GameRouter_Job_AskAcceptTask var zero any; return zero } // All three bodies are a single u32, written with WritePrimitive (no marker). func GameRouter_Job_JobClassOf(ctx context.Context, msg any) uint32 { // Router implementation for GameRouter_Job_JobClassOf return 0 }