mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 05:30:07 +08:00
🎨 改进代码样式 (#723)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
b7e21fc111
commit
dbda1b466d
@ -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,
|
||||
|
||||
@ -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
|
||||
}
|
||||
//}()
|
||||
// }()
|
||||
}
|
||||
|
||||
// 更新上限信息
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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...))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user