From 301f4c6af1e0b5129af8829c34d91e5f36bf6495 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Tue, 25 Jul 2023 20:05:13 +0800 Subject: [PATCH] update --- bin/json/game_bufflottery.json | 142 +++++++++++++++--- bin/json/game_stonebattle.json | 62 ++++++++ ...me_stronebuff.json => game_stonebuff.json} | 0 ..._stroneevent.json => game_stoneevent.json} | 0 ...me_stroneroom.json => game_stoneroom.json} | 0 ..._stronestage.json => game_stonestage.json} | 0 modules/stonehenge/api_enterlevel.go | 4 +- modules/stonehenge/api_event.go | 4 +- modules/stonehenge/configure.go | 42 +++--- sys/configure/structs/Game.StoneBattle.go | 42 ++++++ sys/configure/structs/Game.StoneBattleData.go | 62 ++++++++ sys/configure/structs/Game.StoneBuff.go | 42 ++++++ ...troneBuffData.go => Game.StoneBuffData.go} | 14 +- sys/configure/structs/Game.StoneEvent.go | 42 ++++++ ...oneEventData.go => Game.StoneEventData.go} | 14 +- sys/configure/structs/Game.StoneRoom.go | 42 ++++++ ...troneRoomData.go => Game.StoneRoomData.go} | 14 +- sys/configure/structs/Game.StoneStage.go | 42 ++++++ ...oneStageData.go => Game.StoneStageData.go} | 14 +- sys/configure/structs/Game.StroneBuff.go | 42 ------ sys/configure/structs/Game.StroneEvent.go | 42 ------ sys/configure/structs/Game.StroneRoom.go | 42 ------ sys/configure/structs/Game.StroneStage.go | 42 ------ sys/configure/structs/Tables.go | 31 ++-- 24 files changed, 525 insertions(+), 256 deletions(-) create mode 100644 bin/json/game_stonebattle.json rename bin/json/{game_stronebuff.json => game_stonebuff.json} (100%) rename bin/json/{game_stroneevent.json => game_stoneevent.json} (100%) rename bin/json/{game_stroneroom.json => game_stoneroom.json} (100%) rename bin/json/{game_stronestage.json => game_stonestage.json} (100%) create mode 100644 sys/configure/structs/Game.StoneBattle.go create mode 100644 sys/configure/structs/Game.StoneBattleData.go create mode 100644 sys/configure/structs/Game.StoneBuff.go rename sys/configure/structs/{Game.StroneBuffData.go => Game.StoneBuffData.go} (88%) create mode 100644 sys/configure/structs/Game.StoneEvent.go rename sys/configure/structs/{Game.StroneEventData.go => Game.StoneEventData.go} (90%) create mode 100644 sys/configure/structs/Game.StoneRoom.go rename sys/configure/structs/{Game.StroneRoomData.go => Game.StoneRoomData.go} (89%) create mode 100644 sys/configure/structs/Game.StoneStage.go rename sys/configure/structs/{Game.StroneStageData.go => Game.StoneStageData.go} (93%) delete mode 100644 sys/configure/structs/Game.StroneBuff.go delete mode 100644 sys/configure/structs/Game.StroneEvent.go delete mode 100644 sys/configure/structs/Game.StroneRoom.go delete mode 100644 sys/configure/structs/Game.StroneStage.go diff --git a/bin/json/game_bufflottery.json b/bin/json/game_bufflottery.json index 43d6606df..7b3d62558 100644 --- a/bin/json/game_bufflottery.json +++ b/bin/json/game_bufflottery.json @@ -2,65 +2,161 @@ { "Id": 1, "GroupId": 100001, - "buffID": 251023111, + "buffID": 125004311, "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 2, "GroupId": 100001, - "buffID": 251023112, - "GroupNum": 0, + "buffID": 125004312, + "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 3, "GroupId": 100001, - "buffID": 200000001, - "GroupNum": 0, + "buffID": 135006211, + "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 4, "GroupId": 100001, - "buffID": 200000002, - "GroupNum": 0, + "buffID": 135006212, + "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 5, "GroupId": 100001, - "buffID": 253005111, - "GroupNum": 0, + "buffID": 135006311, + "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 6, "GroupId": 100001, - "buffID": 253005112, - "GroupNum": 0, + "buffID": 135006312, + "GroupNum": 3, "BuffWt": 50, - "TypeWt": 60 + "TypeWt": 600 }, { "Id": 7, "GroupId": 100001, - "buffID": 225002011, - "GroupNum": 0, - "BuffWt": 500, + "buffID": 144004311, + "GroupNum": 3, + "BuffWt": 50, "TypeWt": 600 }, { "Id": 8, "GroupId": 100001, - "buffID": 225002012, - "GroupNum": 0, - "BuffWt": 500, + "buffID": 144004312, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 9, + "GroupId": 100001, + "buffID": 124006311, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 10, + "GroupId": 100001, + "buffID": 124006312, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 11, + "GroupId": 100001, + "buffID": 144002311, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 12, + "GroupId": 100001, + "buffID": 144002312, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 13, + "GroupId": 100001, + "buffID": 151513211, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 14, + "GroupId": 100001, + "buffID": 151513212, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 15, + "GroupId": 100001, + "buffID": 143002311, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 16, + "GroupId": 100001, + "buffID": 143002312, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 17, + "GroupId": 100001, + "buffID": 115005311, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 18, + "GroupId": 100001, + "buffID": 115005312, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 19, + "GroupId": 100001, + "buffID": 143006311, + "GroupNum": 3, + "BuffWt": 50, + "TypeWt": 600 + }, + { + "Id": 20, + "GroupId": 100001, + "buffID": 143006312, + "GroupNum": 3, + "BuffWt": 50, "TypeWt": 600 } ] \ No newline at end of file diff --git a/bin/json/game_stonebattle.json b/bin/json/game_stonebattle.json new file mode 100644 index 000000000..6a258ef3e --- /dev/null +++ b/bin/json/game_stonebattle.json @@ -0,0 +1,62 @@ +[ + { + "BattleStageId": 110101, + "Atk": 0, + "Hp": 0, + "Def": 0, + "SpeedValue": 0, + "EffreValue": 0, + "BattleReadyID": 118, + "FormatList": [ + 101011 + ] + }, + { + "BattleStageId": 110102, + "Atk": 0, + "Hp": 0, + "Def": 0, + "SpeedValue": 0, + "EffreValue": 0, + "BattleReadyID": 118, + "FormatList": [ + 101012 + ] + }, + { + "BattleStageId": 110103, + "Atk": 0, + "Hp": 0, + "Def": 0, + "SpeedValue": 0, + "EffreValue": 0, + "BattleReadyID": 118, + "FormatList": [ + 101013 + ] + }, + { + "BattleStageId": 110104, + "Atk": 0, + "Hp": 0, + "Def": 0, + "SpeedValue": 0, + "EffreValue": 0, + "BattleReadyID": 118, + "FormatList": [ + 101021 + ] + }, + { + "BattleStageId": 110105, + "Atk": 0, + "Hp": 0, + "Def": 0, + "SpeedValue": 0, + "EffreValue": 0, + "BattleReadyID": 118, + "FormatList": [ + 101022 + ] + } +] \ No newline at end of file diff --git a/bin/json/game_stronebuff.json b/bin/json/game_stonebuff.json similarity index 100% rename from bin/json/game_stronebuff.json rename to bin/json/game_stonebuff.json diff --git a/bin/json/game_stroneevent.json b/bin/json/game_stoneevent.json similarity index 100% rename from bin/json/game_stroneevent.json rename to bin/json/game_stoneevent.json diff --git a/bin/json/game_stroneroom.json b/bin/json/game_stoneroom.json similarity index 100% rename from bin/json/game_stroneroom.json rename to bin/json/game_stoneroom.json diff --git a/bin/json/game_stronestage.json b/bin/json/game_stonestage.json similarity index 100% rename from bin/json/game_stronestage.json rename to bin/json/game_stonestage.json diff --git a/modules/stonehenge/api_enterlevel.go b/modules/stonehenge/api_enterlevel.go index 24944cb94..91e0b394b 100644 --- a/modules/stonehenge/api_enterlevel.go +++ b/modules/stonehenge/api_enterlevel.go @@ -25,9 +25,9 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt update map[string]interface{} heros []*pb.DBHero portal int32 // 生成传送门 构造房间数据 - confStage *cfg.GameStroneStageData + confStage *cfg.GameStoneStageData roomlotteryConf *cfg.GameRoomlotteryData - roomConf *cfg.GameStroneRoomData + roomConf *cfg.GameStoneRoomData szBuff []int32 err error ) diff --git a/modules/stonehenge/api_event.go b/modules/stonehenge/api_event.go index 39137eb8d..f87c4b5e1 100644 --- a/modules/stonehenge/api_event.go +++ b/modules/stonehenge/api_event.go @@ -22,10 +22,10 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq var ( stone *pb.DBStonehenge update map[string]interface{} - roomConf *cfg.GameStroneRoomData + roomConf *cfg.GameStoneRoomData err error newEvent int32 // 是否有新的事件 - eventConf *cfg.GameStroneEventData + eventConf *cfg.GameStoneEventData ) update = make(map[string]interface{}) if errdata = this.EventCheck(session, req); errdata != nil { diff --git a/modules/stonehenge/configure.go b/modules/stonehenge/configure.go index 5848b7eeb..b9e4b3195 100644 --- a/modules/stonehenge/configure.go +++ b/modules/stonehenge/configure.go @@ -15,10 +15,10 @@ const ( game_bufflottery = "game_bufflottery.json" game_eventlottery = "game_eventlottery.json" game_roomlottery = "game_roomlottery.json" - game_roomconf = "game_stroneroom.json" - game_stageconf = "game_stronestage.json" - game_buffconf = "game_stronebuff.json" - game_eventconf = "game_stroneevent.json" + game_roomconf = "game_stoneroom.json" + game_stageconf = "game_stonestage.json" + game_buffconf = "game_stonebuff.json" + game_eventconf = "game_stoneevent.json" ) ///背包配置管理组件 @@ -27,7 +27,7 @@ type configureComp struct { module *Stonehenge hlock sync.RWMutex // stronestage - stage map[int64]*cfg.GameStroneStageData + stage map[int64]*cfg.GameStoneStageData // buff buff map[int32]map[int32]struct{} // key buff 类型 value buffid @@ -76,13 +76,13 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp err = this.LoadConfigure(game_roomlottery, cfg.NewGameRoomlottery) configure.RegisterConfigure(game_roomlottery, cfg.NewGameRoomlottery, this.LoadRoomGroupData) - err = this.LoadConfigure(game_stageconf, cfg.NewGameStroneStage) - err = this.LoadConfigure(game_buffconf, cfg.NewGameStroneBuff) - err = this.LoadConfigure(game_eventconf, cfg.NewGameStroneEvent) - err = this.LoadConfigure(game_roomconf, cfg.NewGameStroneRoom) + err = this.LoadConfigure(game_stageconf, cfg.NewGameStoneStage) + err = this.LoadConfigure(game_buffconf, cfg.NewGameStoneBuff) + err = this.LoadConfigure(game_eventconf, cfg.NewGameStoneEvent) + err = this.LoadConfigure(game_roomconf, cfg.NewGameStoneRoom) - configure.RegisterConfigure(game_stageconf, cfg.NewGameStroneStage, this.LoadGameStroneStage) - configure.RegisterConfigure(game_buffconf, cfg.NewGameStroneBuff, this.LoadGameStroneBuff) + configure.RegisterConfigure(game_stageconf, cfg.NewGameStoneStage, this.LoadGameStroneStage) + configure.RegisterConfigure(game_buffconf, cfg.NewGameStoneBuff, this.LoadGameStroneBuff) return } @@ -478,12 +478,12 @@ func (this *configureComp) GetBuffGroupDataByLottery(lotteryId int32, addType in return } -func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStroneRoomData, err error) { +func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStoneRoomData, err error) { var ( v interface{} ) if v, err = this.GetConfigure(game_roomconf); err == nil { - if configure, ok := v.(*cfg.GameStroneRoom); ok { + if configure, ok := v.(*cfg.GameStoneRoom); ok { if conf = configure.Get(roomid); conf != nil { return } @@ -493,12 +493,12 @@ func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStr return } -func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStroneBuffData, err error) { +func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStoneBuffData, err error) { var ( v interface{} ) if v, err = this.GetConfigure(game_buffconf); err == nil { - if configure, ok := v.(*cfg.GameStroneBuff); ok { + if configure, ok := v.(*cfg.GameStoneBuff); ok { if conf = configure.Get(buffid); conf != nil { return } @@ -508,12 +508,12 @@ func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStr return } -func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameStroneEventData, err error) { +func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameStoneEventData, err error) { var ( v interface{} ) if v, err = this.GetConfigure(game_eventconf); err == nil { - if configure, ok := v.(*cfg.GameStroneEvent); ok { + if configure, ok := v.(*cfg.GameStoneEvent); ok { if conf = configure.Get(eventid); conf != nil { return } @@ -527,10 +527,10 @@ func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameS func (this *configureComp) LoadGameStroneStage() { if v, err := this.GetConfigure(game_stageconf); err == nil { - if configure, ok := v.(*cfg.GameStroneStage); ok { + if configure, ok := v.(*cfg.GameStoneStage); ok { this.hlock.Lock() defer this.hlock.Unlock() - this.stage = make(map[int64]*cfg.GameStroneStageData, 0) + this.stage = make(map[int64]*cfg.GameStoneStageData, 0) for _, v := range configure.GetDataList() { key := int64(v.StageId)<<16 + int64(v.RoomId) this.stage[key] = v @@ -542,7 +542,7 @@ func (this *configureComp) LoadGameStroneStage() { } // 参数1 关卡id 参数2 层数id -func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (conf *cfg.GameStroneStageData) { +func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (conf *cfg.GameStoneStageData) { key := int64(stgeid)<<16 + int64(roomid) return this.stage[key] } @@ -550,7 +550,7 @@ func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (co func (this *configureComp) LoadGameStroneBuff() { if v, err := this.GetConfigure(game_buffconf); err == nil { - if configure, ok := v.(*cfg.GameStroneBuff); ok { + if configure, ok := v.(*cfg.GameStoneBuff); ok { this.hlock.Lock() defer this.hlock.Unlock() this.buff = make(map[int32]map[int32]struct{}, 0) diff --git a/sys/configure/structs/Game.StoneBattle.go b/sys/configure/structs/Game.StoneBattle.go new file mode 100644 index 000000000..49eb3d7c2 --- /dev/null +++ b/sys/configure/structs/Game.StoneBattle.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 GameStoneBattle struct { + _dataMap map[int32]*GameStoneBattleData + _dataList []*GameStoneBattleData +} + +func NewGameStoneBattle(_buf []map[string]interface{}) (*GameStoneBattle, error) { + _dataList := make([]*GameStoneBattleData, 0, len(_buf)) + dataMap := make(map[int32]*GameStoneBattleData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameStoneBattleData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.BattleStageId] = _v + } + } + return &GameStoneBattle{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameStoneBattle) GetDataMap() map[int32]*GameStoneBattleData { + return table._dataMap +} + +func (table *GameStoneBattle) GetDataList() []*GameStoneBattleData { + return table._dataList +} + +func (table *GameStoneBattle) Get(key int32) *GameStoneBattleData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.StoneBattleData.go b/sys/configure/structs/Game.StoneBattleData.go new file mode 100644 index 000000000..a9c5a540f --- /dev/null +++ b/sys/configure/structs/Game.StoneBattleData.go @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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 GameStoneBattleData struct { + BattleStageId int32 + Atk int32 + Hp int32 + Def int32 + SpeedValue int32 + EffreValue int32 + BattleReadyID int32 + FormatList []int32 +} + +const TypeId_GameStoneBattleData = 469689547 + +func (*GameStoneBattleData) GetTypeId() int32 { + return 469689547 +} + +func (_v *GameStoneBattleData)Deserialize(_buf map[string]interface{}) (err error) { + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleStageId"].(float64); !_ok_ { err = errors.New("BattleStageId error"); return }; _v.BattleStageId = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Atk"].(float64); !_ok_ { err = errors.New("Atk error"); return }; _v.Atk = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Hp"].(float64); !_ok_ { err = errors.New("Hp error"); return }; _v.Hp = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Def"].(float64); !_ok_ { err = errors.New("Def error"); return }; _v.Def = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SpeedValue"].(float64); !_ok_ { err = errors.New("SpeedValue error"); return }; _v.SpeedValue = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EffreValue"].(float64); !_ok_ { err = errors.New("EffreValue error"); return }; _v.EffreValue = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return } + + _v.FormatList = make([]int32, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ int32 + { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } + _v.FormatList = append(_v.FormatList, _list_v_) + } + } + + return +} + +func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) { + v := &GameStoneBattleData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.StoneBuff.go b/sys/configure/structs/Game.StoneBuff.go new file mode 100644 index 000000000..0667fedfb --- /dev/null +++ b/sys/configure/structs/Game.StoneBuff.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 GameStoneBuff struct { + _dataMap map[int32]*GameStoneBuffData + _dataList []*GameStoneBuffData +} + +func NewGameStoneBuff(_buf []map[string]interface{}) (*GameStoneBuff, error) { + _dataList := make([]*GameStoneBuffData, 0, len(_buf)) + dataMap := make(map[int32]*GameStoneBuffData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameStoneBuffData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.BuffId] = _v + } + } + return &GameStoneBuff{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameStoneBuff) GetDataMap() map[int32]*GameStoneBuffData { + return table._dataMap +} + +func (table *GameStoneBuff) GetDataList() []*GameStoneBuffData { + return table._dataList +} + +func (table *GameStoneBuff) Get(key int32) *GameStoneBuffData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.StroneBuffData.go b/sys/configure/structs/Game.StoneBuffData.go similarity index 88% rename from sys/configure/structs/Game.StroneBuffData.go rename to sys/configure/structs/Game.StoneBuffData.go index 3ad0c046e..80b0abd17 100644 --- a/sys/configure/structs/Game.StroneBuffData.go +++ b/sys/configure/structs/Game.StoneBuffData.go @@ -10,7 +10,7 @@ package cfg import "errors" -type GameStroneBuffData struct { +type GameStoneBuffData struct { BuffId int32 BuffGroupId int32 Type int32 @@ -23,13 +23,13 @@ type GameStroneBuffData struct { BuffSell *Gameatn } -const TypeId_GameStroneBuffData = 1812104654 +const TypeId_GameStoneBuffData = -1457644250 -func (*GameStroneBuffData) GetTypeId() int32 { - return 1812104654 +func (*GameStoneBuffData) GetTypeId() int32 { + return -1457644250 } -func (_v *GameStroneBuffData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameStoneBuffData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ { err = errors.New("BuffId error"); return }; _v.BuffId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffGroupId"].(float64); !_ok_ { err = errors.New("BuffGroupId error"); return }; _v.BuffGroupId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) } @@ -43,8 +43,8 @@ func (_v *GameStroneBuffData)Deserialize(_buf map[string]interface{}) (err error return } -func DeserializeGameStroneBuffData(_buf map[string]interface{}) (*GameStroneBuffData, error) { - v := &GameStroneBuffData{} +func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) { + v := &GameStoneBuffData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.StoneEvent.go b/sys/configure/structs/Game.StoneEvent.go new file mode 100644 index 000000000..858c4f1e6 --- /dev/null +++ b/sys/configure/structs/Game.StoneEvent.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 GameStoneEvent struct { + _dataMap map[int32]*GameStoneEventData + _dataList []*GameStoneEventData +} + +func NewGameStoneEvent(_buf []map[string]interface{}) (*GameStoneEvent, error) { + _dataList := make([]*GameStoneEventData, 0, len(_buf)) + dataMap := make(map[int32]*GameStoneEventData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameStoneEventData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.EventId] = _v + } + } + return &GameStoneEvent{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameStoneEvent) GetDataMap() map[int32]*GameStoneEventData { + return table._dataMap +} + +func (table *GameStoneEvent) GetDataList() []*GameStoneEventData { + return table._dataList +} + +func (table *GameStoneEvent) Get(key int32) *GameStoneEventData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.StroneEventData.go b/sys/configure/structs/Game.StoneEventData.go similarity index 90% rename from sys/configure/structs/Game.StroneEventData.go rename to sys/configure/structs/Game.StoneEventData.go index 020cfd55e..c3db52243 100644 --- a/sys/configure/structs/Game.StroneEventData.go +++ b/sys/configure/structs/Game.StoneEventData.go @@ -10,7 +10,7 @@ package cfg import "errors" -type GameStroneEventData struct { +type GameStoneEventData struct { EventId int32 EventTitle string EventType int32 @@ -24,13 +24,13 @@ type GameStroneEventData struct { Probability int32 } -const TypeId_GameStroneEventData = 341060691 +const TypeId_GameStoneEventData = 2058059771 -func (*GameStroneEventData) GetTypeId() int32 { - return 341060691 +func (*GameStoneEventData) GetTypeId() int32 { + return 2058059771 } -func (_v *GameStroneEventData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameStoneEventData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventId"].(float64); !_ok_ { err = errors.New("EventId error"); return }; _v.EventId = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["EventTitle"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.EventTitle error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.EventTitle, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventType"].(float64); !_ok_ { err = errors.New("EventType error"); return }; _v.EventType = int32(_tempNum_) } @@ -58,8 +58,8 @@ func (_v *GameStroneEventData)Deserialize(_buf map[string]interface{}) (err erro return } -func DeserializeGameStroneEventData(_buf map[string]interface{}) (*GameStroneEventData, error) { - v := &GameStroneEventData{} +func DeserializeGameStoneEventData(_buf map[string]interface{}) (*GameStoneEventData, error) { + v := &GameStoneEventData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.StoneRoom.go b/sys/configure/structs/Game.StoneRoom.go new file mode 100644 index 000000000..83bda4ba3 --- /dev/null +++ b/sys/configure/structs/Game.StoneRoom.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 GameStoneRoom struct { + _dataMap map[int32]*GameStoneRoomData + _dataList []*GameStoneRoomData +} + +func NewGameStoneRoom(_buf []map[string]interface{}) (*GameStoneRoom, error) { + _dataList := make([]*GameStoneRoomData, 0, len(_buf)) + dataMap := make(map[int32]*GameStoneRoomData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameStoneRoomData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.RoomId] = _v + } + } + return &GameStoneRoom{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameStoneRoom) GetDataMap() map[int32]*GameStoneRoomData { + return table._dataMap +} + +func (table *GameStoneRoom) GetDataList() []*GameStoneRoomData { + return table._dataList +} + +func (table *GameStoneRoom) Get(key int32) *GameStoneRoomData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.StroneRoomData.go b/sys/configure/structs/Game.StoneRoomData.go similarity index 89% rename from sys/configure/structs/Game.StroneRoomData.go rename to sys/configure/structs/Game.StoneRoomData.go index 10b14718b..94fcfe839 100644 --- a/sys/configure/structs/Game.StroneRoomData.go +++ b/sys/configure/structs/Game.StoneRoomData.go @@ -10,7 +10,7 @@ package cfg import "errors" -type GameStroneRoomData struct { +type GameStoneRoomData struct { RoomId int32 RoomName string SceneName string @@ -24,13 +24,13 @@ type GameStroneRoomData struct { Condition int32 } -const TypeId_GameStroneRoomData = -1133628842 +const TypeId_GameStoneRoomData = -108410450 -func (*GameStroneRoomData) GetTypeId() int32 { - return -1133628842 +func (*GameStoneRoomData) GetTypeId() int32 { + return -108410450 } -func (_v *GameStroneRoomData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameStoneRoomData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RoomId"].(float64); !_ok_ { err = errors.New("RoomId error"); return }; _v.RoomId = int32(_tempNum_) } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["RoomName"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.RoomName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.RoomName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } { var _ok_ bool; if _v.SceneName, _ok_ = _buf["SceneName"].(string); !_ok_ { err = errors.New("SceneName error"); return } } @@ -45,8 +45,8 @@ func (_v *GameStroneRoomData)Deserialize(_buf map[string]interface{}) (err error return } -func DeserializeGameStroneRoomData(_buf map[string]interface{}) (*GameStroneRoomData, error) { - v := &GameStroneRoomData{} +func DeserializeGameStoneRoomData(_buf map[string]interface{}) (*GameStoneRoomData, error) { + v := &GameStoneRoomData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.StoneStage.go b/sys/configure/structs/Game.StoneStage.go new file mode 100644 index 000000000..b0c457ba5 --- /dev/null +++ b/sys/configure/structs/Game.StoneStage.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 GameStoneStage struct { + _dataMap map[int32]*GameStoneStageData + _dataList []*GameStoneStageData +} + +func NewGameStoneStage(_buf []map[string]interface{}) (*GameStoneStage, error) { + _dataList := make([]*GameStoneStageData, 0, len(_buf)) + dataMap := make(map[int32]*GameStoneStageData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameStoneStageData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameStoneStage{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameStoneStage) GetDataMap() map[int32]*GameStoneStageData { + return table._dataMap +} + +func (table *GameStoneStage) GetDataList() []*GameStoneStageData { + return table._dataList +} + +func (table *GameStoneStage) Get(key int32) *GameStoneStageData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.StroneStageData.go b/sys/configure/structs/Game.StoneStageData.go similarity index 93% rename from sys/configure/structs/Game.StroneStageData.go rename to sys/configure/structs/Game.StoneStageData.go index a2cc14a96..e191592e5 100644 --- a/sys/configure/structs/Game.StroneStageData.go +++ b/sys/configure/structs/Game.StoneStageData.go @@ -10,7 +10,7 @@ package cfg import "errors" -type GameStroneStageData struct { +type GameStoneStageData struct { Id int32 StageId int32 PreviouStage int32 @@ -28,13 +28,13 @@ type GameStroneStageData struct { StageValue int32 } -const TypeId_GameStroneStageData = 2146544311 +const TypeId_GameStoneStageData = -431423905 -func (*GameStroneStageData) GetTypeId() int32 { - return 2146544311 +func (*GameStoneStageData) GetTypeId() int32 { + return -431423905 } -func (_v *GameStroneStageData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameStoneStageData)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["StageId"].(float64); !_ok_ { err = errors.New("StageId error"); return }; _v.StageId = 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_) } @@ -92,8 +92,8 @@ func (_v *GameStroneStageData)Deserialize(_buf map[string]interface{}) (err erro return } -func DeserializeGameStroneStageData(_buf map[string]interface{}) (*GameStroneStageData, error) { - v := &GameStroneStageData{} +func DeserializeGameStoneStageData(_buf map[string]interface{}) (*GameStoneStageData, error) { + v := &GameStoneStageData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.StroneBuff.go b/sys/configure/structs/Game.StroneBuff.go deleted file mode 100644 index 01af4bb77..000000000 --- a/sys/configure/structs/Game.StroneBuff.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 GameStroneBuff struct { - _dataMap map[int32]*GameStroneBuffData - _dataList []*GameStroneBuffData -} - -func NewGameStroneBuff(_buf []map[string]interface{}) (*GameStroneBuff, error) { - _dataList := make([]*GameStroneBuffData, 0, len(_buf)) - dataMap := make(map[int32]*GameStroneBuffData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameStroneBuffData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.BuffId] = _v - } - } - return &GameStroneBuff{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameStroneBuff) GetDataMap() map[int32]*GameStroneBuffData { - return table._dataMap -} - -func (table *GameStroneBuff) GetDataList() []*GameStroneBuffData { - return table._dataList -} - -func (table *GameStroneBuff) Get(key int32) *GameStroneBuffData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.StroneEvent.go b/sys/configure/structs/Game.StroneEvent.go deleted file mode 100644 index 27e585609..000000000 --- a/sys/configure/structs/Game.StroneEvent.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 GameStroneEvent struct { - _dataMap map[int32]*GameStroneEventData - _dataList []*GameStroneEventData -} - -func NewGameStroneEvent(_buf []map[string]interface{}) (*GameStroneEvent, error) { - _dataList := make([]*GameStroneEventData, 0, len(_buf)) - dataMap := make(map[int32]*GameStroneEventData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameStroneEventData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.EventId] = _v - } - } - return &GameStroneEvent{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameStroneEvent) GetDataMap() map[int32]*GameStroneEventData { - return table._dataMap -} - -func (table *GameStroneEvent) GetDataList() []*GameStroneEventData { - return table._dataList -} - -func (table *GameStroneEvent) Get(key int32) *GameStroneEventData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.StroneRoom.go b/sys/configure/structs/Game.StroneRoom.go deleted file mode 100644 index 0b198e4bc..000000000 --- a/sys/configure/structs/Game.StroneRoom.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 GameStroneRoom struct { - _dataMap map[int32]*GameStroneRoomData - _dataList []*GameStroneRoomData -} - -func NewGameStroneRoom(_buf []map[string]interface{}) (*GameStroneRoom, error) { - _dataList := make([]*GameStroneRoomData, 0, len(_buf)) - dataMap := make(map[int32]*GameStroneRoomData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameStroneRoomData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.RoomId] = _v - } - } - return &GameStroneRoom{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameStroneRoom) GetDataMap() map[int32]*GameStroneRoomData { - return table._dataMap -} - -func (table *GameStroneRoom) GetDataList() []*GameStroneRoomData { - return table._dataList -} - -func (table *GameStroneRoom) Get(key int32) *GameStroneRoomData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.StroneStage.go b/sys/configure/structs/Game.StroneStage.go deleted file mode 100644 index 6a21aa81d..000000000 --- a/sys/configure/structs/Game.StroneStage.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 GameStroneStage struct { - _dataMap map[int32]*GameStroneStageData - _dataList []*GameStroneStageData -} - -func NewGameStroneStage(_buf []map[string]interface{}) (*GameStroneStage, error) { - _dataList := make([]*GameStroneStageData, 0, len(_buf)) - dataMap := make(map[int32]*GameStroneStageData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameStroneStageData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.Id] = _v - } - } - return &GameStroneStage{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameStroneStage) GetDataMap() map[int32]*GameStroneStageData { - return table._dataMap -} - -func (table *GameStroneStage) GetDataList() []*GameStroneStageData { - return table._dataList -} - -func (table *GameStroneStage) Get(key int32) *GameStroneStageData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 5316d20b4..f8f8ef3b4 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -203,10 +203,11 @@ type Tables struct { Roomlottery *GameRoomlottery Bufflottery *GameBufflottery Eventlottery *GameEventlottery - StroneBuff *GameStroneBuff - StroneRoom *GameStroneRoom - StroneStage *GameStroneStage - StroneEvent *GameStroneEvent + StoneBuff *GameStoneBuff + StoneRoom *GameStoneRoom + StoneStage *GameStoneStage + StoneEvent *GameStoneEvent + StoneBattle *GameStoneBattle GameSummaryTab *GameGameSummaryTab GameSummary *GameGameSummary CompositeAll *GameCompositeAll @@ -1369,28 +1370,34 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.Eventlottery, err = NewGameEventlottery(buf) ; err != nil { return nil, err } - if buf, err = loader("game_stronebuff") ; err != nil { + if buf, err = loader("game_stonebuff") ; err != nil { return nil, err } - if tables.StroneBuff, err = NewGameStroneBuff(buf) ; err != nil { + if tables.StoneBuff, err = NewGameStoneBuff(buf) ; err != nil { return nil, err } - if buf, err = loader("game_stroneroom") ; err != nil { + if buf, err = loader("game_stoneroom") ; err != nil { return nil, err } - if tables.StroneRoom, err = NewGameStroneRoom(buf) ; err != nil { + if tables.StoneRoom, err = NewGameStoneRoom(buf) ; err != nil { return nil, err } - if buf, err = loader("game_stronestage") ; err != nil { + if buf, err = loader("game_stonestage") ; err != nil { return nil, err } - if tables.StroneStage, err = NewGameStroneStage(buf) ; err != nil { + if tables.StoneStage, err = NewGameStoneStage(buf) ; err != nil { return nil, err } - if buf, err = loader("game_stroneevent") ; err != nil { + if buf, err = loader("game_stoneevent") ; err != nil { return nil, err } - if tables.StroneEvent, err = NewGameStroneEvent(buf) ; err != nil { + if tables.StoneEvent, err = NewGameStoneEvent(buf) ; err != nil { + return nil, err + } + if buf, err = loader("game_stonebattle") ; err != nil { + return nil, err + } + if tables.StoneBattle, err = NewGameStoneBattle(buf) ; err != nil { return nil, err } if buf, err = loader("game_gamesummarytab") ; err != nil {