Skip to content

Commit b494390

Browse files
chore(lint): 改进代码样式 (FloatTech#1124)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 085e95c commit b494390

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

plugin/mcfish/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type buffInfo struct {
102102
Coupon int `db:"Buff1"` // 优惠卷
103103
SalesPole int `db:"Buff2"` // 卖鱼竿上限
104104
BuyTing int `db:"Buff3"` // 购买上限
105-
Buff4 int `db:"Buff4"` // 暂定
105+
Buff4 int `db:"Buff4"` // 暂定
106106
Buff5 int `db:"Buff5"` // 暂定
107107
Buff6 int `db:"Buff6"` // 暂定
108108
Buff7 int `db:"Buff7"` // 暂定
@@ -630,12 +630,12 @@ func (sql *fishdb) refreshStroeInfo() (ok bool, err error) {
630630
Duration: time.Now().Unix(),
631631
Name: "初始木竿",
632632
Type: "pole",
633-
Price: priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100,
634-
Other: "30/0/0/0",
633+
Price: priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100,
634+
Other: "30/0/0/0",
635635
}
636636
_ = sql.db.Find("store", &thingInfo, "WHERE Name = '初始木竿'")
637-
thingInfo.Number ++
638-
if thingInfo.Number > 5{
637+
thingInfo.Number++
638+
if thingInfo.Number > 5 {
639639
thingInfo.Number = 1
640640
}
641641
_ = sql.db.Insert("store", &thingInfo)

plugin/mcfish/store.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ func init() {
472472
thingPice := (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 +
473473
induceLevel*600*discountList["诱钓"]/100 +
474474
favorLevel*1800*discountList["海之眷顾"]/100) * discountList[info.Name] / 100
475-
if strings.Contains(thingName, "初始木竿"){
476-
thingPice = priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100
475+
if strings.Contains(thingName, "初始木竿") {
476+
thingPice = priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100
477477
}
478478
pice = append(pice, thingPice)
479479
} else {
@@ -621,7 +621,7 @@ func init() {
621621
Number: 1,
622622
Other: thing.Other,
623623
}
624-
if thingName == "初始木竿"{
624+
if thingName == "初始木竿" {
625625
newCommodity.Name = "木竿"
626626
}
627627
} else {
@@ -800,8 +800,8 @@ func drawStroeInfoImage(stroeInfo []store) (picImage image.Image, err error) {
800800
induceLevel, _ := strconv.Atoi(poleInfo[2])
801801
favorLevel, _ := strconv.Atoi(poleInfo[3])
802802
pice = (priceList[info.Name] - (durationList[info.Name] - durable) - maintenance*2 + induceLevel*600 + favorLevel*1800) * discountList[info.Name] / 100
803-
if strings.Contains(name, "初始木竿"){
804-
pice = priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100
803+
if strings.Contains(name, "初始木竿") {
804+
pice = priceList["木竿"] + priceList["木竿"]*discountList["木竿"]/100
805805
}
806806
} else {
807807
pice = priceList[info.Name] * discountList[info.Name] / 100

0 commit comments

Comments
 (0)