This commit is contained in:
shoopea 2019-06-02 21:27:53 +08:00
parent 6848fef023
commit d568ab7078
2 changed files with 2 additions and 5 deletions

5
msg.go
View File

@ -35,10 +35,7 @@ func parseSubTypeMessageGStockAnyAck(m *ChatWarsMessage, r *regexp.Regexp) (*Cha
items := []ChatWarsItems{}
re := regexp.MustCompile(`\n([0-9a-z]+) (.*) x ([0-9]+)`)
for _, l := range re.FindAllStringSubmatch(r.ReplaceAllString(m.Text, "${Stock}"), -1) {
i := getObjItemID(l[1])
if i == 0 {
getObjItemID(l[2])
}
i := getObjItemID(l[1], l[2])
q, _ := strconv.ParseInt(l[3], 10, 64)
if i != 0 {
item := ChatWarsItems{

2
obj.go
View File

@ -497,7 +497,7 @@ func getObjItemID(c string, n string) int64 {
} else {
w := TGCommand{
Type: commandSendMsg,
Text: fmt.Sprintf("Object unknown : %s\n", s),
Text: fmt.Sprintf("Object unknown : %s - %s\n", c, n),
ToUserID64: cfg.Bot.Admin,
}
TGCmdQueue <- w