fix
This commit is contained in:
parent
4e179df994
commit
087542a64e
3
bot.go
3
bot.go
@ -863,8 +863,7 @@ func botBrewItem(m *ChatWarsMessage, r *regexp.Regexp) {
|
|||||||
Status: 0,
|
Status: 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Code}"))
|
p.ObjItemID64 = getObjItemID(r.ReplaceAllString(m.Text, "${Code}"))
|
||||||
logOnError(err, "botBrewItem : getCraftItemID")
|
|
||||||
|
|
||||||
fmt.Printf("Code[%s] : %d\n", r.ReplaceAllString(m.Text, "${Code}"), p.ObjItemID64)
|
fmt.Printf("Code[%s] : %d\n", r.ReplaceAllString(m.Text, "${Code}"), p.ObjItemID64)
|
||||||
|
|
||||||
|
2
item.go
2
item.go
@ -86,7 +86,7 @@ func getObjItem(objID64 int64) (*ChatWarsItem, error) {
|
|||||||
muxObjItem.RLock()
|
muxObjItem.RLock()
|
||||||
defer muxObjItem.RUnlock()
|
defer muxObjItem.RUnlock()
|
||||||
if id, ok := cacheObjItemId[objID64]; ok {
|
if id, ok := cacheObjItemId[objID64]; ok {
|
||||||
log.Printf("Matching item name %s with %s.\n", name, obj.Name)
|
//log.Printf("Matching item name %s with %s.\n", name, obj.Name)
|
||||||
return &objItems[id], nil
|
return &objItems[id], nil
|
||||||
} else {
|
} else {
|
||||||
return nil, errors.New("Item not found.")
|
return nil, errors.New("Item not found.")
|
||||||
|
Loading…
Reference in New Issue
Block a user