diff --git a/bin/json/game_msgdistrib.json b/bin/json/game_msgdistrib.json index 8964c17b0..6cdb1276c 100644 --- a/bin/json/game_msgdistrib.json +++ b/bin/json/game_msgdistrib.json @@ -310,5 +310,11 @@ "open": true, "routrules": "~/worker", "describe": "公会日志列表" + }, + { + "msgid": "sociaty.accuse", + "open": true, + "routrules": "~/worker", + "describe": "弹劾" } ] \ No newline at end of file diff --git a/cmd/v2/ui/views/sociaty_mine.go b/cmd/v2/ui/views/sociaty_mine.go index a9bdbe83f..f46914e46 100644 --- a/cmd/v2/ui/views/sociaty_mine.go +++ b/cmd/v2/ui/views/sociaty_mine.go @@ -430,10 +430,22 @@ func (this *SociatyMineView) showSociatyMemberWin() { }) //弹劾 - tanheBtn := widget.NewButton("弹劾", nil) + tanheBtn := widget.NewButton("弹劾", func() { + dialog.ShowConfirm("提示", "确定弹劾会长?", func(b bool) { + if !b { + return + } + if err := service.GetPttService().SendToClient( + string(comm.ModuleSociaty), + sociaty.SociatySubTypeAccuse, + &pb.SociatyAccuseReq{}, + ); err != nil { + logrus.Error(err) + return + } - // 退出 - quitBtn := widget.NewButton("退出", nil) + }, this.w) + }) // 转让 zhuanrangBtn := widget.NewButton("转让", func() { @@ -526,11 +538,10 @@ func (this *SociatyMineView) showSociatyMemberWin() { this.job == pb.SociatyJob_ADMIN { btns.Add(tirenBtn) btns.Add(tanheBtn) - btns.Add(quitBtn) } // 成员 if this.job == pb.SociatyJob_MEMBER { - btns.Add(quitBtn) + btns.Add(tanheBtn) } c := container.NewBorder(btns, nil, nil, nil, this.memberList.ItemList) diff --git a/modules/hero/hero_test.go b/modules/hero/hero_test.go index 4baf294a9..66221aa30 100644 --- a/modules/hero/hero_test.go +++ b/modules/hero/hero_test.go @@ -60,7 +60,7 @@ func (this *TestService) InitSys() { } func Test_Main(t *testing.T) { - + fmt.Printf("%d", 9/10) ids := utils.RandomNumbers(0, 10, 5) for _, v := range ids { fmt.Printf("%d", v) diff --git a/modules/sociaty/api.go b/modules/sociaty/api.go index a976181e5..142429373 100644 --- a/modules/sociaty/api.go +++ b/modules/sociaty/api.go @@ -17,6 +17,7 @@ const ( SociatySubTypeCancel = "cancel" SociatySubTypeDismiss = "dismiss" SociatySubTypeQuit = "quit" + SociatySubTypeAccuse = "accuse" SociatySubTypeAgree = "agree" SociatySubTypeRefuse = "refuse" SociatySubTypeSetting = "setting" diff --git a/modules/sociaty/api_cross_accuse.go b/modules/sociaty/api_cross_accuse.go index de0522578..c39bc73fc 100644 --- a/modules/sociaty/api_cross_accuse.go +++ b/modules/sociaty/api_cross_accuse.go @@ -9,12 +9,12 @@ import ( // 弹劾会长 -func (this *apiComp) AsscuseCheck(session comm.IUserSession, req *pb.SociatyAccuseReq) (code pb.ErrorCode) { +func (this *apiComp) AccuseCheck(session comm.IUserSession, req *pb.SociatyAccuseReq) (code pb.ErrorCode) { return } -func (this *apiComp) Asscuse(session comm.IUserSession, req *pb.SociatyAccuseReq) (code pb.ErrorCode, data proto.Message) { - if code = this.AsscuseCheck(session, req); code != pb.ErrorCode_Success { +func (this *apiComp) Accuse(session comm.IUserSession, req *pb.SociatyAccuseReq) (code pb.ErrorCode, data proto.Message) { + if code = this.AccuseCheck(session, req); code != pb.ErrorCode_Success { return } uid := session.GetUserId() @@ -43,7 +43,7 @@ func (this *apiComp) Asscuse(session comm.IUserSession, req *pb.SociatyAccuseReq SociatyId: sociaty.Id, } - if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeAgree, rsp); err != nil { + if err := session.SendMsg(string(this.module.GetType()), SociatySubTypeAccuse, rsp); err != nil { code = pb.ErrorCode_SystemError } return diff --git a/modules/troll/module.go b/modules/troll/module.go index a4405a94d..f3dd7c8d1 100644 --- a/modules/troll/module.go +++ b/modules/troll/module.go @@ -93,8 +93,8 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain, ai if coefficient == nil { return } - if troll.Sell >= coefficient.Coefficient { // 可以出售 - var preGold int32 + if troll.Sell <= coefficient.Coefficient { // 可以出售 + var preGold int32 // 成本价 for _, v := range goods { sellPrice[v.Id] = v.Goodsprice * coefficient.Coefficient / 1000 preGold += troll.Price[v.Id] * troll.Items[v.Id] @@ -112,8 +112,7 @@ func (this *Troll) TrollAI(session comm.IUserSession, troll *pb.DBTrollTrain, ai break } } - } - if troll.Buy >= coefficient.Coefficient { // 可以购买 + } else if troll.Buy >= coefficient.Coefficient { // 可以购买 for _, v := range goods { sellPrice[v.Id] = v.Goodsprice * coefficient.Coefficient / 1000 } @@ -180,7 +179,6 @@ func (this *Troll) BuyAllItem(uid string, troll *pb.DBTrollTrain, price map[int3 break } } - // 检查该位置的格子没有补满 full := (troll.Items[v.Id] + box[v.Id]) % maxgoods if full != 0 { diff --git a/modules/viking/api_buy.go b/modules/viking/api_buy.go index 6270406e9..def160a1e 100644 --- a/modules/viking/api_buy.go +++ b/modules/viking/api_buy.go @@ -48,7 +48,44 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.VikingBuyReq) (code } else { curByCount = list.BuyCount } + conf := this.module.configure.GetGlobalConf() + if conf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + if list.LeftCount != conf.VikingNum { + if list.RecoveryTime == 0 { + list.RecoveryTime = time.Now().Unix() + } + count := (time.Now().Unix() - list.RecoveryTime) / int64(conf.VikingExpeditionRecoveryTime*60) + if count > 1 { + list.LeftCount += int32(count) + } + if list.LeftCount >= conf.VikingNum { + list.LeftCount = conf.VikingNum + list.RecoveryTime = 0 + } else { + list.RecoveryTime += count * int64(conf.VikingExpeditionRecoveryTime*60) // 更新刷新时间 + } + } else { + list.RecoveryTime = 0 + } curByCount += req.Count // 当前需要购买的数量 + + if this.configure.GetMaxBuyChallengeCount() < curByCount { + code = pb.ErrorCode_VikingBuyMaxCount + return + } + list.LeftCount += req.Count + mapData["leftCount"] = list.LeftCount + if list.LeftCount > conf.VikingNum { + code = pb.ErrorCode_VikingBuyMaxCount + return + } else if list.LeftCount == conf.VikingNum { + list.RecoveryTime = 0 + mapData["recoveryTime"] = list.RecoveryTime // 更新刷新时间 + } + // 消耗资源整合 for i := list.BuyCount + 1; i <= curByCount; i++ { _cfg := this.configure.GetBuyChallengeCount(i) diff --git a/modules/viking/api_challenge.go b/modules/viking/api_challenge.go index 97b44537b..e2de71206 100644 --- a/modules/viking/api_challenge.go +++ b/modules/viking/api_challenge.go @@ -28,7 +28,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.VikingChalleng return } - if viking.ChallengeCount > this.module.configure.GetGlobalConf().VikingNum+viking.BuyCount { + if viking.LeftCount <= 0 { // 有没有挑战次数 code = pb.ErrorCode_VikingMaxChallengeCount return } diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index a41dacc9d..a63a98cbf 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/pb" cfg "go_dreamfactory/sys/configure/structs" + "time" "google.golang.org/protobuf/proto" ) @@ -23,9 +24,11 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal mapData map[string]interface{} newChallenge bool // 新的关卡 reward []*cfg.Gameatn + asset []*pb.UserAssets ) mapData = make(map[string]interface{}, 0) reward = make([]*cfg.Gameatn, 0) + asset = make([]*pb.UserAssets, 0) code = this.ChallengeOverCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 @@ -58,13 +61,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal } newChallenge = true } - if newChallenge { // 新关卡挑战通过 发放首通奖励 - if code = this.module.DispenseRes(session, cfg.Firstprize, true); code != pb.ErrorCode_Success { - return - } - viking.Boss[req.BossId] += 1 - mapData["boss"] = viking.Boss - } + if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 && value == req.Difficulty { sz := make([]*pb.LineUp, 5) for i, v := range req.Report.Info.Redflist[0].Team { @@ -85,15 +82,47 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal return } + conf := this.module.configure.GetGlobalConf() + if conf != nil { + if viking.LeftCount >= conf.VikingNum { + viking.RecoveryTime = time.Now().Unix() + } + } + viking.LeftCount-- + mapData["leftCount"] = viking.LeftCount viking.ChallengeCount++ mapData["challengeCount"] = viking.ChallengeCount code = this.module.ModifyVikingData(session.GetUserId(), mapData) - // 发放通关随机奖励 - this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励 - if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success { - return + if newChallenge { // 新关卡挑战通过 发放首通奖励 + if code = this.module.DispenseRes(session, cfg.Firstprize, true); code != pb.ErrorCode_Success { + return + } + viking.Boss[req.BossId] += 1 + mapData["boss"] = viking.Boss + for _, v := range cfg.Firstprize { + asset = append(asset, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } else { + this.module.configure.GetDropReward(cfg.Drop, reward) // 获取掉落奖励 + if code = this.module.DispenseRes(session, reward, true); code != pb.ErrorCode_Success { + return + } + for _, v := range reward { + asset = append(asset, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } } - - session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingChallengeOverResp{Data: viking}) + // 发放通关随机奖励 + session.SendMsg(string(this.module.GetType()), VikingChallengeOverResp, &pb.VikingChallengeOverResp{ + Data: viking, + Asset: asset, + }) return } diff --git a/modules/viking/api_getlist.go b/modules/viking/api_getlist.go index 426286715..95e3d58df 100644 --- a/modules/viking/api_getlist.go +++ b/modules/viking/api_getlist.go @@ -16,7 +16,10 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.VikingGetLi } func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq) (code pb.ErrorCode, data proto.Message) { - + var ( + mapData map[string]interface{} + ) + mapData = make(map[string]interface{}, 0) code = this.GetListCheck(session, req) if code != pb.ErrorCode_Success { return // 参数校验失败直接返回 @@ -33,12 +36,37 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.VikingGetListReq list.CTime = time.Now().Unix() list.BuyCount = 0 list.ChallengeCount = 0 - mapData := make(map[string]interface{}, 0) + mapData["cTime"] = list.CTime mapData["buyCount"] = list.BuyCount mapData["challengeCount"] = list.ChallengeCount - code = this.module.ModifyVikingData(session.GetUserId(), mapData) //修改内存信息 + } + // 检查恢复时间 + conf := this.module.configure.GetGlobalConf() + if conf == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + if list.LeftCount != conf.VikingNum { + if list.RecoveryTime == 0 { + list.RecoveryTime = time.Now().Unix() + } + count := (time.Now().Unix() - list.RecoveryTime) / int64(conf.VikingExpeditionRecoveryTime*60) + if count > 1 { + list.LeftCount += int32(count) + } + if list.LeftCount >= conf.VikingNum { + list.LeftCount = conf.VikingNum + list.RecoveryTime = 0 + } else { + list.RecoveryTime += count * int64(conf.VikingExpeditionRecoveryTime*60) // 更新刷新时间 + } + } else { + list.RecoveryTime = 0 + } + mapData["recoveryTime"] = list.RecoveryTime + code = this.module.ModifyVikingData(session.GetUserId(), mapData) //修改内存信息 session.SendMsg(string(this.module.GetType()), VikingGetListResp, &pb.VikingGetListResp{Data: list}) return } diff --git a/modules/viking/comp_configure.go b/modules/viking/comp_configure.go index 29725bfe6..e01c843fb 100644 --- a/modules/viking/comp_configure.go +++ b/modules/viking/comp_configure.go @@ -101,3 +101,15 @@ func (this *configureComp) GetBuyChallengeCount(index int32) (data *cfg.GameViki return } + +func (this *configureComp) GetMaxBuyChallengeCount() int32 { + if v, err := this.GetConfigure(game_challenge); err == nil { + if configure, ok := v.(*cfg.GameVikingChallenge); ok { + return int32(len(configure.GetDataList())) + } + } else { + log.Errorf("get game_challenge conf err:%v", err) + } + + return 0 +} diff --git a/modules/viking/model_viking.go b/modules/viking/model_viking.go index 29c254769..0bc465942 100644 --- a/modules/viking/model_viking.go +++ b/modules/viking/model_viking.go @@ -48,6 +48,11 @@ func (this *modelViking) getVikingList(uid string) (result *pb.DBViking, err err str := strconv.Itoa(int(k)) + "_0" result.BossTime[str] = 0 } + conf := this.module.configure.GetGlobalConf() + if conf != nil { + result.LeftCount = conf.VikingNum // 初始账号给默认最大挑战次数 + } + } this.Add(uid, result) } diff --git a/pb/mail_db.pb.go b/pb/mail_db.pb.go index 0c640baa8..b1c6071dc 100644 --- a/pb/mail_db.pb.go +++ b/pb/mail_db.pb.go @@ -34,6 +34,7 @@ type DBMailData struct { Check bool `protobuf:"varint,7,opt,name=Check,proto3" json:"Check"` // 是否查看 Reward bool `protobuf:"varint,8,opt,name=Reward,proto3" json:"Reward"` // 附件领取状态 Items []*UserAssets `protobuf:"bytes,9,rep,name=Items,proto3" json:"Items"` // 附件 + Cid string `protobuf:"bytes,10,opt,name=Cid,proto3" json:"Cid"` // 邮件的配置表ID } func (x *DBMailData) Reset() { @@ -131,12 +132,19 @@ func (x *DBMailData) GetItems() []*UserAssets { return nil } +func (x *DBMailData) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + var File_mail_mail_db_proto protoreflect.FileDescriptor var file_mail_mail_db_proto_rawDesc = []byte{ 0x0a, 0x12, 0x6d, 0x61, 0x69, 0x6c, 0x2f, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xed, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x22, 0xff, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x55, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x55, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x69, 0x74, 0x6c, 0x65, @@ -151,7 +159,9 @@ var file_mail_mail_db_proto_rawDesc = []byte{ 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x10, 0x0a, 0x03, 0x43, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x43, + 0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/viking_db.pb.go b/pb/viking_db.pb.go index 57f3b88ce..2f9ca1335 100644 --- a/pb/viking_db.pb.go +++ b/pb/viking_db.pb.go @@ -33,6 +33,8 @@ type DBViking struct { BuyCount int32 `protobuf:"varint,5,opt,name=buyCount,proto3" json:"buyCount" bson:"buyCount"` //购买次数 CTime int64 `protobuf:"varint,6,opt,name=cTime,proto3" json:"cTime" bson:"cTime"` //修改时间 BossTime map[string]int32 `protobuf:"bytes,7,rep,name=bossTime,proto3" json:"bossTime" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3" bson:"bossTime"` // + LeftCount int32 `protobuf:"varint,8,opt,name=leftCount,proto3" json:"leftCount" bson:"leftCount"` // 当前剩余挑战次数 // 最大不能超过配置 + RecoveryTime int64 `protobuf:"varint,9,opt,name=recoveryTime,proto3" json:"recoveryTime" bson:"recoveryTime"` //// 开始恢复的时间 } func (x *DBViking) Reset() { @@ -116,6 +118,20 @@ func (x *DBViking) GetBossTime() map[string]int32 { return nil } +func (x *DBViking) GetLeftCount() int32 { + if x != nil { + return x.LeftCount + } + return 0 +} + +func (x *DBViking) GetRecoveryTime() int64 { + if x != nil { + return x.RecoveryTime + } + return 0 +} + // 维京远征排行榜 type DBVikingRank struct { state protoimpl.MessageState @@ -242,7 +258,7 @@ var file_viking_viking_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0xda, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x0e, + 0x6f, 0x22, 0x9c, 0x03, 0x0a, 0x08, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 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, 0x26, 0x0a, 0x0e, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x43, 0x6f, 0x75, @@ -256,31 +272,36 @@ var file_viking_viking_db_proto_rawDesc = []byte{ 0x69, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x42, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, - 0x62, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f, 0x73, 0x73, - 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, 0x42, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 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, 0xff, - 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x63, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, - 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x18, 0x0a, - 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, - 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, - 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, - 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x65, 0x66, 0x74, + 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x6c, 0x65, 0x66, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x72, 0x65, + 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x6f, + 0x73, 0x73, 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, 0x42, 0x6f, 0x73, 0x73, 0x54, 0x69, 0x6d, 0x65, 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, 0xff, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, + 0x6b, 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, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x73, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, + 0x63, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x63, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x12, + 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, + 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, + 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/viking_msg.pb.go b/pb/viking_msg.pb.go index 8054dc8d7..20d874693 100644 --- a/pb/viking_msg.pb.go +++ b/pb/viking_msg.pb.go @@ -309,7 +309,8 @@ type VikingChallengeOverResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Data *DBViking `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` + Asset []*UserAssets `protobuf:"bytes,2,rep,name=asset,proto3" json:"asset"` // GameRe // 推送atn } func (x *VikingChallengeOverResp) Reset() { @@ -351,6 +352,13 @@ func (x *VikingChallengeOverResp) GetData() *DBViking { return nil } +func (x *VikingChallengeOverResp) GetAsset() []*UserAssets { + if x != nil { + return x.Asset + } + return nil +} + // 购买 type VikingBuyReq struct { state protoimpl.MessageState @@ -556,53 +564,56 @@ var file_viking_viking_msg_proto_rawDesc = []byte{ 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x56, 0x69, - 0x6b, 0x69, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, - 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0x80, 0x01, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x73, - 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, - 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, - 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, - 0x65, 0x61, 0x6d, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, - 0x61, 0x6d, 0x69, 0x64, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, - 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, - 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, - 0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, - 0x6c, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x22, 0x77, 0x0a, 0x16, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, - 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, - 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, - 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, - 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x38, - 0x0a, 0x17, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, - 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, - 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, - 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, - 0x0a, 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, + 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x32, 0x0a, 0x11, 0x56, 0x69, + 0x6b, 0x69, 0x6e, 0x67, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, - 0x0a, 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x16, 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, - 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, - 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, - 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x80, + 0x01, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, + 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x12, 0x18, 0x0a, + 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, + 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, + 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x74, 0x65, 0x61, 0x6d, 0x69, 0x64, + 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x6f, 0x73, + 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73, 0x73, 0x49, + 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, 0x79, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x22, 0x77, 0x0a, 0x16, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, + 0x6f, 0x73, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x6f, 0x73, + 0x73, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, 0x6c, 0x74, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x69, 0x66, 0x66, 0x69, 0x63, 0x75, + 0x6c, 0x74, 0x79, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x5b, 0x0a, 0x17, 0x56, 0x69, + 0x6b, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x4f, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, + 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0x24, 0x0a, 0x0c, 0x56, 0x69, 0x6b, 0x69, 0x6e, + 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2e, 0x0a, + 0x0d, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, + 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, + 0x42, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x47, 0x0a, + 0x11, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x22, 0x39, 0x0a, 0x12, 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, + 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x05, + 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, + 0x56, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, + 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -632,20 +643,22 @@ var file_viking_viking_msg_proto_goTypes = []interface{}{ (*DBViking)(nil), // 10: DBViking (*BattleInfo)(nil), // 11: BattleInfo (*BattleReport)(nil), // 12: BattleReport - (*DBVikingRank)(nil), // 13: DBVikingRank + (*UserAssets)(nil), // 13: UserAssets + (*DBVikingRank)(nil), // 14: DBVikingRank } var file_viking_viking_msg_proto_depIdxs = []int32{ 10, // 0: VikingGetListResp.data:type_name -> DBViking 11, // 1: VikingChallengeResp.info:type_name -> BattleInfo 12, // 2: VikingChallengeOverReq.report:type_name -> BattleReport 10, // 3: VikingChallengeOverResp.data:type_name -> DBViking - 10, // 4: VikingBuyResp.data:type_name -> DBViking - 13, // 5: VikingRankListResp.ranks:type_name -> DBVikingRank - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 13, // 4: VikingChallengeOverResp.asset:type_name -> UserAssets + 10, // 5: VikingBuyResp.data:type_name -> DBViking + 14, // 6: VikingRankListResp.ranks:type_name -> DBVikingRank + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_viking_viking_msg_proto_init() } @@ -655,6 +668,7 @@ func file_viking_viking_msg_proto_init() { } file_viking_viking_db_proto_init() file_battle_battle_msg_proto_init() + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_viking_viking_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VikingGetListReq); i { diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 5415c2839..7d65642f1 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -106,12 +106,15 @@ type GameGlobalData struct { GuildBuildCd int32 ArenaTicketMax int32 ArenaTicketRecoveryTime int32 + VikingExpeditionRecoveryTime int32 ArenaTicketPurchaseRrestrictions int32 ArenaInitiaIntegral int32 ArenaRecordMax int32 ArenaRefreshCd int32 ShowMale []int32 ShowFemale []int32 + HoroscopeResetCost *Gameatn + HoroscopeResetCd int32 } const TypeId_GameGlobalData = 477542761 @@ -359,6 +362,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_BuildCd"].(float64); !_ok_ { err = errors.New("guild_BuildCd error"); return }; _v.GuildBuildCd = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_max"].(float64); !_ok_ { err = errors.New("ArenaTicket_max error"); return }; _v.ArenaTicketMax = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_RecoveryTime"].(float64); !_ok_ { err = errors.New("ArenaTicket_RecoveryTime error"); return }; _v.ArenaTicketRecoveryTime = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VikingExpedition_RecoveryTime"].(float64); !_ok_ { err = errors.New("VikingExpedition_RecoveryTime error"); return }; _v.VikingExpeditionRecoveryTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_PurchaseRrestrictions"].(float64); !_ok_ { err = errors.New("ArenaTicket_PurchaseRrestrictions error"); return }; _v.ArenaTicketPurchaseRrestrictions = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_InitiaIntegral"].(float64); !_ok_ { err = errors.New("arena_InitiaIntegral error"); return }; _v.ArenaInitiaIntegral = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_RecordMax"].(float64); !_ok_ { err = errors.New("arena_RecordMax error"); return }; _v.ArenaRecordMax = int32(_tempNum_) } @@ -391,6 +395,8 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { } } + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["horoscope_reset_cost"].(map[string]interface{}); !_ok_ { err = errors.New("horoscope_reset_cost error"); return }; if _v.HoroscopeResetCost, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["horoscope_reset_cd"].(float64); !_ok_ { err = errors.New("horoscope_reset_cd error"); return }; _v.HoroscopeResetCd = int32(_tempNum_) } return }