This commit is contained in:
shoopea 2019-05-13 11:01:18 +08:00
parent 2e8e1d8745
commit 1e2574bd3e

View File

@ -175,18 +175,20 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
}
*/
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED!\nLoot1: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), m.Text)
if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot3}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot3}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot4}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot4}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot5}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot5}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot6}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot6}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot7}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot7}")) > 11) {
// log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\nLoot2: %s\nLoot3: %s\nLoot4: %s\nLoot5: %s\nLoot6: %s\nLoot7: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), r.ReplaceAllString(m.Text, "${Loot3}"), r.ReplaceAllString(m.Text, "${Loot4}"), r.ReplaceAllString(m.Text, "${Loot5}"), r.ReplaceAllString(m.Text, "${Loot6}"), r.ReplaceAllString(m.Text, "${Loot7}"), m.Text)
} else {
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED! \nLoot1: %s | Result1: %s | Gold1: %s | Stock1: %s\nLoot2: %s | Result2: %s | Gold2: %s | Stock2: %s\nLoot3: %s | Result3: %s | Gold3: %s | Stock3: %s\nLoot4: %s | Result4: %s | Gold4: %s | Stock4: %s\nLoot5: %s | Result5: %s | Gold5: %s | Stock5: %s\nLoot6: %s | Result6: %s | Gold6: %s | Stock6: %s\nLoot7: %s | Result7: %s | Gold7: %s | Stock7: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Result1}"), r.ReplaceAllString(m.Text, "${Gold1}"), r.ReplaceAllString(m.Text, "${Stock1}"), r.ReplaceAllString(m.Text, "${Loot2}"), r.ReplaceAllString(m.Text, "${Result2}"), r.ReplaceAllString(m.Text, "${Gold2}"), r.ReplaceAllString(m.Text, "${Stock2}"), r.ReplaceAllString(m.Text, "${Loot3}"), r.ReplaceAllString(m.Text, "${Result3}"), r.ReplaceAllString(m.Text, "${Gold3}"), r.ReplaceAllString(m.Text, "${Stock3}"), r.ReplaceAllString(m.Text, "${Loot4}"), r.ReplaceAllString(m.Text, "${Result4}"), r.ReplaceAllString(m.Text, "${Gold4}"), r.ReplaceAllString(m.Text, "${Stock4}"), r.ReplaceAllString(m.Text, "${Loot5}"), r.ReplaceAllString(m.Text, "${Result5}"), r.ReplaceAllString(m.Text, "${Gold5}"), r.ReplaceAllString(m.Text, "${Stock5}"), r.ReplaceAllString(m.Text, "${Loot6}"), r.ReplaceAllString(m.Text, "${Result6}"), r.ReplaceAllString(m.Text, "${Gold6}"), r.ReplaceAllString(m.Text, "${Stock6}"), r.ReplaceAllString(m.Text, "${Loot7}"), r.ReplaceAllString(m.Text, "${Result7}"), r.ReplaceAllString(m.Text, "${Gold7}"), r.ReplaceAllString(m.Text, "${Stock7}"), m.Text)
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : objSubTypeMessageMiniWar\n%s\n", string(b))
}
/*
if (len(r.ReplaceAllString(m.Text, "${Loot1}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot1}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot2}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot2}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot3}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot3}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot4}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot4}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot5}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot5}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot6}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot6}")) > 11) ||
(len(r.ReplaceAllString(m.Text, "${Loot7}")) < 6 || len(r.ReplaceAllString(m.Text, "${Loot7}")) > 11) {
// log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : NOT MATCHED \nLoot1: %s\nLoot2: %s\nLoot3: %s\nLoot4: %s\nLoot5: %s\nLoot6: %s\nLoot7: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Loot2}"), r.ReplaceAllString(m.Text, "${Loot3}"), r.ReplaceAllString(m.Text, "${Loot4}"), r.ReplaceAllString(m.Text, "${Loot5}"), r.ReplaceAllString(m.Text, "${Loot6}"), r.ReplaceAllString(m.Text, "${Loot7}"), m.Text)
} else {
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : MATCHED! \nLoot1: %s | Result1: %s | Gold1: %s | Stock1: %s\nLoot2: %s | Result2: %s | Gold2: %s | Stock2: %s\nLoot3: %s | Result3: %s | Gold3: %s | Stock3: %s\nLoot4: %s | Result4: %s | Gold4: %s | Stock4: %s\nLoot5: %s | Result5: %s | Gold5: %s | Stock5: %s\nLoot6: %s | Result6: %s | Gold6: %s | Stock6: %s\nLoot7: %s | Result7: %s | Gold7: %s | Stock7: %s\n%s\n", r.ReplaceAllString(m.Text, "${Loot1}"), r.ReplaceAllString(m.Text, "${Result1}"), r.ReplaceAllString(m.Text, "${Gold1}"), r.ReplaceAllString(m.Text, "${Stock1}"), r.ReplaceAllString(m.Text, "${Loot2}"), r.ReplaceAllString(m.Text, "${Result2}"), r.ReplaceAllString(m.Text, "${Gold2}"), r.ReplaceAllString(m.Text, "${Stock2}"), r.ReplaceAllString(m.Text, "${Loot3}"), r.ReplaceAllString(m.Text, "${Result3}"), r.ReplaceAllString(m.Text, "${Gold3}"), r.ReplaceAllString(m.Text, "${Stock3}"), r.ReplaceAllString(m.Text, "${Loot4}"), r.ReplaceAllString(m.Text, "${Result4}"), r.ReplaceAllString(m.Text, "${Gold4}"), r.ReplaceAllString(m.Text, "${Stock4}"), r.ReplaceAllString(m.Text, "${Loot5}"), r.ReplaceAllString(m.Text, "${Result5}"), r.ReplaceAllString(m.Text, "${Gold5}"), r.ReplaceAllString(m.Text, "${Stock5}"), r.ReplaceAllString(m.Text, "${Loot6}"), r.ReplaceAllString(m.Text, "${Result6}"), r.ReplaceAllString(m.Text, "${Gold6}"), r.ReplaceAllString(m.Text, "${Stock6}"), r.ReplaceAllString(m.Text, "${Loot7}"), r.ReplaceAllString(m.Text, "${Result7}"), r.ReplaceAllString(m.Text, "${Gold7}"), r.ReplaceAllString(m.Text, "${Stock7}"), m.Text)
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : objSubTypeMessageMiniWar\n%s\n", string(b))
}
*/
/*
if err == nil {
log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : War time : %s (%d)\n", r.ReplaceAllString(m.Text, "${Time}"), objId)