服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
72 lines
2.1 KiB
Go
72 lines
2.1 KiB
Go
package dnfbridge
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
"testing"
|
|
|
|
"longheng.io/server/internal/modules/dnf/alignedcmd"
|
|
dnfpvf "longheng.io/server/internal/modules/dnf/pvf"
|
|
platformpvf "longheng.io/server/internal/platform/pvf"
|
|
)
|
|
|
|
func TestRealPVFDamageFontDefinitionsAreAuditable(t *testing.T) {
|
|
pvfPath := os.Getenv("DNFBRIDGE_REAL_PVF_SMOKE")
|
|
if pvfPath == "" {
|
|
t.Skip("DNFBRIDGE_REAL_PVF_SMOKE not set")
|
|
}
|
|
archive, err := platformpvf.Open(pvfPath)
|
|
if err != nil {
|
|
t.Fatalf("open PVF: %v", err)
|
|
}
|
|
catalog, err := newPVFDungeonDropCatalog(archive)
|
|
if err != nil {
|
|
t.Fatalf("build item catalog: %v", err)
|
|
}
|
|
listText, err := archive.ReadText(dungeonDropStackableList)
|
|
if err != nil {
|
|
t.Fatalf("read stackable list: %v", err)
|
|
}
|
|
listDocument, err := dnfpvf.Parse(dungeonDropStackableList, listText)
|
|
if err != nil {
|
|
t.Fatalf("parse stackable list: %v", err)
|
|
}
|
|
|
|
count := 0
|
|
foundProbe := false
|
|
for _, entry := range dnfpvf.ParseList(listDocument) {
|
|
text, err := archive.ReadText("stackable/" + strings.TrimPrefix(entry.Path, "stackable/"))
|
|
if err != nil {
|
|
continue
|
|
}
|
|
document, err := dnfpvf.Parse(entry.Path, text)
|
|
if err != nil {
|
|
continue
|
|
}
|
|
action, _ := document.Text("action type")
|
|
if !strings.EqualFold(strings.TrimSpace(action), "[add damage font skin]") {
|
|
continue
|
|
}
|
|
count++
|
|
definition, resolveErr := catalog.ResolveItem(uint32(entry.ID))
|
|
if resolveErr != nil {
|
|
t.Fatalf("resolve damage font item=%d path=%q: %v", entry.ID, entry.Path, resolveErr)
|
|
}
|
|
if definition.DamageFontIndex == 0 || definition.DamageFontExpirationMode == 0 {
|
|
t.Fatalf("incomplete damage font definition item=%d: %+v", entry.ID, definition)
|
|
}
|
|
if entry.ID == 10160911 {
|
|
foundProbe = true
|
|
if definition.DamageFontIndex != 2 || definition.DamageFontExpirationMode != alignedcmd.DamageFontExpirationUnlimited {
|
|
t.Fatalf("probe item 10160911 = %+v, want font=2 unlimited", definition)
|
|
}
|
|
}
|
|
}
|
|
if count == 0 {
|
|
t.Fatal("runtime PVF has no [add damage font skin] item")
|
|
}
|
|
if !foundProbe {
|
|
t.Fatal("runtime PVF is missing probe damage-font item 10160911")
|
|
}
|
|
}
|