@@ -393,7 +393,7 @@ func init() {
393
393
}
394
394
ctx .Send (message .ReplyWithMessage (ctx .Event .MessageID , message .Text ("出售成功,你赚到了" , pice , msg )))
395
395
})
396
- engine .OnRegex (`^购买(` + strings .Join (thingList , "|" )+ `)\s*(\d*)$` , getdb , refreshFish ).SetBlock (true ).Limit (limitSet ).Handle (func (ctx * zero.Ctx ) {
396
+ engine .OnRegex (`^购买(` + strings .Join (thingList , "|" )+ `|初始木竿 )\s*(\d*)$` , getdb , refreshFish ).SetBlock (true ).Limit (limitSet ).Handle (func (ctx * zero.Ctx ) {
397
397
uid := ctx .Event .UserID
398
398
thingName := ctx .State ["regex_matched" ].([]string )[1 ]
399
399
number , _ := strconv .Atoi (ctx .State ["regex_matched" ].([]string )[2 ])
@@ -472,6 +472,9 @@ func init() {
472
472
thingPice := (priceList [info .Name ] - (durationList [info .Name ] - durable ) - maintenance * 2 +
473
473
induceLevel * 600 * discountList ["诱钓" ]/ 100 +
474
474
favorLevel * 1800 * discountList ["海之眷顾" ]/ 100 ) * discountList [info .Name ] / 100
475
+ if strings .Contains (thingName , "初始木竿" ){
476
+ thingPice = priceList ["木竿" ]+ priceList ["木竿" ] * discountList ["木竿" ]/ 100
477
+ }
475
478
pice = append (pice , thingPice )
476
479
} else {
477
480
thingPice := priceList [info .Name ] * discountList [info .Name ] / 100
@@ -618,6 +621,9 @@ func init() {
618
621
Number : 1 ,
619
622
Other : thing .Other ,
620
623
}
624
+ if thingName == "初始木竿" {
625
+ newCommodity .Name = "木竿"
626
+ }
621
627
} else {
622
628
things , err1 := dbdata .getUserThingInfo (uid , thingName )
623
629
if err1 != nil {
@@ -794,6 +800,9 @@ func drawStroeInfoImage(stroeInfo []store) (picImage image.Image, err error) {
794
800
induceLevel , _ := strconv .Atoi (poleInfo [2 ])
795
801
favorLevel , _ := strconv .Atoi (poleInfo [3 ])
796
802
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
805
+ }
797
806
} else {
798
807
pice = priceList [info .Name ] * discountList [info .Name ] / 100
799
808
}
0 commit comments