This commit is contained in:
shoopea 2019-06-07 16:00:20 +08:00
parent 2d05776878
commit 99dc3f32f7

4
obj.go
View File

@ -526,7 +526,7 @@ func silentGetObjItemID(code string, name string) int64 {
return i.ObjID64
}
if ok, _ := regexp.MatchString(`(u|a|e)[0-9]+`, c); ok {
r := regexp.MustCompile(`^((?P<Modifier>⚡\+[0-9]+) ){0,1}(?P<BaseName>[a-zA-Z ']+?)( \+(?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}")
if v, ok := cacheObjItem.Load(n2); ok {
i := v.(ChatWarsItem)
@ -540,7 +540,7 @@ func silentGetObjItemID(code string, name string) int64 {
}
if len(c) == 0 {
r := regexp.MustCompile(`^((?P<Modifier>⚡\+[0-9]+) ){0,1}(?P<BaseName>[a-zA-Z ]+?)( \+(?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}")
if v, ok := cacheObjItem.Load(n2); ok {
i := v.(ChatWarsItem)