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,58 @@
|
||||
package annotations
|
||||
|
||||
import "strings"
|
||||
|
||||
// ValidPVFVersion reports whether a value is a supported configuration version.
|
||||
func ValidPVFVersion(version string) bool {
|
||||
return version == "90US" || version == "90CN" || version == "110US" || version == "115US" || version == "115CN" || version == "100CN" || version == "TW"
|
||||
}
|
||||
|
||||
func supportsPVFVersion(versions []string, version string) bool {
|
||||
if len(versions) == 0 {
|
||||
return true
|
||||
}
|
||||
for _, candidate := range versions {
|
||||
if candidate == version {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// ForVersion builds an immutable runtime view while retaining the full source
|
||||
// document for serialization and subsequent archive switches. Unknown versions
|
||||
// only enable unrestricted definitions. Filtering precedes implicit field rules.
|
||||
func (e *Engine) ForVersion(version string) *Engine {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
if !ValidPVFVersion(version) {
|
||||
version = ""
|
||||
}
|
||||
if e.scoped && e.version == version {
|
||||
return e
|
||||
}
|
||||
source := e.Document()
|
||||
document := source
|
||||
document.Fields = make([]FieldDefinition, 0, len(source.Fields))
|
||||
activeFields := make(map[string]bool, len(source.Fields))
|
||||
for _, field := range source.Fields {
|
||||
if supportsPVFVersion(field.PVFVersions, version) {
|
||||
document.Fields = append(document.Fields, field)
|
||||
activeFields[field.ID] = true
|
||||
}
|
||||
}
|
||||
document.Rules = make([]Rule, 0, len(source.Rules))
|
||||
for _, rule := range source.Rules {
|
||||
if !supportsPVFVersion(rule.PVFVersions, version) {
|
||||
continue
|
||||
}
|
||||
if id := strings.TrimSpace(rule.Field); id != "" && !activeFields[id] {
|
||||
continue
|
||||
}
|
||||
document.Rules = append(document.Rules, rule)
|
||||
}
|
||||
result := compileValidated(document)
|
||||
result.source, result.version, result.scoped = &source, version, true
|
||||
return result
|
||||
}
|
||||
Reference in new issue
Block a user