test
This commit is contained in:
parent
b3144ee095
commit
92fa50cab1
26
obj.go
26
obj.go
@ -527,33 +527,31 @@ func silentGetObjItemID(code string, name string) int64 {
|
|||||||
}
|
}
|
||||||
if ok, _ := regexp.MatchString(`(u|a|e)[0-9]+`, c); ok {
|
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>[a-zA-Z ]+?)( \+(?P<Atk>[0-9]+)⚔){0,1}( \+(?P<Def>[0-9]+)🛡){0,1}( \+(?P<Mana>[0-9]+)💧){0,1}$`)
|
||||||
/*
|
|
||||||
fmt.Printf("silentGetObjItemID(unique) : Modifier : `%s`\n", r.ReplaceAllString(n, "${Modifier}"))
|
|
||||||
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}"))
|
|
||||||
fmt.Printf("silentGetObjItemID(unique) : Mana : `%s`\n", r.ReplaceAllString(n, "${Mana}"))
|
|
||||||
*/
|
|
||||||
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)
|
||||||
return i.ObjID64
|
return i.ObjID64
|
||||||
}
|
}
|
||||||
|
fmt.Printf("silentGetObjItemID(unique) : Modifier : `%s`\n", r.ReplaceAllString(n, "${Modifier}"))
|
||||||
|
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}"))
|
||||||
|
fmt.Printf("silentGetObjItemID(unique) : Mana : `%s`\n", r.ReplaceAllString(n, "${Mana}"))
|
||||||
|
|
||||||
}
|
}
|
||||||
if len(c) == 0 {
|
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>[a-zA-Z ]+?)( \+(?P<Atk>[0-9]+)⚔){0,1}( \+(?P<Def>[0-9]+)🛡){0,1}( \+(?P<Mana>[0-9]+)💧){0,1}$`)
|
||||||
/*
|
|
||||||
fmt.Printf("silentGetObjItemID(null) : Modifier : `%s`\n", r.ReplaceAllString(n, "${Modifier}"))
|
|
||||||
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}"))
|
|
||||||
fmt.Printf("silentGetObjItemID(null) : Mana : `%s`\n", r.ReplaceAllString(n, "${Mana}"))
|
|
||||||
*/
|
|
||||||
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)
|
||||||
return i.ObjID64
|
return i.ObjID64
|
||||||
}
|
}
|
||||||
|
fmt.Printf("silentGetObjItemID(null) : Modifier : `%s`\n", r.ReplaceAllString(n, "${Modifier}"))
|
||||||
|
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}"))
|
||||||
|
fmt.Printf("silentGetObjItemID(null) : Mana : `%s`\n", r.ReplaceAllString(n, "${Mana}"))
|
||||||
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user