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
Ananta-ps/internal/gameserver/routers/game_router_racing_tasks.go
T

67 lines
3.3 KiB
Go
Raw 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
//
// Racing-challenge TASK plumbing (R190, ported from the Lyco fork's GameRouter.Task.cs +
// TaskLifecycle.cs, adapted to v2.1's own task contracts in Methods.Game).
// WHY EVERY CHALLENGE TASK MUST BE PUBLISHED UP FRONT
// The 挑战面板 (S_ChallengeStatementPanel.OnStartChallengeButtonClick) starts a run with
// gTaskManager:SetCurrentTask(self.taskId, ...) — a PURE CLIENT-SIDE call. gTaskManager can
// only build the runtime node when the id is already present in the SyncPlayerAllTask list
// published at world entry. Otherwise it logs
// "#NoCreateIssue 当前任务找不到对应的数据" and the challenge silently does nothing —
// the exact "点开始挑战没后续" symptom. (Lyco measured 2026-09-21: 60000147/60000150 both hit it;
// challenge 1003 "王牌车神·城中之夜" → RelatedTask 60000147, raid 23300888.)
// The AskAcceptAndSetCurrentTask handler (63961538) is the other half: the client sends it when a
// task is accepted, and for a racing task we additionally fire the server-side auto-start
// (ScheduleRacingAutoStart → GameRouter.RacingAutoStart.cs). Reply-neutral: still returns empty OK.
// ⛑ 回滚:删掉 Enabled4229938MethodIds 里的 AskAcceptAndSetCurrentTask 一行即可
// (handler 不注册 = 走 typed-default 兜底),本文件的其余代码保留无害。
//
//
// AskAcceptAndSetCurrentTask(63961538): (uint taskId, uint spirit, bool ignoreSwitchSpirit)
// -> empty return. Re-affirms "this task is the currently tracked one" (GPS arming) and, for
// racing tasks, schedules the zone auto-start.
//
func GameRouter_RacingTasks_AskAcceptAndSetCurrentTaskAccept(ctx context.Context, conn any, msg any) any {
// Router implementation for GameRouter_RacingTasks_AskAcceptAndSetCurrentTaskAccept
var zero any; return zero
}
//
// SyncPlayerAllTask body carrying the racing-challenge task nodes. The accepted task
// (, 0 = none) becomes CurrentTask and is marked
// Accepted+Underway; every other racing task is registered as an Accepted node only —
// which one becomes CURRENT is decided by the client when the player hits 开始挑战.
//
func GameRouter_RacingTasks_BuildChallengeTaskPanelBody(ctx context.Context, currentTaskId uint32) any {
// Router implementation for GameRouter_RacingTasks_BuildChallengeTaskPanelBody
var zero any; return zero
}
//
// Minimal runtime node for a racing-challenge task.
// TaskConfig rows for these tasks carry NO Counter and NO EventObjective — the whole race is
// authored in the raid's Spoon graph (60000147 → RelatedRaid 23300888). The client refuses a
// task whose Counters list is empty ("一个计数器都没有"), so one placeholder counter is
// supplied; the goals the player actually sees (第1名 / 前3名 / 180秒内) come from
// ChallengeConfig.CountersDescription and are tracked by the challenge system.
//
func GameRouter_RacingTasks_BuildChallengeTaskViewData(ctx context.Context, taskId uint32) any {
// Router implementation for GameRouter_RacingTasks_BuildChallengeTaskViewData
var zero any; return zero
}
func GameRouter_RacingTasks_ReadU32(ctx context.Context, b []byte, off int32) uint32 {
// Router implementation for GameRouter_RacingTasks_ReadU32
return 0
}