From 087542a64e97594e05915cbdd15e3a302b9c16a3 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 21 Jan 2021 16:36:07 +0100 Subject: [PATCH] fix --- bot.go | 3 +-- item.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.go b/bot.go index a2ab90f..9eb884a 100644 --- a/bot.go +++ b/bot.go @@ -863,8 +863,7 @@ func botBrewItem(m *ChatWarsMessage, r *regexp.Regexp) { Status: 0, } - p.ObjItemID64, err = getCraftItemID(r.ReplaceAllString(m.Text, "${Code}")) - logOnError(err, "botBrewItem : getCraftItemID") + p.ObjItemID64 = getObjItemID(r.ReplaceAllString(m.Text, "${Code}")) fmt.Printf("Code[%s] : %d\n", r.ReplaceAllString(m.Text, "${Code}"), p.ObjItemID64) diff --git a/item.go b/item.go index 9639e8b..0f9f619 100644 --- a/item.go +++ b/item.go @@ -86,7 +86,7 @@ func getObjItem(objID64 int64) (*ChatWarsItem, error) { muxObjItem.RLock() defer muxObjItem.RUnlock() 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 } else { return nil, errors.New("Item not found.")