This commit is contained in:
@@ -48,7 +48,11 @@ func init() {
|
||||
}
|
||||
|
||||
havs := itemService.CheakItem(400501)
|
||||
if havs < int64(count) {
|
||||
if havs <= int64(count) {
|
||||
ctx.Send("扭蛋币不足,当前扭蛋币数量:" + gconv.String(havs))
|
||||
return
|
||||
}
|
||||
if err := itemService.UPDATE(400501, -count); err != nil {
|
||||
ctx.Send("扭蛋币不足,当前扭蛋币数量:" + gconv.String(havs))
|
||||
return
|
||||
}
|
||||
@@ -140,8 +144,6 @@ func init() {
|
||||
buf.WriteString("恭喜你获得 " + xmlres.ItemsMAP[int(item.ItemId)].Name + ":" + gconv.String(item.ItemCnt) + "\n")
|
||||
}
|
||||
|
||||
itemService.UPDATE(400501, -count)
|
||||
|
||||
ctx.SendChain(message.At(ctx.Event.Sender.ID), message.Reply(ctx.Event.MessageID), message.Text(buf.String()))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user