This commit is contained in:
shoopea 2020-01-26 14:49:27 +08:00
parent 6a19a629f4
commit 66d81297dc

View File

@ -3,6 +3,7 @@ package main
import (
"errors"
"fmt"
"log"
"regexp"
"strconv"
"sync"
@ -140,7 +141,7 @@ func getSilentObjItemID(code string, name string) int64 {
//log.Printf("Matching item full basename %s with %s.\n", basename, obj.Name)
return objItems[id].ObjID64
}
i := -1
i := int64(-1)
for _, id := range cacheObjItem {
if ok, _ := regexp.MatchString(`^(a|e|w)[0-9]+$`, objItems[id].Code); ok { //only gear can be custom named
m := fmt.Sprintf("^((%s.*)|(.*%s))$", regexp.QuoteMeta(objItems[id].Names[0]), regexp.QuoteMeta(objItems[id].Names[0]))