parent
911e4d08a8
commit
75cc1df4d1
10
obj.go
10
obj.go
@ -631,7 +631,7 @@ func silentGetObjItemID(code string, name string) int64 {
|
||||
if len(code) > 0 {
|
||||
if v, ok := cacheObjItem.Load(code); ok {
|
||||
item := v.(ChatWarsItem)
|
||||
// log.Printf("Matching item code %s with %s.\n", code, item.Code)
|
||||
log.Printf("Matching item code %s with %s.\n", code, item.Code)
|
||||
return item.ObjID64
|
||||
}
|
||||
if ok, _ := regexp.MatchString(`^u[0-9]+`, code); !ok {
|
||||
@ -651,7 +651,7 @@ func silentGetObjItemID(code string, name string) int64 {
|
||||
basename := r.ReplaceAllString(name, "${BaseName}")
|
||||
if v, ok := cacheObjItem.Load(basename); ok && len(basename) > 0 {
|
||||
item := v.(ChatWarsItem)
|
||||
// log.Printf("Matching item full basename %s with %s.\n", basename, item.Name)
|
||||
log.Printf("Matching item full basename %s with %s.\n", basename, item.Name)
|
||||
return item.ObjID64
|
||||
}
|
||||
item := ChatWarsItem{
|
||||
@ -664,19 +664,19 @@ func silentGetObjItemID(code string, name string) int64 {
|
||||
}
|
||||
m := fmt.Sprintf("^((%s.*)|(.*%s))$", regexp.QuoteMeta(item.Name), regexp.QuoteMeta(item.Name))
|
||||
if ok, _ := regexp.MatchString(m, basename); ok {
|
||||
// log.Printf("Matching item modified basename %s with %s. (1)\n", basename, item.Name)
|
||||
log.Printf("Matching item modified basename %s with %s. (1)\n", basename, item.Name)
|
||||
return false
|
||||
} else {
|
||||
item = ChatWarsItem{
|
||||
ObjID64: 0,
|
||||
}
|
||||
// log.Printf("Not matching item modified basename %s with %s.\n", basename, item.Name)
|
||||
log.Printf("Not matching item modified basename %s with %s.\n", basename, item.Name)
|
||||
return true
|
||||
}
|
||||
|
||||
})
|
||||
if item.ObjID64 != 0 {
|
||||
// log.Printf("Matching item modified basename %s with %s. (2)\n", basename, item.Name)
|
||||
log.Printf("Matching item modified basename %s with %s. (2)\n", basename, item.Name)
|
||||
return item.ObjID64
|
||||
} else {
|
||||
fmt.Printf("silentGetObjItemID : Modifier : `%s`\n", r.ReplaceAllString(name, "${Modifier}"))
|
||||
|
@ -363,7 +363,6 @@ func MQKeepAliveWorker() {
|
||||
time.Sleep(15 * time.Second)
|
||||
err = s.Open()
|
||||
}
|
||||
log.Printf("MQKeepAliveWorker : Connected to RabbitMQ")
|
||||
/*
|
||||
m, err := s.MQChannel.Consume(
|
||||
s.MQQueue.Name, // queue
|
||||
|
Loading…
Reference in New Issue
Block a user