From 64861cfb7fffa9c38d0321582a40916229b9a114 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 11 May 2019 14:24:38 +0800 Subject: [PATCH] testtest --- def.go | 5 +++-- sql.go | 15 +++++++-------- workers.go | 7 +++++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/def.go b/def.go index 99ebce0..7696c7a 100644 --- a/def.go +++ b/def.go @@ -103,8 +103,9 @@ const ( objSubTypeMessageTributeAck = 315 objSubTypeMessageAuctionAnnounce = 316 objSubTypeMessageAuctionUpdReq = 317 - objSubTypeMessageAcutionUpdAck = 318 - objSubTypeMessageTime = 317 + objSubTypeMessageAuctionUpdAck = 318 + objSubTypeMessageTimeAck = 319 + objSubTypeMessageTimeReq = 320 objSubTypeJobPillage = 601 objSubTypeJobTribute = 602 objSubTypeJobStatus = 603 diff --git a/sql.go b/sql.go index 6b172cc..0954c83 100644 --- a/sql.go +++ b/sql.go @@ -234,11 +234,14 @@ func initDB() { ,(` + strconv.Itoa(objSubTypeMessageMe) + `, "me", "Hero short summary", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageInventory) + `, "inv", "Inventory", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessagePillageInc) + `, "pillage_inc", "Pillage incoming", ` + strconv.Itoa(objTypeMessage) + `) - ,(` + strconv.Itoa(objSubTypeMessageTributeInc) + `, "tribute_inc", "Request incoming", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageTributeInc) + `, "tribute_inc", "Tribute incoming", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessagePillageAck) + `, "pillage_ack", "Pillage acknowledged", ` + strconv.Itoa(objTypeMessage) + `) - ,(` + strconv.Itoa(objSubTypeMessageTributeAck) + `, "tribute_ack", "Request acknowledged", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageTributeAck) + `, "tribute_ack", "Tribute acknowledged", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageAuctionAnnounce) + `, "auction_announce", "Auction announce", ` + strconv.Itoa(objTypeMessage) + `) - ,(` + strconv.Itoa(objSubTypeMessageTime) + `, "time", "Time", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageAuctionUpdReq) + `, "auction_upd_req", "Auction update request", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageAuctionUpdAck) + `, "auction_upd_ack", "Auction update acknowledgment", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageTimeAck) + `, "time_ack", "Time Acknowledgment", ` + strconv.Itoa(objTypeMessage) + `) + ,(` + strconv.Itoa(objSubTypeMessageTimeReq) + `, "time_req", "Time Request", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `) @@ -1217,7 +1220,7 @@ func resetMsgParsingRules() { _, err = db.Exec(`INSERT INTO msg_rules (prio, msg_type_id, descn, rule) VALUES (5000, ` + strconv.Itoa(objSubTypeMessageReport) + `, "Player war report", "^(?P[🐉🦅🐺🦈🦌🥔🌑])(?P(\\[[A-Z]{3}\\]){0,1})(?P([A-Za-z0-9 ]*)) ⚔:(?P[0-9]+)(?P\\((-|\\+)[0-9]+\\)){0,1} 🛡:(?P[0-9]+) Lvl: (?P[0-9]+)\\nYour result on the battlefield:\\n🔥Exp: (?P[0-9]+)\\n💰Gold: (?P-{0,1}[0-9]+)\\n📦Stock: (?P-{0,1}[0-9]+)(\\n)*(?P(🔋Stamina restored)){0,1}(\\n)*(?P(⚡Critical strike)){0,1}(\\n)*(?s:.*)$") - ,(5000, ` + strconv.Itoa(objSubTypeMessageAuctionAnnounce) + `, "Auction annouce", "^Lot #(?P[0-9]+) : (?P.*)\\nSeller: (?P.*)\\nCurrent price: (?P[0-9]+) pouch\\(es\\)\\nBuyer: (?P.*)\\nEnd At: (?P.*)\\nStatus: (?P.*)(\\n)*(?s:.*)") + ,(5000, ` + strconv.Itoa(objSubTypeMessageAuctionAnnounce) + `, "Auction annouce", "^Lot #(?P[0-9]+) : (?P.*)\\n(Quality: (?P.*)\\n){0,1}Seller: (?P.*)\\nCurrent price: (?P[0-9]+) pouch\\(es\\)\\nBuyer: (?P.*)\\nEnd At: (?P.*)\\nStatus: (?P.*)(\\n)*(?s:.*)") ,(5000, ` + strconv.Itoa(objSubTypeMessageTime) + `, "Time", "^In Chat Wars world now\\n(?P