服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
82 lines
2.3 KiB
Go
82 lines
2.3 KiB
Go
// raidsurveyscripts 扫描 Script.pvf,找出与攻坚队/频道相关的脚本文件,并在其中搜索关键词。
|
|
//
|
|
// 用途:客户端 EXE 里没有中文 UI 文案(文案在脚本包/数据文件里)。要判断"跨频道加入攻坚队后
|
|
// 客户端会不会自己换频道",需要看 UI 侧脚本是否含"移动频道/切换频道"这类逻辑。
|
|
//
|
|
// 用法:
|
|
//
|
|
// go run ./cmd/scratch/raidsurveyscripts -pvf "runtime\data\dnf\Script.pvf"
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
"strings"
|
|
|
|
"longheng.io/server/internal/platform/pvf"
|
|
)
|
|
|
|
func main() {
|
|
pvfPath := flag.String("pvf", `runtime\data\dnf\Script.pvf`, "Script.pvf path")
|
|
pattern := flag.String("match", "raid", "comma separated path substrings (case-insensitive)")
|
|
keyword := flag.String("keyword", "频道,移动,攻坚", "comma separated keywords to search inside matched files")
|
|
maxFiles := flag.Int("max", 400, "max matched files to inspect")
|
|
flag.Parse()
|
|
|
|
archive, err := pvf.Open(*pvfPath)
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, "open pvf:", err)
|
|
os.Exit(1)
|
|
}
|
|
files := archive.Files()
|
|
fmt.Printf("archive files=%d readable=%t\n", len(files), archive.CanReadFileData())
|
|
|
|
patterns := strings.Split(strings.ToLower(*pattern), ",")
|
|
keywords := strings.Split(*keyword, ",")
|
|
|
|
matched := make([]pvf.File, 0, 64)
|
|
for _, file := range files {
|
|
lower := strings.ToLower(file.Path)
|
|
for _, p := range patterns {
|
|
p = strings.TrimSpace(p)
|
|
if p != "" && strings.Contains(lower, p) {
|
|
matched = append(matched, file)
|
|
break
|
|
}
|
|
}
|
|
}
|
|
fmt.Printf("path matches=%d\n", len(matched))
|
|
show := matched
|
|
if len(show) > *maxFiles {
|
|
show = show[:*maxFiles]
|
|
}
|
|
for _, file := range show {
|
|
fmt.Printf(" %s (%d bytes)\n", file.Path, file.Size)
|
|
}
|
|
|
|
fmt.Println("--- keyword hits ---")
|
|
hits := 0
|
|
for _, file := range show {
|
|
text, err := archive.ReadText(file.Path)
|
|
if err != nil {
|
|
continue
|
|
}
|
|
for _, kw := range keywords {
|
|
kw = strings.TrimSpace(kw)
|
|
if kw == "" || !strings.Contains(text, kw) {
|
|
continue
|
|
}
|
|
lineNo := 0
|
|
for _, line := range strings.Split(text, "\n") {
|
|
lineNo++
|
|
if strings.Contains(line, kw) {
|
|
fmt.Printf("%s:%d: %s\n", file.Path, lineNo, strings.TrimSpace(line))
|
|
hits++
|
|
}
|
|
}
|
|
}
|
|
}
|
|
fmt.Printf("keyword hits=%d\n", hits)
|
|
}
|