服务端(Go): - GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面 - GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新 - 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新) - 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍 - 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0) - 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算 启动器(Python/JS): - 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭 - GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐) - 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
86 lines
2.6 KiB
Go
86 lines
2.6 KiB
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"sort"
|
|
|
|
"longheng.io/server/internal/modules/dnf/worldmap"
|
|
)
|
|
|
|
// runQ2 统计 SpecialPassiveObject 的 Spawns 中 Kind 归一化为 monster 的
|
|
// (ObjectID, monsterCode) 组合、出现次数与所在地图/dungeon。
|
|
func runQ2(table *worldmap.Table, usages map[int64][]mapUsage, _ map[int64]string, objRefs map[int64]string) map[string]any {
|
|
combos := map[comboKey]*comboInfo{}
|
|
kindCensus := map[string]int{}
|
|
totalSpecial := 0
|
|
totalWithSpawns := 0
|
|
|
|
for _, m := range table.Maps() {
|
|
for _, obj := range m.SpecialPassiveObjects {
|
|
totalSpecial++
|
|
if len(obj.Spawns) > 0 {
|
|
totalWithSpawns++
|
|
}
|
|
for _, spawn := range obj.Spawns {
|
|
kind := normSymbol(spawn.Kind)
|
|
kindCensus[kind]++
|
|
if kind != "monster" {
|
|
continue
|
|
}
|
|
key := comboKey{ObjectID: obj.ObjectID, Code: spawn.Code}
|
|
info, ok := combos[key]
|
|
if !ok {
|
|
info = &comboInfo{
|
|
ObjectID: obj.ObjectID, Code: spawn.Code,
|
|
Maps: map[int64]bool{}, Dungeons: map[int64]bool{},
|
|
Levels: map[int64]bool{}, RawKinds: map[string]bool{},
|
|
ObjRef: objRefs[obj.ObjectID],
|
|
}
|
|
combos[key] = info
|
|
}
|
|
info.Count++
|
|
info.Maps[m.ID] = true
|
|
info.Levels[spawn.Level] = true
|
|
info.RawKinds[spawn.Kind] = true
|
|
for _, u := range usages[m.ID] {
|
|
info.Dungeons[u.DungeonID] = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
var list []*comboInfo
|
|
for _, info := range combos {
|
|
info.MapList = sortedIDs(info.Maps)
|
|
info.DgList = sortedIDs(info.Dungeons)
|
|
info.LevelVal = sortedIDs(info.Levels)
|
|
list = append(list, info)
|
|
}
|
|
sort.Slice(list, func(i, j int) bool {
|
|
if list[i].ObjectID != list[j].ObjectID {
|
|
return list[i].ObjectID < list[j].ObjectID
|
|
}
|
|
return list[i].Code < list[j].Code
|
|
})
|
|
|
|
var lines []string
|
|
lines = append(lines, "object_id\tmonster_code\tcount\tmaps\tdungeons\tobj_ref")
|
|
for _, info := range list {
|
|
lines = append(lines, fmt.Sprintf("%d\t%d\t%d\t%v\t%v\t%s",
|
|
info.ObjectID, info.Code, info.Count, info.MapList, info.DgList, info.ObjRef))
|
|
}
|
|
writeLines("q2_special_spawn_combos.tsv", lines)
|
|
|
|
fmt.Printf("[Q2] special_objects=%d with_spawns=%d monster_combos=%d kind_census=%v\n",
|
|
totalSpecial, totalWithSpawns, len(list), kindCensus)
|
|
return map[string]any{
|
|
"total_special_objects": totalSpecial,
|
|
"with_spawns": totalWithSpawns,
|
|
"kind_census": kindCensus,
|
|
"monster_combo_count": len(list),
|
|
"combos": list,
|
|
"full_list_file": "out/q2_special_spawn_combos.tsv",
|
|
"count_semantics": "count = 全 PVF 地图上该 (ObjectID, monsterCode) spawn 条目出现次数(每次摆放计入)",
|
|
}
|
|
}
|