diff --git a/bin/json/game_guildbosstask.json b/bin/json/game_guildbosstask.json deleted file mode 100644 index 18dd5f9eb..000000000 --- a/bin/json/game_guildbosstask.json +++ /dev/null @@ -1,152 +0,0 @@ -[ - { - "id": 1, - "score": 1500000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_1", - "text": "总积分达到1500000分" - } - }, - { - "id": 2, - "score": 3000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_2", - "text": "总积分达到3000000分" - } - }, - { - "id": 3, - "score": 4500000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_3", - "text": "总积分达到4500000分" - } - }, - { - "id": 4, - "score": 6000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_4", - "text": "总积分达到6000000分" - } - }, - { - "id": 5, - "score": 9000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_5", - "text": "总积分达到9000000分" - } - }, - { - "id": 6, - "score": 12000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_6", - "text": "总积分达到12000000分" - } - }, - { - "id": 7, - "score": 15000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_7", - "text": "总积分达到15000000分" - } - }, - { - "id": 8, - "score": 18000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_8", - "text": "总积分达到18000000分" - } - }, - { - "id": 9, - "score": 21000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_9", - "text": "总积分达到21000000分" - } - }, - { - "id": 10, - "score": 24000000, - "reward": [ - { - "a": "attr", - "t": "gold", - "n": 1000 - } - ], - "task_describe": { - "key": "guildboss_task_task_describe_10", - "text": "总积分达到24000000分" - } - } -] \ No newline at end of file diff --git a/bin/json/game_robotdata.json b/bin/json/game_robotdata.json deleted file mode 100644 index a039d2ed3..000000000 --- a/bin/json/game_robotdata.json +++ /dev/null @@ -1,322 +0,0 @@ -[ - { - "robotid": 10001, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "激奋的布卢尔", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10002, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "快乐的艾丽莎", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10003, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "朴素的希伯来", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10004, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "庄重的布卢姆", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10005, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "和谐的哈莉特", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10006, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "坦然的乔伊斯", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10007, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "苗条的赫瑟尔", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10008, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "可人的博斯韦", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10009, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "青春的罗瑞尔", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10010, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "开心的茉莉", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10011, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "幸运的蒂安娜", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10012, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "踊跃的波伊尔", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10013, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "愉快的爱罗拉", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10014, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "神奇的塔利娅", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10015, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "不凡的埃达", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10016, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "进步的汉塞尔", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10017, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "业余的桃乐丝", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10018, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "整洁的薇薇安", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10019, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "认真的塞尔特", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10020, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "友爱的白雪", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10021, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "聪明的玛娅", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10022, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "细心的阿拉丁", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10023, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "娇美的布赖特", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10024, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "无知的伊凡", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10025, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "冷魅的梅根", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10026, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "雍容的布罗德", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10027, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "害羞的夏洛特", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10028, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "热情的海洛伊", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10029, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "开朗的克莱儿", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10030, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "唠叨的巴比特", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10031, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "娇媚的波比", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10032, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "绝美的艾薇", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10033, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "职业的艾尔玛", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10034, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "佩服的布鲁克", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10035, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "迷茫的鲍德温", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10036, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "摩登的鲁思", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10037, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "火红的巴纳德", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10038, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "好动的杰奎琳", - "sex": 1, - "showid": "16010101" - }, - { - "robotid": 10039, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "娇艳的丝特勒", - "sex": 0, - "showid": "16010101" - }, - { - "robotid": 10040, - "icon": "hbkp_js_24003", - "lvshow": 60, - "name": "欢闹的妮莉雅", - "sex": 1, - "showid": "16010101" - } -] \ No newline at end of file diff --git a/modules/stonehenge/configure.go b/modules/stonehenge/configure.go index 5cb62ff4b..5a49548ec 100644 --- a/modules/stonehenge/configure.go +++ b/modules/stonehenge/configure.go @@ -15,6 +15,10 @@ const ( game_bufflottery = "game_bufflottery.json" game_eventlottery = "game_eventlottery.json" game_roomlottery = "game_roomlottery.json" + game_roomconf = "game_roomconfig.json" + game_stageconf = "game_stronestage.json" + game_buffconf = "game_stronebuff.json" + game_eventconf = "game_stroneevent.json" ) ///背包配置管理组件 @@ -78,6 +82,10 @@ 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) //测试 接口 _d := this.GetBuffGroupDataByLottery(100001) _d = this.GetEventGroupDataByLottery(1001001) @@ -623,3 +631,25 @@ func (this *configureComp) GetBuffGroupDataByLottery(lotteryId int32) (buff []in } return } + +/* + game_roomconf = "game_roomconfig.json" + game_stageconf = "game_stronestage.json" + game_buffconf = "game_stronebuff.json" + game_eventconf = "game_stroneevent.json" +*/ + +func (this *configureComp) GetStoneRoomIdBy(roomid int32) (conf *cfg.GameStroneRoomData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_roomconf); err == nil { + if configure, ok := v.(*cfg.GameStroneRoom); ok { + if conf = configure.Get(roomid); conf != nil { + return + } + } + } + err = comm.NewNotFoundConfErr(moduleName, game_roomconf, roomid) + return +} diff --git a/sys/configure/structs/Game.GuildBossTask.go b/sys/configure/structs/Game.GuildBossTask.go deleted file mode 100644 index d40d7ae99..000000000 --- a/sys/configure/structs/Game.GuildBossTask.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 GameGuildBossTask struct { - _dataMap map[int32]*GameGuildBossTaskData - _dataList []*GameGuildBossTaskData -} - -func NewGameGuildBossTask(_buf []map[string]interface{}) (*GameGuildBossTask, error) { - _dataList := make([]*GameGuildBossTaskData, 0, len(_buf)) - dataMap := make(map[int32]*GameGuildBossTaskData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameGuildBossTaskData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.Id] = _v - } - } - return &GameGuildBossTask{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameGuildBossTask) GetDataMap() map[int32]*GameGuildBossTaskData { - return table._dataMap -} - -func (table *GameGuildBossTask) GetDataList() []*GameGuildBossTaskData { - return table._dataList -} - -func (table *GameGuildBossTask) Get(key int32) *GameGuildBossTaskData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.GuildBossTaskData.go b/sys/configure/structs/Game.GuildBossTaskData.go deleted file mode 100644 index 3110f6990..000000000 --- a/sys/configure/structs/Game.GuildBossTaskData.go +++ /dev/null @@ -1,54 +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 - -import "errors" - -type GameGuildBossTaskData struct { - Id int32 - Score int32 - Reward []*Gameatn - TaskDescribe string -} - -const TypeId_GameGuildBossTaskData = -1074074125 - -func (*GameGuildBossTaskData) GetTypeId() int32 { - return -1074074125 -} - -func (_v *GameGuildBossTaskData)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["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return } - - _v.Reward = 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.Reward = append(_v.Reward, _list_v_) - } - } - - {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_describe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDescribe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDescribe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } - return -} - -func DeserializeGameGuildBossTaskData(_buf map[string]interface{}) (*GameGuildBossTaskData, error) { - v := &GameGuildBossTaskData{} - if err := v.Deserialize(_buf); err == nil { - return v, nil - } else { - return nil, err - } -} diff --git a/sys/configure/structs/Game.RobotDataData.go b/sys/configure/structs/Game.RobotDataData.go deleted file mode 100644 index f50d04d75..000000000 --- a/sys/configure/structs/Game.RobotDataData.go +++ /dev/null @@ -1,45 +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 - -import "errors" - -type GameRobotDataData struct { - Robotid int32 - Icon string - Lvshow int32 - Name string - Sex int32 - Showid string -} - -const TypeId_GameRobotDataData = 1848956418 - -func (*GameRobotDataData) GetTypeId() int32 { - return 1848956418 -} - -func (_v *GameRobotDataData)Deserialize(_buf map[string]interface{}) (err error) { - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["robotid"].(float64); !_ok_ { err = errors.New("robotid error"); return }; _v.Robotid = int32(_tempNum_) } - { var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lvshow"].(float64); !_ok_ { err = errors.New("lvshow error"); return }; _v.Lvshow = int32(_tempNum_) } - { var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sex"].(float64); !_ok_ { err = errors.New("sex error"); return }; _v.Sex = int32(_tempNum_) } - { var _ok_ bool; if _v.Showid, _ok_ = _buf["showid"].(string); !_ok_ { err = errors.New("showid error"); return } } - return -} - -func DeserializeGameRobotDataData(_buf map[string]interface{}) (*GameRobotDataData, error) { - v := &GameRobotDataData{} - if err := v.Deserialize(_buf); err == nil { - return v, nil - } else { - return nil, err - } -}