This commit is contained in:
shoopea 2019-06-07 18:54:26 +08:00
parent f09097936d
commit b8d1e012da

2
obj.go
View File

@ -525,7 +525,7 @@ func silentGetObjItemID(code string, name string) int64 {
i := v.(ChatWarsItem) i := v.(ChatWarsItem)
return i.ObjID64 return i.ObjID64
} }
if ok, _ := regexp.MatchString(`(u|a|e)[0-9]+`, c); ok { if ok, _ := regexp.MatchString(`(u|a|e)[0-9]+[a-z]{0,1}`, c); ok {
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}$`) 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}") n2 := r.ReplaceAllString(n, "${BaseName}")
if v, ok := cacheObjItem.Load(n2); ok { if v, ok := cacheObjItem.Load(n2); ok {