配置同步

This commit is contained in:
meixiongfeng 2023-04-21 21:08:54 +08:00
parent 2ff92487cf
commit 9448a51507
9 changed files with 131 additions and 46 deletions

View File

@ -716,6 +716,20 @@
"n": 1000 "n": 1000
} }
], ],
"buzkashi_resurrection": 10 "buzkashi_resurrection": 10,
"favorability_attenuation": [
{
"k": 3,
"v": 1000
},
{
"k": 6,
"v": 800
},
{
"k": 9,
"v": 500
}
]
} }
] ]

View File

@ -3490,12 +3490,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3525,12 +3525,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3560,12 +3560,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3595,12 +3595,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3630,12 +3630,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3665,12 +3665,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },
@ -3700,12 +3700,12 @@
}, },
"boxPos": { "boxPos": {
"x": 0, "x": 0,
"y": 0.5, "y": 16,
"z": 0 "z": 0
}, },
"boxSize": { "boxSize": {
"x": 1, "x": 28,
"y": 1, "y": 8,
"z": 1 "z": 1
} }
}, },

View File

@ -1051,7 +1051,7 @@
"key": "opencond_prompt_Mystery", "key": "opencond_prompt_Mystery",
"text": "功能暂未开启" "text": "功能暂未开启"
}, },
"uiid": 0, "uiid": 903,
"activateType": 0, "activateType": 0,
"notify": [] "notify": []
}, },
@ -1660,5 +1660,24 @@
"uiid": 0, "uiid": 0,
"activateType": 0, "activateType": 0,
"notify": [] "notify": []
},
{
"id": "vikingexpedition_experience",
"name": {
"key": "num_3008",
"text": "经验副本"
},
"main": [],
"optional": "",
"wkqbx": 0,
"kqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 10005,
"activateType": 0,
"notify": []
} }
] ]

View File

@ -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) { 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.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Parkour) 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_buzkashigrade, cfg.NewGameBuzkashiGrade)
this.LoadConfigure(game_buzkashilv, cfg.NewGameBuzkashiLv) this.LoadConfigure(game_buzkashilv, cfg.NewGameBuzkashiLv)
this.LoadConfigure(game_buzkashimount, cfg.NewGameBuzkashiMount) 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) { func (this *configureComp) isopen() (open bool) {
var ( var (
v interface{} v interface{}
config *cfg.GamebuzkashiOpen config *cfg.GameBuzkashiOpen
currtime string = configure.Now().Format("15:04") currtime string = configure.Now().Format("15:04")
err error err error
ok bool ok bool
@ -47,7 +47,7 @@ func (this *configureComp) isopen() (open bool) {
this.module.Errorln(err) this.module.Errorln(err)
return return
} else { } else {
if config, ok = v.(*cfg.GamebuzkashiOpen); !ok { if config, ok = v.(*cfg.GameBuzkashiOpen); !ok {
err = fmt.Errorf("config type err:%T", v) err = fmt.Errorf("config type err:%T", v)
return return
} else { } else {

View File

@ -8,34 +8,34 @@
package cfg package cfg
type GamebuzkashiOpen struct { type GameBuzkashiOpen struct {
_dataMap map[int32]*GamebuzkashiOpenData _dataMap map[int32]*GameBuzkashiOpenData
_dataList []*GamebuzkashiOpenData _dataList []*GameBuzkashiOpenData
} }
func NewGamebuzkashiOpen(_buf []map[string]interface{}) (*GamebuzkashiOpen, error) { func NewGameBuzkashiOpen(_buf []map[string]interface{}) (*GameBuzkashiOpen, error) {
_dataList := make([]*GamebuzkashiOpenData, 0, len(_buf)) _dataList := make([]*GameBuzkashiOpenData, 0, len(_buf))
dataMap := make(map[int32]*GamebuzkashiOpenData) dataMap := make(map[int32]*GameBuzkashiOpenData)
for _, _ele_ := range _buf { for _, _ele_ := range _buf {
if _v, err2 := DeserializeGamebuzkashiOpenData(_ele_); err2 != nil { if _v, err2 := DeserializeGameBuzkashiOpenData(_ele_); err2 != nil {
return nil, err2 return nil, err2
} else { } else {
_dataList = append(_dataList, _v) _dataList = append(_dataList, _v)
dataMap[_v.Num] = _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 return table._dataMap
} }
func (table *GamebuzkashiOpen) GetDataList() []*GamebuzkashiOpenData { func (table *GameBuzkashiOpen) GetDataList() []*GameBuzkashiOpenData {
return table._dataList return table._dataList
} }
func (table *GamebuzkashiOpen) Get(key int32) *GamebuzkashiOpenData { func (table *GameBuzkashiOpen) Get(key int32) *GameBuzkashiOpenData {
return table._dataMap[key] return table._dataMap[key]
} }

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GamebuzkashiOpenData struct { type GameBuzkashiOpenData struct {
Num int32 Num int32
Shtime int32 Shtime int32
Smtime int32 Smtime int32
@ -18,13 +18,13 @@ type GamebuzkashiOpenData struct {
Emtime int32 Emtime int32
} }
const TypeId_GamebuzkashiOpenData = 1621393927 const TypeId_GameBuzkashiOpenData = 778618407
func (*GamebuzkashiOpenData) GetTypeId() int32 { func (*GameBuzkashiOpenData) GetTypeId() int32 {
return 1621393927 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["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["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_) } { 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 return
} }
func DeserializeGamebuzkashiOpenData(_buf map[string]interface{}) (*GamebuzkashiOpenData, error) { func DeserializeGameBuzkashiOpenData(_buf map[string]interface{}) (*GameBuzkashiOpenData, error) {
v := &GamebuzkashiOpenData{} v := &GameBuzkashiOpenData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

View File

@ -0,0 +1,37 @@
//------------------------------------------------------------------------------
// <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 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
}
}

View File

@ -195,7 +195,7 @@ type Tables struct {
BuzkashiGrade *GameBuzkashiGrade BuzkashiGrade *GameBuzkashiGrade
BuzkashiReward *GameBuzkashiReward BuzkashiReward *GameBuzkashiReward
BuzkashiFm *GameBuzkashiFm BuzkashiFm *GameBuzkashiFm
buzkashiOpen *GamebuzkashiOpen BuzkashiOpen *GameBuzkashiOpen
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -1310,7 +1310,7 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if buf, err = loader("game_buzkashiopen") ; err != nil { if buf, err = loader("game_buzkashiopen") ; err != nil {
return nil, err return nil, err
} }
if tables.buzkashiOpen, err = NewGamebuzkashiOpen(buf) ; err != nil { if tables.BuzkashiOpen, err = NewGameBuzkashiOpen(buf) ; err != nil {
return nil, err return nil, err
} }
return tables, nil return tables, nil

View File

@ -222,6 +222,7 @@ type GameGlobalData struct {
BuzkashiVintegral []*Gameatn BuzkashiVintegral []*Gameatn
BuzkashiFintegral []*Gameatn BuzkashiFintegral []*Gameatn
BuzkashiResurrection int32 BuzkashiResurrection int32
FavorabilityAttenuation []*Gamekv
} }
const TypeId_GameGlobalData = 477542761 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 _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 return
} }