From 88480dbe18d2895a42423c4fcf25fd02df5250bf Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 8 Nov 2022 15:06:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=85=A8=E5=B1=80=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BC=98=E5=8C=96=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_global.json | 44 ++++- bin/json/game_herostrategy.json | 176 ++++++++++++++++++ modules/academy/api_teaching.go | 2 +- modules/academy/api_teachingreward.go | 2 +- modules/academy/configure.go | 12 +- modules/comp_configure.go | 16 -- modules/equipment/api_wash.go | 7 +- modules/friend/api_cross_getreward.go | 9 +- modules/hero/api_talentreset.go | 11 +- modules/user/api_modifyname.go | 10 +- modules/user/model_sign.go | 7 +- pb/errorcode.pb.go | 67 ++++--- sys/configure/structs/Game.HeroStrategy.go | 42 +++++ .../structs/Game.HeroStrategyData.go | 95 ++++++++++ sys/configure/structs/Game.TeachingTask.go | 42 +++++ .../structs/Game.TeachingTaskData.go | 43 +++++ sys/configure/structs/game.globalData.go | 90 +++++++++ 17 files changed, 582 insertions(+), 93 deletions(-) create mode 100644 bin/json/game_herostrategy.json create mode 100644 sys/configure/structs/Game.HeroStrategy.go create mode 100644 sys/configure/structs/Game.HeroStrategyData.go create mode 100644 sys/configure/structs/Game.TeachingTask.go create mode 100644 sys/configure/structs/Game.TeachingTaskData.go diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 5c6ef1232..f01279723 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -229,6 +229,48 @@ "t": "diamond", "n": 500 }, - "horoscope_reset_cd": 86400 + "horoscope_reset_cd": 86400, + "hero_reset": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } + ], + "hero_name": [ + { + "a": "attr", + "t": "gold", + "n": 20 + } + ], + "friend_peize": [ + { + "a": "attr", + "t": "friend", + "n": 100 + } + ], + "equip_wash": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } + ], + "talent_reset": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } + ], + "unified_reward": [ + { + "a": "attr", + "t": "gold", + "n": 20000 + } + ] } ] \ No newline at end of file diff --git a/bin/json/game_herostrategy.json b/bin/json/game_herostrategy.json new file mode 100644 index 000000000..96b31fbcb --- /dev/null +++ b/bin/json/game_herostrategy.json @@ -0,0 +1,176 @@ +[ + { + "heroid": "13001", + "task": [ + 1, + 2, + 11 + ], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "13002", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "13003", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "13004", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "13005", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "14001", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "14002", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "14003", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "14004", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + }, + { + "heroid": "14005", + "task": [], + "us_FormatList": [ + 101091 + ], + "FormatList": [ + 101091 + ], + "award": [ + { + "a": "attr", + "t": "gold", + "n": 1650 + } + ] + } +] \ No newline at end of file diff --git a/modules/academy/api_teaching.go b/modules/academy/api_teaching.go index 10f2592ea..d3aca47c1 100644 --- a/modules/academy/api_teaching.go +++ b/modules/academy/api_teaching.go @@ -17,7 +17,7 @@ func (this *apiComp) TeachingCheck(session comm.IUserSession, req *pb.AcademyTea ///挑战 func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeachingReq) (code pb.ErrorCode, data proto.Message) { var ( - level *cfg.GameTeachingData + level *cfg.GameHeroStrategyData record *pb.DBBattleRecord err error cd pb.ErrorCode diff --git a/modules/academy/api_teachingreward.go b/modules/academy/api_teachingreward.go index a74428532..e8f0200bc 100644 --- a/modules/academy/api_teachingreward.go +++ b/modules/academy/api_teachingreward.go @@ -18,7 +18,7 @@ func (this *apiComp) TeachingRewardCheck(session comm.IUserSession, req *pb.Acad func (this *apiComp) TeachingReward(session comm.IUserSession, req *pb.AcademyTeachingReceiveReq) (code pb.ErrorCode, data proto.Message) { var ( iswin bool - level *cfg.GameTeachingData + level *cfg.GameHeroStrategyData info *pb.DBAcademy // group []*cfg.GameTeachingData err error diff --git a/modules/academy/configure.go b/modules/academy/configure.go index 55445062f..ee5d095d9 100644 --- a/modules/academy/configure.go +++ b/modules/academy/configure.go @@ -8,7 +8,8 @@ import ( ) const ( - game_teaching = "game_teaching.json" + game_teaching = "game_teaching.json" + game_herostrategy = "game_herostrategy.json" ) ///背包配置管理组件 @@ -22,6 +23,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp this.MCompConfigure.Init(service, module, comp, options) this.module = module.(*Academy) this.LoadConfigure(game_teaching, cfg.NewGameTeaching) + this.LoadConfigure(game_herostrategy, cfg.NewGameHeroStrategy) return } @@ -35,7 +37,7 @@ func (this *configureComp) getGameTeaching(id int32) (result *cfg.GameTeachingDa this.module.Errorln(err) } else { if result, ok = v.(*cfg.GameTeaching).GetDataMap()[id]; !ok { - err = fmt.Errorf("on found GameMonster:%s", id) + err = fmt.Errorf("on found GameMonster:%d", id) this.module.Errorln(err) } } @@ -59,15 +61,15 @@ func (this *configureComp) getGameTeachingByGroup(group int32) (result []*cfg.Ga } //查询英雄 -func (this *configureComp) getGameHeroTeaching(id string) (result *cfg.GameTeachingData, err error) { +func (this *configureComp) getGameHeroTeaching(id string) (result *cfg.GameHeroStrategyData, err error) { var ( v interface{} ok bool ) - if v, err = this.GetConfigure(game_teaching); err != nil { + if v, err = this.GetConfigure(game_herostrategy); err != nil { this.module.Errorln(err) } else { - if result, ok = v.(*cfg.GameTeaching).GetDataMap()[0]; !ok { + if result, ok = v.(*cfg.GameHeroStrategy).GetDataMap()[id]; !ok { err = fmt.Errorf("on found GameMonster:%s", id) this.module.Errorln(err) } diff --git a/modules/comp_configure.go b/modules/comp_configure.go index 8c315ba29..e8c422640 100644 --- a/modules/comp_configure.go +++ b/modules/comp_configure.go @@ -19,7 +19,6 @@ const ( game_playerlv = "game_playerlv.json" //玩家等级 game_facemod = "game_facemod.json" //形象配置表 game_drop = "game_drop.json" //掉落 - game_comatn = "game_comatn.json" //atn配置表 new_hero = "game_hero.json" // 签到 game_signreset = "game_signreset.json" @@ -43,7 +42,6 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com err = this.LoadConfigure(new_hero, cfg.NewGameHero) err = this.LoadConfigure(game_playerlv, cfg.NewGamePlayerlv) err = this.LoadConfigure(game_facemod, cfg.NewGameFacemod) - err = this.LoadConfigure(game_comatn, cfg.NewGameComAtn) err = this.LoadConfigure(game_signreset, cfg.NewGameSignReset) //err = this.LoadConfigure(game_sign, cfg.NewGameSign) @@ -124,20 +122,6 @@ func (this *MCompConfigure) GetGlobalInitConf() (configure *cfg.GameInitial, err return } -func (this *MCompConfigure) GetGlobalAtnConf(key string) *cfg.GameComAtnData { - var ( - configure *cfg.GameComAtn - ok bool - ) - if v, err := this.GetConfigure(game_comatn); err == nil { - if configure, ok = v.(*cfg.GameComAtn); ok { - return configure.Get(key) - } - } - fmt.Errorf("%T no is *cfg.GameComAtnData", key) - return nil -} - // 主角等级经验配置列表 func (this *MCompConfigure) GetPlayerlvConfList() (list []*cfg.GamePlayerlvData) { if v, err := this.GetConfigure(game_playerlv); err != nil { diff --git a/modules/equipment/api_wash.go b/modules/equipment/api_wash.go index b8631a3bd..20456f7a2 100644 --- a/modules/equipment/api_wash.go +++ b/modules/equipment/api_wash.go @@ -25,7 +25,6 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( conf *cfg.GameEquipData attrlibrarys []*cfg.GameEquipAttrlibraryData adverbEntry []*pb.EquipmentAttributeEntry - deplete *cfg.GameComAtnData err error ) if code = this.WashCheck(session, req); code != pb.ErrorCode_Success { @@ -36,11 +35,7 @@ func (this *apiComp) Wash(session comm.IUserSession, req *pb.EquipmentWashReq) ( code = pb.ErrorCode_SystemError return } - if deplete = this.module.configure.GetGlobalAtnConf("equip_wash"); deplete == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - if code = this.module.ConsumeRes(session, deplete.Var, true); code != pb.ErrorCode_Success { + if code = this.module.ConsumeRes(session, this.module.configure.GetGlobalConf().EquipWash, true); code != pb.ErrorCode_Success { return } if conf, err = this.module.configure.GetEquipmentConfigureById(equip.CId); err != nil { diff --git a/modules/friend/api_cross_getreward.go b/modules/friend/api_cross_getreward.go index 7b5e0ab8d..d3d97af05 100644 --- a/modules/friend/api_cross_getreward.go +++ b/modules/friend/api_cross_getreward.go @@ -25,13 +25,6 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar return } - //发送友情点 - globalCnf := this.moduleFriend.configure.GetGlobalAtnConf("friend_peize") - if globalCnf == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - received := 2 //已领 update := map[string]interface{}{ "received": received, @@ -42,7 +35,7 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar return } - code = this.moduleFriend.DispenseRes(session, globalCnf.Var, true) + code = this.moduleFriend.DispenseRes(session, this.moduleFriend.configure.GetGlobalConf().FriendPeize, true) rsp := &pb.FriendGetrewardResp{Received: int32(received)} diff --git a/modules/hero/api_talentreset.go b/modules/hero/api_talentreset.go index ef7469a08..2d716ddf0 100644 --- a/modules/hero/api_talentreset.go +++ b/modules/hero/api_talentreset.go @@ -36,17 +36,8 @@ func (this *apiComp) TalentReset(session comm.IUserSession, req *pb.HeroTalentRe chanegCard = make([]*pb.DBHero, 0) - globalCnf := this.module.configure.GetGlobalAtnConf("talent_reset") // 获取重置消耗 - if globalCnf == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - // 检查消耗够不够 - if code = this.module.CheckRes(session, globalCnf.Var); code != pb.ErrorCode_Success { - return - } - if code = this.module.ConsumeRes(session, globalCnf.Var, true); code != pb.ErrorCode_Success { + if code = this.module.ConsumeRes(session, this.module.configure.GetGlobalConf().TalentReset, true); code != pb.ErrorCode_Success { return } diff --git a/modules/user/api_modifyname.go b/modules/user/api_modifyname.go index 4906b769a..f02603578 100644 --- a/modules/user/api_modifyname.go +++ b/modules/user/api_modifyname.go @@ -33,19 +33,13 @@ func (this *apiComp) Modifyname(session comm.IUserSession, req *pb.UserModifynam return } - globalCnf := this.module.configure.GetGlobalAtnConf("hero_name") - if globalCnf == nil { - code = pb.ErrorCode_ConfigNoFound - return - } - //校验名称修改次数 if expand.ModifynameCount <= 0 { - code = this.module.ConsumeRes(session, globalCnf.Var, true) + code = this.module.ConsumeRes(session, this.module.configure.GetGlobalConf().HeroName, true) if code != pb.ErrorCode_Success { return } - this.module.Infof("修改昵称 uid:%v 消耗:%v code:%v", session.GetUserId(), globalCnf.Var, code) + this.module.Infof("修改昵称 uid:%v 消耗:%v code:%v", session.GetUserId(), this.module.configure.GetGlobalConf().HeroName, code) } //修改名称次数 diff --git a/modules/user/model_sign.go b/modules/user/model_sign.go index 2dcdfa933..b58e5373b 100644 --- a/modules/user/model_sign.go +++ b/modules/user/model_sign.go @@ -120,13 +120,8 @@ func (this *ModelSign) checkResetSignData(session comm.IUserSession) (code pb.Er this.module.DispenseRes(session, _data.Loopgift, true) } } else { - globalCnf := this.module.configure.GetGlobalAtnConf("unified_reward") // 获取重置消耗 - if globalCnf == nil { - code = pb.ErrorCode_ConfigNoFound - return - } if bReward { - this.module.DispenseRes(session, globalCnf.Var, true) // 发放通用奖励 + this.module.DispenseRes(session, this.module.configure.GetGlobalConf().UnifiedReward, true) // 发放通用奖励 } } session.SendMsg(string(this.module.GetType()), "sign", &pb.UserSignResp{ diff --git a/pb/errorcode.pb.go b/pb/errorcode.pb.go index 041dd3702..4b5c2576e 100644 --- a/pb/errorcode.pb.go +++ b/pb/errorcode.pb.go @@ -232,6 +232,7 @@ const ( ErrorCode_SociatyAcitvityReceive ErrorCode = 30030 //活跃度领取失败 ErrorCode_SociatyDismissed ErrorCode = 30031 //公会已解散 ErrorCode_SociatyNameExist ErrorCode = 30032 //公会名存在 + ErrorCode_SociatyQuitNoAllowed ErrorCode = 30033 //会长不允许退公会 // arena ErrorCode_ArenaTicketBuyUp ErrorCode = 3101 //票据上限 ErrorCode_ArenaTicketNotEnough ErrorCode = 3102 //票据不足 @@ -453,6 +454,7 @@ var ( 30030: "SociatyAcitvityReceive", 30031: "SociatyDismissed", 30032: "SociatyNameExist", + 30033: "SociatyQuitNoAllowed", 3101: "ArenaTicketBuyUp", 3102: "ArenaTicketNotEnough", 3103: "ArenaTicketNpcInCd", @@ -664,6 +666,7 @@ var ( "SociatyAcitvityReceive": 30030, "SociatyDismissed": 30031, "SociatyNameExist": 30032, + "SociatyQuitNoAllowed": 30033, "ArenaTicketBuyUp": 3101, "ArenaTicketNotEnough": 3102, "ArenaTicketNpcInCd": 3103, @@ -717,7 +720,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, 0x87, 0x25, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x6f, 0x2a, 0xa3, 0x25, 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, 0x11, 0x0a, 0x0d, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, @@ -985,36 +988,38 @@ var file_errorcode_proto_rawDesc = []byte{ 0x10, 0xce, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x44, 0x69, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x65, 0x64, 0x10, 0xcf, 0xea, 0x01, 0x12, 0x16, 0x0a, 0x10, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x45, 0x78, 0x69, 0x73, 0x74, - 0x10, 0xd0, 0xea, 0x01, 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, - 0x6b, 0x65, 0x74, 0x42, 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, - 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, - 0x75, 0x67, 0x68, 0x10, 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, - 0x16, 0x0a, 0x11, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, - 0x65, 0x61, 0x72, 0x6e, 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, - 0x74, 0x45, 0x72, 0x72, 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, - 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, - 0x6f, 0x72, 0x65, 0x10, 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, - 0x0b, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, - 0x11, 0x0a, 0x0c, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, - 0xe6, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, - 0x6c, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, - 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, - 0xe8, 0x19, 0x12, 0x18, 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x65, 0x64, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12, 0x19, 0x0a, 0x14, - 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, - 0x65, 0x64, 0x4f, 0x6e, 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, - 0xca, 0x1a, 0x12, 0x16, 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4e, - 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, - 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, - 0x10, 0xae, 0x1b, 0x12, 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, - 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47, 0x72, 0x6f, - 0x77, 0x74, 0x61, 0x73, 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, - 0x92, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, - 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x42, 0x06, 0x5a, 0x04, 0x2e, - 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0xd0, 0xea, 0x01, 0x12, 0x1a, 0x0a, 0x14, 0x53, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x79, 0x51, + 0x75, 0x69, 0x74, 0x4e, 0x6f, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0xd1, 0xea, 0x01, + 0x12, 0x15, 0x0a, 0x10, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, + 0x75, 0x79, 0x55, 0x70, 0x10, 0x9d, 0x18, 0x12, 0x19, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, + 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x45, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, + 0x9e, 0x18, 0x12, 0x17, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x54, 0x69, 0x63, 0x6b, 0x65, + 0x74, 0x4e, 0x70, 0x63, 0x49, 0x6e, 0x43, 0x64, 0x10, 0x9f, 0x18, 0x12, 0x16, 0x0a, 0x11, 0x54, + 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, + 0x10, 0x81, 0x19, 0x12, 0x12, 0x0a, 0x0d, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x45, 0x72, 0x72, + 0x44, 0x61, 0x74, 0x61, 0x10, 0x82, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x6c, 0x65, 0x6e, + 0x74, 0x55, 0x6e, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x72, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x10, + 0x83, 0x19, 0x12, 0x15, 0x0a, 0x10, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x10, 0x84, 0x19, 0x12, 0x10, 0x0a, 0x0b, 0x54, 0x72, 0x6f, + 0x6c, 0x6c, 0x42, 0x75, 0x79, 0x4d, 0x61, 0x78, 0x10, 0xe5, 0x19, 0x12, 0x11, 0x0a, 0x0c, 0x54, + 0x72, 0x6f, 0x6c, 0x6c, 0x53, 0x65, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x10, 0xe6, 0x19, 0x12, 0x16, + 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x6c, 0x6c, 0x43, 0x6f, + 0x75, 0x6e, 0x74, 0x10, 0xe7, 0x19, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x4d, + 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x10, 0xe8, 0x19, 0x12, 0x18, + 0x0a, 0x13, 0x54, 0x72, 0x6f, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, + 0x65, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe9, 0x19, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x4e, 0x6f, 0x74, 0x54, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x4f, 0x6e, + 0x10, 0xc9, 0x1a, 0x12, 0x19, 0x0a, 0x14, 0x48, 0x6f, 0x72, 0x6f, 0x73, 0x63, 0x6f, 0x70, 0x65, + 0x52, 0x65, 0x73, 0x74, 0x43, 0x44, 0x4e, 0x6f, 0x45, 0x6e, 0x64, 0x10, 0xca, 0x1a, 0x12, 0x16, + 0x0a, 0x11, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, 0x65, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x46, 0x6f, + 0x75, 0x6e, 0x64, 0x10, 0xad, 0x1b, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x69, 0x6c, + 0x65, 0x67, 0x65, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x10, 0xae, 0x1b, 0x12, + 0x14, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x76, 0x65, 0x10, 0x91, 0x1c, 0x12, 0x17, 0x0a, 0x12, 0x47, 0x72, 0x6f, 0x77, 0x74, 0x61, 0x73, + 0x6b, 0x41, 0x64, 0x76, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0x92, 0x1c, 0x12, 0x17, + 0x0a, 0x12, 0x50, 0x61, 0x79, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x4e, 0x6f, 0x74, 0x45, 0x6e, + 0x6f, 0x75, 0x67, 0x68, 0x10, 0xf5, 0x1c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/sys/configure/structs/Game.HeroStrategy.go b/sys/configure/structs/Game.HeroStrategy.go new file mode 100644 index 000000000..79e6fc25b --- /dev/null +++ b/sys/configure/structs/Game.HeroStrategy.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 GameHeroStrategy struct { + _dataMap map[string]*GameHeroStrategyData + _dataList []*GameHeroStrategyData +} + +func NewGameHeroStrategy(_buf []map[string]interface{}) (*GameHeroStrategy, error) { + _dataList := make([]*GameHeroStrategyData, 0, len(_buf)) + dataMap := make(map[string]*GameHeroStrategyData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameHeroStrategyData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Heroid] = _v + } + } + return &GameHeroStrategy{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameHeroStrategy) GetDataMap() map[string]*GameHeroStrategyData { + return table._dataMap +} + +func (table *GameHeroStrategy) GetDataList() []*GameHeroStrategyData { + return table._dataList +} + +func (table *GameHeroStrategy) Get(key string) *GameHeroStrategyData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.HeroStrategyData.go b/sys/configure/structs/Game.HeroStrategyData.go new file mode 100644 index 000000000..e1ac07bdb --- /dev/null +++ b/sys/configure/structs/Game.HeroStrategyData.go @@ -0,0 +1,95 @@ +//------------------------------------------------------------------------------ +// +// 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 GameHeroStrategyData struct { + Heroid string + Task []int32 + UsFormatList []int32 + FormatList []int32 + Award []*Gameatn +} + +const TypeId_GameHeroStrategyData = 1489985875 + +func (*GameHeroStrategyData) GetTypeId() int32 { + return 1489985875 +} + +func (_v *GameHeroStrategyData)Deserialize(_buf map[string]interface{}) (err error) { + { var _ok_ bool; if _v.Heroid, _ok_ = _buf["heroid"].(string); !_ok_ { err = errors.New("heroid error"); return } } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["task"].([]interface{}); !_ok_ { err = errors.New("task error"); return } + + _v.Task = 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.Task = append(_v.Task, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["us_FormatList"].([]interface{}); !_ok_ { err = errors.New("us_FormatList error"); return } + + _v.UsFormatList = 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.UsFormatList = append(_v.UsFormatList, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return } + + _v.FormatList = 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.FormatList = append(_v.FormatList, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["award"].([]interface{}); !_ok_ { err = errors.New("award error"); return } + + _v.Award = 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.Award = append(_v.Award, _list_v_) + } + } + + return +} + +func DeserializeGameHeroStrategyData(_buf map[string]interface{}) (*GameHeroStrategyData, error) { + v := &GameHeroStrategyData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.TeachingTask.go b/sys/configure/structs/Game.TeachingTask.go new file mode 100644 index 000000000..409e1ebd1 --- /dev/null +++ b/sys/configure/structs/Game.TeachingTask.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 GameTeachingTask struct { + _dataMap map[int32]*GameTeachingTaskData + _dataList []*GameTeachingTaskData +} + +func NewGameTeachingTask(_buf []map[string]interface{}) (*GameTeachingTask, error) { + _dataList := make([]*GameTeachingTaskData, 0, len(_buf)) + dataMap := make(map[int32]*GameTeachingTaskData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameTeachingTaskData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Task] = _v + } + } + return &GameTeachingTask{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameTeachingTask) GetDataMap() map[int32]*GameTeachingTaskData { + return table._dataMap +} + +func (table *GameTeachingTask) GetDataList() []*GameTeachingTaskData { + return table._dataList +} + +func (table *GameTeachingTask) Get(key int32) *GameTeachingTaskData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.TeachingTaskData.go b/sys/configure/structs/Game.TeachingTaskData.go new file mode 100644 index 000000000..644c0df91 --- /dev/null +++ b/sys/configure/structs/Game.TeachingTaskData.go @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// +// 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 GameTeachingTaskData struct { + Task int32 + Type int32 + Value1 string + Value2 int32 + Desc string +} + +const TypeId_GameTeachingTaskData = -437181512 + +func (*GameTeachingTaskData) GetTypeId() int32 { + return -437181512 +} + +func (_v *GameTeachingTaskData)Deserialize(_buf map[string]interface{}) (err error) { + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task"].(float64); !_ok_ { err = errors.New("task error"); return }; _v.Task = 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; if _v.Value1, _ok_ = _buf["value1"].(string); !_ok_ { err = errors.New("value1 error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["value2"].(float64); !_ok_ { err = errors.New("value2 error"); return }; _v.Value2 = int32(_tempNum_) } + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + return +} + +func DeserializeGameTeachingTaskData(_buf map[string]interface{}) (*GameTeachingTaskData, error) { + v := &GameTeachingTaskData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index e8619ff72..f74416b8b 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -116,6 +116,12 @@ type GameGlobalData struct { ShowFemale []int32 HoroscopeResetCost *Gameatn HoroscopeResetCd int32 + HeroReset []*Gameatn + HeroName []*Gameatn + FriendPeize []*Gameatn + EquipWash []*Gameatn + TalentReset []*Gameatn + UnifiedReward []*Gameatn } const TypeId_GameGlobalData = 477542761 @@ -399,6 +405,90 @@ 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_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["hero_reset"].([]interface{}); !_ok_ { err = errors.New("hero_reset error"); return } + + _v.HeroReset = 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.HeroReset = append(_v.HeroReset, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["hero_name"].([]interface{}); !_ok_ { err = errors.New("hero_name error"); return } + + _v.HeroName = 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.HeroName = append(_v.HeroName, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["friend_peize"].([]interface{}); !_ok_ { err = errors.New("friend_peize error"); return } + + _v.FriendPeize = 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.FriendPeize = append(_v.FriendPeize, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["equip_wash"].([]interface{}); !_ok_ { err = errors.New("equip_wash error"); return } + + _v.EquipWash = 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.EquipWash = append(_v.EquipWash, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["talent_reset"].([]interface{}); !_ok_ { err = errors.New("talent_reset error"); return } + + _v.TalentReset = 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.TalentReset = append(_v.TalentReset, _list_v_) + } + } + + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["unified_reward"].([]interface{}); !_ok_ { err = errors.New("unified_reward error"); return } + + _v.UnifiedReward = 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.UnifiedReward = append(_v.UnifiedReward, _list_v_) + } + } + return }