Files
bd2/go/internal/server/gamedata/event_owned_item.go
T
Flechazo 924a42c32e fix(all): complete activity calendars, shop purchases and reward dispatch
Restore event and mini hubs, current shop and hunt calendars, and regular seasons; preserve all published windows. Implement story/quiz routes, native shop purchases, avatar sets, currencies, rank-change items and permanent buffs with rollback and reward coverage tests. Refresh client buff stats and update Cash Shop to 0.1.1.
2026-10-05 15:49:50 +08:00

32 lines
732 B
Go

package gamedata
func LoadOwnedEventItemDesign(root, version string) (map[uint64]map[uint64]bool, error) {
db, done, e := openStatDatabase(root, version)
if e != nil {
return nil, e
}
defer done()
out := map[uint64]map[uint64]bool{}
for typ, table := range map[uint64]string{47: "IdCardItemTable", 49: "AvatarItemTable", 69: "EquipmentRankChangeItemTable"} {
rows, e := db.Query("SELECT id FROM " + table)
if e != nil {
return nil, e
}
out[typ] = map[uint64]bool{}
for rows.Next() {
var id uint64
if e = rows.Scan(&id); e != nil {
rows.Close()
return nil, e
}
out[typ][id] = true
}
if e = rows.Err(); e != nil {
rows.Close()
return nil, e
}
rows.Close()
}
return out, nil
}