From 9448a51507975bae7955cbeb8309078c13267939 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Fri, 21 Apr 2023 21:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_global.json | 16 ++++++- bin/json/game_model.json | 42 +++++++++---------- bin/json/game_opencond.json | 21 +++++++++- modules/parkour/configure.go | 6 +-- sys/configure/structs/Game.buzkashiOpen.go | 22 +++++----- .../structs/Game.buzkashiOpenData.go | 14 +++---- sys/configure/structs/Game.kv.go | 37 ++++++++++++++++ sys/configure/structs/Tables.go | 4 +- sys/configure/structs/game.globalData.go | 15 +++++++ 9 files changed, 131 insertions(+), 46 deletions(-) create mode 100644 sys/configure/structs/Game.kv.go diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 233818b05..edd6f3ae3 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -716,6 +716,20 @@ "n": 1000 } ], - "buzkashi_resurrection": 10 + "buzkashi_resurrection": 10, + "favorability_attenuation": [ + { + "k": 3, + "v": 1000 + }, + { + "k": 6, + "v": 800 + }, + { + "k": 9, + "v": 500 + } + ] } ] \ No newline at end of file diff --git a/bin/json/game_model.json b/bin/json/game_model.json index f2faeb998..7d8bc6771 100644 --- a/bin/json/game_model.json +++ b/bin/json/game_model.json @@ -3490,12 +3490,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3525,12 +3525,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3560,12 +3560,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3595,12 +3595,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3630,12 +3630,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3665,12 +3665,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, @@ -3700,12 +3700,12 @@ }, "boxPos": { "x": 0, - "y": 0.5, + "y": 16, "z": 0 }, "boxSize": { - "x": 1, - "y": 1, + "x": 28, + "y": 8, "z": 1 } }, diff --git a/bin/json/game_opencond.json b/bin/json/game_opencond.json index e25a3d30d..e00a74276 100644 --- a/bin/json/game_opencond.json +++ b/bin/json/game_opencond.json @@ -1051,7 +1051,7 @@ "key": "opencond_prompt_Mystery", "text": "功能暂未开启" }, - "uiid": 0, + "uiid": 903, "activateType": 0, "notify": [] }, @@ -1660,5 +1660,24 @@ "uiid": 0, "activateType": 0, "notify": [] + }, + { + "id": "vikingexpedition_experience", + "name": { + "key": "num_3008", + "text": "经验副本" + }, + "main": [], + "optional": "", + "wkqbx": 0, + "kqbx": 0, + "img": "", + "prompt": { + "key": "", + "text": "" + }, + "uiid": 10005, + "activateType": 0, + "notify": [] } ] \ No newline at end of file diff --git a/modules/parkour/configure.go b/modules/parkour/configure.go index 1488b9cab..d649e4e26 100644 --- a/modules/parkour/configure.go +++ b/modules/parkour/configure.go @@ -26,7 +26,7 @@ type configureComp struct { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { this.MCompConfigure.Init(service, module, comp, options) this.module = module.(*Parkour) - this.LoadConfigure(game_buzkashiopen, cfg.NewGamebuzkashiOpen) + this.LoadConfigure(game_buzkashiopen, cfg.NewGameBuzkashiOpen) this.LoadConfigure(game_buzkashigrade, cfg.NewGameBuzkashiGrade) this.LoadConfigure(game_buzkashilv, cfg.NewGameBuzkashiLv) this.LoadConfigure(game_buzkashimount, cfg.NewGameBuzkashiMount) @@ -38,7 +38,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp func (this *configureComp) isopen() (open bool) { var ( v interface{} - config *cfg.GamebuzkashiOpen + config *cfg.GameBuzkashiOpen currtime string = configure.Now().Format("15:04") err error ok bool @@ -47,7 +47,7 @@ func (this *configureComp) isopen() (open bool) { this.module.Errorln(err) return } else { - if config, ok = v.(*cfg.GamebuzkashiOpen); !ok { + if config, ok = v.(*cfg.GameBuzkashiOpen); !ok { err = fmt.Errorf("config type err:%T", v) return } else { diff --git a/sys/configure/structs/Game.buzkashiOpen.go b/sys/configure/structs/Game.buzkashiOpen.go index 819f52683..edce49419 100644 --- a/sys/configure/structs/Game.buzkashiOpen.go +++ b/sys/configure/structs/Game.buzkashiOpen.go @@ -8,34 +8,34 @@ package cfg -type GamebuzkashiOpen struct { - _dataMap map[int32]*GamebuzkashiOpenData - _dataList []*GamebuzkashiOpenData +type GameBuzkashiOpen struct { + _dataMap map[int32]*GameBuzkashiOpenData + _dataList []*GameBuzkashiOpenData } -func NewGamebuzkashiOpen(_buf []map[string]interface{}) (*GamebuzkashiOpen, error) { - _dataList := make([]*GamebuzkashiOpenData, 0, len(_buf)) - dataMap := make(map[int32]*GamebuzkashiOpenData) +func NewGameBuzkashiOpen(_buf []map[string]interface{}) (*GameBuzkashiOpen, error) { + _dataList := make([]*GameBuzkashiOpenData, 0, len(_buf)) + dataMap := make(map[int32]*GameBuzkashiOpenData) for _, _ele_ := range _buf { - if _v, err2 := DeserializeGamebuzkashiOpenData(_ele_); err2 != nil { + if _v, err2 := DeserializeGameBuzkashiOpenData(_ele_); err2 != nil { return nil, err2 } else { _dataList = append(_dataList, _v) dataMap[_v.Num] = _v } } - return &GamebuzkashiOpen{_dataList:_dataList, _dataMap:dataMap}, nil + return &GameBuzkashiOpen{_dataList:_dataList, _dataMap:dataMap}, nil } -func (table *GamebuzkashiOpen) GetDataMap() map[int32]*GamebuzkashiOpenData { +func (table *GameBuzkashiOpen) GetDataMap() map[int32]*GameBuzkashiOpenData { return table._dataMap } -func (table *GamebuzkashiOpen) GetDataList() []*GamebuzkashiOpenData { +func (table *GameBuzkashiOpen) GetDataList() []*GameBuzkashiOpenData { return table._dataList } -func (table *GamebuzkashiOpen) Get(key int32) *GamebuzkashiOpenData { +func (table *GameBuzkashiOpen) Get(key int32) *GameBuzkashiOpenData { return table._dataMap[key] } diff --git a/sys/configure/structs/Game.buzkashiOpenData.go b/sys/configure/structs/Game.buzkashiOpenData.go index 3189a64c2..8179607ed 100644 --- a/sys/configure/structs/Game.buzkashiOpenData.go +++ b/sys/configure/structs/Game.buzkashiOpenData.go @@ -10,7 +10,7 @@ package cfg import "errors" -type GamebuzkashiOpenData struct { +type GameBuzkashiOpenData struct { Num int32 Shtime int32 Smtime int32 @@ -18,13 +18,13 @@ type GamebuzkashiOpenData struct { Emtime int32 } -const TypeId_GamebuzkashiOpenData = 1621393927 +const TypeId_GameBuzkashiOpenData = 778618407 -func (*GamebuzkashiOpenData) GetTypeId() int32 { - return 1621393927 +func (*GameBuzkashiOpenData) GetTypeId() int32 { + return 778618407 } -func (_v *GamebuzkashiOpenData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameBuzkashiOpenData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["shtime"].(float64); !_ok_ { err = errors.New("shtime error"); return }; _v.Shtime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["smtime"].(float64); !_ok_ { err = errors.New("smtime error"); return }; _v.Smtime = int32(_tempNum_) } @@ -33,8 +33,8 @@ func (_v *GamebuzkashiOpenData)Deserialize(_buf map[string]interface{}) (err err return } -func DeserializeGamebuzkashiOpenData(_buf map[string]interface{}) (*GamebuzkashiOpenData, error) { - v := &GamebuzkashiOpenData{} +func DeserializeGameBuzkashiOpenData(_buf map[string]interface{}) (*GameBuzkashiOpenData, error) { + v := &GameBuzkashiOpenData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.kv.go b/sys/configure/structs/Game.kv.go new file mode 100644 index 000000000..ed2445c3b --- /dev/null +++ b/sys/configure/structs/Game.kv.go @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// +// 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 Gamekv struct { + K int32 + V int32 +} + +const TypeId_Gamekv = 1468999879 + +func (*Gamekv) GetTypeId() int32 { + return 1468999879 +} + +func (_v *Gamekv)Deserialize(_buf map[string]interface{}) (err error) { + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["k"].(float64); !_ok_ { err = errors.New("k error"); return }; _v.K = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["v"].(float64); !_ok_ { err = errors.New("v error"); return }; _v.V = int32(_tempNum_) } + return +} + +func DeserializeGamekv(_buf map[string]interface{}) (*Gamekv, error) { + v := &Gamekv{} + 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 a2c92e40d..47b4d9c94 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -195,7 +195,7 @@ type Tables struct { BuzkashiGrade *GameBuzkashiGrade BuzkashiReward *GameBuzkashiReward BuzkashiFm *GameBuzkashiFm - buzkashiOpen *GamebuzkashiOpen + BuzkashiOpen *GameBuzkashiOpen } func NewTables(loader JsonLoader) (*Tables, error) { @@ -1310,7 +1310,7 @@ func NewTables(loader JsonLoader) (*Tables, error) { if buf, err = loader("game_buzkashiopen") ; err != nil { return nil, err } - if tables.buzkashiOpen, err = NewGamebuzkashiOpen(buf) ; err != nil { + if tables.BuzkashiOpen, err = NewGameBuzkashiOpen(buf) ; err != nil { return nil, err } return tables, nil diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index 0a16cb656..76dc46387 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -222,6 +222,7 @@ type GameGlobalData struct { BuzkashiVintegral []*Gameatn BuzkashiFintegral []*Gameatn BuzkashiResurrection int32 + FavorabilityAttenuation []*Gamekv } const TypeId_GameGlobalData = 477542761 @@ -910,6 +911,20 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["buzkashi_resurrection"].(float64); !_ok_ { err = errors.New("buzkashi_resurrection error"); return }; _v.BuzkashiResurrection = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["favorability_attenuation"].([]interface{}); !_ok_ { err = errors.New("favorability_attenuation error"); return } + + _v.FavorabilityAttenuation = make([]*Gamekv, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gamekv + { 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 = DeserializeGamekv(_x_); err != nil { return } } + _v.FavorabilityAttenuation = append(_v.FavorabilityAttenuation, _list_v_) + } + } + return }