update g deposit

This commit is contained in:
shoopea 2019-08-30 11:07:37 +08:00
parent c94024038a
commit b6ddfc7194
2 changed files with 10 additions and 1 deletions

7
bot.go
View File

@ -658,6 +658,13 @@ func botGDepositAll(m *tb.Message) {
p.ResObjID64 = append(p.ResObjID64, getObjItemID(`23`, `Coke`)) p.ResObjID64 = append(p.ResObjID64, getObjItemID(`23`, `Coke`))
p.ResObjID64 = append(p.ResObjID64, getObjItemID(`24`, `Purified Powder`)) p.ResObjID64 = append(p.ResObjID64, getObjItemID(`24`, `Purified Powder`))
p.ResObjID64 = append(p.ResObjID64, getObjItemID(`31`, `Rope`)) p.ResObjID64 = append(p.ResObjID64, getObjItemID(`31`, `Rope`))
list := getSQLListID64(`select o.id from obj o where o.obj_sub_type_id = ` + strconv(objSubTypeItemRecipe) + `;`)
p.ResObjID64 = append(p.ResObjID64, list...)
list = getSQLListID64(`select o.id from obj o where o.obj_sub_type_id = ` + strconv(objSubTypeItemPart) + `;`)
p.ResObjID64 = append(p.ResObjID64, list...)
/* /*
p.ResObjID64 = append(p.ResObjID64, getObjItemID(`39`, `Stinky Sumac`)) p.ResObjID64 = append(p.ResObjID64, getObjItemID(`39`, `Stinky Sumac`))
p.ResObjID64 = append(p.ResObjID64, getObjItemID(`s01`, `📕Scroll of Rage`)) p.ResObjID64 = append(p.ResObjID64, getObjItemID(`s01`, `📕Scroll of Rage`))

2
msg.go
View File

@ -49,7 +49,9 @@ func parseSubTypeMessageGDepositAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
cwmreq, err := parseSubTypeMessageGDepositReq(msg, rule.re) cwmreq, err := parseSubTypeMessageGDepositReq(msg, rule.re)
logOnError(err, "parseSubTypeMessageGDepositAck : parseSubTypeMessageGDepositReq") logOnError(err, "parseSubTypeMessageGDepositAck : parseSubTypeMessageGDepositReq")
if err == nil && cwmreq.ItemID64 == cwm.ItemID64 && cwmreq.Quantity == cwm.Quantity { if err == nil && cwmreq.ItemID64 == cwm.ItemID64 && cwmreq.Quantity == cwm.Quantity {
if m.Date.UTC().Before(msg.Date.UTC().Add(1 * time.Minute)) {
clientFwdCWMsg(msg.TGUserID64, m.ID64, m.ChatID64, cfg.Bot.Depositchat) clientFwdCWMsg(msg.TGUserID64, m.ID64, m.ChatID64, cfg.Bot.Depositchat)
}
gDepositForwardMsg[i] = gDepositForwardMsg[len(gDepositForwardMsg)-1] gDepositForwardMsg[i] = gDepositForwardMsg[len(gDepositForwardMsg)-1]
gDepositForwardMsg = gDepositForwardMsg[:len(gDepositForwardMsg)-1] gDepositForwardMsg = gDepositForwardMsg[:len(gDepositForwardMsg)-1]
break break