test
This commit is contained in:
parent
9901518a37
commit
3c075df02d
2
obj.go
2
obj.go
@ -524,6 +524,7 @@ func silentGetObjItemID(c string, n string) int64 {
|
|||||||
}
|
}
|
||||||
if ok, _ := regexp.MatchString(`u[0-9]+`, c); ok {
|
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}`)
|
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}"))
|
||||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||||
if v, ok := cacheObjItem.Load(n2); ok {
|
if v, ok := cacheObjItem.Load(n2); ok {
|
||||||
i := v.(ChatWarsItem)
|
i := v.(ChatWarsItem)
|
||||||
@ -532,6 +533,7 @@ func silentGetObjItemID(c string, n string) int64 {
|
|||||||
}
|
}
|
||||||
if len(c) == 0 {
|
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}`)
|
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}"))
|
||||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||||
if v, ok := cacheObjItem.Load(n2); ok {
|
if v, ok := cacheObjItem.Load(n2); ok {
|
||||||
i := v.(ChatWarsItem)
|
i := v.(ChatWarsItem)
|
||||||
|
Loading…
Reference in New Issue
Block a user