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

This commit is contained in:
meixiongfeng 2022-09-01 14:39:36 +08:00
commit ee1bc3fcc2
17 changed files with 123 additions and 22752 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

View File

@ -58,7 +58,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004112 225004121
] ]
}, },
"Desc": "skill_1250041112", "Desc": "skill_1250041112",
@ -80,7 +80,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004113 225004131
] ]
}, },
"Desc": "skill_1250041113", "Desc": "skill_1250041113",
@ -102,7 +102,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004114 225004141
] ]
}, },
"Desc": "skill_1250041114", "Desc": "skill_1250041114",
@ -124,7 +124,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004115 225004151
] ]
}, },
"Desc": "skill_1250041115", "Desc": "skill_1250041115",
@ -146,7 +146,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004116 225004161
] ]
}, },
"Desc": "skill_1250041116", "Desc": "skill_1250041116",
@ -262,7 +262,7 @@
"Target": 1, "Target": 1,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004312 225004321
] ]
}, },
"Desc": "skill_1250043112", "Desc": "skill_1250043112",
@ -284,7 +284,7 @@
"Target": 1, "Target": 1,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004313 225004331
] ]
}, },
"Desc": "skill_1250043113", "Desc": "skill_1250043113",
@ -306,7 +306,7 @@
"Target": 1, "Target": 1,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004314 225004341
] ]
}, },
"Desc": "skill_1250043114", "Desc": "skill_1250043114",
@ -328,7 +328,7 @@
"Target": 1, "Target": 1,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
225004315 225004351
] ]
}, },
"Desc": "skill_1250043115", "Desc": "skill_1250043115",
@ -555,7 +555,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
235002312 235002321
] ]
}, },
"Desc": "skill_1350023112", "Desc": "skill_1350023112",
@ -577,7 +577,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
235002313 235002331
] ]
}, },
"Desc": "skill_1350023113", "Desc": "skill_1350023113",
@ -599,7 +599,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
235002314 235002341
] ]
}, },
"Desc": "skill_1350023114", "Desc": "skill_1350023114",
@ -621,7 +621,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
235002315 235002351
] ]
}, },
"Desc": "skill_1350023115", "Desc": "skill_1350023115",
@ -643,7 +643,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
235002316 235002361
] ]
}, },
"Desc": "skill_1350023116", "Desc": "skill_1350023116",
@ -687,7 +687,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
935002312 935002321
] ]
}, },
"Desc": "skill_9350023212", "Desc": "skill_9350023212",
@ -709,7 +709,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
935002313 935002331
] ]
}, },
"Desc": "skill_9350023213", "Desc": "skill_9350023213",
@ -731,7 +731,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
935002314 935002341
] ]
}, },
"Desc": "skill_9350023214", "Desc": "skill_9350023214",
@ -753,7 +753,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
935002315 935002351
] ]
}, },
"Desc": "skill_9350023215", "Desc": "skill_9350023215",
@ -775,7 +775,7 @@
"Target": 2, "Target": 2,
"ChildSkill": { "ChildSkill": {
"Id": [ "Id": [
935002316 935002361
] ]
}, },
"Desc": "skill_9350023216", "Desc": "skill_9350023216",

View File

@ -306,3 +306,7 @@ const (
const ( const (
MaxRankList = 50 MaxRankList = 50
) )
const (
MaxMainlineIntensity = 3 // 最大难度
)

View File

@ -91,8 +91,6 @@ type (
IMainline interface { IMainline interface {
// 修改章节信息 // 修改章节信息
ModifyMainlineData(uid string, objId string, data interface{}) (code pb.ErrorCode) ModifyMainlineData(uid string, objId string, data interface{}) (code pb.ErrorCode)
// 检查能不能挑战该关卡
CheckChallengeChapter(storyObjId string, uid string, zhangjieID int32, Intensity int32) (code pb.ErrorCode)
/// 查询章节ID /// 查询章节ID
GetUsermainLineData(uid string) (mainlineId int32) GetUsermainLineData(uid string) (mainlineId int32)
} }

View File

@ -57,36 +57,32 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
return return
} }
// 根据难度找对应的配置文件 node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), curChapter.Intensity)
if chaptConfig.Intensity == comm.MailLineEasy { if node == nil { // 配置文件校验
con := this.module.configure.GetMainlineEasyChapter(int32(req.MainlineId)) // 根据配置文件找 code = pb.ErrorCode_MainlineNotFindChapter
if con == nil { return
code = pb.ErrorCode_ConfigNoFound
return
}
if con.Route == 1 {
if curChapter.MainlineId == 0 { // 表示第一小关
} else if con.Previoustage != curChapter.MainlineId { // 前置关卡校验
// 分支关卡也校验一下
for _, v := range curChapter.BranchID {
if v == con.Previoustage {
break
}
}
code = pb.ErrorCode_MainlinePreNotFound
}
} else if con.Route == 2 { //分支
bBranch = true
// 只需要校验小关ID 是不是大于当前ID就可以
//if curChapter.MainlineId < int32(req.MainlineId) { //必须大于前置关卡才可以挑战
// code = pb.ErrorCode_MainlineIDFailed
// return
//}
}
res = append(res, con.Award...)
} }
if node.Route == 1 {
if node.Previoustage != curChapter.MainlineId {
// 分支关卡也校验一下
for _, v := range curChapter.BranchID {
if v == node.Previoustage {
break
}
}
code = pb.ErrorCode_MainlinePreNotFound
}
} else if node.Route == 2 { //分支
bBranch = true
// 只需要校验小关ID 是不是大于当前ID就可以
//if curChapter.MainlineId < int32(req.MainlineId) { //必须大于前置关卡才可以挑战
// code = pb.ErrorCode_MainlineIDFailed
// return
//}
}
res = append(res, node.Award...)
// TODO 调用战斗逻辑 // TODO 调用战斗逻辑
// 挑战成功 // 挑战成功
curChapter.MainlineId = int32(req.MainlineId) curChapter.MainlineId = int32(req.MainlineId)
@ -104,29 +100,36 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle
code = pb.ErrorCode_DBError code = pb.ErrorCode_DBError
return return
} }
newChaptConfig := this.module.configure.GetMainlineChapter(int32(curChapter.ChapterId + 1)) // 查下一章节 newChaptConfig := this.module.configure.GetMainlineNextConfigData(curChapter.Intensity, curChapter.ChapterId+1) // 查下一章节
if newChaptConfig != nil { if newChaptConfig != nil && newChaptConfig.Previoustage == curChapter.MainlineId {
if len(newChaptConfig.Episode) <= 0 {
return
}
//mainLineID := newChaptConfig.Episode[0]
// 如果本章节打完 则创建新的章节 // 如果本章节打完 则创建新的章节
if chaptConfig.Episode[len(chaptConfig.Episode)-1] == int32(req.MainlineId) { _data := &pb.DBMainline{}
_data.Id = primitive.NewObjectID().Hex()
_data.ChapterId = curChapter.ChapterId + 1
_data.MainlineId = 0 // 第二章数据默认0
_mData := make(map[string]interface{}, 0)
_data.Uid = session.GetUserId()
_mData[_data.Id] = _data
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
// 推送新的章节
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
} else { // 切换下个难度
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId+1), curChapter.Intensity)
if node == nil && curChapter.Intensity < comm.MaxMainlineIntensity { // 配置文件校验
_data := &pb.DBMainline{} _data := &pb.DBMainline{}
_data.Id = primitive.NewObjectID().Hex() _data.Id = primitive.NewObjectID().Hex()
_data.ChapterId = curChapter.ChapterId + 1 _data.ChapterId = 1 // 默认第一章节
_data.MainlineId = 0 // 第二章数据默认0
_mData := make(map[string]interface{}, 0) _mData := make(map[string]interface{}, 0)
_data.Uid = session.GetUserId() _data.Uid = session.GetUserId()
_data.Intensity = curChapter.Intensity + 1 // 难度+1
_mData[_data.Id] = _data _mData[_data.Id] = _data
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData) this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
// 推送新的章节
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data})
} }
} }
// 发奖 (奖励数据还没配置,后续补充) // 发奖 (奖励数据还没配置,后续补充)
code = this.module.DispenseRes(session, res, true) code = this.module.DispenseRes(session, res, true)
if code != pb.ErrorCode_Success { if code != pb.ErrorCode_Success {

View File

@ -34,6 +34,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListR
_data.ChapterId = 1 // 默认第一章节 _data.ChapterId = 1 // 默认第一章节
_mData := make(map[string]interface{}, 0) _mData := make(map[string]interface{}, 0)
_data.Uid = session.GetUserId() _data.Uid = session.GetUserId()
_data.Intensity = 1 // 难度1
_mData[_data.Id] = _data _mData[_data.Id] = _data
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData) this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)

View File

@ -2,22 +2,25 @@ package mainline
import ( import (
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"sync"
) )
const ( const (
game_mainlinechapter = "game_mainlinechapter.json" game_mainlinechapter = "game_mainlinechapter.json"
game_mainlineeasy = "game_mainlineeasy.json" game_mainline = "game_mainline.json"
game_mainlinehard = "game_mainlinehard.json"
game_mainlinepurgatory = "game_mainlinepurgatory.json"
) )
///配置管理基础组件 ///配置管理基础组件
type configureComp struct { type configureComp struct {
modules.MCompConfigure modules.MCompConfigure
module *Mainline module *Mainline
hlock sync.RWMutex
_mapMainline map[int64]*cfg.GameMainlineData
_mapMainlineNextC map[int64]*cfg.GameMainlineData // 获取下一章节的对象
} }
//组件初始化接口 //组件初始化接口
@ -25,18 +28,47 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
err = this.MCompConfigure.Init(service, module, comp, options) err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Mainline) this.module = module.(*Mainline)
err = this.LoadMultiConfigure(map[string]interface{}{ err = this.LoadMultiConfigure(map[string]interface{}{
game_mainlinechapter: cfg.NewGameMainlineChapter, game_mainlinechapter: cfg.NewGameMainlineChapter,
game_mainlineeasy: cfg.NewGameMainlineEasy,
game_mainlinehard: cfg.NewGameMainlineHard,
game_mainlinepurgatory: cfg.NewGameMainlinePurgatory,
}) })
this._mapMainline = make(map[int64]*cfg.GameMainlineData, 0)
this._mapMainlineNextC = make(map[int64]*cfg.GameMainlineData, 0)
configure.RegisterConfigure(game_mainline, cfg.NewGameMainline, this.GetMainline)
return return
} }
func (this *configureComp) GetMainline() {
if v, err := this.GetConfigure(game_mainline); err == nil {
if configure, ok := v.(*cfg.GameMainline); ok {
this.hlock.Lock()
defer this.hlock.Unlock()
for _, value := range configure.GetDataList() {
this._mapMainline[int64(value.Id<<16)+int64(value.Intensity)] = value
}
for _, value := range configure.GetDataList() {
this._mapMainlineNextC[int64(value.Intensity<<16)+int64(value.Chapter)] = value
}
return
}
} else {
log.Errorf("get game_pagoda conf err:%v", err)
}
return
}
// id + intensity
func (this *configureComp) GetMainlineConfigData(id, intensity int32) *cfg.GameMainlineData {
return this._mapMainline[int64(id<<16)+int64(intensity)]
}
// intensity + chapter
func (this *configureComp) GetMainlineNextConfigData(intensity, chapter int32) *cfg.GameMainlineData {
return this._mapMainline[int64(intensity<<16)+int64(chapter)]
}
//读取配置数据 //读取配置数据
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) { func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name) return configure.GetConfigure(name)
} }
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineChapterData) { func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineChapterData) {
@ -59,69 +91,3 @@ func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineC
} }
return return
} }
// 获取简单的关卡配置信息
func (this *configureComp) GetMainlineEasyChapter(id int32) (data *cfg.GameMainlineEasyData) {
if v, err := this.GetConfigure(game_mainlineeasy); err != nil {
this.module.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.GameMainlineEasy
ok bool
)
if configure, ok = v.(*cfg.GameMainlineEasy); !ok {
this.module.Errorf("%T no is *cfg.Game_MainlineEasyData", v)
return
}
if data, ok = configure.GetDataMap()[id]; ok {
return
}
}
return
}
// 获取炼狱级别难度的关卡配置
func (this *configureComp) GetMainlinePurgatoryChapter(id int32) (data *cfg.GameMainlinePurgatoryData) {
if v, err := this.GetConfigure(game_mainlinepurgatory); err != nil {
this.module.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.GameMainlinePurgatory
ok bool
)
if configure, ok = v.(*cfg.GameMainlinePurgatory); !ok {
this.module.Errorf("%T no is *cfg.Game_MainlinePurgatoryData", v)
return
}
if data, ok = configure.GetDataMap()[id]; ok {
return
}
}
return
}
// 获取困难的关卡配置
func (this *configureComp) GetMainlineHardChapter(id int32) (data *cfg.GameMainlineHardData) {
if v, err := this.GetConfigure(game_mainlinehard); err != nil {
this.module.Errorf("get global conf err:%v", err)
return
} else {
var (
configure *cfg.GameMainlineHard
ok bool
)
if configure, ok = v.(*cfg.GameMainlineHard); !ok {
this.module.Errorf("%T no is *cfg.Game_MainlineHardData", v)
return
}
if data, ok = configure.GetDataMap()[id]; ok {
return
}
}
return
}

View File

@ -45,73 +45,6 @@ func (this *Mainline) ModifyMainlineData(uid string, objId string, data map[stri
return return
} }
// 校验是否能挑战该关卡
func (this *Mainline) CheckChallengeChapter(storyObjId string, uid string, zhangjieID int32, Intensity int32) (code pb.ErrorCode) {
// _szData, err := this.modelMainline.getMainlineList(uid)
// if err != nil {
// code = pb.ErrorCode_DBError
// return
// }
// sort.SliceStable(_szData, func(i, j int) bool { // 排序
// return _szData[i].ChapterId > _szData[j].ChapterId
// })
// 获取当前关卡数据
curChapter := this.modelMainline.getOneChapterInfo(uid, storyObjId)
if curChapter == nil {
code = pb.ErrorCode_MainlineNotFindChapter // 没有找到主线关卡信息
return
}
stroyId := curChapter.ChapterId
// 获取关卡难度用来取配置文件
if Intensity == comm.MailLineEasy {
configData := this.configure.GetMainlineEasyChapter(curChapter.MainlineId)
if configData != nil { // 校验章节
if configData.Chapter != zhangjieID {
code = pb.ErrorCode_ConfigNoFound
return
}
// 如果这一关是路线二的话
if configData.Route == 2 && curChapter.ChapterId > stroyId { // 当前的关卡ID 大于路线2的ID 即可
return
}
// 判断下一关是不是当前传入的值
if configData.Previoustage != stroyId {
code = pb.ErrorCode_MainlineIDFailed
return
}
}
} else if Intensity == comm.MailLineHard {
configData := this.configure.GetMainlineHardChapter(curChapter.MainlineId)
if configData != nil { // 校验章节
if configData.Chapter != zhangjieID {
code = pb.ErrorCode_ConfigNoFound
return
}
// 判断下一关是不是当前传入的值
if configData.Previoustage != stroyId {
code = pb.ErrorCode_MainlineIDFailed
return
}
}
} else {
configData := this.configure.GetMainlinePurgatoryChapter(curChapter.MainlineId)
if configData != nil { // 校验章节
if configData.Chapter != zhangjieID {
code = pb.ErrorCode_ConfigNoFound
return
}
// 判断下一关是不是当前传入的值
if configData.Previoustage != stroyId {
code = pb.ErrorCode_MainlineIDFailed
return
}
}
}
return
}
func (this *Mainline) GetUsermainLineData(uid string) (mainlineId int32) { func (this *Mainline) GetUsermainLineData(uid string) (mainlineId int32) {
_szData, err := this.modelMainline.getMainlineList(uid) _szData, err := this.modelMainline.getMainlineList(uid)

View File

@ -31,6 +31,7 @@ type DBMainline struct {
MainlineId int32 `protobuf:"varint,4,opt,name=mainlineId,proto3" json:"mainlineId" bson:"mainlineId"` //主线关卡ID MainlineId int32 `protobuf:"varint,4,opt,name=mainlineId,proto3" json:"mainlineId" bson:"mainlineId"` //主线关卡ID
AwaredID int32 `protobuf:"varint,5,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //是否领奖(设置int是考虑后续扩展有多个宝箱情况) AwaredID int32 `protobuf:"varint,5,opt,name=awaredID,proto3" json:"awaredID" bson:"awaredID"` //是否领奖(设置int是考虑后续扩展有多个宝箱情况)
BranchID []int32 `protobuf:"varint,6,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况 BranchID []int32 `protobuf:"varint,6,rep,packed,name=branchID,proto3" json:"branchID" bson:"branchID"` // 记录分支通关的情况
Intensity int32 `protobuf:"varint,7,opt,name=intensity,proto3" json:"intensity"` // 难度
} }
func (x *DBMainline) Reset() { func (x *DBMainline) Reset() {
@ -107,11 +108,18 @@ func (x *DBMainline) GetBranchID() []int32 {
return nil return nil
} }
func (x *DBMainline) GetIntensity() int32 {
if x != nil {
return x.Intensity
}
return 0
}
var File_mainline_mainline_db_proto protoreflect.FileDescriptor var File_mainline_mainline_db_proto protoreflect.FileDescriptor
var file_mainline_mainline_db_proto_rawDesc = []byte{ var file_mainline_mainline_db_proto_rawDesc = []byte{
0x0a, 0x1a, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 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, 0xa4, 0x01, 0x0a, 0x69, 0x6e, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x01, 0x0a,
0x0a, 0x44, 0x42, 0x4d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 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, 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, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a,
@ -122,8 +130,10 @@ var file_mainline_mainline_db_proto_rawDesc = []byte{
0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x61,
0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x77, 0x61, 0x72, 0x65, 0x64, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63,
0x68, 0x49, 0x44, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x06, 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, 0x68, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
0x74, 0x6f, 0x33, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x74,
0x79, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
} }
var ( var (

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 GameMainlineEasy struct {
_dataMap map[int32]*GameMainlineEasyData
_dataList []*GameMainlineEasyData
}
func NewGameMainlineEasy(_buf []map[string]interface{}) (*GameMainlineEasy, error) {
_dataList := make([]*GameMainlineEasyData, 0, len(_buf))
dataMap := make(map[int32]*GameMainlineEasyData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameMainlineEasyData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameMainlineEasy{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameMainlineEasy) GetDataMap() map[int32]*GameMainlineEasyData {
return table._dataMap
}
func (table *GameMainlineEasy) GetDataList() []*GameMainlineEasyData {
return table._dataList
}
func (table *GameMainlineEasy) Get(key int32) *GameMainlineEasyData {
return table._dataMap[key]
}

View File

@ -1,171 +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 GameMainlineEasyData struct {
Id int32
Previoustage int32
Order int32
Linearnum int32
Chapter int32
Route int32
Episodetype int32
Episodelocation []int32
Model string
Effect string
Enemywave int32
Enemy1lv int32
Enemy1hppro float32
Enemy1atkpro float32
Enemy1defpro float32
Enemy2lv int32
Enemy2hppro float32
Enemy2atkpro float32
Enemy2defpro float32
Wave1enemyid []int32
Wave2enemyid []int32
Enemyid string
MonsterId string
Battlescene string
Sceneeffect string
Award []*Gameatn
Title string
Desc string
Stroyid []int32
Condition []int32
}
const TypeId_GameMainlineEasyData = -2098766443
func (*GameMainlineEasyData) GetTypeId() int32 {
return -2098766443
}
func (_v *GameMainlineEasyData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
{ 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["linearnum"].(float64); !_ok_ { err = errors.New("linearnum error"); return }; _v.Linearnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["route"].(float64); !_ok_ { err = errors.New("route error"); return }; _v.Route = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Episodetype"].(float64); !_ok_ { err = errors.New("Episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["Episodelocation"].([]interface{}); !_ok_ { err = errors.New("Episodelocation error"); return }
_v.Episodelocation = 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.Episodelocation = append(_v.Episodelocation, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Effect, _ok_ = _buf["effect"].(string); !_ok_ { err = errors.New("effect error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemywave"].(float64); !_ok_ { err = errors.New("enemywave error"); return }; _v.Enemywave = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1lv"].(float64); !_ok_ { err = errors.New("enemy1lv error"); return }; _v.Enemy1lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1hppro"].(float64); !_ok_ { err = errors.New("enemy1hppro error"); return }; _v.Enemy1hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1atkpro"].(float64); !_ok_ { err = errors.New("enemy1atkpro error"); return }; _v.Enemy1atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1defpro"].(float64); !_ok_ { err = errors.New("enemy1defpro error"); return }; _v.Enemy1defpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2lv"].(float64); !_ok_ { err = errors.New("enemy2lv error"); return }; _v.Enemy2lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2hppro"].(float64); !_ok_ { err = errors.New("enemy2hppro error"); return }; _v.Enemy2hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2atkpro"].(float64); !_ok_ { err = errors.New("enemy2atkpro error"); return }; _v.Enemy2atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2defpro"].(float64); !_ok_ { err = errors.New("enemy2defpro error"); return }; _v.Enemy2defpro = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave1enemyid"].([]interface{}); !_ok_ { err = errors.New("wave1enemyid error"); return }
_v.Wave1enemyid = 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.Wave1enemyid = append(_v.Wave1enemyid, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave2enemyid"].([]interface{}); !_ok_ { err = errors.New("wave2enemyid error"); return }
_v.Wave2enemyid = 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.Wave2enemyid = append(_v.Wave2enemyid, _list_v_)
}
}
{ var _ok_ bool; if _v.Enemyid, _ok_ = _buf["enemyid"].(string); !_ok_ { err = errors.New("enemyid error"); return } }
{ var _ok_ bool; if _v.MonsterId, _ok_ = _buf["monster_id"].(string); !_ok_ { err = errors.New("monster_id error"); return } }
{ var _ok_ bool; if _v.Battlescene, _ok_ = _buf["battlescene"].(string); !_ok_ { err = errors.New("battlescene error"); return } }
{ var _ok_ bool; if _v.Sceneeffect, _ok_ = _buf["sceneeffect"].(string); !_ok_ { err = errors.New("sceneeffect error"); return } }
{
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_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{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 } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["stroyid"].([]interface{}); !_ok_ { err = errors.New("stroyid error"); return }
_v.Stroyid = 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.Stroyid = append(_v.Stroyid, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["condition"].([]interface{}); !_ok_ { err = errors.New("condition error"); return }
_v.Condition = 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.Condition = append(_v.Condition, _list_v_)
}
}
return
}
func DeserializeGameMainlineEasyData(_buf map[string]interface{}) (*GameMainlineEasyData, error) {
v := &GameMainlineEasyData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameMainlineHard struct {
_dataMap map[int32]*GameMainlineHardData
_dataList []*GameMainlineHardData
}
func NewGameMainlineHard(_buf []map[string]interface{}) (*GameMainlineHard, error) {
_dataList := make([]*GameMainlineHardData, 0, len(_buf))
dataMap := make(map[int32]*GameMainlineHardData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameMainlineHardData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameMainlineHard{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameMainlineHard) GetDataMap() map[int32]*GameMainlineHardData {
return table._dataMap
}
func (table *GameMainlineHard) GetDataList() []*GameMainlineHardData {
return table._dataList
}
func (table *GameMainlineHard) Get(key int32) *GameMainlineHardData {
return table._dataMap[key]
}

View File

@ -1,141 +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 GameMainlineHardData struct {
Id int32
Previoustage int32
Order int32
Linearnum int32
Chapter int32
Route int32
Episodetype int32
Episodelocation []int32
Model string
Effect string
Enemywave int32
Enemy1lv int32
Enemy1hppro float32
Enemy1atkpro float32
Enemy1defpro float32
Enemy2lv int32
Enemy2hppro float32
Enemy2atkpro float32
Enemy2defpro float32
Wave1enemyid []int32
Wave2enemyid []int32
Enemyid string
MonsterId string
Battlescene string
Sceneeffect string
Award []*Gameatn
Title string
Desc string
}
const TypeId_GameMainlineHardData = -1213325826
func (*GameMainlineHardData) GetTypeId() int32 {
return -1213325826
}
func (_v *GameMainlineHardData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
{ 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["linearnum"].(float64); !_ok_ { err = errors.New("linearnum error"); return }; _v.Linearnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["route"].(float64); !_ok_ { err = errors.New("route error"); return }; _v.Route = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["episodetype"].(float64); !_ok_ { err = errors.New("episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["episodelocation"].([]interface{}); !_ok_ { err = errors.New("episodelocation error"); return }
_v.Episodelocation = 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.Episodelocation = append(_v.Episodelocation, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Effect, _ok_ = _buf["effect"].(string); !_ok_ { err = errors.New("effect error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemywave"].(float64); !_ok_ { err = errors.New("enemywave error"); return }; _v.Enemywave = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1lv"].(float64); !_ok_ { err = errors.New("enemy1lv error"); return }; _v.Enemy1lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1hppro"].(float64); !_ok_ { err = errors.New("enemy1hppro error"); return }; _v.Enemy1hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1atkpro"].(float64); !_ok_ { err = errors.New("enemy1atkpro error"); return }; _v.Enemy1atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1defpro"].(float64); !_ok_ { err = errors.New("enemy1defpro error"); return }; _v.Enemy1defpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2lv"].(float64); !_ok_ { err = errors.New("enemy2lv error"); return }; _v.Enemy2lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2hppro"].(float64); !_ok_ { err = errors.New("enemy2hppro error"); return }; _v.Enemy2hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2atkpro"].(float64); !_ok_ { err = errors.New("enemy2atkpro error"); return }; _v.Enemy2atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2defpro"].(float64); !_ok_ { err = errors.New("enemy2defpro error"); return }; _v.Enemy2defpro = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave1enemyid"].([]interface{}); !_ok_ { err = errors.New("wave1enemyid error"); return }
_v.Wave1enemyid = 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.Wave1enemyid = append(_v.Wave1enemyid, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave2enemyid"].([]interface{}); !_ok_ { err = errors.New("wave2enemyid error"); return }
_v.Wave2enemyid = 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.Wave2enemyid = append(_v.Wave2enemyid, _list_v_)
}
}
{ var _ok_ bool; if _v.Enemyid, _ok_ = _buf["enemyid"].(string); !_ok_ { err = errors.New("enemyid error"); return } }
{ var _ok_ bool; if _v.MonsterId, _ok_ = _buf["monster_id"].(string); !_ok_ { err = errors.New("monster_id error"); return } }
{ var _ok_ bool; if _v.Battlescene, _ok_ = _buf["battlescene"].(string); !_ok_ { err = errors.New("battlescene error"); return } }
{ var _ok_ bool; if _v.Sceneeffect, _ok_ = _buf["sceneeffect"].(string); !_ok_ { err = errors.New("sceneeffect error"); return } }
{
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_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{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 DeserializeGameMainlineHardData(_buf map[string]interface{}) (*GameMainlineHardData, error) {
v := &GameMainlineHardData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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 GameMainlinePurgatory struct {
_dataMap map[int32]*GameMainlinePurgatoryData
_dataList []*GameMainlinePurgatoryData
}
func NewGameMainlinePurgatory(_buf []map[string]interface{}) (*GameMainlinePurgatory, error) {
_dataList := make([]*GameMainlinePurgatoryData, 0, len(_buf))
dataMap := make(map[int32]*GameMainlinePurgatoryData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameMainlinePurgatoryData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameMainlinePurgatory{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameMainlinePurgatory) GetDataMap() map[int32]*GameMainlinePurgatoryData {
return table._dataMap
}
func (table *GameMainlinePurgatory) GetDataList() []*GameMainlinePurgatoryData {
return table._dataList
}
func (table *GameMainlinePurgatory) Get(key int32) *GameMainlinePurgatoryData {
return table._dataMap[key]
}

View File

@ -1,141 +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 GameMainlinePurgatoryData struct {
Id int32
Previoustage int32
Order int32
Linearnum int32
Chapter int32
Route int32
Episodetype int32
Episodelocation []int32
Model string
Effect string
Enemywave int32
Enemy1lv int32
Enemy1hppro float32
Enemy1atkpro float32
Enemy1defpro float32
Enemy2lv int32
Enemy2hppro float32
Enemy2atkpro float32
Enemy2defpro float32
Wave1enemyid []int32
Wave2enemyid []int32
Enemyid string
MonsterId string
Battlescene string
Sceneeffect string
Award []*Gameatn
Title string
Desc string
}
const TypeId_GameMainlinePurgatoryData = -1700526774
func (*GameMainlinePurgatoryData) GetTypeId() int32 {
return -1700526774
}
func (_v *GameMainlinePurgatoryData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
{ 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["linearnum"].(float64); !_ok_ { err = errors.New("linearnum error"); return }; _v.Linearnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["route"].(float64); !_ok_ { err = errors.New("route error"); return }; _v.Route = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["episodetype"].(float64); !_ok_ { err = errors.New("episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["episodelocation"].([]interface{}); !_ok_ { err = errors.New("episodelocation error"); return }
_v.Episodelocation = 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.Episodelocation = append(_v.Episodelocation, _list_v_)
}
}
{ var _ok_ bool; if _v.Model, _ok_ = _buf["model"].(string); !_ok_ { err = errors.New("model error"); return } }
{ var _ok_ bool; if _v.Effect, _ok_ = _buf["effect"].(string); !_ok_ { err = errors.New("effect error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemywave"].(float64); !_ok_ { err = errors.New("enemywave error"); return }; _v.Enemywave = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1lv"].(float64); !_ok_ { err = errors.New("enemy1lv error"); return }; _v.Enemy1lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1hppro"].(float64); !_ok_ { err = errors.New("enemy1hppro error"); return }; _v.Enemy1hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1atkpro"].(float64); !_ok_ { err = errors.New("enemy1atkpro error"); return }; _v.Enemy1atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy1defpro"].(float64); !_ok_ { err = errors.New("enemy1defpro error"); return }; _v.Enemy1defpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2lv"].(float64); !_ok_ { err = errors.New("enemy2lv error"); return }; _v.Enemy2lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2hppro"].(float64); !_ok_ { err = errors.New("enemy2hppro error"); return }; _v.Enemy2hppro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2atkpro"].(float64); !_ok_ { err = errors.New("enemy2atkpro error"); return }; _v.Enemy2atkpro = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["enemy2defpro"].(float64); !_ok_ { err = errors.New("enemy2defpro error"); return }; _v.Enemy2defpro = float32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave1enemyid"].([]interface{}); !_ok_ { err = errors.New("wave1enemyid error"); return }
_v.Wave1enemyid = 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.Wave1enemyid = append(_v.Wave1enemyid, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["wave2enemyid"].([]interface{}); !_ok_ { err = errors.New("wave2enemyid error"); return }
_v.Wave2enemyid = 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.Wave2enemyid = append(_v.Wave2enemyid, _list_v_)
}
}
{ var _ok_ bool; if _v.Enemyid, _ok_ = _buf["enemyid"].(string); !_ok_ { err = errors.New("enemyid error"); return } }
{ var _ok_ bool; if _v.MonsterId, _ok_ = _buf["monster_id"].(string); !_ok_ { err = errors.New("monster_id error"); return } }
{ var _ok_ bool; if _v.Battlescene, _ok_ = _buf["battlescene"].(string); !_ok_ { err = errors.New("battlescene error"); return } }
{ var _ok_ bool; if _v.Sceneeffect, _ok_ = _buf["sceneeffect"].(string); !_ok_ { err = errors.New("sceneeffect error"); return } }
{
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_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{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 DeserializeGameMainlinePurgatoryData(_buf map[string]interface{}) (*GameMainlinePurgatoryData, error) {
v := &GameMainlinePurgatoryData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}