test
This commit is contained in:
parent
3a45e3f595
commit
977f65828d
@ -14,4 +14,6 @@ ChirpNestBot
|
||||
- [ ] Experience graphs & forecast
|
||||
- [ ] Impersonate
|
||||
- [x] Foray interception
|
||||
|
||||
Progression :
|
||||
- 0 -> 4 : Forest + Foray ;
|
||||
- 5 -> 10 : Forest + Foray + Arena ;
|
24
obj.go
24
obj.go
@ -516,9 +516,29 @@ func silentGetObjItemID(c string, n string) int64 {
|
||||
if v, ok := cacheObjItem.Load(c); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
return i.ObjID64
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
if v, ok := cacheObjItem.Load(n); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
return i.ObjID64
|
||||
}
|
||||
if ok, _ := regexp.MatchString(`u[0-9]+`, c); ok {
|
||||
r := regexp.MustCompile(`(?P<Modifier>⚡\+[0-9]+) (?P<BaseName>[a-zA-Z ]+)`)
|
||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||
if v, ok := cacheObjItem.Load(n2); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
return i.ObjID64
|
||||
}
|
||||
}
|
||||
if len(c) == 0 {
|
||||
r := regexp.MustCompile(`(?P<Modifier>⚡\+[0-9]+) (?P<BaseName>[a-zA-Z ]+)`)
|
||||
n2 := r.ReplaceAllString(n, "${BaseName}")
|
||||
if v, ok := cacheObjItem.Load(n2); ok {
|
||||
i := v.(ChatWarsItem)
|
||||
return i.ObjID64
|
||||
}
|
||||
}
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
func loadObjItem() error {
|
||||
|
Loading…
Reference in New Issue
Block a user