This commit is contained in:
shoopea 2019-05-18 19:15:50 +08:00
parent 73aef5ff38
commit 7c33a323ce
4 changed files with 10 additions and 4 deletions

4
bot.go
View File

@ -117,7 +117,7 @@ func botMsgRescan(m *tb.Message) {
if err != nil {
c := TGCommand{
Type: commandReplyMsg,
Text: fmt.Sprint("Error scheduling the rescan for msg #%s", m.Payload),
Text: fmt.Sprintf("Error scheduling the rescan for msg #%s", m.Payload),
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}
@ -125,7 +125,7 @@ func botMsgRescan(m *tb.Message) {
} else {
c := TGCommand{
Type: commandReplyMsg,
Text: fmt.Sprint("Rescaning msg #%s", m.Payload),
Text: fmt.Sprintf("Rescaning msg #%s", m.Payload),
FromMsgID64: int64(m.ID),
FromChatID64: m.Chat.ID,
}

2
def.go
View File

@ -161,7 +161,7 @@ const (
objSubTypeMessageReport = 305
objSubTypeMessageGReport = 306
objSubTypeMessageQuest = 307
objSubTypeMessageFight = 308
objSubTypeMessageDuelFight = 308
objSubTypeMessageHero = 309
objSubTypeMessageMe = 310
objSubTypeMessageInventory = 311

2
sql.go
View File

@ -307,7 +307,7 @@ func initDB() {
,(` + strconv.Itoa(objSubTypeMessageReport) + `, "report", "Player war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageGReport) + `, "g_report", "Player guilds war report", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageQuest) + `, "quest", "Quest result", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageFight) + `, "fight", "Fight result", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageDuelFight) + `, "duel_fight", "Duel fight result", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageHero) + `, "hero", "Hero summary", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageMe) + `, "me", "Hero short summary", ` + strconv.Itoa(objTypeMessage) + `)
,(` + strconv.Itoa(objSubTypeMessageInventory) + `, "inv", "Inventory", ` + strconv.Itoa(objTypeMessage) + `)

View File

@ -138,6 +138,12 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
case objSubTypeMessagePillageLoss:
err = setObjSubTypeId(objId, objSubTypeMessagePillageLoss)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(PillageLoss)")
case objSubTypeMessageDuelFight:
err = setObjSubTypeId(objId, objSubTypeMessageDuelFight)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(DuelFight)")
case objSubTypeMessageQuest:
err = setObjSubTypeId(objId, objSubTypeMessageQuest)
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(Quest)")
case objSubTypeMessageAuctionAnnounce:
cwm := ChatWarsMessageAuctionAnnounce{
ObjID64: objId,