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,66 @@
|
||||
// skilljobauth dumps (job, skill id, name, kind, active) for the requested skill ids from the
|
||||
// real client PVF. Skill ids are job-scoped in the current data (dnfskill.Key is {Job, ID}),
|
||||
// so this tool exists to prove which class actually owns an id such as 31 or 234 — i.e. to
|
||||
// show that a job-scoped gate cannot touch another class.
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"fmt"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
dnfpvf "longheng.io/server/internal/modules/dnf/pvf"
|
||||
dnfskill "longheng.io/server/internal/modules/dnf/skill"
|
||||
platformpvf "longheng.io/server/internal/platform/pvf"
|
||||
)
|
||||
|
||||
func main() {
|
||||
pvfPath := flag.String("pvf", `data/dnf/Script.pvf`, "Script.pvf path")
|
||||
ids := flag.String("ids", "31,234", "comma separated skill ids to look up across every job")
|
||||
job := flag.Int("job", -1, "optional: only print rows for this job byte")
|
||||
flag.Parse()
|
||||
archive, err := platformpvf.LoadArchive(platformpvf.Options{Path: *pvfPath})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
index, err := dnfpvf.Build(context.Background(), archive, dnfpvf.BuildOptions{Lists: []string{dnfskill.DefaultList}})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
catalog, err := dnfskill.Load(context.Background(), index, dnfskill.Options{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
wanted := make(map[uint16]bool)
|
||||
for _, part := range strings.Split(*ids, ",") {
|
||||
value, convErr := strconv.Atoi(strings.TrimSpace(part))
|
||||
if convErr != nil {
|
||||
continue
|
||||
}
|
||||
wanted[uint16(value)] = true
|
||||
}
|
||||
rows := make([]dnfskill.Skill, 0)
|
||||
for _, definition := range catalog.Skills() {
|
||||
if !wanted[definition.ID] {
|
||||
continue
|
||||
}
|
||||
if *job >= 0 && int(definition.Job) != *job {
|
||||
continue
|
||||
}
|
||||
rows = append(rows, definition)
|
||||
}
|
||||
sort.Slice(rows, func(left, right int) bool {
|
||||
if rows[left].ID != rows[right].ID {
|
||||
return rows[left].ID < rows[right].ID
|
||||
}
|
||||
return rows[left].Job < rows[right].Job
|
||||
})
|
||||
for _, definition := range rows {
|
||||
fmt.Printf("id=%-6d job=%-3d active=%-5v kind=%-16s name=%s\n",
|
||||
definition.ID, definition.Job, definition.Active, definition.Kind, definition.Name)
|
||||
}
|
||||
fmt.Printf("total rows=%d\n", len(rows))
|
||||
}
|
||||
Reference in new issue
Block a user