debug message

update bindata
This commit is contained in:
shoopea 2020-04-18 11:44:42 +08:00
parent 14fe8d2d10
commit 7c5d823c72
2 changed files with 162 additions and 132 deletions

File diff suppressed because one or more lines are too long

12
item.go
View File

@ -292,8 +292,12 @@ func loadObjItem() error {
cacheObjItemCraft = make(map[string]int64) cacheObjItemCraft = make(map[string]int64)
objItems = make([]ChatWarsItem, 0) objItems = make([]ChatWarsItem, 0)
b, err := Asset("data/obj_item.json") for _, a := range AssetNames() {
logOnError(err, "loadObjItem : load data/obj_item.json") m, err := regexp.MatchString("data/obj_item/.*\\.json", a)
logOnError(err, "loadObjItem : MatchString")
if m {
b, err := Asset(a)
logOnError(err, "loadObjItem : load Asset("+a+")")
if err != nil { if err != nil {
return err return err
} }
@ -405,7 +409,9 @@ func loadObjItem() error {
} }
} }
log.Printf("%d items loaded.\n", len(objItems)) log.Printf("%d items loaded for %s.\n", len(objItems), a)
}
}
/* /*
for _, v := range cacheObjItemId { for _, v := range cacheObjItemId {