This commit is contained in:
shoopea 2019-05-30 09:56:12 +08:00
parent e1e4b985cd
commit 1ed61ace6e

6
job.go
View File

@ -260,6 +260,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("More than one outcome for pillage #%d\n", r.ObjID64)
} else if len(ids) == 1 { // we've got a match, job is done whether we prevented the pillage or not
m, err := getMsg(ids[0])
logOnError(err, "jobPillage : getMsg(objSubTypeMessagePillageGo, objSubTypeMessagePillageTimeout)")
@ -275,6 +276,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("jobPillage : objSubTypeMessagePillageGo\n", r.ObjID64)
} else if msgTypeID64 == objSubTypeMessagePillageWin {
s := TGCommand{
Type: commandSendMsg,
@ -282,6 +284,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("jobPillage : objSubTypeMessagePillageWin\n", r.ObjID64)
} else if msgTypeID64 == objSubTypeMessagePillageLoss {
s := TGCommand{
Type: commandSendMsg,
@ -289,6 +292,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("jobPillage : objSubTypeMessagePillageLoss\n", r.ObjID64)
} else if msgTypeID64 == objSubTypeMessagePillageTimeout {
s := TGCommand{
Type: commandSendMsg,
@ -296,6 +300,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("jobPillage : objSubTypeMessagePillageTimeout\n", r.ObjID64)
} else {
s := TGCommand{
Type: commandSendMsg,
@ -303,6 +308,7 @@ func jobPillage(j Job) {
ToUserID64: j.UserID64,
}
TGCmdQueue <- s
log.Printf("jobPillage : We don't know what happened\n", r.ObjID64)
}
}
}