update msg

This commit is contained in:
shoopea 2019-08-29 19:03:38 +08:00
parent e60dfdc66f
commit edb9a3885c
4 changed files with 19 additions and 9 deletions

12
def.go
View File

@ -419,10 +419,14 @@ const (
objSubTypeMessageGStockReq = 363 // /g_stock (done) objSubTypeMessageGStockReq = 363 // /g_stock (done)
objSubTypeMessageGStockAck = 364 // result from /g_stock (done) objSubTypeMessageGStockAck = 364 // result from /g_stock (done)
objSubTypeMessageBusy = 365 // too busy now objSubTypeMessageBusy = 365 // too busy now
objSubTypeMessageStockEmpty = 366 // [empty] objSubTypeMessageResStockReq = 366 // 📦Resources or /stock (done)
objSubTypeMessageStockAnyAck = 367 // list of stock objSubTypeMessageAlchStockReq = 367 // ⚗Alchemy (done)
objSubTypeMessageGDepositReq = 368 // /g_deposit xx y (done) objSubTypeMessageMiscStockReq = 368 // 🗃Misc or /misc (done)
objSubTypeMessageGDepositAck = 369 // Deposited successfully: xx (y) (done) objSubTypeMessageEquipStockReq = 369 // 🏷Equipment (done)
objSubTypeMessageStockEmpty = 370 // [empty] (done)
objSubTypeMessageStockAnyAck = 371 // list of stock (done)
objSubTypeMessageGDepositReq = 372 // /g_deposit xx y (done)
objSubTypeMessageGDepositAck = 373 // Deposited successfully: xx (y) (done)
objSubTypeJobPillage = 601 objSubTypeJobPillage = 601
objSubTypeJobTribute = 602 objSubTypeJobTribute = 602
objSubTypeJobStatus = 603 objSubTypeJobStatus = 603

6
job.go
View File

@ -45,11 +45,7 @@ func createJob(jobTypeID int32, priority int32, userID64 int64, trigger int64, s
} }
defer stmt.Close() defer stmt.Close()
t := time.Unix(maxUnixTimestamp, 0).UTC() _, err = stmt.Exec(objId, priority, userID64, trigger, schedule.UTC(), time.Now().UTC(), time.Unix(maxUnixTimestamp, 0).UTC(), payload)
log.Printf("createJob : timeout : %s.\n", t.Format(time.RFC3339))
_, err = stmt.Exec(objId, priority, userID64, trigger, schedule.UTC(), time.Now().UTC(), t, payload)
logOnError(err, "createJob : insert obj_job") logOnError(err, "createJob : insert obj_job")
if err != nil { if err != nil {
return 0, err return 0, err

View File

@ -195,6 +195,12 @@ func resetMsgParsingRules() {
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockOthReq) + `, "Guild stock other Req", "^/g_stock_other$") ,(5000, ` + strconv.Itoa(objSubTypeMessageGStockOthReq) + `, "Guild stock other Req", "^/g_stock_other$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "Guild stock any Ack", "^Guild Warehouse:(?P<Stock>(\\n[0-9a-z]+ (.*) x ([0-9]+))+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageGStockAnyAck) + `, "Guild stock any Ack", "^Guild Warehouse:(?P<Stock>(\\n[0-9a-z]+ (.*) x ([0-9]+))+)$")
,(5000, ` + strconv.Itoa(objSubTypeMessageBusy) + `, "Too busy now", "^You are too busy with a different adventure. Try a bit later.$") ,(5000, ` + strconv.Itoa(objSubTypeMessageBusy) + `, "Too busy now", "^You are too busy with a different adventure. Try a bit later.$")
,(5000, ` + strconv.Itoa(objSubTypeMessageResStockReq) + `, "Resources Stock Req #1", "^📦Resources$")
,(5000, ` + strconv.Itoa(objSubTypeMessageResStockReq) + `, "Resources Stock Req #2", "^/stock$")
,(5000, ` + strconv.Itoa(objSubTypeMessageAlchStockReq) + `, "Alchemy Stock Req", "^⚗Alchemy$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMiscStockReq) + `, "Misc Stock Req #1", "^🗃Misc$")
,(5000, ` + strconv.Itoa(objSubTypeMessageMiscStockReq) + `, "Misc Stock Req #2", "^/misc$")
,(5000, ` + strconv.Itoa(objSubTypeMessageEquipStockReq) + `, "Equipment Stock Req", "^🏷Equipment$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockEmpty) + `, "Stock Empty", "^\\[empty\\]$") ,(5000, ` + strconv.Itoa(objSubTypeMessageStockEmpty) + `, "Stock Empty", "^\\[empty\\]$")
,(5000, ` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "Any Stock Ack", "^$") ,(5000, ` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "Any Stock Ack", "^$")
,(5000, ` + strconv.Itoa(objSubTypeMessageGDepositReq) + `, "GDeposit Req", "^/g_deposit (?P<Item>[0-9]+) (?P<Quantity>[0-9]+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageGDepositReq) + `, "GDeposit Req", "^/g_deposit (?P<Item>[0-9]+) (?P<Quantity>[0-9]+)$")

4
sql.go
View File

@ -512,6 +512,10 @@ func initDB() {
,(` + strconv.Itoa(objSubTypeMessageGStockReq) + `, "gstock_req", "GStock Req", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageGStockReq) + `, "gstock_req", "GStock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageGStockAck) + `, "gstock_ack", "GStock Ack", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageGStockAck) + `, "gstock_ack", "GStock Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageBusy) + `, "busy", "Busy", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageBusy) + `, "busy", "Busy", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageResStockReq) + `, "res_stock_req", "Resources Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageAlchStockReq) + `, "alch_stock_req", "Alchemy Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageMiscStockReq) + `, "misc_stock_req", "Misc Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageEquipStockReq) + `, "equip_stock_req", "Equipment Stock Req", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageStockEmpty) + `, "stock_empty", "Stock Empty", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageStockEmpty) + `, "stock_empty", "Stock Empty", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "stock_any_ack", "Stock Any Ack", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageStockAnyAck) + `, "stock_any_ack", "Stock Any Ack", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageGDepositReq) + `, "g_deposit_req", "GDeposit Req", ` + strconv.Itoa(objTypeMessage) + `) ,(` + strconv.Itoa(objSubTypeMessageGDepositReq) + `, "g_deposit_req", "GDeposit Req", ` + strconv.Itoa(objTypeMessage) + `)