Implement hunting AP and progress, event tasks, exchanges, games, stories and actions; connect battle and reward handling. Add CashShop plugin and installation, server purchases and entitlements, recharge rules and plugin version metadata. Distribute binary calendars independently; cache GameData in memory and fix single-connection query deadlocks. Improve automatic login and recovery diagnostics; document configuration and release flows.
27 lines
629 B
Go
27 lines
629 B
Go
package gamedata
|
|
|
|
func LoadEventAPDesign(root, version string) (map[uint64]uint64, HuntingAPDesign, error) {
|
|
d, e := LoadHuntingAPDesign(root, version)
|
|
if e != nil {
|
|
return nil, d, e
|
|
}
|
|
db, done, e := openStatDatabase(root, version)
|
|
if e != nil {
|
|
return nil, d, e
|
|
}
|
|
defer done()
|
|
var raw []byte
|
|
if e = db.QueryRow("SELECT ProtoBuf FROM GameDefaultTable WHERE id=0").Scan(&raw); e != nil {
|
|
return nil, d, e
|
|
}
|
|
caps := map[uint64]uint64{}
|
|
for typ, field := range map[uint64]int{30: 43, 32: 113} {
|
|
n, e := optionalScalar(raw, field)
|
|
if e != nil {
|
|
return nil, d, e
|
|
}
|
|
caps[typ] = n
|
|
}
|
|
return caps, d, nil
|
|
}
|