DNF90 服务端与启动器完整源码(含 GM 工具功能增强)
服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
This commit is contained in:
commit
645b64fe21
4388 files changed
+1405457
No files matched your search
@@ -0,0 +1,65 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
dnfpvf "longheng.io/server/internal/modules/dnf/pvf"
|
||||
platformpvf "longheng.io/server/internal/platform/pvf"
|
||||
)
|
||||
|
||||
type row struct {
|
||||
ItemID int64 `json:"item_id"`
|
||||
Path string `json:"path"`
|
||||
Name string `json:"name,omitempty"`
|
||||
FontIndex int64 `json:"font_index"`
|
||||
ExpirationInfo []string `json:"expiration_info,omitempty"`
|
||||
ItemExpiration string `json:"item_expiration,omitempty"`
|
||||
}
|
||||
|
||||
func main() {
|
||||
input := flag.String("pvf", `D:/DNF/runtime/data/dnf/Script.pvf`, "PVF path")
|
||||
flag.Parse()
|
||||
archive, err := platformpvf.Open(*input)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
listText, err := archive.ReadText("stackable/stackable.lst")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
listDoc, err := dnfpvf.Parse("stackable/stackable.lst", listText)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
rows := make([]row, 0)
|
||||
for _, entry := range dnfpvf.ParseList(listDoc) {
|
||||
ref := strings.Trim(strings.TrimSpace(entry.Path), "`\"'")
|
||||
path := filepath.ToSlash(filepath.Join("stackable", strings.TrimPrefix(ref, "stackable/")))
|
||||
text, err := archive.ReadText(path)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
doc, err := dnfpvf.Parse(path, text)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
action, _ := doc.Text("action type")
|
||||
if !strings.EqualFold(strings.TrimSpace(action), "[add damage font skin]") {
|
||||
continue
|
||||
}
|
||||
name, _ := doc.Text("name")
|
||||
index, _ := doc.Int("index")
|
||||
itemExpiry, _ := doc.Text("expiration date")
|
||||
rows = append(rows, row{ItemID: entry.ID, Path: path, Name: name, FontIndex: index, ExpirationInfo: doc.Texts("expiration info"), ItemExpiration: itemExpiry})
|
||||
}
|
||||
enc := json.NewEncoder(os.Stdout)
|
||||
enc.SetIndent("", " ")
|
||||
if err := enc.Encode(rows); err != nil {
|
||||
panic(fmt.Errorf("encode: %w", err))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user