test
This commit is contained in:
parent
ebece6e98f
commit
b189743697
4
obj.go
4
obj.go
@ -915,7 +915,7 @@ func getSilentObjItemID(code string, name string) int64 {
|
||||
}
|
||||
for _, obj := range cacheObjItem {
|
||||
if ok, _ := regexp.MatchString(`^(a|e|w)[0-9]+$`, obj.Code); ok { //only gear can be custom named
|
||||
m := fmt.Sprintf("^((%s.*)|(.*%s))$", regexp.QuoteMeta(obj.Name), regexp.QuoteMeta(obj.Name))
|
||||
m := fmt.Sprintf("^((%s.*)|(.*%s))$", regexp.QuoteMeta(obj.Names[0]), regexp.QuoteMeta(obj.Names[0]))
|
||||
if ok, _ := regexp.MatchString(m, basename); ok {
|
||||
//log.Printf("LOOP : Matching item modified basename %s with %s (%d).\n", basename, item.Name, item.ObjID64)
|
||||
i = obj
|
||||
@ -963,7 +963,7 @@ func loadObjItem2() error {
|
||||
err = json.Unmarshal(b, &items)
|
||||
|
||||
for _, i := range items {
|
||||
id := 0
|
||||
var int64 id := 0
|
||||
for _, n := range i.Names {
|
||||
if id == 0 {
|
||||
id = getSilentObjItemID(i.Code, ``)
|
||||
|
Loading…
Reference in New Issue
Block a user