上传编译代码

This commit is contained in:
liwei1dao 2023-09-12 10:06:12 +08:00
parent f896209158
commit 646244d996
3 changed files with 11 additions and 7 deletions

View File

@ -27,7 +27,6 @@ type GameMainStageData struct {
Bubbletalk string
Venturetype int32
Ventureavatar []string
SceneEffectfilter string
Herocolor int32
Heroimg string
Bubbletext string
@ -108,7 +107,6 @@ func (_v *GameMainStageData)Deserialize(_buf map[string]interface{}) (err error)
}
}
{ var _ok_ bool; if _v.SceneEffectfilter, _ok_ = _buf["scene_effectfilter"].(string); !_ok_ { err = errors.New("scene_effectfilter error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["herocolor"].(float64); !_ok_ { err = errors.New("herocolor error"); return }; _v.Herocolor = int32(_tempNum_) }
{ var _ok_ bool; if _v.Heroimg, _ok_ = _buf["heroimg"].(string); !_ok_ { err = errors.New("heroimg error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["bubbletext"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Bubbletext error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Bubbletext, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }

View File

@ -9,26 +9,34 @@
package cfg
type GameTrainlv struct {
_dataMap map[int32]*GameTrainlvData
_dataList []*GameTrainlvData
}
func NewGameTrainlv(_buf []map[string]interface{}) (*GameTrainlv, error) {
_dataList := make([]*GameTrainlvData, 0, len(_buf))
dataMap := make(map[int32]*GameTrainlvData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameTrainlvData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Key] = _v
}
}
return &GameTrainlv{_dataList:_dataList}, nil
return &GameTrainlv{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameTrainlv) GetDataMap() map[int32]*GameTrainlvData {
return table._dataMap
}
func (table *GameTrainlv) GetDataList() []*GameTrainlvData {
return table._dataList
}
func (table *GameTrainlv) Get(index int) *GameTrainlvData {
return table._dataList[index]
func (table *GameTrainlv) Get(key int32) *GameTrainlvData {
return table._dataMap[key]
}

View File

@ -287,7 +287,6 @@ type GameGlobalData struct {
DragonInteraction int32
Dialogueclickcd float32
DoragonItem string
SignAccount int32
}
const TypeId_GameGlobalData = 477542761
@ -1132,7 +1131,6 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dragon_interaction"].(float64); !_ok_ { err = errors.New("dragon_interaction error"); return }; _v.DragonInteraction = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dialogueclickcd"].(float64); !_ok_ { err = errors.New("dialogueclickcd error"); return }; _v.Dialogueclickcd = float32(_tempNum_) }
{ var _ok_ bool; if _v.DoragonItem, _ok_ = _buf["doragon_item"].(string); !_ok_ { err = errors.New("doragon_item error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sign_account"].(float64); !_ok_ { err = errors.New("sign_account error"); return }; _v.SignAccount = int32(_tempNum_) }
return
}