服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
84 lines
2.0 KiB
Go
84 lines
2.0 KiB
Go
// pvfkeys collects the bracketed dictionary keys used by stackable/equipment
|
|
// scripts so an item rule can be gated on a real PVF field instead of a guess.
|
|
//
|
|
// go run ./cmd/scratch/pvfkeys [-pvf path] [-prefix stackable] [-filter sell]
|
|
package main
|
|
|
|
import (
|
|
"flag"
|
|
"fmt"
|
|
"os"
|
|
"regexp"
|
|
"sort"
|
|
"strings"
|
|
|
|
platformpvf "longheng.io/server/internal/platform/pvf"
|
|
)
|
|
|
|
var keyPattern = regexp.MustCompile(`^\s*\[([^\]/][^\]]*)\]\s*$`)
|
|
|
|
func main() {
|
|
pvfPath := flag.String("pvf", `../runtime/data/dnf/Script.pvf`, "Script.pvf path")
|
|
prefixes := flag.String("prefix", "stackable,equipment", "comma separated archive path prefixes")
|
|
filter := flag.String("filter", "", "only report keys containing this substring")
|
|
flag.Parse()
|
|
|
|
archive, err := platformpvf.Open(*pvfPath)
|
|
if err != nil {
|
|
fmt.Fprintln(os.Stderr, "open:", err)
|
|
os.Exit(1)
|
|
}
|
|
wanted := map[string]bool{}
|
|
for _, prefix := range strings.Split(*prefixes, ",") {
|
|
wanted[strings.TrimSpace(prefix)] = true
|
|
}
|
|
counts := map[string]int{}
|
|
examples := map[string]string{}
|
|
scanned := 0
|
|
for _, file := range archive.Files() {
|
|
path := file.ArchivePath
|
|
matched := false
|
|
for prefix := range wanted {
|
|
if strings.HasPrefix(path, prefix+"/") {
|
|
matched = true
|
|
break
|
|
}
|
|
}
|
|
if !matched {
|
|
continue
|
|
}
|
|
text, readErr := archive.ReadText(path)
|
|
if readErr != nil {
|
|
continue
|
|
}
|
|
scanned++
|
|
for _, line := range strings.Split(text, "\n") {
|
|
match := keyPattern.FindStringSubmatch(line)
|
|
if match == nil {
|
|
continue
|
|
}
|
|
key := strings.ToLower(strings.TrimSpace(match[1]))
|
|
if key == "" {
|
|
continue
|
|
}
|
|
counts[key]++
|
|
if _, seen := examples[key]; !seen {
|
|
examples[key] = path
|
|
}
|
|
}
|
|
}
|
|
|
|
keys := make([]string, 0, len(counts))
|
|
for key := range counts {
|
|
if *filter != "" && !strings.Contains(key, *filter) {
|
|
continue
|
|
}
|
|
keys = append(keys, key)
|
|
}
|
|
sort.Strings(keys)
|
|
fmt.Printf("scanned=%d distinct_keys=%d filter=%q\n", scanned, len(counts), *filter)
|
|
for _, key := range keys {
|
|
fmt.Printf("%6d [%s] e.g. %s\n", counts[key], key, examples[key])
|
|
}
|
|
}
|