test
This commit is contained in:
parent
c997cad696
commit
0c006bedc6
8
obj.go
8
obj.go
@ -524,7 +524,9 @@ func silentGetObjItemID(c string, n string) int64 {
|
||||
}
|
||||
if ok, _ := regexp.MatchString(`u[0-9]+`, c); ok {
|
||||
r := regexp.MustCompile(`^(?P<Modifier>⚡\+[0-9]+) (?P<BaseName>[a-zA-Z ]+?)( +(?P<Atk>[0-9]+)⚔ +(?P<Def>[0-9]+)🛡){0,1}$`)
|
||||
fmt.Printf("silentGetObjItemID : Looking for `%s` (Atk : %s, Def : %s)\n", r.ReplaceAllString(n, "${BaseName}"), r.ReplaceAllString(n, "${Atk}"), r.ReplaceAllString(n, "${Def}"))
|
||||
fmt.Printf("silentGetObjItemID(unique) : BaseName : %s\n", r.ReplaceAllString(n, "${BaseName}"))
|
||||
fmt.Printf("silentGetObjItemID(unique) : Atk : %s\n", r.ReplaceAllString(n, "${Atk}"))
|
||||
fmt.Printf("silentGetObjItemID(unique) : Def : %s\n", r.ReplaceAllString(n, "${Def}"))
|
||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||
if v, ok := cacheObjItem.Load(n2); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
@ -533,7 +535,9 @@ func silentGetObjItemID(c string, n string) int64 {
|
||||
}
|
||||
if len(c) == 0 {
|
||||
r := regexp.MustCompile(`^(?P<Modifier>⚡\+[0-9]+) (?P<BaseName>[a-zA-Z ]+?)( +(?P<Atk>[0-9]+)⚔ +(?P<Def>[0-9]+)🛡){0,1}$`)
|
||||
fmt.Printf("silentGetObjItemID : Looking for `%s` (Atk : %s, Def : %s)\n", r.ReplaceAllString(n, "${BaseName}"), r.ReplaceAllString(n, "${Atk}"), r.ReplaceAllString(n, "${Def}"))
|
||||
fmt.Printf("silentGetObjItemID(null) : BaseName : %s\n", r.ReplaceAllString(n, "${BaseName}"))
|
||||
fmt.Printf("silentGetObjItemID(null) : Atk : %s\n", r.ReplaceAllString(n, "${Atk}"))
|
||||
fmt.Printf("silentGetObjItemID(null) : Def : %s\n", r.ReplaceAllString(n, "${Def}"))
|
||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||
if v, ok := cacheObjItem.Load(n2); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
|
Loading…
Reference in New Issue
Block a user