test
This commit is contained in:
parent
19da93063e
commit
d10b9f5efc
4
obj.go
4
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<Modifier>⚡\+[0-9]+) ){0,1}(?P<BaseName>.+?)( \+(?P<Atk>[0-9]+)⚔){0,1}( \+(?P<Def>[0-9]+)🛡){0,1}( \+(?P<Mana>[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))
|
||||
|
Loading…
Reference in New Issue
Block a user