181 lines
9.0 KiB
Go
181 lines
9.0 KiB
Go
package routers
|
||
|
||
import (
|
||
"context"
|
||
"sync"
|
||
)
|
||
|
||
var _ = sync.Mutex{}
|
||
var _ = context.Background
|
||
|
||
//
|
||
// 音乐 / 演出线三条玩法的服务端闭环 —— 2026-10-04:
|
||
// <list>
|
||
// <item>1. Livehouse 音游(节奏打击,引擎 MusicGameManager.lua)</item>
|
||
// <item>2. PartyDance 舞池(同一套音游引擎,LivehouseConfig.Use == Party 那 5 首)</item>
|
||
// <item>3. PartyLive 派对直播(点赞 / 礼物 / 弹幕,PartyLiveStreamPanelStore.lua)</item>
|
||
// </list>
|
||
// <para>
|
||
// ★★ 接之前这三条线全套落在空包兜底里(DefaultReturnCatalog4229938.cs):
|
||
// 63885626 → [0xFF,0x01] list7-empty、63848409 → [0xFF,0x00] ReadBoolean、
|
||
// 其余 shape="void"。症状不是报错,而是静默没内容:
|
||
// · 曲目列表恒空 ⇒ 面板上的等级打点永远是 0,重进清零;
|
||
// · FirstPlay 恒 false ⇒ 首次引导 timeline 永远不播;
|
||
// · 舞会三连里 AskStartPartyDance 的 Callback 什么都不做,客户端在等
|
||
// SyncPartyDanceStart 推送 ⇒ 不推 = 点了没反应;
|
||
// · 直播间 UI 自己不发 RPC,数据全靠 SyncPartyResponse(68456156) ⇒ 从不推 = 空直播间。
|
||
// </para>
|
||
// <para>
|
||
// ⛑ 硬规则 239 —— 每个契约都对照客户端自己的反序列化器核过,不是照 dump.cs 猜:
|
||
// Drmk.Proxy\proxy\lua\RPCDeserializeAuto.lua 的 Auto.Reader[571] /
|
||
// [568] / [428] / [429] / [1123],
|
||
// 参数形状对照 _lua_all\lua\LuaGen\AutoGen\ClientToGameDelegate.lua 的 *_Serializer。
|
||
// </para>
|
||
// <para>⛑ 回滚:从 GameRouter.cs 的 Enabled4229938MethodIds 里删掉对应行即可
|
||
// (handler 不注册 = 回到中性兜底),本文件留着无害。</para>
|
||
//
|
||
// ---------------------------------------------------------------------------------------
|
||
// 1. Livehouse 音游
|
||
//
|
||
// 客户端整条链(逐行核过,非推断):
|
||
// 进 Sonic Boom(IndoorId 5) / 万能旋钮(274) 的室内扇区 → 选曲面板
|
||
// LivehouseSelectPanelStore.lua:291 OnPlayBtn
|
||
// · LivehouseConfig.DialogBeforeTimelineSingle 命中 ⇒ 先播对话,DialogEnd 再进
|
||
// · 否则直接 PlayLiveHouseV2
|
||
// MusicGameManager.PlayLiveHouseV2(:324) → StartGame(:371)
|
||
// → CheckShow(LIVEHOUSE_GAME_PANEL) + PlayGameMainTimeline(:564)
|
||
// → 未显式跳过 intro 时先 AskQueryLiveHouseInfo():FirstPlay 为真才播 intro timeline
|
||
// → LiveHouseMusicStart(musicId, inviteNpcId, difficulty) ← NOTIFY
|
||
// → 打完 SetLiveHouseMusicResult(musicId, {P,G,M,S,percent}, inviteNpcId) ← INVOKE
|
||
// → SetRecordMusicInfo + PlayLivehouseEndTimeline(Good / BadEnding 对话)
|
||
// 开局前勾了「金手指」⇒ 先 AskLiveHouseUseItem(musicId) 再 StartGame。
|
||
// ---------------------------------------------------------------------------------------
|
||
// 取登录后才能拿到的 WorldEntryState;还没建好就是 null(按新账号处理)。
|
||
func GameRouter_LiveHouse_LivehouseState(ctx context.Context, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_LivehouseState
|
||
var zero any; return zero
|
||
}
|
||
|
||
// AskQueryLiveHouseInfo (63848409) — Invoke ; 无参 ; return: Complex{ bool FirstPlay }
|
||
//
|
||
// 「要不要播首次引导」的唯一判据。第一次答 true,之后恒 false,由
|
||
// LivehouseProgressStore 把这个 latch 落进 config/player-progress.json。
|
||
func GameRouter_LiveHouse_AskQueryLiveHouseInfo4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskQueryLiveHouseInfo4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// AskLiveHouseMusicList (63885626) — Invoke ; 无参 ; return: List7Bit<Complex(571)>
|
||
//
|
||
// 客户端把整张表灌进 gMusicGameManager.RecordMusicInfo,之后 GetScoreLevel 才显示
|
||
// 非最低档评级。空列表客户端<b>不报错</b>,只是等级打点全 0 —— 别指望有日志线索。
|
||
func GameRouter_LiveHouse_AskLiveHouseMusicList4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskLiveHouseMusicList4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// SetLiveHouseMusicResult (63723141) — Invoke ; args: u32 musicId, list7bit<u32> counts, u32 npcId
|
||
//
|
||
// 唯一的成绩写入路径。客户端实际给 5 项 {Perfect, Great, Miss, Special, floor(percent)}
|
||
// (MusicGameManager.lua:264-270),我们只需要前 4 项。
|
||
func GameRouter_LiveHouse_SetLiveHouseMusicResult4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_SetLiveHouseMusicResult4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// LiveHouseMusicStart (63293678) — Notify ; args: u32 musicId, u32 npcId, u32 difficulty
|
||
// LiveHouseMusicInterrupt (63752208)— Notify ; args: u32 musicId, u32 npcId
|
||
//
|
||
// 两条都只是「服务端知道一下就够了」:客户端既不 await,回调里也没有业务分支。
|
||
// 只落日志(将来要做局数统计时这份日志就是现成素材,同硬规则 112 的做法)。
|
||
func GameRouter_LiveHouse_LiveHouseMusicNotify4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_LiveHouseMusicNotify4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// AskLiveHouseUseItem (63665380) — Invoke ; args: u32 musicId ; return: void
|
||
//
|
||
// 「金手指」(强制全 Perfect)的道具消耗请求 —— LivehouseSelectPanelStore.lua:320。
|
||
// ⛑ 客户端自己的前置检查才是权威:面板在道具不足时先弹
|
||
// MessageConfig.LivehouseGoldFinger 而<b>不会走到这里</b>(:322)。
|
||
// ⇒ 服务端再扣一次是双重扣减;这里只放行,扣减交给客户端驱动的道具系统。
|
||
func GameRouter_LiveHouse_AskLiveHouseUseItem4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskLiveHouseUseItem4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_AskSelectPartyDanceSong4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskSelectPartyDanceSong4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_AskSelectPartyDanceMode4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskSelectPartyDanceMode4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// AskStartPartyDance (63292540) — Invoke ; 无参 ; return: void
|
||
//
|
||
// ★ 唯一能让舞会真正开始的推送点。不推 = 面板开得出来、按钮点得动、什么都不会发生。
|
||
func GameRouter_LiveHouse_AskStartPartyDance4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskStartPartyDance4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// AskLeavePartyDance (63516846) — Invoke ; 无参 ; return: void
|
||
func GameRouter_LiveHouse_AskLeavePartyDance4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_AskLeavePartyDance4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// 每个 session 一份直播间账本。没有 session 时返回一个丢弃用的空壳。
|
||
func GameRouter_LiveHouse_PartyLiveLedger(ctx context.Context, bag map[string]any) any {
|
||
// Router implementation for GameRouter_LiveHouse_PartyLiveLedger
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_PushPartyLiveAsync(ctx context.Context, conn any, response any, why string) any {
|
||
// Router implementation for GameRouter_LiveHouse_PushPartyLiveAsync
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_PartyLiveSwitch4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_PartyLiveSwitch4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_SendPartyEvent4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_SendPartyEvent4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
// GmPartyLiveAddEvent (65785804) — Invoke ; args: int32 eventid, string message ; return: void
|
||
//
|
||
// ★ GM 通道。官方留它是给自己调试用的;我们拿它做「服务端往直播间塞一条弹幕」。
|
||
// 这是三个玩法里最容易现场见效的一处(不用改 GM 面板,GATE Lua / GM delegate 直接发即可)。
|
||
func GameRouter_LiveHouse_GmPartyLiveAddEvent4229938(ctx context.Context, conn any, msg any) any {
|
||
// Router implementation for GameRouter_LiveHouse_GmPartyLiveAddEvent4229938
|
||
var zero any; return zero
|
||
}
|
||
|
||
//
|
||
// 读 int32 eventid + string。string 的形状是 ReadString:
|
||
// 无值写单字节 0x00,有值写 0xFF 后跟 UTF8 裸字节。
|
||
//
|
||
func GameRouter_LiveHouse_ReadInt32AndString(ctx context.Context, body []byte, eventId int32, text string) any {
|
||
// Router implementation for GameRouter_LiveHouse_ReadInt32AndString
|
||
var zero any; return zero
|
||
}
|
||
|
||
// 往「累计送礼表」追加一行。每个元素是一次事件,不去重也不断言 id 范围。
|
||
func GameRouter_LiveHouse_AppendRow(ctx context.Context, list []any, id int32) any {
|
||
// Router implementation for GameRouter_LiveHouse_AppendRow
|
||
var zero any; return zero
|
||
}
|
||
|
||
func GameRouter_LiveHouse_U(ctx context.Context, list []any, index int32) uint32 {
|
||
// Router implementation for GameRouter_LiveHouse_U
|
||
return 0
|
||
}
|
||
|