From f302428e60804b7a4cdac275d2a5eff455d50782 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Mon, 5 Dec 2022 16:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=8B=E6=B5=8B=E6=B5=81=E7=A8=8B=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_testflow.json | 44 +++++++++++++++++++ sys/configure/structs/Game.TestFlow.go | 42 +++++++++++++++++++ sys/configure/structs/Game.TestFlowData.go | 41 ++++++++++++++++++ sys/configure/structs/Tables.go | 49 ++++------------------ 4 files changed, 134 insertions(+), 42 deletions(-) create mode 100644 bin/json/game_testflow.json create mode 100644 sys/configure/structs/Game.TestFlow.go create mode 100644 sys/configure/structs/Game.TestFlowData.go diff --git a/bin/json/game_testflow.json b/bin/json/game_testflow.json new file mode 100644 index 000000000..f17e592c7 --- /dev/null +++ b/bin/json/game_testflow.json @@ -0,0 +1,44 @@ +[ + { + "id": 1, + "msg": "功能列表", + "route": "sys.funclist", + "params": "{}" + }, + { + "id": 2, + "msg": "", + "route": "", + "params": "" + }, + { + "id": 3, + "msg": "", + "route": "", + "params": "" + }, + { + "id": 4, + "msg": "", + "route": "", + "params": "" + }, + { + "id": 5, + "msg": "", + "route": "", + "params": "" + }, + { + "id": 6, + "msg": "", + "route": "", + "params": "" + }, + { + "id": 7, + "msg": "", + "route": "", + "params": "" + } +] \ No newline at end of file diff --git a/sys/configure/structs/Game.TestFlow.go b/sys/configure/structs/Game.TestFlow.go new file mode 100644 index 000000000..b8946f191 --- /dev/null +++ b/sys/configure/structs/Game.TestFlow.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameTestFlow struct { + _dataMap map[int32]*GameTestFlowData + _dataList []*GameTestFlowData +} + +func NewGameTestFlow(_buf []map[string]interface{}) (*GameTestFlow, error) { + _dataList := make([]*GameTestFlowData, 0, len(_buf)) + dataMap := make(map[int32]*GameTestFlowData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameTestFlowData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameTestFlow{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameTestFlow) GetDataMap() map[int32]*GameTestFlowData { + return table._dataMap +} + +func (table *GameTestFlow) GetDataList() []*GameTestFlowData { + return table._dataList +} + +func (table *GameTestFlow) Get(key int32) *GameTestFlowData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.TestFlowData.go b/sys/configure/structs/Game.TestFlowData.go new file mode 100644 index 000000000..c41d92c1a --- /dev/null +++ b/sys/configure/structs/Game.TestFlowData.go @@ -0,0 +1,41 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameTestFlowData struct { + Id int32 + Msg string + Route string + Params string +} + +const TypeId_GameTestFlowData = -1087831770 + +func (*GameTestFlowData) GetTypeId() int32 { + return -1087831770 +} + +func (_v *GameTestFlowData)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; if _v.Msg, _ok_ = _buf["msg"].(string); !_ok_ { err = errors.New("msg error"); return } } + { var _ok_ bool; if _v.Route, _ok_ = _buf["route"].(string); !_ok_ { err = errors.New("route error"); return } } + { var _ok_ bool; if _v.Params, _ok_ = _buf["params"].(string); !_ok_ { err = errors.New("params error"); return } } + return +} + +func DeserializeGameTestFlowData(_buf map[string]interface{}) (*GameTestFlowData, error) { + v := &GameTestFlowData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 91958249d..ea07ab5ae 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -58,17 +58,14 @@ type Tables struct { Playerlv *GamePlayerlv Facemod *GameFacemod Msgdistrib *GameMsgdistrib + TestFlow *GameTestFlow Opencond *GameOpencond Stroy *GameStroy Pagoda *GamePagoda PagodaTaskReward *GamePagodaTaskReward SeasonLoop *GameSeasonLoop PagodaSeasonReward *GamePagodaSeasonReward - Rdtask *GameRdtask RdtaskCondi *GameRdtaskCondi - RdtaskChoose *GameRdtaskChoose - RdtaskSide *GameRdtaskSide - RdtaskBattle *GameRdtaskBattle KungfuUnlock *GameKungfuUnlock KungfuMasterworker *GameKungfuMasterworker Gourmet *GameGourmet @@ -135,8 +132,6 @@ type Tables struct { PrivilegeCard *GamePrivilegeCard Privilege *GamePrivilege WorldTask *GameWorldTask - TaskCond *GameTaskCond - TaskType *GameTaskType Teaching *GameTeaching HeroStrategy *GameHeroStrategy FightGlobalEvent *GameFightGlobalEvent @@ -440,6 +435,12 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.Msgdistrib, err = NewGameMsgdistrib(buf) ; err != nil { return nil, err } + if buf, err = loader("game_testflow") ; err != nil { + return nil, err + } + if tables.TestFlow, err = NewGameTestFlow(buf) ; err != nil { + return nil, err + } if buf, err = loader("game_opencond") ; err != nil { return nil, err } @@ -476,36 +477,12 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.PagodaSeasonReward, err = NewGamePagodaSeasonReward(buf) ; err != nil { return nil, err } - if buf, err = loader("game_rdtask") ; err != nil { - return nil, err - } - if tables.Rdtask, err = NewGameRdtask(buf) ; err != nil { - return nil, err - } if buf, err = loader("game_rdtaskcondi") ; err != nil { return nil, err } if tables.RdtaskCondi, err = NewGameRdtaskCondi(buf) ; err != nil { return nil, err } - if buf, err = loader("game_rdtaskchoose") ; err != nil { - return nil, err - } - if tables.RdtaskChoose, err = NewGameRdtaskChoose(buf) ; err != nil { - return nil, err - } - if buf, err = loader("game_rdtaskside") ; err != nil { - return nil, err - } - if tables.RdtaskSide, err = NewGameRdtaskSide(buf) ; err != nil { - return nil, err - } - if buf, err = loader("game_rdtaskbattle") ; err != nil { - return nil, err - } - if tables.RdtaskBattle, err = NewGameRdtaskBattle(buf) ; err != nil { - return nil, err - } if buf, err = loader("game_kungfuunlock") ; err != nil { return nil, err } @@ -902,18 +879,6 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.WorldTask, err = NewGameWorldTask(buf) ; err != nil { return nil, err } - if buf, err = loader("game_taskcond") ; err != nil { - return nil, err - } - if tables.TaskCond, err = NewGameTaskCond(buf) ; err != nil { - return nil, err - } - if buf, err = loader("game_tasktype") ; err != nil { - return nil, err - } - if tables.TaskType, err = NewGameTaskType(buf) ; err != nil { - return nil, err - } if buf, err = loader("game_teaching") ; err != nil { return nil, err }