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,119 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
dnfpvf "longheng.io/server/internal/modules/dnf/pvf"
|
||||
platformpvf "longheng.io/server/internal/platform/pvf"
|
||||
)
|
||||
|
||||
func name_of(s string) string {
|
||||
return strings.ToLower(strings.Join(strings.Fields(strings.TrimSpace(s)), " "))
|
||||
}
|
||||
|
||||
func main() {
|
||||
archive, err := platformpvf.Open(`DNF_REAL_PVF`)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
paths := []string{}
|
||||
archive.RangePaths(func(p string) bool {
|
||||
if strings.HasSuffix(strings.ToLower(p), ".equ") {
|
||||
paths = append(paths, p)
|
||||
}
|
||||
return true
|
||||
})
|
||||
sort.Strings(paths)
|
||||
blocks := 0
|
||||
noGrow := 0
|
||||
orderBad := 0
|
||||
nestedLevelupInGroup := 0
|
||||
var noGrowList []string
|
||||
var orderBadList []string
|
||||
containers := 0
|
||||
for _, p := range paths {
|
||||
text, err := archive.ReadText(p)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
if !strings.Contains(text, "[all skill item]") {
|
||||
continue
|
||||
}
|
||||
doc, perr := dnfpvf.Parse(p, text)
|
||||
if perr != nil {
|
||||
continue
|
||||
}
|
||||
depth := 0
|
||||
curHasGrow := false
|
||||
curHasApply := false
|
||||
curApplyBeforeGrow := false
|
||||
curStart := 0
|
||||
curLevelup := false
|
||||
for si, sec := range doc.Sections {
|
||||
n := name_of(sec.Name)
|
||||
switch n {
|
||||
case "all skill item container":
|
||||
containers++
|
||||
case "all skill item":
|
||||
depth++
|
||||
blocks++
|
||||
curHasGrow, curHasApply, curApplyBeforeGrow, curLevelup = false, false, false, false
|
||||
curStart = si
|
||||
case "/all skill item":
|
||||
if depth > 0 {
|
||||
if !curHasGrow {
|
||||
noGrow++
|
||||
if len(noGrowList) < 25 {
|
||||
beg := doc.Sections[curStart].Start
|
||||
end := sec.Start
|
||||
if end > beg+220 {
|
||||
end = beg + 220
|
||||
}
|
||||
raw := ""
|
||||
for _, tk := range doc.Tokens[beg:end] {
|
||||
raw += tk.Raw + " "
|
||||
}
|
||||
noGrowList = append(noGrowList, fmt.Sprintf("%s :: %s", p, strings.ReplaceAll(raw, "\n", " ")))
|
||||
}
|
||||
}
|
||||
if curApplyBeforeGrow {
|
||||
orderBad++
|
||||
if len(orderBadList) < 10 {
|
||||
orderBadList = append(orderBadList, p)
|
||||
}
|
||||
}
|
||||
if curLevelup {
|
||||
nestedLevelupInGroup++
|
||||
}
|
||||
depth--
|
||||
}
|
||||
case "item growtype":
|
||||
if depth > 0 {
|
||||
curHasGrow = true
|
||||
if curHasApply {
|
||||
curApplyBeforeGrow = true
|
||||
}
|
||||
}
|
||||
case "skill apply condition":
|
||||
if depth > 0 {
|
||||
curHasApply = true
|
||||
}
|
||||
case "skill levelup":
|
||||
if depth > 0 {
|
||||
curLevelup = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
fmt.Printf("containers=%d blocks=%d noGrowBlock=%d applyBeforeGrow=%d levelupInsideGroup=%d\n", containers, blocks, noGrow, orderBad, nestedLevelupInGroup)
|
||||
fmt.Println("### blocks without [item growtype]:")
|
||||
for _, s := range noGrowList {
|
||||
fmt.Println(" " + s)
|
||||
}
|
||||
fmt.Println("### apply-before-grow files:")
|
||||
for _, s := range orderBadList {
|
||||
fmt.Println(" " + s)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user