From 43cc18301a07366f2a51ee35584c8a133d59db79 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 13 Dec 2019 20:08:08 +0800 Subject: [PATCH] update object matching for quality --- obj.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/obj.go b/obj.go index 614acda..cd10d4e 100644 --- a/obj.go +++ b/obj.go @@ -735,6 +735,11 @@ func getSilentObjItemID(code string, name string) int64 { //log.Printf("Matching item name %s with %s.\n", name, obj.Name) return obj.ObjID64 } + if ok, _ := regexp.MatchString(`^a[0-9]+[a-e])$`, code); ok { + if obj, ok := cacheObjItem[code[:len(code)-1]]; ok { + return obj.ObjID64 + } + } if ok, _ := regexp.MatchString(`^((u|e)[0-9]+|(a|w)[0-9]+[a-e]{0,1})$`, code); ok || len(code) == 0 { r := regexp.MustCompile(`^((?P⚡\+[0-9]+) ){0,1}(?P.+?)( \+(?P[0-9]+)⚔){0,1}( \+(?P[0-9]+)🛡){0,1}( \+(?P[0-9]+)💧){0,1}$`) basename := r.ReplaceAllString(name, "${BaseName}")