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_vehicle_radio.go
T

63 lines
2.9 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
//
// 车载电台的服务端那一半 —— 2026-09-27 落地(kpect 捐赠端的候选 2)。
// ## 先说清楚:歌曲解锁早就做完了
// 59 首歌在登录帧里就全部塞进了 PlayerRadioSongsData.SongInfoDict
// (RuntimePayloadFactory),而 RadioPlayerManager.IsSongUnlocked 查的就是这张表。
// 所以「车上有几首歌、能不能播」不归这条 RPC 管 —— 别再往这里找原因。
// ## 这条 RPC 真正管什么:歌与歌之间的「串词」
// AskGetVehicleRadioContent(67725622) 是 INVOKE,返回 UX.Game.RadioRandomContent。
// 客户端 RadioPlayerManager.GetRadioVoiceData 拿到后存进 radioInfo.randomContent,
// 等歌播到 cue 点(OnRadioMusicMark)时调 GetVoicesByContent 把
// ContentType / ContentId / StartContentId / EndContentId 换成三条 SoundId 播出去 ——
// 也就是 DJ 开场口播 → 广告/新闻/突发新闻 → DJ 收尾口播。
// 移植前回的是 DefaultReturnCatalog 的**全零** typed-default(15 字节
// FF 00 …,wire 合法但四个 id 全是 0)⇒ 客户端四条表一条都查不到,
// 日志里是四行「GetVoicesByContent … 配表找不到」⇒ **只有歌、没有串词**。
// ## 内容从哪来
// RadioContentCatalog4229938(47 行,投影自 ConfigDump_v3 的
// RadioContentDJs/Ads/News/SpecialNews 四条表)。ContentType 取值是
// UX.Game.RadioContentType:1=Ad 2=News 3=Chat(DJ) 4=Comment(DJ) 5=SpecialNews,
// 3/4 在客户端查同一张 RadioContentDJs。
// ## 回滚
// gameplay.vehicleRadio.enabled=false ⇒ 回到全零 typed-default。
//
func GameRouter_VehicleRadio_AskGetVehicleRadioContent(ctx context.Context, conn any, msg any) any {
// Router implementation for GameRouter_VehicleRadio_AskGetVehicleRadioContent
var zero any; return zero
}
//
// AskSwitchVehicleRadio (67959772):客户端切台的**通知**。
// 切台在客户端本地已经完成了才发这一帧,服务端没有任何权威状态要维护 ——
// 这里只记录序号(配合 [VEHICLE-RADIO] 日志做对照),并回一个空 OK。
//
func GameRouter_VehicleRadio_AskSwitchVehicleRadio(ctx context.Context, conn any, msg any) any {
// Router implementation for GameRouter_VehicleRadio_AskSwitchVehicleRadio
var zero any; return zero
}
//
// 按权重抽一条串词;DJ 类(3/4)额外配一对开场/收尾口播 id,
// 突发新闻(5)用配置行自带的 DJComeId / DJBackId。
//
func GameRouter_VehicleRadio_PickRadioContent(ctx context.Context, session *GameSession, cfg any) any {
// Router implementation for GameRouter_VehicleRadio_PickRadioContent
var zero any; return zero
}
func GameRouter_VehicleRadio_WeightedPick(ctx context.Context, items []any, weightOf any) any {
// Router implementation for GameRouter_VehicleRadio_WeightedPick
var zero any; return zero
}