服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
91 lines
2.6 KiB
Go
91 lines
2.6 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"path"
|
|
"sort"
|
|
|
|
"longheng.io/server/internal/modules/dnf/worldmap"
|
|
)
|
|
|
|
// runQ1 统计含 EventMonsterPositions 的地图总量、分布直方图与 dungeon 归属。
|
|
func runQ1(table *worldmap.Table, usages map[int64][]mapUsage, dungeonNames map[int64]string) map[string]any {
|
|
var all []q1Map
|
|
histogram := map[int]int{}
|
|
dungeonSet := map[int64]bool{}
|
|
dungeonMaps := 0
|
|
for _, m := range table.Maps() {
|
|
n := len(m.EventMonsterPositions)
|
|
if n == 0 {
|
|
continue
|
|
}
|
|
histogram[n]++
|
|
entry := q1Map{MapID: m.ID, Path: m.Path, Name: m.Name, Positions: n, Dungeon: usageStrings(usages[m.ID])}
|
|
all = append(all, entry)
|
|
if len(usages[m.ID]) > 0 {
|
|
dungeonMaps++
|
|
for _, u := range usages[m.ID] {
|
|
dungeonSet[u.DungeonID] = true
|
|
}
|
|
}
|
|
}
|
|
sort.Slice(all, func(i, j int) bool { return all[i].MapID < all[j].MapID })
|
|
|
|
// TSV 完整清单
|
|
var lines []string
|
|
lines = append(lines, "map_id\tpositions\tpath\tname\tdungeons")
|
|
for _, e := range all {
|
|
lines = append(lines, fmt.Sprintf("%d\t%d\t%s\t%s\t%s", e.MapID, e.Positions, e.Path, e.Name, joinOr(e.Dungeon, "; ")))
|
|
}
|
|
writeLines("q1_event_monster_maps.tsv", lines)
|
|
|
|
// 涉及 dungeon 清单(ID + 名称)
|
|
type dg struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name,omitempty"`
|
|
}
|
|
var dungeons []dg
|
|
for _, id := range sortedIDs(dungeonSet) {
|
|
dungeons = append(dungeons, dg{ID: id, Name: dungeonNames[id]})
|
|
}
|
|
|
|
fmt.Printf("[Q1] maps_with_event_monster_positions=%d (dungeon-associated=%d) dungeons=%d histogram=%v\n",
|
|
len(all), dungeonMaps, len(dungeons), histogram)
|
|
return map[string]any{
|
|
"total_maps": len(all),
|
|
"dungeon_associated": dungeonMaps,
|
|
"histogram": histogram,
|
|
"dungeons": dungeons,
|
|
"maps": all,
|
|
"full_list_file": "out/q1_event_monster_maps.tsv",
|
|
"histogram_description": "key = EventMonsterPositions 个数, value = 地图数",
|
|
"association_definition": "经 maze specification/boss/layered 引用或 map [dungeon] ownership 关联到 dungeon",
|
|
}
|
|
}
|
|
|
|
func joinOr(values []string, sep string) string {
|
|
if len(values) == 0 {
|
|
return ""
|
|
}
|
|
out := values[0]
|
|
for _, v := range values[1:] {
|
|
out += sep + v
|
|
}
|
|
return out
|
|
}
|
|
|
|
func writeLines(name string, lines []string) {
|
|
if err := os.MkdirAll(outDir, 0o755); err != nil {
|
|
panic(err)
|
|
}
|
|
content := ""
|
|
for _, line := range lines {
|
|
content += line + "\n"
|
|
}
|
|
if err := os.WriteFile(path.Join(outDir, name), []byte(content), 0o644); err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Printf("[survey] wrote %s (%d lines)\n", path.Join(outDir, name), len(lines))
|
|
}
|