This commit is contained in:
shoopea 2019-06-28 19:07:42 +08:00
parent eb1de66c07
commit 187d7ca41f

6
obj.go
View File

@ -664,19 +664,19 @@ func silentGetObjItemID(code string, name string) int64 {
}
m := fmt.Sprintf("^((%s.*)|(.*%s))$", regexp.QuoteMeta(item.Name), regexp.QuoteMeta(item.Name))
if ok, _ := regexp.MatchString(m, basename); ok {
log.Printf("Matching item modified basename %s with %s. (1)\n", basename, item.Name)
log.Printf("LOOP : Matching item modified basename %s with %s (%d).\n", basename, item.Name, item.ObjID64)
return false
} else {
log.Printf("Not matching item modified basename %s with %s (%d).\n", basename, item.Name, item.ObjID64)
item = ChatWarsItem{
ObjID64: 0,
}
log.Printf("Not matching item modified basename %s with %s.\n", basename, item.Name)
return true
}
})
if item.ObjID64 != 0 {
log.Printf("Matching item modified basename %s with %s. (2)\n", basename, item.Name)
log.Printf("RETURN : Matching item modified basename %s with %s (%d).\n", basename, item.Name, item.ObjID64)
return item.ObjID64
} else {
fmt.Printf("silentGetObjItemID : Modifier : `%s`\n", r.ReplaceAllString(name, "${Modifier}"))