diff --git a/modules/pay/api_delivery.go b/modules/pay/api_delivery.go index 8e7336452..ae114fbbc 100644 --- a/modules/pay/api_delivery.go +++ b/modules/pay/api_delivery.go @@ -2,8 +2,11 @@ package pay import ( "context" + "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "math" "go.mongodb.org/mongo-driver/bson/primitive" ) @@ -17,13 +20,48 @@ func (this *apiComp) DeliveryCheck(session comm.IUserSession, req *pb.PayDeliver // /模拟充值 func (this *apiComp) Delivery(session comm.IUserSession, req *pb.PayDeliveryReq) (errdata *pb.ErrorData) { var ( - err error + conf *cfg.GameRechargeData + voucher *cfg.Gameatn + amount uint32 + neet uint32 + err error ) if errdata = this.DeliveryCheck(session, req); errdata != nil { return } req.Orderid = primitive.NewObjectID().Hex() req.Uid = session.GetUserId() + + if conf, err = this.module.configure.getGameRecharge(req.Productid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + + voucher = this.module.ModuleTools.GetGlobalConf().Voucher + amount = this.module.ModuleItems.QueryItemAmount(session.GetUserId(), voucher.T) + neet = uint32(math.Floor(float64(conf.Amount) / 100)) + if amount < neet { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ResNoEnough, + Title: pb.ErrorCode_ResNoEnough.ToString(), + Message: fmt.Sprintf("需要代金卷:%d 只有:%d", neet, amount), + } + return + } + needatn := []*cfg.Gameatn{{ + A: voucher.A, + T: voucher.T, + N: int32(neet), + }} + + if errdata = this.module.ConsumeRes(session, needatn, true); errdata != nil { + return + } + if err = this.module.Rpc_ModulePayDelivery(context.Background(), req, &pb.PayDeliveryResp{}); err != nil { this.module.Errorln(err) return diff --git a/modules/practice/api_info.go b/modules/practice/api_info.go index 8f49743e8..49393437d 100644 --- a/modules/practice/api_info.go +++ b/modules/practice/api_info.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + "go_dreamfactory/utils" "time" ) @@ -29,6 +30,15 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.PracticeInfoReq) (e } return } + if utils.IsToday(room.Pillar1.Lastusetime) { //上一次训练不是今天 + room.Pillar1.Usenum = 0 + } + if utils.IsToday(room.Pillar2.Lastusetime) { //上一次训练不是今天 + room.Pillar2.Usenum = 0 + } + if utils.IsToday(room.Pillar3.Lastusetime) { //上一次训练不是今天 + room.Pillar3.Usenum = 0 + } if room.Npcstate == 0 && room.Currnpc == 0 { this.module.modelPandata.refreshnpc(room) diff --git a/modules/practice/api_practice.go b/modules/practice/api_practice.go index ae1346bf7..443b06c32 100644 --- a/modules/practice/api_practice.go +++ b/modules/practice/api_practice.go @@ -1,24 +1,27 @@ package practice import ( + "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" + "go_dreamfactory/utils" "time" ) -//参数校验 +// 参数校验 func (this *apiComp) PracticeCheck(session comm.IUserSession, req *pb.PracticePracticeReq) (errdata *pb.ErrorData) { return } -///练功请求 练功 +// /练功请求 练功 func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePracticeReq) (errdata *pb.ErrorData) { var ( err error room *pb.DBPracticeRoom + hero *pb.DBHero pillar *pb.DBPracticePillar pillarconfigure *cfg.GamePandamasMzData tconfigure *cfg.GamePandamasJxData @@ -34,6 +37,22 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic } return } + if hero, err = this.module.ModuleHero.QueryCrossHeroinfo(req.Hero); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: fmt.Sprintf("no found hero:%s", req.Hero), + } + return + } + if tconfigure, err = this.module.configure.getGamePandamasJx(req.Teacher); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } switch req.Index { case 1: @@ -70,6 +89,18 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic return } + if utils.IsToday(pillar.Lastusetime) { //上一次训练不是今天 + pillar.Usenum = 0 + } + + if pillar.Usenum >= pillarconfigure.Limitation { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_PracticeUseLimit, + Title: pb.ErrorCode_PracticeUseLimit.ToString(), + } + return + } + if req.Teacher != "" { if room.Knapsack[req.Teacher] == 1 { //已经被使用 errdata = &pb.ErrorData{ @@ -87,6 +118,14 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic } return } + if tconfigure.BanHero == hero.HeroID { //禁止使用 + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: fmt.Sprintf("teacher:%s and hero:%s no can together", req.Teacher, hero.HeroID), + } + return + } extra += tconfigure.Duration pillar.Teacher = req.Teacher } @@ -122,7 +161,8 @@ func (this *apiComp) Practice(session comm.IUserSession, req *pb.PracticePractic pillar.End = configure.Now().Add(time.Minute * (time.Duration(pillarconfigure.PlacementDuration + extra))).Unix() pillar.Expend = configure.Now().Add(time.Minute * (time.Duration(pillarconfigure.PlacementDuration))).Unix() } - + pillar.Usenum++ + pillar.Lastusetime = configure.Now().Unix() this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{ "knapsack": room.Knapsack, filed: pillar, diff --git a/modules/shop/api_getlist.go b/modules/shop/api_getlist.go index 1b6db3559..3e535e1e0 100644 --- a/modules/shop/api_getlist.go +++ b/modules/shop/api_getlist.go @@ -25,6 +25,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) var ( err error filed string + refresh int32 shopconf *cfg.GameShopData shopData *pb.DBShop udata *pb.DBUser @@ -66,6 +67,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) case pb.ShopType_GoldShop: sdata = shopData.GoldShop filed = "goldShop" + refresh = this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2) break case pb.ShopType_DiamondShop: sdata = shopData.DiamondShop @@ -127,15 +129,15 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) if req.IsManualRefresh && shopconf.Rnum > 0 { //可以手动刷新 isrefresh := false - refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2)) if refresh > 0 { // if time.Unix(shopData.RefreshtimegoldShop, 0).Day() < configure.Now().Day() { shopData.RefreshtimegoldShop = configure.Now().Unix() shopData.RefreshnumgoldShop = 0 } - if int(shopData.RefreshnumgoldShop) < refresh { + if shopData.RefreshnumgoldShop < refresh { isrefresh = true shopData.RefreshnumgoldShop++ + } } if !isrefresh { @@ -170,6 +172,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) sdata.Buy = make(map[int32]int32) sdata.LastRefreshTime = configure.Now().Unix() sdata.ManualRefreshNum++ + sdata.Leftfreerefreshnum = refresh - shopData.RefreshnumgoldShop sdata.Items = make([]int32, len(items)) sdata.Preview = make(map[int32]*pb.DB_Equipment) for i, v := range items { @@ -248,6 +251,6 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq) } return } - session.SendMsg(string(this.module.GetType()), "getlist", &pb.ShopGetListResp{SType: req.SType, IsManualRefresh: req.IsManualRefresh, Goods: goods, SurplusRefreshNum: leftrefnum, Lastrefreshtime: sdata.LastRefreshTime}) + session.SendMsg(string(this.module.GetType()), "getlist", &pb.ShopGetListResp{SType: req.SType, IsManualRefresh: req.IsManualRefresh, Goods: goods, SurplusRefreshNum: leftrefnum, Lastrefreshtime: sdata.LastRefreshTime, Leftfreerefreshnum: sdata.Leftfreerefreshnum}) return } diff --git a/pb/activity_db.pb.go b/pb/activity_db.pb.go index ed35a5b0c..b423a3d1a 100644 --- a/pb/activity_db.pb.go +++ b/pb/activity_db.pb.go @@ -329,7 +329,7 @@ type DBActivityData struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"` - Hdid int32 `protobuf:"varint,3,opt,name=hdid,proto3" json:"hdid"` + Hid int32 `protobuf:"varint,3,opt,name=hid,proto3" json:"hid"` Gotarr []int32 `protobuf:"varint,4,rep,packed,name=gotarr,proto3" json:"gotarr"` Lasttime int64 `protobuf:"varint,5,opt,name=lasttime,proto3" json:"lasttime"` Val int32 `protobuf:"varint,6,opt,name=val,proto3" json:"val"` @@ -381,9 +381,9 @@ func (x *DBActivityData) GetUid() string { return "" } -func (x *DBActivityData) GetHdid() int32 { +func (x *DBActivityData) GetHid() int32 { if x != nil { - return x.Hdid + return x.Hid } return 0 } @@ -450,16 +450,16 @@ var file_activity_activity_db_proto_rawDesc = []byte{ 0x13, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x68, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x8c, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, + 0x8a, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x44, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x04, 0x68, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, - 0x72, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, - 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x76, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06, - 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x03, 0x68, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x67, 0x6f, 0x74, 0x61, 0x72, 0x72, 0x12, 0x1a, + 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, + 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index f6ac3aa8e..62f593842 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -389,6 +389,7 @@ const ( ErrorCode_PracticePillarMaxLv ErrorCode = 4304 //木桩已到满级 ErrorCode_PracticeYouQiecuoing ErrorCode = 4305 //你有切磋未完成 ErrorCode_PracticeTargetQiecuoing ErrorCode = 4306 //目标正在切磋中 + ErrorCode_PracticeUseLimit ErrorCode = 4307 //柱子使用已达上限 //parkour ErrorCode_ParkourMemberFull ErrorCode = 4401 //队伍成员已满 ErrorCode_ParkourInviteOverdue ErrorCode = 4402 //邀请已过期 @@ -738,6 +739,7 @@ var ( 4304: "PracticePillarMaxLv", 4305: "PracticeYouQiecuoing", 4306: "PracticeTargetQiecuoing", + 4307: "PracticeUseLimit", 4401: "ParkourMemberFull", 4402: "ParkourInviteOverdue", 4403: "ParkourInviteNoPermissions", @@ -1081,6 +1083,7 @@ var ( "PracticePillarMaxLv": 4304, "PracticeYouQiecuoing": 4305, "PracticeTargetQiecuoing": 4306, + "PracticeUseLimit": 4307, "ParkourMemberFull": 4401, "ParkourInviteOverdue": 4402, "ParkourInviteNoPermissions": 4403, @@ -1126,7 +1129,7 @@ var File_errorcode_proto protoreflect.FileDescriptor var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2a, 0xdb, 0x3e, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xf2, 0x3e, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, @@ -1609,26 +1612,28 @@ var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x14, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x59, 0x6f, 0x75, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x69, 0x6e, 0x67, 0x10, 0xd1, 0x21, 0x12, 0x1c, 0x0a, 0x17, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x51, 0x69, 0x65, 0x63, 0x75, - 0x6f, 0x69, 0x6e, 0x67, 0x10, 0xd2, 0x21, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x6b, 0x6f, - 0x75, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0xb1, 0x22, 0x12, - 0x19, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, - 0x4f, 0x76, 0x65, 0x72, 0x64, 0x75, 0x65, 0x10, 0xb2, 0x22, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x61, - 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x10, 0xb3, 0x22, 0x12, 0x18, 0x0a, 0x13, 0x50, - 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, - 0x65, 0x64, 0x10, 0xb4, 0x22, 0x12, 0x19, 0x0a, 0x14, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x95, 0x23, - 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, - 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x76, 0x10, 0x96, 0x23, 0x12, 0x15, 0x0a, 0x10, - 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, - 0x10, 0xf9, 0x23, 0x12, 0x15, 0x0a, 0x10, 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x46, - 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xfa, 0x23, 0x12, 0x16, 0x0a, 0x11, 0x4f, 0x6c, - 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x10, - 0xfb, 0x23, 0x12, 0x1f, 0x0a, 0x1a, 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x50, 0x72, - 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, - 0x10, 0xfc, 0x23, 0x12, 0x1a, 0x0a, 0x15, 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x4e, - 0x6f, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xfd, 0x23, 0x42, - 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x69, 0x6e, 0x67, 0x10, 0xd2, 0x21, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x63, 0x65, 0x55, 0x73, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x10, 0xd3, 0x21, 0x12, 0x16, + 0x0a, 0x11, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x46, + 0x75, 0x6c, 0x6c, 0x10, 0xb1, 0x22, 0x12, 0x19, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, + 0x72, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x64, 0x75, 0x65, 0x10, 0xb2, + 0x22, 0x12, 0x1f, 0x0a, 0x1a, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x49, 0x6e, 0x76, 0x69, + 0x74, 0x65, 0x4e, 0x6f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x10, + 0xb3, 0x22, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x6b, 0x6f, 0x75, 0x72, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x54, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x10, 0xb4, 0x22, 0x12, 0x19, 0x0a, 0x14, + 0x52, 0x65, 0x70, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, + 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x95, 0x23, 0x12, 0x1a, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x75, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x50, 0x72, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x4c, 0x76, + 0x10, 0x96, 0x23, 0x12, 0x15, 0x0a, 0x10, 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xf9, 0x23, 0x12, 0x15, 0x0a, 0x10, 0x4f, 0x6c, + 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xfa, + 0x23, 0x12, 0x16, 0x0a, 0x11, 0x4f, 0x6c, 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x4c, 0x65, 0x76, + 0x65, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x10, 0xfb, 0x23, 0x12, 0x1f, 0x0a, 0x1a, 0x4f, 0x6c, 0x64, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x50, 0x72, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x4e, 0x6f, 0x46, + 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xfc, 0x23, 0x12, 0x1a, 0x0a, 0x15, 0x4f, 0x6c, + 0x64, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6e, 0x69, 0x73, + 0x68, 0x65, 0x64, 0x10, 0xfd, 0x23, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/practice_db.pb.go b/pb/practice_db.pb.go index ca9375afb..80eff96ba 100644 --- a/pb/practice_db.pb.go +++ b/pb/practice_db.pb.go @@ -26,16 +26,18 @@ type DBPracticePillar struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` //柱子下标 - Lv int32 `protobuf:"varint,2,opt,name=lv,proto3" json:"lv"` //柱子等级 - Isunlock int32 `protobuf:"varint,3,opt,name=isunlock,proto3" json:"isunlock"` //是否解锁 0不能解锁 1可解锁 2已解锁 - Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid"` //英雄uid - Hero string `protobuf:"bytes,5,opt,name=hero,proto3" json:"hero"` //当前练功英雄 - Teacher string `protobuf:"bytes,6,opt,name=teacher,proto3" json:"teacher"` //教习 - Prop string `protobuf:"bytes,7,opt,name=prop,proto3" json:"prop"` //道具 - Start int64 `protobuf:"varint,8,opt,name=start,proto3" json:"start"` //开始时间 - End int64 `protobuf:"varint,9,opt,name=end,proto3" json:"end"` //结束时间 - Expend int64 `protobuf:"varint,10,opt,name=expend,proto3" json:"expend"` //经验上限时间 + Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index"` //柱子下标 + Lv int32 `protobuf:"varint,2,opt,name=lv,proto3" json:"lv"` //柱子等级 + Isunlock int32 `protobuf:"varint,3,opt,name=isunlock,proto3" json:"isunlock"` //是否解锁 0不能解锁 1可解锁 2已解锁 + Uid string `protobuf:"bytes,4,opt,name=uid,proto3" json:"uid"` //英雄uid + Hero string `protobuf:"bytes,5,opt,name=hero,proto3" json:"hero"` //当前练功英雄 + Teacher string `protobuf:"bytes,6,opt,name=teacher,proto3" json:"teacher"` //教习 + Prop string `protobuf:"bytes,7,opt,name=prop,proto3" json:"prop"` //道具 + Start int64 `protobuf:"varint,8,opt,name=start,proto3" json:"start"` //开始时间 + End int64 `protobuf:"varint,9,opt,name=end,proto3" json:"end"` //结束时间 + Expend int64 `protobuf:"varint,10,opt,name=expend,proto3" json:"expend"` //经验上限时间 + Usenum int32 `protobuf:"varint,11,opt,name=usenum,proto3" json:"usenum"` //已使用次数 + Lastusetime int64 `protobuf:"varint,12,opt,name=lastusetime,proto3" json:"lastusetime"` //上一次使用时间 } func (x *DBPracticePillar) Reset() { @@ -140,6 +142,20 @@ func (x *DBPracticePillar) GetExpend() int64 { return 0 } +func (x *DBPracticePillar) GetUsenum() int32 { + if x != nil { + return x.Usenum + } + return 0 +} + +func (x *DBPracticePillar) GetLastusetime() int64 { + if x != nil { + return x.Lastusetime + } + return 0 +} + //熊猫武馆教习 type DBPracticeTeacher struct { state protoimpl.MessageState @@ -617,7 +633,7 @@ var file_practice_practice_db_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x10, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, @@ -631,87 +647,90 @@ var file_practice_practice_db_proto_rawDesc = []byte{ 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x65, 0x6e, - 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x65, 0x6e, 0x64, 0x22, - 0x4f, 0x0a, 0x11, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x54, 0x65, 0x61, - 0x63, 0x68, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, - 0x22, 0x81, 0x01, 0x0a, 0x11, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x03, 0x65, 0x6e, 0x64, 0x22, 0x89, 0x06, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, - 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x79, 0x6d, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x79, - 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, - 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x79, 0x6d, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, - 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, - 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x66, 0x75, 0x6c, - 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, - 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x04, 0x66, 0x75, 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x08, 0x6b, 0x6e, 0x61, 0x70, - 0x73, 0x61, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x50, - 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x2e, 0x4b, 0x6e, 0x61, 0x70, - 0x73, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6b, 0x6e, 0x61, 0x70, 0x73, - 0x61, 0x63, 0x6b, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, - 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, - 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, - 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x12, 0x2b, 0x0a, - 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, + 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x65, 0x6e, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x06, 0x75, 0x73, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x75, + 0x73, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, + 0x73, 0x74, 0x75, 0x73, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x4f, 0x0a, 0x11, 0x44, 0x42, 0x50, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x54, 0x65, 0x61, 0x63, 0x68, 0x65, 0x72, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x74, 0x75, 0x64, 0x65, 0x6e, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x44, + 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, + 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x89, + 0x06, 0x0a, 0x0e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, 0x6f, + 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x79, 0x6d, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x67, 0x79, 0x6d, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x12, 0x2d, 0x0a, 0x04, 0x66, 0x75, 0x6c, 0x6c, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x52, 0x6f, + 0x6f, 0x6d, 0x2e, 0x46, 0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x66, 0x75, + 0x6c, 0x6c, 0x12, 0x39, 0x0a, 0x08, 0x6b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, + 0x65, 0x52, 0x6f, 0x6f, 0x6d, 0x2e, 0x4b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x08, 0x6b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x12, 0x2b, 0x0a, + 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, - 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x33, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, - 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, + 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x31, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, + 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, - 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x12, 0x2e, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x50, 0x72, - 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x52, 0x08, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x6e, - 0x70, 0x63, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x6e, 0x70, - 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x70, 0x63, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, 0x70, 0x63, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, - 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x12, - 0x29, 0x0a, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x37, 0x0a, 0x09, 0x46, 0x75, - 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, 0x0d, 0x4b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x48, 0x0a, 0x16, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, - 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, - 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0xb5, 0x01, 0x0a, 0x16, 0x44, - 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, - 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, - 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x32, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, + 0x72, 0x33, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, + 0x6c, 0x61, 0x72, 0x33, 0x12, 0x2b, 0x0a, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x66, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, + 0x63, 0x65, 0x50, 0x69, 0x6c, 0x6c, 0x61, 0x72, 0x52, 0x07, 0x70, 0x69, 0x6c, 0x6c, 0x61, 0x72, + 0x66, 0x12, 0x2e, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x73, 0x18, 0x0c, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x65, 0x72, + 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x75, 0x72, 0x72, 0x6e, 0x70, 0x63, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x07, 0x63, 0x75, 0x72, 0x72, 0x6e, 0x70, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x6e, + 0x70, 0x63, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6e, + 0x70, 0x63, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, + 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x6e, 0x75, 0x6d, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x63, 0x61, 0x70, 0x74, 0x61, 0x69, 0x6e, 0x12, 0x29, 0x0a, 0x09, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x37, 0x0a, 0x09, 0x46, 0x75, 0x6c, 0x6c, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3b, 0x0a, + 0x0d, 0x4b, 0x6e, 0x61, 0x70, 0x73, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x42, + 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, + 0x76, 0x69, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x22, 0xb5, 0x01, 0x0a, 0x16, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x63, 0x65, 0x51, 0x69, 0x65, 0x63, 0x75, 0x6f, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, + 0x64, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x50, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x51, + 0x69, 0x65, 0x63, 0x75, 0x6f, 0x49, 0x6e, 0x76, 0x69, 0x74, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x61, 0x74, 0x74, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x61, + 0x74, 0x74, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x06, 0x5a, 0x04, + 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/shop_db.pb.go b/pb/shop_db.pb.go index 65c5963f5..703b27e8e 100644 --- a/pb/shop_db.pb.go +++ b/pb/shop_db.pb.go @@ -89,11 +89,12 @@ type UserShopData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间 - ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数 - Items []int32 `protobuf:"varint,3,rep,packed,name=Items,proto3" json:"Items"` //商品列表 - Buy map[int32]int32 `protobuf:"bytes,4,rep,name=buy,proto3" json:"buy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //购买记录 - Preview map[int32]*DB_Equipment `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据 + LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间 + ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数 + Items []int32 `protobuf:"varint,3,rep,packed,name=Items,proto3" json:"Items"` //商品列表 + Buy map[int32]int32 `protobuf:"bytes,4,rep,name=buy,proto3" json:"buy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //购买记录 + Preview map[int32]*DB_Equipment `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据 + Leftfreerefreshnum int32 `protobuf:"varint,6,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数 } func (x *UserShopData) Reset() { @@ -163,6 +164,13 @@ func (x *UserShopData) GetPreview() map[int32]*DB_Equipment { return nil } +func (x *UserShopData) GetLeftfreerefreshnum() int32 { + if x != nil { + return x.Leftfreerefreshnum + } + return 0 +} + type DBShop struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -296,7 +304,7 @@ var file_shop_shop_db_proto_rawDesc = []byte{ 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xdd, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, + 0x74, 0x6f, 0x22, 0x8d, 0x03, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, @@ -309,7 +317,10 @@ var file_shop_shop_db_proto_rawDesc = []byte{ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, - 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x1a, + 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, + 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, + 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6c, 0x65, 0x66, + 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x1a, 0x36, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, diff --git a/pb/shop_msg.pb.go b/pb/shop_msg.pb.go index 570a3c1fe..daa118255 100644 --- a/pb/shop_msg.pb.go +++ b/pb/shop_msg.pb.go @@ -170,11 +170,12 @@ type ShopGetListResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SType ShopType `protobuf:"varint,1,opt,name=sType,proto3,enum=ShopType" json:"sType"` //商城类型 - IsManualRefresh bool `protobuf:"varint,2,opt,name=IsManualRefresh,proto3" json:"IsManualRefresh"` //是否手动刷新 - Goods []*ShopItem `protobuf:"bytes,4,rep,name=Goods,proto3" json:"Goods"` //商品列表 - SurplusRefreshNum int32 `protobuf:"varint,5,opt,name=SurplusRefreshNum,proto3" json:"SurplusRefreshNum"` //剩余手动刷新次数 - Lastrefreshtime int64 `protobuf:"varint,6,opt,name=lastrefreshtime,proto3" json:"lastrefreshtime"` //上一次刷新时间 + SType ShopType `protobuf:"varint,1,opt,name=sType,proto3,enum=ShopType" json:"sType"` //商城类型 + IsManualRefresh bool `protobuf:"varint,2,opt,name=IsManualRefresh,proto3" json:"IsManualRefresh"` //是否手动刷新 + Goods []*ShopItem `protobuf:"bytes,4,rep,name=Goods,proto3" json:"Goods"` //商品列表 + SurplusRefreshNum int32 `protobuf:"varint,5,opt,name=SurplusRefreshNum,proto3" json:"SurplusRefreshNum"` //剩余手动刷新次数 + Lastrefreshtime int64 `protobuf:"varint,6,opt,name=lastrefreshtime,proto3" json:"lastrefreshtime"` //上一次刷新时间 + Leftfreerefreshnum int32 `protobuf:"varint,7,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数 } func (x *ShopGetListResp) Reset() { @@ -244,6 +245,13 @@ func (x *ShopGetListResp) GetLastrefreshtime() int64 { return 0 } +func (x *ShopGetListResp) GetLeftfreerefreshnum() int32 { + if x != nil { + return x.Leftfreerefreshnum + } + return 0 +} + //购买商品 请求 type ShopBuyReq struct { state protoimpl.MessageState @@ -382,8 +390,8 @@ var file_shop_shop_msg_proto_rawDesc = []byte{ 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x49, - 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x22, 0xd5, - 0x01, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x22, 0x85, + 0x02, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, @@ -396,7 +404,10 @@ var file_shop_shop_msg_proto_rawDesc = []byte{ 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, - 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x65, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, + 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, + 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, + 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x22, 0x65, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, diff --git a/sys/configure/structs/Game.HuntingBossData.go b/sys/configure/structs/Game.HuntingBossData.go index 7d12efdf8..e012a858e 100644 --- a/sys/configure/structs/Game.HuntingBossData.go +++ b/sys/configure/structs/Game.HuntingBossData.go @@ -11,129 +11,270 @@ package cfg import "errors" type GameHuntingBossData struct { - Id int32 - Type int32 - Name string - Difficulty int32 - BattleReadyID int32 - Firstprize []*Gameatn - Dropshow []*Gameatn - Drop int32 - Heroexp int32 - Bossmodel int32 - Boss []int32 - PsConsume []*Gameatn - PsMg []*Gameatn - Captionrecommend []int32 + Id int32 + Type int32 + Name string + Difficulty int32 + BattleReadyID int32 + Firstprize []*Gameatn + Dropshow []*Gameatn + Drop int32 + Heroexp int32 + Boss []int32 + PsConsume []*Gameatn + PsMg []*Gameatn + Captionrecommend []int32 } const TypeId_GameHuntingBossData = -450881718 func (*GameHuntingBossData) GetTypeId() int32 { - return -450881718 + return -450881718 } -func (_v *GameHuntingBossData)Deserialize(_buf map[string]interface{}) (err error) { - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } - {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["difficulty"].(float64); !_ok_ { err = errors.New("difficulty error"); return }; _v.Difficulty = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["firstprize"].([]interface{}); !_ok_ { err = errors.New("firstprize error"); return } +func (_v *GameHuntingBossData) Deserialize(_buf map[string]interface{}) (err error) { + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { + err = errors.New("id error") + return + } + _v.Id = int32(_tempNum_) + } + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { + err = errors.New("type error") + return + } + _v.Type = int32(_tempNum_) + } + { + var _ok_ bool + var __json_text__ map[string]interface{} + if __json_text__, _ok_ = _buf["name"].(map[string]interface{}); !_ok_ { + err = errors.New("_v.Name error") + return + } + { + var _ok_ bool + if _, _ok_ = __json_text__["key"].(string); !_ok_ { + err = errors.New("key error") + return + } + } + { + var _ok_ bool + if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { + err = errors.New("text error") + return + } + } + } + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["difficulty"].(float64); !_ok_ { + err = errors.New("difficulty error") + return + } + _v.Difficulty = int32(_tempNum_) + } + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { + err = errors.New("BattleReadyID error") + return + } + _v.BattleReadyID = int32(_tempNum_) + } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["firstprize"].([]interface{}); !_ok_ { + err = errors.New("firstprize error") + return + } - _v.Firstprize = make([]*Gameatn, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ *Gameatn - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } - _v.Firstprize = append(_v.Firstprize, _list_v_) - } - } + _v.Firstprize = make([]*Gameatn, 0, len(_arr_)) - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["dropshow"].([]interface{}); !_ok_ { err = errors.New("dropshow error"); return } + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { + var _ok_ bool + var _x_ map[string]interface{} + if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { + err = errors.New("_list_v_ error") + return + } + if _list_v_, err = DeserializeGameatn(_x_); err != nil { + return + } + } + _v.Firstprize = append(_v.Firstprize, _list_v_) + } + } - _v.Dropshow = make([]*Gameatn, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ *Gameatn - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } - _v.Dropshow = append(_v.Dropshow, _list_v_) - } - } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["dropshow"].([]interface{}); !_ok_ { + err = errors.New("dropshow error") + return + } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["drop"].(float64); !_ok_ { err = errors.New("drop error"); return }; _v.Drop = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["heroexp"].(float64); !_ok_ { err = errors.New("heroexp error"); return }; _v.Heroexp = int32(_tempNum_) } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bossmodel"].(float64); !_ok_ { err = errors.New("bossmodel error"); return }; _v.Bossmodel = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["boss"].([]interface{}); !_ok_ { err = errors.New("boss error"); return } + _v.Dropshow = make([]*Gameatn, 0, len(_arr_)) - _v.Boss = make([]int32, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ int32 - { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Boss = append(_v.Boss, _list_v_) - } - } + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { + var _ok_ bool + var _x_ map[string]interface{} + if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { + err = errors.New("_list_v_ error") + return + } + if _list_v_, err = DeserializeGameatn(_x_); err != nil { + return + } + } + _v.Dropshow = append(_v.Dropshow, _list_v_) + } + } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["ps_consume"].([]interface{}); !_ok_ { err = errors.New("ps_consume error"); return } + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["drop"].(float64); !_ok_ { + err = errors.New("drop error") + return + } + _v.Drop = int32(_tempNum_) + } + { + var _ok_ bool + var _tempNum_ float64 + if _tempNum_, _ok_ = _buf["heroexp"].(float64); !_ok_ { + err = errors.New("heroexp error") + return + } + _v.Heroexp = int32(_tempNum_) + } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["boss"].([]interface{}); !_ok_ { + err = errors.New("boss error") + return + } - _v.PsConsume = make([]*Gameatn, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ *Gameatn - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } - _v.PsConsume = append(_v.PsConsume, _list_v_) - } - } + _v.Boss = make([]int32, 0, len(_arr_)) - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["ps_mg"].([]interface{}); !_ok_ { err = errors.New("ps_mg error"); return } + for _, _e_ := range _arr_ { + var _list_v_ int32 + { + var _ok_ bool + var _x_ float64 + if _x_, _ok_ = _e_.(float64); !_ok_ { + err = errors.New("_list_v_ error") + return + } + _list_v_ = int32(_x_) + } + _v.Boss = append(_v.Boss, _list_v_) + } + } - _v.PsMg = make([]*Gameatn, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ *Gameatn - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } - _v.PsMg = append(_v.PsMg, _list_v_) - } - } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["ps_consume"].([]interface{}); !_ok_ { + err = errors.New("ps_consume error") + return + } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["captionrecommend"].([]interface{}); !_ok_ { err = errors.New("captionrecommend error"); return } + _v.PsConsume = make([]*Gameatn, 0, len(_arr_)) - _v.Captionrecommend = make([]int32, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ int32 - { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Captionrecommend = append(_v.Captionrecommend, _list_v_) - } - } + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { + var _ok_ bool + var _x_ map[string]interface{} + if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { + err = errors.New("_list_v_ error") + return + } + if _list_v_, err = DeserializeGameatn(_x_); err != nil { + return + } + } + _v.PsConsume = append(_v.PsConsume, _list_v_) + } + } - return + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["ps_mg"].([]interface{}); !_ok_ { + err = errors.New("ps_mg error") + return + } + + _v.PsMg = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { + var _ok_ bool + var _x_ map[string]interface{} + if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { + err = errors.New("_list_v_ error") + return + } + if _list_v_, err = DeserializeGameatn(_x_); err != nil { + return + } + } + _v.PsMg = append(_v.PsMg, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["captionrecommend"].([]interface{}); !_ok_ { + err = errors.New("captionrecommend error") + return + } + + _v.Captionrecommend = make([]int32, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ int32 + { + var _ok_ bool + var _x_ float64 + if _x_, _ok_ = _e_.(float64); !_ok_ { + err = errors.New("_list_v_ error") + return + } + _list_v_ = int32(_x_) + } + _v.Captionrecommend = append(_v.Captionrecommend, _list_v_) + } + } + + return } func DeserializeGameHuntingBossData(_buf map[string]interface{}) (*GameHuntingBossData, error) { - v := &GameHuntingBossData{} - if err := v.Deserialize(_buf); err == nil { - return v, nil - } else { - return nil, err - } + v := &GameHuntingBossData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } }