From dbda1b466dec330d4a4cfcf872b8427ac780ba79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 3 Sep 2023 14:12:33 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E6=94=B9=E8=BF=9B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=B7=E5=BC=8F=20(#723)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- plugin/mcfish/fish.go | 2 +- plugin/mcfish/main.go | 8 ++++---- plugin/mcfish/pack.go | 2 +- plugin/mcfish/store.go | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/plugin/mcfish/fish.go b/plugin/mcfish/fish.go index 4045b3ee..a0c69285 100644 --- a/plugin/mcfish/fish.go +++ b/plugin/mcfish/fish.go @@ -153,7 +153,7 @@ func init() { ctx.SendChain(message.Text("[ERROR at fish.go.5.1]:", err)) return } - if number > 100 || equipInfo.Equip == "美西螈" { //放大概率 + if number > 100 || equipInfo.Equip == "美西螈" { // 放大概率 probabilities["treasure"] = probabilityLimit{ Min: 0, Max: 2, diff --git a/plugin/mcfish/main.go b/plugin/mcfish/main.go index 726d892e..b466576b 100644 --- a/plugin/mcfish/main.go +++ b/plugin/mcfish/main.go @@ -32,11 +32,11 @@ type jsonInfo struct { ArticleInfo []articleInfo `json:"物品"` // 物品信息 } type zoneInfo struct { - Name string `json:"类型"` //类型 + Name string `json:"类型"` // 类型 Probability int `json:"概率[0-100)"` // 概率 } type articleInfo struct { - Name string `json:"名称"` //名称 + Name string `json:"名称"` // 名称 Type string `json:"类型"` // 类型 Probability int `json:"概率[0-100),omitempty"` // 概率 Durable int `json:"耐久上限,omitempty"` // 耐久 @@ -135,7 +135,7 @@ var ( ) func init() { - //go func() { + // go func() { _, err := engine.GetLazyData("articlesInfo.json", false) if err != nil { panic(err) @@ -202,7 +202,7 @@ func init() { } min[info.Type] += info.Probability } - //}() + // }() } // 更新上限信息 diff --git a/plugin/mcfish/pack.go b/plugin/mcfish/pack.go index 053d9a6d..7c1043e2 100644 --- a/plugin/mcfish/pack.go +++ b/plugin/mcfish/pack.go @@ -69,7 +69,7 @@ func init() { probableList[3] = info.Probability } } - if number > 100 || equipInfo.Equip == "美西螈" { //放大概率 + if number > 100 || equipInfo.Equip == "美西螈" { // 放大概率 probableList = []int{2, 8, 35, 45} } if equipInfo.Favor > 0 { diff --git a/plugin/mcfish/store.go b/plugin/mcfish/store.go index 696240e0..2f2eff26 100644 --- a/plugin/mcfish/store.go +++ b/plugin/mcfish/store.go @@ -89,7 +89,6 @@ func init() { msg = append(msg, message.Text( "[", i, "]", info.Name, " 数量: ", info.Number, "\n")) } - } msg = append(msg, message.Reply(ctx.Event.MessageID), message.Text("————————\n输入对应序号进行装备,或回复“取消”取消")) ctx.Send(msg) @@ -300,7 +299,6 @@ func init() { thingPice := priceList[info.Name] * discountList[info.Name] / 100 pice = append(pice, thingPice) } - } if len(thingInfos) > 1 { msg := make(message.Message, 0, 3+len(thingInfos)) @@ -313,7 +311,6 @@ func init() { msg = append(msg, message.Text( "[", i, "]", info.Name, " 数量:", info.Number, " 价格:", pice[i], "\n")) } - } msg = append(msg, message.Text("————————\n输入对应序号进行装备,或回复“取消”取消")) ctx.Send(message.ReplyWithMessage(ctx.Event.MessageID, msg...))