diff --git a/def.go b/def.go index 6dfff70..ce99ac7 100644 --- a/def.go +++ b/def.go @@ -285,19 +285,16 @@ type JobPayloadTribute struct { type JobPayloadStatus struct { } -type JobPayloadWithdrawal struct { -} - type JobPayloadGStock struct { MsgID64 int64 `json:"msg_id"` ChatID64 int64 `json:"chat_id"` } type JobPayloadGWithdraw struct { - MsgID64 int64 `json:"msg_id"` - ChatID64 int64 `json:"chat_id"` - Items []ChatWarsItems `json:"items"` - Status int `json:"status"` + MsgID64 int64 `json:"msg_id"` + ChatID64 int64 `json:"chat_id"` + Request string `json:"request"` + Status int `json:"status"` } type JobPayloadGDeposit struct { @@ -478,7 +475,7 @@ const ( objSubTypeJobPillage = 601 objSubTypeJobTribute = 602 objSubTypeJobStatus = 603 - objSubTypeJobWithdrawal = 604 + objSubTypeJobGWithdraw = 604 objSubTypeJobGStock = 605 objSubTypeJobRescanMsg = 606 objSubTypeJobSetJobDone = 607 diff --git a/rules.go b/rules.go index d1a4034..80d6a7f 100644 --- a/rules.go +++ b/rules.go @@ -231,6 +231,8 @@ func resetMsgParsingRules() { ,(5000, ` + strconv.Itoa(objSubTypeMessageUnequipGearAck) + `, "Unequip Ack", "^Item unequipped: (?P.+)$") ,(5000, ` + strconv.Itoa(objSubTypeMessageNoStamina) + `, "Unequip Ack", "^Not enough stamina. Come back after you take a rest.\\n\\n` + `To get more stamina, invite friends to the game via invite link. Press /promo to get it.$") - ;`) + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestResult) + `, "On your way to the swamp, you saw a group of people shouting angrily at their supposed leader. The leader was in tears and explained that loyalty can be won again, even if the medals are lost. You left confused. But a few meters away you found a badge with almost unrecognizable letters: tl.. You sold it to a merchant.(?s:.*)$") + ,(5000, ` + strconv.Itoa(objSubTypeMessageQuestResult) + `, "You were taking a walk when you found two burning marks on the ground that disappeared after a few meters. Near them there was some kind of almanac with a lot of numbers written in it. It was a cold day so you used it to make a campfire to warm yourself and then went back to the castle.(?s:.*)$") + ;`) failOnError(err, "resetMsgParsingRules : populate table msg_rules") } diff --git a/sql.go b/sql.go index 3e6d5cb..6013c64 100644 --- a/sql.go +++ b/sql.go @@ -544,7 +544,7 @@ func initDB() { ,(` + strconv.Itoa(objSubTypeMessageNoStamina) + `, "no_stamina", "No Stamina", ` + 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) + `) + ,(` + strconv.Itoa(objSubTypeJobGWithdraw) + `, "job_gwithdraw", "GWithdrawal job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobGStock) + `, "job_gstock", "GStock job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobRescanMsg) + `, "job_rescan_msg", "Rescan message job", ` + strconv.Itoa(objTypeJob) + `) ,(` + strconv.Itoa(objSubTypeJobSetJobDone) + `, "job_set_done", "Set job as done job", ` + strconv.Itoa(objTypeJob) + `)