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)
|
i := v.(ChatWarsItem)
|
||||||
return i.ObjID64
|
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}$`)
|
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 {
|
||||||
@ -620,7 +620,7 @@ func silentGetObjItemID(code string, name string) int64 {
|
|||||||
i := ChatWarsItem{}
|
i := ChatWarsItem{}
|
||||||
cacheObjItem.Range(func(k, v interface{}) bool {
|
cacheObjItem.Range(func(k, v interface{}) bool {
|
||||||
i = v.(ChatWarsItem)
|
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
|
return true
|
||||||
}
|
}
|
||||||
s := strings.ToUpper(regexp.QuoteMeta(i.Name))
|
s := strings.ToUpper(regexp.QuoteMeta(i.Name))
|
||||||
|
Loading…
Reference in New Issue
Block a user