optimize(mcfish): 更改插件规则 (#1122)

每日商店会固定刷新1初始木竿。该木竿价格也会随木竿的价格浮动。
This commit is contained in:
方柳煜
2025-02-20 00:46:35 +08:00
committed by GitHub
parent 659f4e07c2
commit 085e95cd48
3 changed files with 25 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ type fishdb struct {
const FishLimit = 50
// version 规则版本号
const version = "5.6.1"
const version = "5.6.2"
// 各物品信息
type jsonInfo struct {
@@ -102,7 +102,7 @@ type buffInfo struct {
Coupon int `db:"Buff1"` // 优惠卷
SalesPole int `db:"Buff2"` // 卖鱼竿上限
BuyTing int `db:"Buff3"` // 购买上限
Buff4 int `db:"Buff4"` // 暂定
Buff4 int `db:"Buff4"` // 暂定
Buff5 int `db:"Buff5"` // 暂定
Buff6 int `db:"Buff6"` // 暂定
Buff7 int `db:"Buff7"` // 暂定
@@ -625,15 +625,19 @@ func (sql *fishdb) refreshStroeInfo() (ok bool, err error) {
thingInfo.Number = 100
}
_ = sql.db.Insert("store", &thingInfo)
// 每天上架20本净化书
// 每天上架1木竿
thingInfo = store{
Duration: time.Now().Unix(),
Name: "净化书",
Type: "article",
Price: priceList["净化书"] * discountList["净化书"] / 100,
Name: "初始木竿",
Type: "pole",
Price: priceList["木竿"]+priceList["木竿"] * discountList["木竿"]/100,
Other: "30/0/0/0",
}
_ = sql.db.Find("store", &thingInfo, "WHERE Name = '初始木竿'")
thingInfo.Number ++
if thingInfo.Number > 5{
thingInfo.Number = 1
}
_ = sql.db.Find("store", &thingInfo, "WHERE Name = '净化书'")
thingInfo.Number = 20
_ = sql.db.Insert("store", &thingInfo)
}
return true, nil