Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-07-18 16:13:49 +08:00
commit 93df38efd2
25 changed files with 850 additions and 286158 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -27,12 +27,13 @@ func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.Hero
func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStrengthenUplvReq) (code pb.ErrorCode, data proto.Message) {
var (
curLv int32
curExp int32 // 当前英雄的经验
addExp int32 // 需要增加的经验
costGold int32 // 需要消耗的资源
_hero *pb.DBHero // 目标英雄
_expHero *pb.DBHero // 消耗英雄
curLv int32
curExp int32 // 当前英雄的经验
addExp int32 // 需要增加的经验
costGold int32 // 需要消耗的资源
_hero *pb.DBHero // 目标英雄
_expHero *pb.DBHero // 消耗英雄
minAddExp int32
)
code = this.StrengthenUplvCheck(session, req) // check
@ -72,6 +73,11 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
code = pb.ErrorCode_HeroNoEnough
return
}
if minAddExp == 0 {
minAddExp = expConf.Heroexp //初始化
} else if minAddExp > expConf.Heroexp {
minAddExp = expConf.Heroexp // 取出最小的经验卡
}
}
if addExp == 0 {
code = pb.ErrorCode_HeroExpTypeErr
@ -101,7 +107,10 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
// 超过的经验值
leftExp := curExp - _data.Heroexp[0].N
this.module.Debugf("经验溢出%d", leftExp)
if leftExp >= minAddExp {
code = pb.ErrorCode_HeroAddMaxExp
return
}
curLv = maxLv
curExp = _data.Heroexp[0].N
break

View File

@ -6,20 +6,20 @@ import (
)
const (
StoryGetListResp = "getlist"
StoryChallengeResp = "challenge"
MainlineGetListResp = "getlist"
MainlineChallengeResp = "challenge"
)
type apiComp struct {
modules.MCompGate
service core.IService
module *Story
module *Mainline
}
//组件初始化接口
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompGate.Init(service, module, comp, options)
this.module = module.(*Story)
this.module = module.(*Mainline)
this.service = service
return
}

View File

@ -11,8 +11,8 @@ import (
)
//参数校验
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.StoryChallengeReq) (code pb.ErrorCode) {
if req.ChapterId == 0 || req.StoryId == 0 {
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
if req.ChapterId == 0 || req.MainlineId == 0 {
code = pb.ErrorCode_ReqParameterError
return
}
@ -20,17 +20,17 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.StoryChal
}
///挑战主线关卡
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.StoryChallengeReq) (code pb.ErrorCode, data proto.Message) {
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
var (
curChapter *pb.DBStory // 当前章节信息
bBranch bool // 当前挑战关卡是不是分支
curChapter *pb.DBMainline // 当前章节信息
bBranch bool // 当前挑战关卡是不是分支
)
bBranch = false
code = this.ChallengeCheck(session, req)
if code != pb.ErrorCode_Success {
return // 参数校验失败直接返回
}
list, err := this.module.modelStory.getStoryList(session.GetUserId())
list, err := this.module.modelMainline.getMainlineList(session.GetUserId())
if err != nil && err != redis.RedisNil {
code = pb.ErrorCode_DBError
return
@ -43,13 +43,13 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.StoryChallenge
}
// 先校验是不是分支
chaptConfig := this.module.configure.GetStoryChapter(int32(req.ChapterId)) // 根据配置文件找
chaptConfig := this.module.configure.GetMainlineChapter(int32(req.ChapterId)) // 根据配置文件找
if chaptConfig == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if curChapter == nil {
if len(chaptConfig.Fubendata) <= 0 {
if len(chaptConfig.Episode) <= 0 {
code = pb.ErrorCode_ConfigNoFound
return
}
@ -57,51 +57,51 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.StoryChallenge
code = pb.ErrorCode_ReqParameterError
return
}
_data := &pb.DBStory{}
_data := &pb.DBMainline{}
_data.Id = primitive.NewObjectID().Hex()
_data.ChapterId = int32(req.ChapterId)
_mData := make(map[string]interface{}, 0)
_data.Uid = session.GetUserId()
_mData[_data.Id] = _data
this.module.modelStory.addNewChapter(session.GetUserId(), _mData)
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
curChapter = _data
//curChapter.StoryId = chaptConfig.Fubendata[0] // 第一次挑战
//curChapter.MainlineId = chaptConfig.Fubendata[0] // 第一次挑战
}
// 根据难度找对应的配置文件
if chaptConfig.Intensity == "1" { // 这里按临时配置读取 后面会修改
con := this.module.configure.GetStoryEasyChapter(int32(req.StoryId)) // 根据配置文件找
con := this.module.configure.GetMainlineEasyChapter(int32(req.MainlineId)) // 根据配置文件找
if con == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if con.Area == 2 { //分支
if con.Route == 2 { //分支
bBranch = true
// 只需要校验小关ID 是不是大于当前ID就可以
if curChapter.StoryId < int32(req.StoryId) { //必须大于前置关卡才可以挑战
code = pb.ErrorCode_StoryIDFailed
if curChapter.MainlineId < int32(req.MainlineId) { //必须大于前置关卡才可以挑战
code = pb.ErrorCode_MainlineIDFailed
return
}
}
}
// TODO 调用战斗逻辑
// 挑战成功
curChapter.StoryId += 1 // 临时数据 后面配置表完善查找
curChapter.MainlineId += 1 // 临时数据 后面配置表完善查找
if bBranch {
curChapter.BranchID = append(curChapter.BranchID, int32(req.ChapterId)) // 记录分支关卡
}
if curChapter.ChapterId == int32(req.ChapterId) && curChapter.StoryId == int32(req.StoryId) {
if curChapter.ChapterId == int32(req.ChapterId) && curChapter.MainlineId == int32(req.MainlineId) {
update := map[string]interface{}{
"storyId": req.StoryId,
"storyId": req.MainlineId,
"ChapterId": req.ChapterId,
"branchID": curChapter.BranchID,
}
err = this.module.modelStory.modifyStoryData(session.GetUserId(), curChapter.Id, update)
err = this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
} else {
code = pb.ErrorCode_ReqParameterError
return
}
// 发奖 (奖励数据还没配置,后续补充)
session.SendMsg(string(this.module.GetType()), StoryChallengeResp, &pb.StoryChallengeResp{Data: curChapter})
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{Data: curChapter})
return
}

View File

@ -9,10 +9,10 @@ import (
)
const (
game_storychapter = "game_storychapter.json"
game_storyeasy = "game_storyeasy.json"
game_storyhard = "game_storyhard.json"
game_storypurgatory = "game_storypurgatory.json"
game_mainlinechapter = "game_mainlinechapter.json"
game_mainlineeasy = "game_mainlineeasy.json"
game_mainlinehard = "game_mainlinehard.json"
game_mainlinepurgatory = "game_mainlinepurgatory.json"
)
///配置管理基础组件
@ -24,10 +24,10 @@ type configureComp struct {
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options)
err = this.LoadMultiConfigure(map[string]interface{}{
game_storychapter: cfg.NewGame_storyChapter,
game_storyeasy: cfg.NewGame_storyEasy,
game_storyhard: cfg.NewGame_storyHard,
game_storypurgatory: cfg.NewGame_storyPurgatory,
game_mainlinechapter: cfg.NewGame_mainlineChapter,
game_mainlineeasy: cfg.NewGame_mainlineEasy,
game_mainlinehard: cfg.NewGame_mainlineHard,
game_mainlinepurgatory: cfg.NewGame_mainlinePurgatory,
})
return
@ -50,17 +50,17 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
return configure.GetConfigure(name)
}
func (this *configureComp) GetStoryChapter(id int32) (data *cfg.Game_storyChapterData) {
if v, err := this.GetConfigure(game_storychapter); err != nil {
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.Game_mainlineChapterData) {
if v, err := this.GetConfigure(game_mainlinechapter); err != nil {
log.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.Game_storyChapter
configure *cfg.Game_mainlineChapter
ok bool
)
if configure, ok = v.(*cfg.Game_storyChapter); !ok {
log.Errorf("%T no is *cfg.Game_storyChapterData", v)
if configure, ok = v.(*cfg.Game_mainlineChapter); !ok {
log.Errorf("%T no is *cfg.Game_mainlineChapterData", v)
return
}
@ -72,17 +72,17 @@ func (this *configureComp) GetStoryChapter(id int32) (data *cfg.Game_storyChapte
}
// 获取简单的关卡配置信息
func (this *configureComp) GetStoryEasyChapter(id int32) (data *cfg.Game_storyEasyData) {
if v, err := this.GetConfigure(game_storyeasy); err != nil {
func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.Game_mainlineEasyData) {
if v, err := this.GetConfigure(game_mainlineeasy); err != nil {
log.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.Game_storyEasy
configure *cfg.Game_mainlineEasy
ok bool
)
if configure, ok = v.(*cfg.Game_storyEasy); !ok {
log.Errorf("%T no is *cfg.Game_storyEasyData", v)
if configure, ok = v.(*cfg.Game_mainlineEasy); !ok {
log.Errorf("%T no is *cfg.Game_mainlineEasyData", v)
return
}
@ -94,17 +94,17 @@ func (this *configureComp) GetStoryEasyChapter(id int32) (data *cfg.Game_storyEa
}
// 获取炼狱级别难度的关卡配置
func (this *configureComp) GetStoryPurgatoryChapter(id int32) (data *cfg.Game_storyPurgatoryData) {
if v, err := this.GetConfigure(game_storypurgatory); err != nil {
func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.Game_mainlinePurgatoryData) {
if v, err := this.GetConfigure(game_mainlinepurgatory); err != nil {
log.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.Game_storyPurgatory
configure *cfg.Game_mainlinePurgatory
ok bool
)
if configure, ok = v.(*cfg.Game_storyPurgatory); !ok {
log.Errorf("%T no is *cfg.Game_storyPurgatoryData", v)
if configure, ok = v.(*cfg.Game_mainlinePurgatory); !ok {
log.Errorf("%T no is *cfg.Game_mainlinePurgatoryData", v)
return
}
@ -116,17 +116,17 @@ func (this *configureComp) GetStoryPurgatoryChapter(id int32) (data *cfg.Game_st
}
// 获取困难的关卡配置
func (this *configureComp) GetStoryHardChapter(id int32) (data *cfg.Game_storyHardData) {
if v, err := this.GetConfigure(game_storyhard); err != nil {
func (this *configureComp) GetMainlineHardChapter(id int32) (data *cfg.Game_mainlineHardData) {
if v, err := this.GetConfigure(game_mainlinehard); err != nil {
log.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.Game_storyHard
configure *cfg.Game_mainlineHard
ok bool
)
if configure, ok = v.(*cfg.Game_storyHard); !ok {
log.Errorf("%T no is *cfg.Game_storyHardData", v)
if configure, ok = v.(*cfg.Game_mainlineHard); !ok {
log.Errorf("%T no is *cfg.Game_mainlineHardData", v)
return
}

View File

@ -8,37 +8,37 @@ import (
"sort"
)
type Story struct {
type Mainline struct {
modules.ModuleBase
modelStory *ModelStory
api *apiComp
configure *configureComp
modelMainline *ModelMainline
api *apiComp
configure *configureComp
}
func NewModule() core.IModule {
return &Story{}
return &Mainline{}
}
func (this *Story) GetType() core.M_Modules {
return comm.ModuleStory
func (this *Mainline) GetType() core.M_Modules {
return comm.ModuleMainline
}
func (this *Story) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
func (this *Mainline) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options)
return
}
func (this *Story) OnInstallComp() {
func (this *Mainline) OnInstallComp() {
this.ModuleBase.OnInstallComp()
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
this.modelStory = this.RegisterComp(new(ModelStory)).(*ModelStory)
this.modelMainline = this.RegisterComp(new(ModelMainline)).(*ModelMainline)
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
}
// 接口信息 给其他模块调用 用来修改主线关卡信息
func (this *Story) ModifyStoryData(uid string, objId string, data map[string]interface{}) (code pb.ErrorCode) {
err := this.modelStory.modifyStoryData(uid, objId, data)
func (this *Mainline) ModifyMainlineData(uid string, objId string, data map[string]interface{}) (code pb.ErrorCode) {
err := this.modelMainline.modifyMainlineData(uid, objId, data)
if err != nil {
code = pb.ErrorCode_DBError
}
@ -46,11 +46,11 @@ func (this *Story) ModifyStoryData(uid string, objId string, data map[string]int
}
// 校验是否能挑战该关卡
func (this *Story) CheckChallengeChapter(stroyId int32, uid string, zhangjieID int32) (code pb.ErrorCode) {
func (this *Mainline) CheckChallengeChapter(stroyId int32, uid string, zhangjieID int32) (code pb.ErrorCode) {
var (
curChapter *pb.DBStory
curChapter *pb.DBMainline
)
_szData, err := this.modelStory.getStoryList(uid)
_szData, err := this.modelMainline.getMainlineList(uid)
if err != nil {
code = pb.ErrorCode_DBError
return
@ -62,39 +62,39 @@ func (this *Story) CheckChallengeChapter(stroyId int32, uid string, zhangjieID i
// 取出最后一条数据
curChapter = _szData[len(_szData)-1]
if curChapter == nil {
code = pb.ErrorCode_StoryNotFindChapter // 没有找到主线关卡信息
code = pb.ErrorCode_MainlineNotFindChapter // 没有找到主线关卡信息
return
}
// 获取关卡难度用来取配置文件
switch curChapter.Intensity {
case 1:
configData := this.configure.GetStoryEasyChapter(curChapter.StoryId)
configData := this.configure.GetMainlineEasyChapter(curChapter.MainlineId)
if configData != nil { // 校验章节
if configData.Zhangshu != zhangjieID {
if configData.Chapter != zhangjieID {
code = pb.ErrorCode_ConfigNoFound
return
}
// 如果这一关是路线二的话
if configData.Area == 2 && curChapter.ChapterId > stroyId { // 当前的关卡ID 大于路线2的ID 即可
if configData.Route == 2 && curChapter.ChapterId > stroyId { // 当前的关卡ID 大于路线2的ID 即可
return
}
// 判断下一关是不是当前传入的值
if configData.Nextid != stroyId {
code = pb.ErrorCode_StoryIDFailed
if configData.Previoustage != stroyId {
code = pb.ErrorCode_MainlineIDFailed
return
}
}
break
case 2:
configData := this.configure.GetStoryHardChapter(curChapter.StoryId)
configData := this.configure.GetMainlineHardChapter(curChapter.MainlineId)
if configData != nil { // 校验章节
if configData.Zhangshu != zhangjieID {
if configData.Chapter != zhangjieID {
code = pb.ErrorCode_ConfigNoFound
return
}
// 判断下一关是不是当前传入的值
if configData.Nextid != stroyId {
code = pb.ErrorCode_StoryIDFailed
if configData.Previoustage != stroyId {
code = pb.ErrorCode_MainlineIDFailed
return
}
}

2
pb.bat
View File

@ -16,6 +16,6 @@ protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\mail\*.pro
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\equipment\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\hero\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\shop\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\story\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\mainline\*.proto
protoc --proto_path=%SRC% --go_out=%TAR% --go_opt=paths=import %SRC%\task\*.proto
pause

View File

@ -88,6 +88,7 @@ const (
ErrorCode_HeroStarErr ErrorCode = 1316 // 不满足升星条件
ErrorCode_HeroTypeErr ErrorCode = 1317 // 升级英雄类型不对
ErrorCode_HeroExpTypeErr ErrorCode = 1318 // 技能升级卡类型不对
ErrorCode_HeroAddMaxExp ErrorCode = 1319 // 升级经验卡溢出 检查传入的数量
// equipment
ErrorCode_EquipmentOnFoundEquipment ErrorCode = 1400 // 未找到武器
ErrorCode_EquipmentLvlimitReached ErrorCode = 1401 // 武器等级已达上限
@ -169,6 +170,7 @@ var (
1316: "HeroStarErr",
1317: "HeroTypeErr",
1318: "HeroExpTypeErr",
1319: "HeroAddMaxExp",
1400: "EquipmentOnFoundEquipment",
1401: "EquipmentLvlimitReached",
1500: "StoryNotFindChapter",
@ -244,6 +246,7 @@ var (
"HeroStarErr": 1316,
"HeroTypeErr": 1317,
"HeroExpTypeErr": 1318,
"HeroAddMaxExp": 1319,
"EquipmentOnFoundEquipment": 1400,
"EquipmentLvlimitReached": 1401,
"StoryNotFindChapter": 1500,
@ -290,7 +293,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, 0xeb, 0x0b, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
0x6f, 0x2a, 0xff, 0x0b, 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,
@ -368,24 +371,26 @@ var file_errorcode_proto_rawDesc = []byte{
0x48, 0x65, 0x72, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x45, 0x72, 0x72, 0x10, 0xa4, 0x0a, 0x12, 0x10,
0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x45, 0x72, 0x72, 0x10, 0xa5, 0x0a,
0x12, 0x13, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x45, 0x78, 0x70, 0x54, 0x79, 0x70, 0x65, 0x45,
0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65,
0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61, 0x63, 0x68, 0x65, 0x64,
0x10, 0xf9, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x74, 0x46,
0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc, 0x0b, 0x12, 0x12, 0x0a,
0x0d, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xdd,
0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc0, 0x0c,
0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65, 0x74, 0x10, 0xc1, 0x0c,
0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, 0xc2,
0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69,
0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73,
0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xc5,
0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e,
0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61,
0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x10, 0xc7, 0x0c, 0x42,
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x72, 0x10, 0xa6, 0x0a, 0x12, 0x12, 0x0a, 0x0d, 0x48, 0x65, 0x72, 0x6f, 0x41, 0x64, 0x64,
0x4d, 0x61, 0x78, 0x45, 0x78, 0x70, 0x10, 0xa7, 0x0a, 0x12, 0x1e, 0x0a, 0x19, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4f, 0x6e, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x10, 0xf8, 0x0a, 0x12, 0x1c, 0x0a, 0x17, 0x45, 0x71, 0x75,
0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x4c, 0x76, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x61,
0x63, 0x68, 0x65, 0x64, 0x10, 0xf9, 0x0a, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x74, 0x6f, 0x72, 0x79,
0x4e, 0x6f, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x10, 0xdc,
0x0b, 0x12, 0x12, 0x0a, 0x0d, 0x53, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x46, 0x61, 0x69, 0x6c,
0x65, 0x64, 0x10, 0xdd, 0x0b, 0x12, 0x0d, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x6e, 0x69,
0x74, 0x10, 0xc0, 0x0c, 0x12, 0x0e, 0x0a, 0x09, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x65,
0x74, 0x10, 0xc1, 0x0c, 0x12, 0x0f, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x48, 0x61, 0x6e, 0x64,
0x6c, 0x65, 0x10, 0xc2, 0x0c, 0x12, 0x11, 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x63,
0x65, 0x69, 0x76, 0x65, 0x64, 0x10, 0xc3, 0x0c, 0x12, 0x13, 0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b,
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x10, 0xc4, 0x0c, 0x12, 0x16, 0x0a,
0x11, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x4e, 0x6f, 0x66, 0x6f, 0x75,
0x6e, 0x64, 0x10, 0xc5, 0x0c, 0x12, 0x17, 0x0a, 0x12, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74,
0x69, 0x76, 0x65, 0x4e, 0x6f, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x10, 0xc6, 0x0c, 0x12, 0x13,
0x0a, 0x0e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64,
0x10, 0xc7, 0x0c, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (

219
pb/mainline_db.pb.go Normal file
View File

@ -0,0 +1,219 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: mainline/mainline_db.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type DBMainline struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
ChapterId int32 `protobuf:"varint,3,opt,name=chapterId,proto3" json:"chapterId" bson:"chapterId"` //章节ID
StoryId int32 `protobuf:"varint,4,opt,name=storyId,proto3" json:"storyId" bson:"storyId"` //主线关卡ID
Intensity int32 `protobuf:"varint,5,opt,name=intensity,proto3" json:"intensity" bson:"intensity"` //难度类型
AwaredID int32 `protobuf:"varint,6,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //领奖ID
Progress int32 `protobuf:"varint,7,opt,name=progress,proto3" json:"progress" bson:"progress"` // 通关进度(打了多少主关卡)
TotalBox int32 `protobuf:"varint,8,opt,name=totalBox,proto3" json:"totalBox" bson:"totalBox"` // 总关卡数量
BranchID []int32 `protobuf:"varint,9,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况
}
func (x *DBMainline) Reset() {
*x = DBMainline{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DBMainline) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DBMainline) ProtoMessage() {}
func (x *DBMainline) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_db_proto_msgTypes[0]
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 DBMainline.ProtoReflect.Descriptor instead.
func (*DBMainline) Descriptor() ([]byte, []int) {
return file_mainline_mainline_db_proto_rawDescGZIP(), []int{0}
}
func (x *DBMainline) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *DBMainline) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *DBMainline) GetChapterId() int32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *DBMainline) GetStoryId() int32 {
if x != nil {
return x.StoryId
}
return 0
}
func (x *DBMainline) GetIntensity() int32 {
if x != nil {
return x.Intensity
}
return 0
}
func (x *DBMainline) GetAwaredID() int32 {
if x != nil {
return x.AwaredID
}
return 0
}
func (x *DBMainline) GetProgress() int32 {
if x != nil {
return x.Progress
}
return 0
}
func (x *DBMainline) GetTotalBox() int32 {
if x != nil {
return x.TotalBox
}
return 0
}
func (x *DBMainline) GetBranchID() []int32 {
if x != nil {
return x.BranchID
}
return nil
}
var File_mainline_mainline_db_proto protoreflect.FileDescriptor
var file_mainline_mainline_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x01, 0x0a,
0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75,
0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73,
0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x74,
0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69,
0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73,
0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18,
0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x74,
0x6f, 0x74, 0x61, 0x6c, 0x42, 0x6f, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x49, 0x44, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x49, 0x44, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_mainline_mainline_db_proto_rawDescOnce sync.Once
file_mainline_mainline_db_proto_rawDescData = file_mainline_mainline_db_proto_rawDesc
)
func file_mainline_mainline_db_proto_rawDescGZIP() []byte {
file_mainline_mainline_db_proto_rawDescOnce.Do(func() {
file_mainline_mainline_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_mainline_mainline_db_proto_rawDescData)
})
return file_mainline_mainline_db_proto_rawDescData
}
var file_mainline_mainline_db_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_mainline_mainline_db_proto_goTypes = []interface{}{
(*DBMainline)(nil), // 0: DBMainline
}
var file_mainline_mainline_db_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_mainline_mainline_db_proto_init() }
func file_mainline_mainline_db_proto_init() {
if File_mainline_mainline_db_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_mainline_mainline_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBMainline); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mainline_mainline_db_proto_rawDesc,
NumEnums: 0,
NumMessages: 1,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_mainline_mainline_db_proto_goTypes,
DependencyIndexes: file_mainline_mainline_db_proto_depIdxs,
MessageInfos: file_mainline_mainline_db_proto_msgTypes,
}.Build()
File_mainline_mainline_db_proto = out.File
file_mainline_mainline_db_proto_rawDesc = nil
file_mainline_mainline_db_proto_goTypes = nil
file_mainline_mainline_db_proto_depIdxs = nil
}

479
pb/mainline_msg.pb.go Normal file
View File

@ -0,0 +1,479 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.20.0
// source: mainline/mainline_msg.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// 查询关卡进度
type MainlineGetListReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *MainlineGetListReq) Reset() {
*x = MainlineGetListReq{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineGetListReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineGetListReq) ProtoMessage() {}
func (x *MainlineGetListReq) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[0]
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 MainlineGetListReq.ProtoReflect.Descriptor instead.
func (*MainlineGetListReq) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{0}
}
// 返回进度信息
type MainlineGetListResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data []*DBMainline `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
}
func (x *MainlineGetListResp) Reset() {
*x = MainlineGetListResp{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineGetListResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineGetListResp) ProtoMessage() {}
func (x *MainlineGetListResp) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[1]
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 MainlineGetListResp.ProtoReflect.Descriptor instead.
func (*MainlineGetListResp) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{1}
}
func (x *MainlineGetListResp) GetData() []*DBMainline {
if x != nil {
return x.Data
}
return nil
}
// 领取关卡宝箱
type MainlineGetRewrdReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
BoxId uint32 `protobuf:"varint,2,opt,name=boxId,proto3" json:"boxId"` // 宝箱ID
}
func (x *MainlineGetRewrdReq) Reset() {
*x = MainlineGetRewrdReq{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineGetRewrdReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineGetRewrdReq) ProtoMessage() {}
func (x *MainlineGetRewrdReq) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[2]
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 MainlineGetRewrdReq.ProtoReflect.Descriptor instead.
func (*MainlineGetRewrdReq) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{2}
}
func (x *MainlineGetRewrdReq) GetChapterId() uint32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *MainlineGetRewrdReq) GetBoxId() uint32 {
if x != nil {
return x.BoxId
}
return 0
}
type MainlineGetRewrdResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
}
func (x *MainlineGetRewrdResp) Reset() {
*x = MainlineGetRewrdResp{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineGetRewrdResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineGetRewrdResp) ProtoMessage() {}
func (x *MainlineGetRewrdResp) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[3]
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 MainlineGetRewrdResp.ProtoReflect.Descriptor instead.
func (*MainlineGetRewrdResp) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{3}
}
func (x *MainlineGetRewrdResp) GetData() *DBMainline {
if x != nil {
return x.Data
}
return nil
}
// 挑战关卡
type MainlineChallengeReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChapterId uint32 `protobuf:"varint,1,opt,name=chapterId,proto3" json:"chapterId"` // 章节ID
StoryId uint32 `protobuf:"varint,2,opt,name=storyId,proto3" json:"storyId"` // 小关ID
}
func (x *MainlineChallengeReq) Reset() {
*x = MainlineChallengeReq{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineChallengeReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineChallengeReq) ProtoMessage() {}
func (x *MainlineChallengeReq) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[4]
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 MainlineChallengeReq.ProtoReflect.Descriptor instead.
func (*MainlineChallengeReq) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{4}
}
func (x *MainlineChallengeReq) GetChapterId() uint32 {
if x != nil {
return x.ChapterId
}
return 0
}
func (x *MainlineChallengeReq) GetStoryId() uint32 {
if x != nil {
return x.StoryId
}
return 0
}
type MainlineChallengeResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Data *DBMainline `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` //当前章节信息
}
func (x *MainlineChallengeResp) Reset() {
*x = MainlineChallengeResp{}
if protoimpl.UnsafeEnabled {
mi := &file_mainline_mainline_msg_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MainlineChallengeResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MainlineChallengeResp) ProtoMessage() {}
func (x *MainlineChallengeResp) ProtoReflect() protoreflect.Message {
mi := &file_mainline_mainline_msg_proto_msgTypes[5]
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 MainlineChallengeResp.ProtoReflect.Descriptor instead.
func (*MainlineChallengeResp) Descriptor() ([]byte, []int) {
return file_mainline_mainline_msg_proto_rawDescGZIP(), []int{5}
}
func (x *MainlineChallengeResp) GetData() *DBMainline {
if x != nil {
return x.Data
}
return nil
}
var File_mainline_mainline_msg_proto protoreflect.FileDescriptor
var file_mainline_mainline_msg_proto_rawDesc = []byte{
0x0a, 0x1b, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x6d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65,
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22,
0x36, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x4c, 0x69,
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e,
0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x49, 0x0a, 0x13, 0x4d, 0x61, 0x69, 0x6e, 0x6c,
0x69, 0x6e, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x1c,
0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05,
0x62, 0x6f, 0x78, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x62, 0x6f, 0x78,
0x49, 0x64, 0x22, 0x37, 0x0a, 0x14, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x47, 0x65,
0x74, 0x52, 0x65, 0x77, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61,
0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69,
0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x4e, 0x0a, 0x14, 0x4d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x52, 0x65, 0x71, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x49,
0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x15, 0x4d,
0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65,
0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_mainline_mainline_msg_proto_rawDescOnce sync.Once
file_mainline_mainline_msg_proto_rawDescData = file_mainline_mainline_msg_proto_rawDesc
)
func file_mainline_mainline_msg_proto_rawDescGZIP() []byte {
file_mainline_mainline_msg_proto_rawDescOnce.Do(func() {
file_mainline_mainline_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_mainline_mainline_msg_proto_rawDescData)
})
return file_mainline_mainline_msg_proto_rawDescData
}
var file_mainline_mainline_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_mainline_mainline_msg_proto_goTypes = []interface{}{
(*MainlineGetListReq)(nil), // 0: MainlineGetListReq
(*MainlineGetListResp)(nil), // 1: MainlineGetListResp
(*MainlineGetRewrdReq)(nil), // 2: MainlineGetRewrdReq
(*MainlineGetRewrdResp)(nil), // 3: MainlineGetRewrdResp
(*MainlineChallengeReq)(nil), // 4: MainlineChallengeReq
(*MainlineChallengeResp)(nil), // 5: MainlineChallengeResp
(*DBMainline)(nil), // 6: DBMainline
}
var file_mainline_mainline_msg_proto_depIdxs = []int32{
6, // 0: MainlineGetListResp.data:type_name -> DBMainline
6, // 1: MainlineGetRewrdResp.data:type_name -> DBMainline
6, // 2: MainlineChallengeResp.data:type_name -> DBMainline
3, // [3:3] is the sub-list for method output_type
3, // [3:3] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_mainline_mainline_msg_proto_init() }
func file_mainline_mainline_msg_proto_init() {
if File_mainline_mainline_msg_proto != nil {
return
}
file_mainline_mainline_db_proto_init()
if !protoimpl.UnsafeEnabled {
file_mainline_mainline_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineGetListReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mainline_mainline_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineGetListResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mainline_mainline_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineGetRewrdReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mainline_mainline_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineGetRewrdResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mainline_mainline_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineChallengeReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mainline_mainline_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MainlineChallengeResp); 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{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mainline_mainline_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_mainline_mainline_msg_proto_goTypes,
DependencyIndexes: file_mainline_mainline_msg_proto_depIdxs,
MessageInfos: file_mainline_mainline_msg_proto_msgTypes,
}.Build()
File_mainline_mainline_msg_proto = out.File
file_mainline_mainline_msg_proto_rawDesc = nil
file_mainline_mainline_msg_proto_goTypes = nil
file_mainline_mainline_msg_proto_depIdxs = nil
}

View File

@ -71,6 +71,7 @@ enum ErrorCode {
HeroStarErr = 1316; //
HeroTypeErr = 1317; //
HeroExpTypeErr = 1318; //
HeroAddMaxExp = 1319; //
// equipment
EquipmentOnFoundEquipment = 1400; //

View File

@ -1,7 +1,7 @@
syntax = "proto3";
option go_package = ".;pb";
message DBStory {
message DBMainline {
string id = 1; //@go_tags(`bson:"_id"`) ID
string uid = 2; //@go_tags(`bson:"uid"`) ID
int32 chapterId = 3; //@go_tags(`bson:"chapterId"`) ID

View File

@ -0,0 +1,32 @@
syntax = "proto3";
option go_package = ".;pb";
import "mainline/mainline_db.proto";
//
message MainlineGetListReq {
}
//
message MainlineGetListResp {
repeated DBMainline data = 1;
}
//
message MainlineGetRewrdReq {
uint32 chapterId = 1; // ID
uint32 boxId = 2; // ID
}
message MainlineGetRewrdResp {
DBMainline data = 1; //
}
//
message MainlineChallengeReq {
uint32 chapterId = 1; // ID
uint32 storyId = 2; // ID
}
message MainlineChallengeResp {
DBMainline data = 1; //
}

View File

@ -1,32 +0,0 @@
syntax = "proto3";
option go_package = ".;pb";
import "story/story_db.proto";
//
message StoryGetListReq {
}
//
message StoryGetListResp {
repeated DBStory data = 1;
}
//
message StoryGetRewrdReq {
uint32 chapterId = 1; // ID
uint32 boxId = 2; // ID
}
message StoryGetRewrdResp {
DBStory data = 1; //
}
//
message StoryChallengeReq {
uint32 chapterId = 1; // ID
uint32 storyId = 2; // ID
}
message StoryChallengeResp {
DBStory data = 1; //
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_storyChapter struct {
_dataMap map[int32]*Game_storyChapterData
_dataList []*Game_storyChapterData
}
func NewGame_storyChapter(_buf []map[string]interface{}) (*Game_storyChapter, error) {
_dataList := make([]*Game_storyChapterData, 0, len(_buf))
dataMap := make(map[int32]*Game_storyChapterData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_storyChapterData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &Game_storyChapter{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_storyChapter) GetDataMap() map[int32]*Game_storyChapterData {
return table._dataMap
}
func (table *Game_storyChapter) GetDataList() []*Game_storyChapterData {
return table._dataList
}
func (table *Game_storyChapter) Get(key int32) *Game_storyChapterData {
return table._dataMap[key]
}

View File

@ -1,52 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_storyChapterData struct {
Id int32
Name string
Intensity string
Map string
Desc string
Icon string
Text string
Fubendata []int32
}
func (Game_storyChapterData) GetTypeId() int {
return -920674338
}
func NewGame_storyChapterData(_buf map[string]interface{}) (_v *Game_storyChapterData, err error) {
_v = &Game_storyChapterData{}
{ 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; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } }
{ var _ok_ bool; if _v.Intensity, _ok_ = _buf["Intensity"].(string); !_ok_ { err = errors.New("Intensity error"); return } }
{ var _ok_ bool; if _v.Map, _ok_ = _buf["map"].(string); !_ok_ { err = errors.New("map error"); return } }
{ var _ok_ bool; if _v.Desc, _ok_ = _buf["desc"].(string); !_ok_ { err = errors.New("desc error"); return } }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{ var _ok_ bool; if _v.Text, _ok_ = _buf["text"].(string); !_ok_ { err = errors.New("text error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["fubendata"].([]interface{}); !_ok_ { err = errors.New("fubendata error"); return }
_v.Fubendata = 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.Fubendata = append(_v.Fubendata, _list_v_)
}
}
return
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_storyEasy struct {
_dataMap map[int32]*Game_storyEasyData
_dataList []*Game_storyEasyData
}
func NewGame_storyEasy(_buf []map[string]interface{}) (*Game_storyEasy, error) {
_dataList := make([]*Game_storyEasyData, 0, len(_buf))
dataMap := make(map[int32]*Game_storyEasyData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_storyEasyData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Order] = _v
}
}
return &Game_storyEasy{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_storyEasy) GetDataMap() map[int32]*Game_storyEasyData {
return table._dataMap
}
func (table *Game_storyEasy) GetDataList() []*Game_storyEasyData {
return table._dataList
}
func (table *Game_storyEasy) Get(key int32) *Game_storyEasyData {
return table._dataMap[key]
}

View File

@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_storyEasyData struct {
Order int32
Gqshu int32
Id int32
Nextid int32
Zhangshu int32
Area int32
Fubentype int32
Zuobiao []int32
Model string
Texiao string
Desc string
Armnum int32
Guaiwulv int32
Guaiwuhppro float32
Guaiwuatkpro float32
Guaiwudefpro float32
Guaiwulv1 int32
Guaiwuhppro1 float32
Guaiwuatkpro1 float32
Guaiwudefpro1 float32
Boci1 []int32
Boci2 []int32
Aname string
Zhandouchangjing string
Cjtexiao string
}
func (Game_storyEasyData) GetTypeId() int {
return -1625602587
}
func NewGame_storyEasyData(_buf map[string]interface{}) (_v *Game_storyEasyData, err error) {
_v = &Game_storyEasyData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["order"].(float64); !_ok_ { err = errors.New("order error"); return }; _v.Order = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gqshu"].(float64); !_ok_ { err = errors.New("gqshu error"); return }; _v.Gqshu = int32(_tempNum_) }
{ 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["nextid"].(float64); !_ok_ { err = errors.New("nextid error"); return }; _v.Nextid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["zhangshu"].(float64); !_ok_ { err = errors.New("zhangshu error"); return }; _v.Zhangshu = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["area"].(float64); !_ok_ { err = errors.New("area error"); return }; _v.Area = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fubentype"].(float64); !_ok_ { err = errors.New("fubentype error"); return }; _v.Fubentype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["zuobiao"].([]interface{}); !_ok_ { err = errors.New("zuobiao error"); return }
_v.Zuobiao = 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.Zuobiao = append(_v.Zuobiao, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Texiao, _ok_ = _buf["texiao"].(string); !_ok_ { err = errors.New("texiao error"); return } }
{ var _ok_ bool; if _v.Desc, _ok_ = _buf["desc"].(string); !_ok_ { err = errors.New("desc error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["armnum"].(float64); !_ok_ { err = errors.New("armnum error"); return }; _v.Armnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv"].(float64); !_ok_ { err = errors.New("guaiwulv error"); return }; _v.Guaiwulv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro"].(float64); !_ok_ { err = errors.New("guaiwuhppro error"); return }; _v.Guaiwuhppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro"].(float64); !_ok_ { err = errors.New("guaiwuatkpro error"); return }; _v.Guaiwuatkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro"].(float64); !_ok_ { err = errors.New("guaiwudefpro error"); return }; _v.Guaiwudefpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv1"].(float64); !_ok_ { err = errors.New("guaiwulv1 error"); return }; _v.Guaiwulv1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro1"].(float64); !_ok_ { err = errors.New("guaiwuhppro1 error"); return }; _v.Guaiwuhppro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro1"].(float64); !_ok_ { err = errors.New("guaiwuatkpro1 error"); return }; _v.Guaiwuatkpro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro1"].(float64); !_ok_ { err = errors.New("guaiwudefpro1 error"); return }; _v.Guaiwudefpro1 = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci1"].([]interface{}); !_ok_ { err = errors.New("boci1 error"); return }
_v.Boci1 = 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.Boci1 = append(_v.Boci1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci2"].([]interface{}); !_ok_ { err = errors.New("boci2 error"); return }
_v.Boci2 = 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.Boci2 = append(_v.Boci2, _list_v_)
}
}
{ var _ok_ bool; if _v.Aname, _ok_ = _buf["aname"].(string); !_ok_ { err = errors.New("aname error"); return } }
{ var _ok_ bool; if _v.Zhandouchangjing, _ok_ = _buf["zhandouchangjing"].(string); !_ok_ { err = errors.New("zhandouchangjing error"); return } }
{ var _ok_ bool; if _v.Cjtexiao, _ok_ = _buf["cjtexiao"].(string); !_ok_ { err = errors.New("cjtexiao error"); return } }
return
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_storyHard struct {
_dataMap map[int32]*Game_storyHardData
_dataList []*Game_storyHardData
}
func NewGame_storyHard(_buf []map[string]interface{}) (*Game_storyHard, error) {
_dataList := make([]*Game_storyHardData, 0, len(_buf))
dataMap := make(map[int32]*Game_storyHardData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_storyHardData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Order] = _v
}
}
return &Game_storyHard{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_storyHard) GetDataMap() map[int32]*Game_storyHardData {
return table._dataMap
}
func (table *Game_storyHard) GetDataList() []*Game_storyHardData {
return table._dataList
}
func (table *Game_storyHard) Get(key int32) *Game_storyHardData {
return table._dataMap[key]
}

View File

@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_storyHardData struct {
Order int32
Gqshu int32
Id int32
Nextid int32
Zhangshu int32
Area int32
Fubentype int32
Zuobiao []int32
Model string
Texiao string
Desc string
Armnum int32
Guaiwulv int32
Guaiwuhppro float32
Guaiwuatkpro float32
Guaiwudefpro float32
Guaiwulv1 int32
Guaiwuhppro1 float32
Guaiwuatkpro1 float32
Guaiwudefpro1 float32
Boci1 []int32
Boci2 []int32
Aname string
Zhandouchangjing string
Cjtexiao string
}
func (Game_storyHardData) GetTypeId() int {
return -740161970
}
func NewGame_storyHardData(_buf map[string]interface{}) (_v *Game_storyHardData, err error) {
_v = &Game_storyHardData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["order"].(float64); !_ok_ { err = errors.New("order error"); return }; _v.Order = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gqshu"].(float64); !_ok_ { err = errors.New("gqshu error"); return }; _v.Gqshu = int32(_tempNum_) }
{ 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["nextid"].(float64); !_ok_ { err = errors.New("nextid error"); return }; _v.Nextid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["zhangshu"].(float64); !_ok_ { err = errors.New("zhangshu error"); return }; _v.Zhangshu = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["area"].(float64); !_ok_ { err = errors.New("area error"); return }; _v.Area = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fubentype"].(float64); !_ok_ { err = errors.New("fubentype error"); return }; _v.Fubentype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["zuobiao"].([]interface{}); !_ok_ { err = errors.New("zuobiao error"); return }
_v.Zuobiao = 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.Zuobiao = append(_v.Zuobiao, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Texiao, _ok_ = _buf["texiao"].(string); !_ok_ { err = errors.New("texiao error"); return } }
{ var _ok_ bool; if _v.Desc, _ok_ = _buf["desc"].(string); !_ok_ { err = errors.New("desc error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["armnum"].(float64); !_ok_ { err = errors.New("armnum error"); return }; _v.Armnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv"].(float64); !_ok_ { err = errors.New("guaiwulv error"); return }; _v.Guaiwulv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro"].(float64); !_ok_ { err = errors.New("guaiwuhppro error"); return }; _v.Guaiwuhppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro"].(float64); !_ok_ { err = errors.New("guaiwuatkpro error"); return }; _v.Guaiwuatkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro"].(float64); !_ok_ { err = errors.New("guaiwudefpro error"); return }; _v.Guaiwudefpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv1"].(float64); !_ok_ { err = errors.New("guaiwulv1 error"); return }; _v.Guaiwulv1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro1"].(float64); !_ok_ { err = errors.New("guaiwuhppro1 error"); return }; _v.Guaiwuhppro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro1"].(float64); !_ok_ { err = errors.New("guaiwuatkpro1 error"); return }; _v.Guaiwuatkpro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro1"].(float64); !_ok_ { err = errors.New("guaiwudefpro1 error"); return }; _v.Guaiwudefpro1 = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci1"].([]interface{}); !_ok_ { err = errors.New("boci1 error"); return }
_v.Boci1 = 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.Boci1 = append(_v.Boci1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci2"].([]interface{}); !_ok_ { err = errors.New("boci2 error"); return }
_v.Boci2 = 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.Boci2 = append(_v.Boci2, _list_v_)
}
}
{ var _ok_ bool; if _v.Aname, _ok_ = _buf["aname"].(string); !_ok_ { err = errors.New("aname error"); return } }
{ var _ok_ bool; if _v.Zhandouchangjing, _ok_ = _buf["zhandouchangjing"].(string); !_ok_ { err = errors.New("zhandouchangjing error"); return } }
{ var _ok_ bool; if _v.Cjtexiao, _ok_ = _buf["cjtexiao"].(string); !_ok_ { err = errors.New("cjtexiao error"); return } }
return
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_storyPurgatory struct {
_dataMap map[int32]*Game_storyPurgatoryData
_dataList []*Game_storyPurgatoryData
}
func NewGame_storyPurgatory(_buf []map[string]interface{}) (*Game_storyPurgatory, error) {
_dataList := make([]*Game_storyPurgatoryData, 0, len(_buf))
dataMap := make(map[int32]*Game_storyPurgatoryData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_storyPurgatoryData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Order] = _v
}
}
return &Game_storyPurgatory{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_storyPurgatory) GetDataMap() map[int32]*Game_storyPurgatoryData {
return table._dataMap
}
func (table *Game_storyPurgatory) GetDataList() []*Game_storyPurgatoryData {
return table._dataList
}
func (table *Game_storyPurgatory) Get(key int32) *Game_storyPurgatoryData {
return table._dataMap[key]
}

View File

@ -1,112 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_storyPurgatoryData struct {
Order int32
Gqshu int32
Id int32
Nextid int32
Zhangshu int32
Area int32
Fubentype int32
Zuobiao []int32
Model string
Texiao string
Desc string
Armnum int32
Guaiwulv int32
Guaiwuhppro float32
Guaiwuatkpro float32
Guaiwudefpro float32
Guaiwulv1 int32
Guaiwuhppro1 float32
Guaiwuatkpro1 float32
Guaiwudefpro1 float32
Boci1 []int32
Boci2 []int32
Aname string
Zhandouchangjing string
Cjtexiao string
}
func (Game_storyPurgatoryData) GetTypeId() int {
return -1826304262
}
func NewGame_storyPurgatoryData(_buf map[string]interface{}) (_v *Game_storyPurgatoryData, err error) {
_v = &Game_storyPurgatoryData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["order"].(float64); !_ok_ { err = errors.New("order error"); return }; _v.Order = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gqshu"].(float64); !_ok_ { err = errors.New("gqshu error"); return }; _v.Gqshu = int32(_tempNum_) }
{ 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["nextid"].(float64); !_ok_ { err = errors.New("nextid error"); return }; _v.Nextid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["zhangshu"].(float64); !_ok_ { err = errors.New("zhangshu error"); return }; _v.Zhangshu = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["area"].(float64); !_ok_ { err = errors.New("area error"); return }; _v.Area = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fubentype"].(float64); !_ok_ { err = errors.New("fubentype error"); return }; _v.Fubentype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["zuobiao"].([]interface{}); !_ok_ { err = errors.New("zuobiao error"); return }
_v.Zuobiao = 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.Zuobiao = append(_v.Zuobiao, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Texiao, _ok_ = _buf["texiao"].(string); !_ok_ { err = errors.New("texiao error"); return } }
{ var _ok_ bool; if _v.Desc, _ok_ = _buf["desc"].(string); !_ok_ { err = errors.New("desc error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["armnum"].(float64); !_ok_ { err = errors.New("armnum error"); return }; _v.Armnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv"].(float64); !_ok_ { err = errors.New("guaiwulv error"); return }; _v.Guaiwulv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro"].(float64); !_ok_ { err = errors.New("guaiwuhppro error"); return }; _v.Guaiwuhppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro"].(float64); !_ok_ { err = errors.New("guaiwuatkpro error"); return }; _v.Guaiwuatkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro"].(float64); !_ok_ { err = errors.New("guaiwudefpro error"); return }; _v.Guaiwudefpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwulv1"].(float64); !_ok_ { err = errors.New("guaiwulv1 error"); return }; _v.Guaiwulv1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuhppro1"].(float64); !_ok_ { err = errors.New("guaiwuhppro1 error"); return }; _v.Guaiwuhppro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwuatkpro1"].(float64); !_ok_ { err = errors.New("guaiwuatkpro1 error"); return }; _v.Guaiwuatkpro1 = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guaiwudefpro1"].(float64); !_ok_ { err = errors.New("guaiwudefpro1 error"); return }; _v.Guaiwudefpro1 = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci1"].([]interface{}); !_ok_ { err = errors.New("boci1 error"); return }
_v.Boci1 = 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.Boci1 = append(_v.Boci1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["boci2"].([]interface{}); !_ok_ { err = errors.New("boci2 error"); return }
_v.Boci2 = 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.Boci2 = append(_v.Boci2, _list_v_)
}
}
{ var _ok_ bool; if _v.Aname, _ok_ = _buf["aname"].(string); !_ok_ { err = errors.New("aname error"); return } }
{ var _ok_ bool; if _v.Zhandouchangjing, _ok_ = _buf["zhandouchangjing"].(string); !_ok_ { err = errors.New("zhandouchangjing error"); return } }
{ var _ok_ bool; if _v.Cjtexiao, _ok_ = _buf["cjtexiao"].(string); !_ok_ { err = errors.New("cjtexiao error"); return } }
return
}