This commit is contained in:
shoopea 2020-01-12 20:20:18 +08:00
parent 3655c15f4a
commit 0bd8ba4d9a

5
obj.go
View File

@ -945,8 +945,7 @@ func getSilentObjItemID(code string, name string) int64 {
} }
func loadObjItem2() error { func loadObjItem2() error {
var items, items2 []ChatWarsItem var items []ChatWarsItem
var count int64
muxObjItem.Lock() muxObjItem.Lock()
cacheObjItem = make(map[string]ChatWarsItem) cacheObjItem = make(map[string]ChatWarsItem)
@ -1050,7 +1049,7 @@ func loadObjItem() error {
muxObjItem.Lock() muxObjItem.Lock()
cacheObjItem[intl_id] = c cacheObjItem[intl_id] = c
for _, n := range c.Names { for _, n := range c.Names {
cacheObjItem[name] = c cacheObjItem[n] = c
} }
muxObjItem.Unlock() muxObjItem.Unlock()
} else { } else {