This commit is contained in:
shoopea 2019-05-27 18:56:03 +08:00
parent 27a5f0f8be
commit 9c4bb2a7a8
2 changed files with 14 additions and 0 deletions

View File

@ -119,6 +119,17 @@ func resetMsgParsingRules() {
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only union", "^(🏠Trade union news:\n)(?P<Union>(?s:.*))(🎪State of exclusive rights:\n){0}(?P<Fair>(?s:.*))$")
,(4900, ` + strconv.Itoa(objSubTypeMessageUnionWar) + `, "Union war rep only fair", "^(🏠Trade union news:\n){0}(?P<Union>(?s:.*))(🎪State of exclusive rights:\n)(?P<Fair>(?s:.*))$")
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeout) + `, "Generic timeout", "^Too late. Action is not available.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMeAck) + `, "Me ack", "^(?s:.*)Battle of the seven castles in .* minutes!\\n` +
`(?s:.*)\\n` +
`Level:(?P<Level>[0-9]+)\\n` +
`Atk:(?P<Atk>[0-9]+) Def:(?P<Def>[0-9]+)\\n` +
`Exp:(?P<ExpNow>[0-9]+)/(?P<ExpLvl>[0-9]+)\\n` +
`Stamina:(?P<StaminaNow>[0-9]+)/(?P<StaminaMax>[0-9]+)\\n` +
`(Gold(?P<Gold>[0-9]+)){0,1}(Pogs(?P<Pogs>[0-9]+)){0,1}(Gems(?P<Gems>[0-9]+)){0,1}\\n\\n` +
`Equipment +(?P<AtkGear>[0-9]+) +(?P<DefGear>[0-9]+)` +
`Bag: (?P<BagUsed>[0-9]+)/(?P<BagDispo>[0-9]+) /inv\\n\\n` +
`State:\\n(?P<State>.*)\\n\\n` +
`More:/hero(?s:.*)$")
;`)
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
}

View File

@ -140,6 +140,9 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
case objSubTypeMessageMeReq:
err = setObjSubTypeId(objId, objSubTypeMessageMeReq)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(MeReq)")
case objSubTypeMessageMeAck:
err = setObjSubTypeId(objId, objSubTypeMessageMeAck)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(MeAck)")
case objSubTypeMessageInventoryReq:
err = setObjSubTypeId(objId, objSubTypeMessageInventoryReq)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(InventoryReq)")