服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
50 lines
2.3 KiB
Go
50 lines
2.3 KiB
Go
package dnfbridge
|
||
|
||
import "testing"
|
||
|
||
// TestCompanionServerStartMapActorGateCoversPureServerPath 是「不改客户端」这条
|
||
// 路线的直接护栏。
|
||
//
|
||
// 本部署的支援兵走**服务端自建 APC**:把 code 5405 的 AI角色作为一条 START_MAP
|
||
// 行放进副本,客户端原生就能渲染,因此不需要任何客户端补丁。
|
||
//
|
||
// 与「客户端执行器」路线的互斥关系(两者同时生效会出现重复 actor):
|
||
// - 打了 90CN 补丁 → actor 由客户端建,服务端只发 0x7F41 投影,必须**不**注入
|
||
// - 未打补丁 → 服务端自建,必须注入
|
||
//
|
||
// 这条路的开关**只看环境变量**,不看 ConfigSource:因为一旦在 GM 工具里保存过
|
||
// 配置,ConfigSource 就变成 "account_settings",若还要求 environment_fallback
|
||
// 就等于"配好了反而不生效"。
|
||
func TestCompanionServerStartMapActorGateCoversPureServerPath(t *testing.T) {
|
||
ready := ¤tDungeonCompanionRun{Ready: true, ConfigSource: "account_settings"}
|
||
notReady := ¤tDungeonCompanionRun{Ready: false, ConfigSource: "account_settings"}
|
||
|
||
// 未设开关:一律不注入(默认行为与移植前一致,绝不能影响正常玩法)。
|
||
t.Setenv(currentDungeonCompanionP0StartMapEnv, "")
|
||
if currentDungeonCompanionServerStartMapActorEnabled(ready) {
|
||
t.Fatal("env unset must not inject a server-owned START_MAP actor")
|
||
}
|
||
|
||
t.Setenv(currentDungeonCompanionP0StartMapEnv, "0")
|
||
if currentDungeonCompanionServerStartMapActorEnabled(ready) {
|
||
t.Fatal("env=0 must not inject a server-owned START_MAP actor")
|
||
}
|
||
|
||
// nil run:即使开着开关也不能注入(没有可用投影,注入会发出空 actor)。
|
||
t.Setenv(currentDungeonCompanionP0StartMapEnv, "1")
|
||
if currentDungeonCompanionServerStartMapActorEnabled(nil) {
|
||
t.Fatal("nil run must not inject a server-owned START_MAP actor")
|
||
}
|
||
|
||
// run 未就绪:源角色快照无效,不能注入。
|
||
if currentDungeonCompanionServerStartMapActorEnabled(notReady) {
|
||
t.Fatal("non-ready run must not inject a server-owned START_MAP actor")
|
||
}
|
||
|
||
// 关键:持久化配置(account_settings)**也要**能走自建路径 ——
|
||
// 这正是"未打补丁客户端"的场景。
|
||
if !currentDungeonCompanionServerStartMapActorEnabled(ready) {
|
||
t.Fatal("ready persisted run with env=1 must inject a server-owned START_MAP actor")
|
||
}
|
||
}
|