diff --git a/bin/json/game_integralachieve.json b/bin/json/game_integralachieve.json new file mode 100644 index 000000000..76319cac9 --- /dev/null +++ b/bin/json/game_integralachieve.json @@ -0,0 +1,392 @@ +[ + { + "id": 1001, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_01", + "text": "通关难度1" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1002, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_02", + "text": "通关难度2" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1003, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_03", + "text": "通关难度3" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1004, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_04", + "text": "通关难度4" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1005, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_05", + "text": "通关难度5" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1006, + "type": 1, + "des": { + "key": "IntegralBoss_Integralachieve_des_06", + "text": "通关难度6" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1007, + "type": 2, + "des": { + "key": "IntegralBoss_Integralachieve_des_07", + "text": "噩梦侵袭进行3场战斗" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1008, + "type": 2, + "des": { + "key": "IntegralBoss_Integralachieve_des_08", + "text": "噩梦侵袭任意难度获得A及以上评级" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1009, + "type": 2, + "des": { + "key": "IntegralBoss_Integralachieve_des_09", + "text": "噩梦侵袭任意难度获得EX++评级" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1010, + "type": 2, + "des": { + "key": "IntegralBoss_Integralachieve_des_10", + "text": "触发5次敌方全体复活" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1011, + "type": 2, + "des": { + "key": "IntegralBoss_Integralachieve_des_11", + "text": "完成10次BOSS击杀" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1012, + "type": 3, + "des": { + "key": "IntegralBoss_Integralachieve_des_12", + "text": "使用异化效果组合A通关任意难度挑战" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1013, + "type": 3, + "des": { + "key": "IntegralBoss_Integralachieve_des_13", + "text": "使用异化效果组合B通关任意难度挑战" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1014, + "type": 3, + "des": { + "key": "IntegralBoss_Integralachieve_des_14", + "text": "使用异化效果组合C通关任意难度挑战" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + }, + { + "id": 1015, + "type": 3, + "des": { + "key": "IntegralBoss_Integralachieve_des_15", + "text": "使用异化效果组合D通关任意难度挑战" + }, + "reward": [ + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + }, + { + "a": "attr", + "t": "diamond", + "n": 200 + } + ], + "taskid": 0 + } +] \ No newline at end of file diff --git a/modules/integral/api_achieve.go b/modules/integral/api_achieve.go new file mode 100644 index 000000000..14cc97ba9 --- /dev/null +++ b/modules/integral/api_achieve.go @@ -0,0 +1,61 @@ +package integral + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +//参数校验 +func (this *apiComp) GetAchieveCheck(session comm.IUserSession, req *pb.IntegralGetAchieveReq) (errdata *pb.ErrorData) { + + return +} + +func (this *apiComp) GetAchieve(session comm.IUserSession, req *pb.IntegralGetAchieveReq) (errdata *pb.ErrorData) { + + var ( + list *pb.DBIntegralBoss + err error + conf *cfg.GameIntegralAchieveData + atno []*pb.UserAtno + ) + list, err = this.module.modelIntegral.getIntegralList(session) + if err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + } + return + } + if conf, err = this.module.configure.GetIntegralAchieveByKey(req.Id); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + if _, ok := list.Achieve[req.Id]; ok { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_TntegralRepleteAchive, + Title: pb.ErrorCode_TntegralRepleteAchive.ToString(), + Message: err.Error(), + } + return + } + if conf.Taskid != 0 { + if ok, _, err := this.module.ModuleBuried.CheckCondition(session, conf.Taskid); !ok || err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_TaskNoFinished, + Title: pb.ErrorCode_TaskNoFinished.ToString(), + Message: err.Error(), + } + } + } + session.SendMsg(string(this.module.GetType()), "getachieve", &pb.IntegralGetAchieveResp{ + Achieve: list.Achieve, + Award: atno, + }) + return +} diff --git a/modules/integral/comp_configure.go b/modules/integral/comp_configure.go index 04eaf8cb0..c96e4e055 100644 --- a/modules/integral/comp_configure.go +++ b/modules/integral/comp_configure.go @@ -17,6 +17,7 @@ const ( game_integralreward = "game_integralreward.json" game_integraltime = "game_integraltime.json" game_integralbuff = "game_integralbuff.json" + game_integralachieve = "game_integralachieve.json" ) ///配置管理基础组件 @@ -37,6 +38,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp game_integraltime: cfg.NewGameIntegralTime, game_integralcondition: cfg.NewGameIntegralCondition, game_integralbuff: cfg.NewGameIntegralBuff, + game_integralachieve: cfg.NewGameIntegralAchieve, }) configure.RegisterConfigure(game_integralboss, cfg.NewGameIntegralBoss, this.LoadStageBoss) configure.RegisterConfigure(game_integralreward, cfg.NewGameIntegralReward, this.LoadIntegralReward) @@ -217,3 +219,18 @@ func (this *configureComp) GetIntegralBuffByKey(skillId int32) (result *cfg.Game err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_integralbuff, skillId) return } + +func (this *configureComp) GetIntegralAchieveByKey(id int32) (result *cfg.GameIntegralAchieveData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_integralachieve); err == nil { + if configure, ok := v.(*cfg.GameIntegralAchieve); ok { + if result = configure.Get(id); result != nil { + return + } + } + } + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_integralachieve, id) + return +} diff --git a/modules/integral/model_integral.go b/modules/integral/model_integral.go index d3dbe3419..ef915c8a4 100644 --- a/modules/integral/model_integral.go +++ b/modules/integral/model_integral.go @@ -54,6 +54,7 @@ func (this *modelIntegral) getIntegralList(session comm.IUserSession) (result *p result.Buff = make(map[int32]int32) result.Score = make(map[int32]int32) result.Line = make(map[int32]*pb.LineData, 0) + result.Achieve = make(map[int32]int32) // 初始化成就 // 获取当前的hid curTime := configure.Now().Unix() szConf := this.module.configure.GetIntegralITime() diff --git a/modules/plunder/api_develop.go b/modules/plunder/api_develop.go index b4d15198f..0b6e734e8 100644 --- a/modules/plunder/api_develop.go +++ b/modules/plunder/api_develop.go @@ -38,7 +38,7 @@ func (this *apiComp) Develop(session comm.IUserSession, req *pb.PlunderDevelopRe } return } - if _, ok := list.Develop[conf.Itype]; ok { + if _, ok := list.Develop[req.Cid]; ok { errdata = &pb.ErrorData{ Code: pb.ErrorCode_PlundeAlreadyLearn, Title: pb.ErrorCode_PlundeAlreadyLearn.ToString(), @@ -55,7 +55,7 @@ func (this *apiComp) Develop(session comm.IUserSession, req *pb.PlunderDevelopRe return } } - list.Develop[conf.Itype] = 1 + list.Develop[req.Cid] = 1 update["develop"] = list.Develop this.module.modelPlunder.changePlunderData(session.GetUserId(), update) diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 1cd5e3661..b885d6dd5 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -472,6 +472,7 @@ const ( ErrorCode_EntertainNoSkillCard ErrorCode = 5212 //技能卡不足 // integral ErrorCode_TntegralDayMaxChallenge ErrorCode = 5301 // 当日挑战达上限 + ErrorCode_TntegralRepleteAchive ErrorCode = 5302 // 重复激活 //plunder ErrorCode_PlunderNotFoundShip ErrorCode = 5401 // pvp 没找到数据 ErrorCode_PlunderLineUnlock ErrorCode = 5402 // 队列没解锁 @@ -890,6 +891,7 @@ var ( 5211: "EntertainNoGamePlayering", 5212: "EntertainNoSkillCard", 5301: "TntegralDayMaxChallenge", + 5302: "TntegralRepleteAchive", 5401: "PlunderNotFoundShip", 5402: "PlunderLineUnlock", 5403: "PlundeRepleteRecive", @@ -1304,6 +1306,7 @@ var ( "EntertainNoGamePlayering": 5211, "EntertainNoSkillCard": 5212, "TntegralDayMaxChallenge": 5301, + "TntegralRepleteAchive": 5302, "PlunderNotFoundShip": 5401, "PlunderLineUnlock": 5402, "PlundeRepleteRecive": 5403, @@ -1347,7 +1350,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, 0xe6, 0x4c, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0x82, 0x4d, 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, @@ -1948,21 +1951,23 @@ var file_errorcode_proto_rawDesc = []byte{ 0x0a, 0x14, 0x45, 0x6e, 0x74, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x4e, 0x6f, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x43, 0x61, 0x72, 0x64, 0x10, 0xdc, 0x28, 0x12, 0x1c, 0x0a, 0x17, 0x54, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x44, 0x61, 0x79, 0x4d, 0x61, 0x78, 0x43, 0x68, 0x61, 0x6c, 0x6c, - 0x65, 0x6e, 0x67, 0x65, 0x10, 0xb5, 0x29, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x6c, 0x75, 0x6e, 0x64, - 0x65, 0x72, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x10, 0x99, - 0x2a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, - 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0x9a, 0x2a, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x6c, 0x75, - 0x6e, 0x64, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, - 0x10, 0x9b, 0x2a, 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x53, 0x68, 0x69, - 0x70, 0x52, 0x65, 0x61, 0x63, 0x68, 0x10, 0x9c, 0x2a, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x6c, 0x75, - 0x6e, 0x64, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x68, 0x69, 0x70, 0x10, 0x9d, 0x2a, - 0x12, 0x14, 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x53, 0x68, 0x69, 0x70, 0x43, 0x44, - 0x49, 0x6e, 0x67, 0x10, 0x9e, 0x2a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, - 0x53, 0x68, 0x69, 0x70, 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x9f, 0x2a, 0x12, 0x11, - 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0xa0, - 0x2a, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, - 0x64, 0x79, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x10, 0xa1, 0x2a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x67, 0x65, 0x10, 0xb5, 0x29, 0x12, 0x1a, 0x0a, 0x15, 0x54, 0x6e, 0x74, 0x65, 0x67, + 0x72, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x68, 0x69, 0x76, 0x65, + 0x10, 0xb6, 0x29, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x68, 0x69, 0x70, 0x10, 0x99, 0x2a, 0x12, 0x16, 0x0a, + 0x11, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x6e, 0x6c, 0x6f, + 0x63, 0x6b, 0x10, 0x9a, 0x2a, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x52, + 0x65, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x10, 0x9b, 0x2a, 0x12, + 0x14, 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x53, 0x68, 0x69, 0x70, 0x52, 0x65, 0x61, + 0x63, 0x68, 0x10, 0x9c, 0x2a, 0x12, 0x15, 0x0a, 0x10, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x53, 0x68, 0x69, 0x70, 0x10, 0x9d, 0x2a, 0x12, 0x14, 0x0a, 0x0f, + 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x53, 0x68, 0x69, 0x70, 0x43, 0x44, 0x49, 0x6e, 0x67, 0x10, + 0x9e, 0x2a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x53, 0x68, 0x69, 0x70, + 0x52, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x9f, 0x2a, 0x12, 0x11, 0x0a, 0x0c, 0x50, 0x6c, + 0x75, 0x6e, 0x64, 0x65, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x10, 0xa0, 0x2a, 0x12, 0x17, 0x0a, + 0x12, 0x50, 0x6c, 0x75, 0x6e, 0x64, 0x65, 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x4c, 0x65, + 0x61, 0x72, 0x6e, 0x10, 0xa1, 0x2a, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/integral_db.pb.go b/pb/integral_db.pb.go index d509f8ae7..63f50f47b 100644 --- a/pb/integral_db.pb.go +++ b/pb/integral_db.pb.go @@ -41,6 +41,7 @@ type DBIntegralBoss struct { Score map[int32]int32 `protobuf:"bytes,14,rep,name=score,proto3" json:"score" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // key 难度 value 积分 Uinfo *BaseUserInfo `protobuf:"bytes,15,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 Line map[int32]*LineData `protobuf:"bytes,16,rep,name=line,proto3" json:"line" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Achieve map[int32]int32 `protobuf:"bytes,17,rep,name=achieve,proto3" json:"achieve" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 成就奖励 key 成就id } func (x *DBIntegralBoss) Reset() { @@ -187,6 +188,13 @@ func (x *DBIntegralBoss) GetLine() map[int32]*LineData { return nil } +func (x *DBIntegralBoss) GetAchieve() map[int32]int32 { + if x != nil { + return x.Achieve + } + return nil +} + // 积分boss 排行 type DBIntegralRank struct { state protoimpl.MessageState @@ -274,7 +282,7 @@ var file_integral_integral_db_proto_rawDesc = []byte{ 0x72, 0x61, 0x6c, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 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, 0x8e, 0x05, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x6f, 0x22, 0x82, 0x06, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 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, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x79, 0x70, 0x65, 0x18, @@ -303,29 +311,36 @@ var file_integral_integral_db_proto_rawDesc = []byte{ 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x4c, 0x69, 0x6e, 0x65, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, - 0x75, 0x66, 0x66, 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, 0x38, 0x0a, 0x0a, 0x53, 0x63, 0x6f, 0x72, 0x65, 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, 0x42, - 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, - 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x90, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, - 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, - 0x6e, 0x64, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x61, + 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x44, + 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x42, 0x6f, 0x73, 0x73, 0x2e, 0x41, 0x63, + 0x68, 0x69, 0x65, 0x76, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x63, 0x68, 0x69, + 0x65, 0x76, 0x65, 0x1a, 0x37, 0x0a, 0x09, 0x42, 0x75, 0x66, 0x66, 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, 0x38, 0x0a, 0x0a, + 0x53, 0x63, 0x6f, 0x72, 0x65, 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, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x6e, 0x65, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x41, 0x63, + 0x68, 0x69, 0x65, 0x76, 0x65, 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, 0x22, 0x90, 0x01, 0x0a, 0x0e, 0x44, 0x42, 0x49, 0x6e, 0x74, + 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x64, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, + 0x61, 0x6e, 0x64, 0x75, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -340,29 +355,31 @@ func file_integral_integral_db_proto_rawDescGZIP() []byte { return file_integral_integral_db_proto_rawDescData } -var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_integral_integral_db_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_integral_integral_db_proto_goTypes = []interface{}{ (*DBIntegralBoss)(nil), // 0: DBIntegralBoss (*DBIntegralRank)(nil), // 1: DBIntegralRank nil, // 2: DBIntegralBoss.BuffEntry nil, // 3: DBIntegralBoss.ScoreEntry nil, // 4: DBIntegralBoss.LineEntry - (*BaseUserInfo)(nil), // 5: BaseUserInfo - (*LineData)(nil), // 6: LineData + nil, // 5: DBIntegralBoss.AchieveEntry + (*BaseUserInfo)(nil), // 6: BaseUserInfo + (*LineData)(nil), // 7: LineData } var file_integral_integral_db_proto_depIdxs = []int32{ 2, // 0: DBIntegralBoss.buff:type_name -> DBIntegralBoss.BuffEntry 3, // 1: DBIntegralBoss.score:type_name -> DBIntegralBoss.ScoreEntry - 5, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo + 6, // 2: DBIntegralBoss.uinfo:type_name -> BaseUserInfo 4, // 3: DBIntegralBoss.line:type_name -> DBIntegralBoss.LineEntry - 5, // 4: DBIntegralRank.uinfo:type_name -> BaseUserInfo - 6, // 5: DBIntegralRank.line:type_name -> LineData - 6, // 6: DBIntegralBoss.LineEntry.value:type_name -> LineData - 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 + 5, // 4: DBIntegralBoss.achieve:type_name -> DBIntegralBoss.AchieveEntry + 6, // 5: DBIntegralRank.uinfo:type_name -> BaseUserInfo + 7, // 6: DBIntegralRank.line:type_name -> LineData + 7, // 7: DBIntegralBoss.LineEntry.value:type_name -> LineData + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_integral_integral_db_proto_init() } @@ -404,7 +421,7 @@ func file_integral_integral_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integral_integral_db_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/integral_msg.pb.go b/pb/integral_msg.pb.go index 5f79f441e..d2838b299 100644 --- a/pb/integral_msg.pb.go +++ b/pb/integral_msg.pb.go @@ -549,6 +549,109 @@ func (x *IntegralRankListResp) GetFriends() []*DBIntegralRank { return nil } +// 领取成就 +type IntegralGetAchieveReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` // 成就id +} + +func (x *IntegralGetAchieveReq) Reset() { + *x = IntegralGetAchieveReq{} + if protoimpl.UnsafeEnabled { + mi := &file_integral_integral_msg_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntegralGetAchieveReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntegralGetAchieveReq) ProtoMessage() {} + +func (x *IntegralGetAchieveReq) ProtoReflect() protoreflect.Message { + mi := &file_integral_integral_msg_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IntegralGetAchieveReq.ProtoReflect.Descriptor instead. +func (*IntegralGetAchieveReq) Descriptor() ([]byte, []int) { + return file_integral_integral_msg_proto_rawDescGZIP(), []int{10} +} + +func (x *IntegralGetAchieveReq) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +type IntegralGetAchieveResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Achieve map[int32]int32 `protobuf:"bytes,1,rep,name=achieve,proto3" json:"achieve" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 成就奖励 key 成就id + Award []*UserAtno `protobuf:"bytes,2,rep,name=award,proto3" json:"award"` //奖励 +} + +func (x *IntegralGetAchieveResp) Reset() { + *x = IntegralGetAchieveResp{} + if protoimpl.UnsafeEnabled { + mi := &file_integral_integral_msg_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IntegralGetAchieveResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IntegralGetAchieveResp) ProtoMessage() {} + +func (x *IntegralGetAchieveResp) ProtoReflect() protoreflect.Message { + mi := &file_integral_integral_msg_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IntegralGetAchieveResp.ProtoReflect.Descriptor instead. +func (*IntegralGetAchieveResp) Descriptor() ([]byte, []int) { + return file_integral_integral_msg_proto_rawDescGZIP(), []int{11} +} + +func (x *IntegralGetAchieveResp) GetAchieve() map[int32]int32 { + if x != nil { + return x.Achieve + } + return nil +} + +func (x *IntegralGetAchieveResp) GetAward() []*UserAtno { + if x != nil { + return x.Award + } + return nil +} + var File_integral_integral_msg_proto protoreflect.FileDescriptor var file_integral_integral_msg_proto_rawDesc = []byte{ @@ -612,8 +715,22 @@ var file_integral_integral_msg_proto_rawDesc = []byte{ 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x12, 0x29, 0x0a, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x52, 0x61, 0x6e, - 0x6b, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x52, 0x07, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x22, 0x27, 0x0a, 0x15, 0x49, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, + 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xb5, 0x01, 0x0a, 0x16, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, + 0x0a, 0x07, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x24, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x47, 0x65, 0x74, 0x41, 0x63, 0x68, + 0x69, 0x65, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x61, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 0x12, 0x1f, + 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, + 0x3a, 0x0a, 0x0c, 0x41, 0x63, 0x68, 0x69, 0x65, 0x76, 0x65, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -628,7 +745,7 @@ func file_integral_integral_msg_proto_rawDescGZIP() []byte { return file_integral_integral_msg_proto_rawDescData } -var file_integral_integral_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_integral_integral_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_integral_integral_msg_proto_goTypes = []interface{}{ (*IntegralGetListReq)(nil), // 0: IntegralGetListReq (*IntegralGetListResp)(nil), // 1: IntegralGetListResp @@ -640,31 +757,36 @@ var file_integral_integral_msg_proto_goTypes = []interface{}{ (*IntegralGetRewardResp)(nil), // 7: IntegralGetRewardResp (*IntegralRankListReq)(nil), // 8: IntegralRankListReq (*IntegralRankListResp)(nil), // 9: IntegralRankListResp - nil, // 10: IntegralChallengeOverResp.HeroexpEntry - (*DBIntegralBoss)(nil), // 11: DBIntegralBoss - (*BattleFormation)(nil), // 12: BattleFormation - (*BattleInfo)(nil), // 13: BattleInfo - (*BattleReport)(nil), // 14: BattleReport - (*UserAtno)(nil), // 15: UserAtno - (*DBIntegralRank)(nil), // 16: DBIntegralRank + (*IntegralGetAchieveReq)(nil), // 10: IntegralGetAchieveReq + (*IntegralGetAchieveResp)(nil), // 11: IntegralGetAchieveResp + nil, // 12: IntegralChallengeOverResp.HeroexpEntry + nil, // 13: IntegralGetAchieveResp.AchieveEntry + (*DBIntegralBoss)(nil), // 14: DBIntegralBoss + (*BattleFormation)(nil), // 15: BattleFormation + (*BattleInfo)(nil), // 16: BattleInfo + (*BattleReport)(nil), // 17: BattleReport + (*UserAtno)(nil), // 18: UserAtno + (*DBIntegralRank)(nil), // 19: DBIntegralRank } var file_integral_integral_msg_proto_depIdxs = []int32{ - 11, // 0: IntegralGetListResp.data:type_name -> DBIntegralBoss - 12, // 1: IntegralChallengeReq.battle:type_name -> BattleFormation - 13, // 2: IntegralChallengeResp.info:type_name -> BattleInfo - 14, // 3: IntegralChallengeOverReq.report:type_name -> BattleReport - 11, // 4: IntegralChallengeOverResp.data:type_name -> DBIntegralBoss - 15, // 5: IntegralChallengeOverResp.atno:type_name -> UserAtno - 10, // 6: IntegralChallengeOverResp.heroexp:type_name -> IntegralChallengeOverResp.HeroexpEntry - 11, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss - 15, // 8: IntegralGetRewardResp.award:type_name -> UserAtno - 16, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank - 16, // 10: IntegralRankListResp.friends:type_name -> DBIntegralRank - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 14, // 0: IntegralGetListResp.data:type_name -> DBIntegralBoss + 15, // 1: IntegralChallengeReq.battle:type_name -> BattleFormation + 16, // 2: IntegralChallengeResp.info:type_name -> BattleInfo + 17, // 3: IntegralChallengeOverReq.report:type_name -> BattleReport + 14, // 4: IntegralChallengeOverResp.data:type_name -> DBIntegralBoss + 18, // 5: IntegralChallengeOverResp.atno:type_name -> UserAtno + 12, // 6: IntegralChallengeOverResp.heroexp:type_name -> IntegralChallengeOverResp.HeroexpEntry + 14, // 7: IntegralGetRewardResp.data:type_name -> DBIntegralBoss + 18, // 8: IntegralGetRewardResp.award:type_name -> UserAtno + 19, // 9: IntegralRankListResp.ranks:type_name -> DBIntegralRank + 19, // 10: IntegralRankListResp.friends:type_name -> DBIntegralRank + 13, // 11: IntegralGetAchieveResp.achieve:type_name -> IntegralGetAchieveResp.AchieveEntry + 18, // 12: IntegralGetAchieveResp.award:type_name -> UserAtno + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_integral_integral_msg_proto_init() } @@ -796,6 +918,30 @@ func file_integral_integral_msg_proto_init() { return nil } } + file_integral_integral_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntegralGetAchieveReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_integral_integral_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IntegralGetAchieveResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -803,7 +949,7 @@ func file_integral_integral_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_integral_integral_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 14, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.IntegralAchieve.go b/sys/configure/structs/Game.IntegralAchieve.go new file mode 100644 index 000000000..b4788306b --- /dev/null +++ b/sys/configure/structs/Game.IntegralAchieve.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameIntegralAchieve struct { + _dataMap map[int32]*GameIntegralAchieveData + _dataList []*GameIntegralAchieveData +} + +func NewGameIntegralAchieve(_buf []map[string]interface{}) (*GameIntegralAchieve, error) { + _dataList := make([]*GameIntegralAchieveData, 0, len(_buf)) + dataMap := make(map[int32]*GameIntegralAchieveData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameIntegralAchieveData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameIntegralAchieve{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameIntegralAchieve) GetDataMap() map[int32]*GameIntegralAchieveData { + return table._dataMap +} + +func (table *GameIntegralAchieve) GetDataList() []*GameIntegralAchieveData { + return table._dataList +} + +func (table *GameIntegralAchieve) Get(key int32) *GameIntegralAchieveData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.IntegralAchieveData.go b/sys/configure/structs/Game.IntegralAchieveData.go new file mode 100644 index 000000000..7455f3ff4 --- /dev/null +++ b/sys/configure/structs/Game.IntegralAchieveData.go @@ -0,0 +1,56 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameIntegralAchieveData struct { + Id int32 + Type int32 + Des string + Reward []*Gameatn + Taskid int32 +} + +const TypeId_GameIntegralAchieveData = -1383728045 + +func (*GameIntegralAchieveData) GetTypeId() int32 { + return -1383728045 +} + +func (_v *GameIntegralAchieveData)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["des"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Des error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Des, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return } + + _v.Reward = 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.Reward = append(_v.Reward, _list_v_) + } + } + + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskid"].(float64); !_ok_ { err = errors.New("taskid error"); return }; _v.Taskid = int32(_tempNum_) } + return +} + +func DeserializeGameIntegralAchieveData(_buf map[string]interface{}) (*GameIntegralAchieveData, error) { + v := &GameIntegralAchieveData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 509d68329..b0157afa9 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -331,6 +331,7 @@ type Tables struct { IntegralBoss *GameIntegralBoss IntegralReward *GameIntegralReward IntegralCondition *GameIntegralCondition + IntegralAchieve *GameIntegralAchieve IntegralBuff *GameIntegralBuff IntegralTime *GameIntegralTime Restore *GameRestore @@ -352,7 +353,6 @@ type Tables struct { SystemChatText *GameSystemChatText SystemStroyTalk *GameSystemStroyTalk ActiveKing *GameActiveKing - ActiveTask *GameActiveTask } func NewTables(loader JsonLoader) (*Tables, error) { @@ -2280,6 +2280,12 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.IntegralCondition, err = NewGameIntegralCondition(buf) ; err != nil { return nil, err } + if buf, err = loader("game_integralachieve") ; err != nil { + return nil, err + } + if tables.IntegralAchieve, err = NewGameIntegralAchieve(buf) ; err != nil { + return nil, err + } if buf, err = loader("game_integralbuff") ; err != nil { return nil, err } @@ -2406,11 +2412,5 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.ActiveKing, err = NewGameActiveKing(buf) ; err != nil { return nil, err } - if buf, err = loader("game_activetask") ; err != nil { - return nil, err - } - if tables.ActiveTask, err = NewGameActiveTask(buf) ; err != nil { - return nil, err - } return tables, nil }