diff --git a/obj.go b/obj.go index 1486fd8..fa3daa1 100644 --- a/obj.go +++ b/obj.go @@ -610,7 +610,7 @@ func silentGetObjItemID(code string, name string) int64 { i := v.(ChatWarsItem) return i.ObjID64 } - if ok, _ := regexp.MatchString(`^((u|e)[0-9]+|a[0-9]+[a-e]{0,1})$`, c); ok || len(c) == 0 { + if ok, _ := regexp.MatchString(`^((u|e)[0-9]+|(a|w)[0-9]+[a-e]{0,1})$`, c); ok || len(c) == 0 { r := regexp.MustCompile(`^((?P⚡\+[0-9]+) ){0,1}(?P.+?)( \+(?P[0-9]+)⚔){0,1}( \+(?P[0-9]+)🛡){0,1}( \+(?P[0-9]+)💧){0,1}$`) n2 := r.ReplaceAllString(n, "${BaseName}") if v, ok := cacheObjItem.Load(n2); ok { @@ -620,7 +620,7 @@ func silentGetObjItemID(code string, name string) int64 { i := ChatWarsItem{} cacheObjItem.Range(func(k, v interface{}) bool { i = v.(ChatWarsItem) - if ok, _ := regexp.MatchString(`^(a|e)[0-9]+$`, i.Code); !ok { //only gear can be custom named + if ok, _ := regexp.MatchString(`^(a|e|w)[0-9]+$`, i.Code); !ok { //only gear can be custom named return true } s := strings.ToUpper(regexp.QuoteMeta(i.Name))