This commit is contained in:
liwei 2022-07-22 20:35:34 +08:00
commit 49cffb0594
9 changed files with 327 additions and 291 deletions

View File

@ -11,16 +11,6 @@
}, },
{ {
"index": "2", "index": "2",
"var": [
{
"a": "item",
"t": "1",
"n": 1
}
]
},
{
"index": "3",
"var": [ "var": [
{ {
"a": "attr", "a": "attr",
@ -30,7 +20,7 @@
] ]
}, },
{ {
"index": "4", "index": "3",
"var": [ "var": [
{ {
"a": "hero", "a": "hero",
@ -40,7 +30,7 @@
] ]
}, },
{ {
"index": "5", "index": "4",
"var": [ "var": [
{ {
"a": "hero", "a": "hero",
@ -50,7 +40,7 @@
] ]
}, },
{ {
"index": "6", "index": "5",
"var": [ "var": [
{ {
"a": "hero", "a": "hero",
@ -60,11 +50,41 @@
] ]
}, },
{ {
"index": "7", "index": "6",
"var": [ "var": [
{ {
"a": "item", "a": "item",
"t": "1", "t": "10006",
"n": 2
}
]
},
{
"index": "7",
"var": [
{
"a": "equi",
"t": "10001",
"n": 1
}
]
},
{
"index": "8",
"var": [
{
"a": "equi",
"t": "10002",
"n": 1
}
]
},
{
"index": "9",
"var": [
{
"a": "equi",
"t": "10003",
"n": 1 "n": 1
} }
] ]

View File

@ -1,273 +1,268 @@
[ [
{ {
"id": 10001, "id": 10001,
"name": "绿色材料", "name": {
"usetype": 1, "key": "itemname_10001",
"color": 1, "text": "初级经验精灵"
},
"usetype": 3,
"color": 3,
"bagtype": 1, "bagtype": 1,
"index": 1, "index": 1,
"special_type": 0, "special_type": 0,
"effects": "", "time": 0,
"box_id": 0,
"synthetize_num": 10,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 10,
"isani": 0,
"star": 2,
"race": 1,
"img": "item1",
"ico": "item1",
"intr": "绿色材料,可以合成蓝色材料",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 2000
}
]
},
{
"id": 10002,
"name": "蓝色材料",
"usetype": 1,
"color": 2,
"bagtype": 1,
"index": 2,
"special_type": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 20,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 3,
"race": 2,
"img": "item2",
"ico": "item2",
"intr": "蓝色材料,可以合成紫色材料",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 3000
}
]
},
{
"id": 10003,
"name": "紫色材料",
"usetype": 1,
"color": 3,
"bagtype": 1,
"index": 3,
"special_type": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 30,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 4,
"race": 3,
"img": "item3",
"ico": "item3",
"intr": "紫色材料,可以合成橙色材料",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 4000
}
]
},
{
"id": 10004,
"name": "橙色材料",
"usetype": 1,
"color": 4,
"bagtype": 1,
"index": 4,
"special_type": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 40,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 5,
"race": 4,
"img": "item4",
"ico": "item4",
"intr": "橙色材料,可以合成红色材料",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 5000
}
]
},
{
"id": 10005,
"name": "红色材料",
"usetype": 2,
"color": 5,
"bagtype": 1,
"index": 5,
"special_type": 0,
"effects": "effects1", "effects": "effects1",
"box_id": 0, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
"upper_limit": 1, "upper_limit": -1,
"uselv": 0, "uselv": 0,
"isani": 1, "isani": 1,
"star": 6, "star": 4,
"race": 4, "race": 4,
"img": "item5", "img": "wp_icon_0002",
"ico": "item5", "ico": "wp_icon_0002",
"intr": "红色材料,最顶级的材料", "intr": {
"key": "itemdesc_10001",
"text": "使用后可以强化英雄"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 6000 "n": 1000
}
]
},
{
"id": 10002,
"name": {
"key": "itemname_10002",
"text": "石头"
},
"usetype": 2,
"color": 3,
"bagtype": 1,
"index": 3,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
"intr": {
"key": "itemdesc_10002",
"text": "一块测试功能的石头,他可能是某个不能使用的活动道具"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
},
{
"id": 10003,
"name": {
"key": "itemname_10003",
"text": "5星阿宝碎片"
},
"usetype": 1,
"color": 5,
"bagtype": 2,
"index": 2,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 50,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 6,
"race": 3,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
"intr": {
"key": "itemdesc_10003",
"text": "集齐50个碎片合成阿宝"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
},
{
"id": 10004,
"name": {
"key": "itemname_10004",
"text": "金币自选箱子"
},
"usetype": 4,
"color": 4,
"bagtype": 1,
"index": 4,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_0002",
"ico": "wp_icon_0002",
"intr": {
"key": "itemdesc_10004",
"text": "可以在以下道具中选择任选1个"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
},
{
"id": 10005,
"name": {
"key": "itemname_10005",
"text": "随机金币箱子"
},
"usetype": 5,
"color": 4,
"bagtype": 1,
"index": 5,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
"intr": {
"key": "itemdesc_10005",
"text": "可以下一下道具中随机获取1个"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
} }
] ]
}, },
{ {
"id": 10006, "id": 10006,
"name": "5星阿宝碎片", "name": {
"usetype": 3, "key": "itemname_10006",
"color": 5, "text": "金币箱子"
"bagtype": 2, },
"usetype": 6,
"color": 4,
"bagtype": 1,
"index": 6, "index": 6,
"special_type": 0, "special_type": 0,
"time": 0,
"effects": "", "effects": "",
"box_id": 10001, "box_id": 20001,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
"upper_limit": 999, "upper_limit": 999,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 6, "star": 0,
"race": 0, "race": 0,
"img": "item6", "img": "wp_icon_0002",
"ico": "item6", "ico": "wp_icon_0002",
"intr": "集齐50个碎片合成阿宝", "intr": {
"key": "itemdesc_10006",
"text": "打开后可以获得金币"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 2000 "n": 1000
} }
] ]
}, },
{ {
"id": 10007, "id": 10007,
"name": "金币自选箱子", "name": {
"usetype": 4, "key": "itemname_10007",
"text": "2小时金币"
},
"usetype": 7,
"color": 4, "color": 4,
"bagtype": 1, "bagtype": 1,
"index": 7, "index": 7,
"special_type": 0, "special_type": 120,
"time": 0,
"effects": "", "effects": "",
"box_id": 10001, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
"upper_limit": 999, "upper_limit": 999,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 5, "star": 0,
"race": 0, "race": 0,
"img": "item7", "img": "wp_icon_0001",
"ico": "item7", "ico": "wp_icon_0001",
"intr": "可以在以下道具中选择任选1个", "intr": {
"key": "itemdesc_10007",
"text": "使用后获得2小时金币收益"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 3000 "n": 1000
} }
] ]
}, },
{ {
"id": 10008, "id": 10008,
"name": "随机金币箱子", "name": {
"usetype": 5, "key": "itemname_10008",
"color": 4, "text": "特殊2小时金币"
"bagtype": 1, },
"index": 8,
"special_type": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 5,
"race": 0,
"img": "item8",
"ico": "item8",
"intr": "可以下一下道具中随机获取1个",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 4000
}
]
},
{
"id": 10009,
"name": "金币箱子",
"usetype": 6,
"color": 4,
"bagtype": 1,
"index": 9,
"special_type": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 5,
"race": 0,
"img": "item9",
"ico": "item9",
"intr": "打开后可以获得金币",
"sale": [
{
"a": "attr",
"t": "gold",
"n": 5000
}
]
},
{
"id": 10010,
"name": "2小时金币",
"usetype": 7, "usetype": 7,
"color": 4, "color": 4,
"bagtype": 1, "bagtype": 1,
"index": 10, "index": 8,
"special_type": 120, "special_type": 120,
"time": 2,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
@ -276,27 +271,34 @@
"upper_limit": 999, "upper_limit": 999,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 5, "star": 0,
"race": 0, "race": 0,
"img": "item9", "img": "wp_icon_0001",
"ico": "item9", "ico": "wp_icon_0001",
"intr": "使用后获得2小时金币收益", "intr": {
"key": "itemdesc_10008",
"text": "使用后获得2小时金币收益但是他会在2分钟内消失测下功能。"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 6000 "n": 1000
} }
] ]
}, },
{ {
"id": 1, "id": 1,
"name": "宝箱自选", "name": {
"key": "itemname_1",
"text": "宝箱自选"
},
"usetype": 4, "usetype": 4,
"color": 4, "color": 4,
"bagtype": 1, "bagtype": 1,
"index": 7, "index": 9,
"special_type": 0, "special_type": 0,
"time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
@ -305,45 +307,55 @@
"upper_limit": 999, "upper_limit": 999,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 5, "star": 0,
"race": 0, "race": 0,
"img": "wp_icon_0001", "img": "wp_icon_0001",
"ico": "wp_icon_0001", "ico": "wp_icon_0001",
"intr": "可以在以下道具中选择任选1个", "intr": {
"key": "itemdesc_1",
"text": "可以在以下道具中选择任选1个"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 6000 "n": 1000
} }
] ]
}, },
{ {
"id": 2, "id": 2,
"name": "金币", "name": {
"key": "itemname_2",
"text": "金币"
},
"usetype": 4, "usetype": 4,
"color": 3, "color": 3,
"bagtype": 1, "bagtype": 1,
"index": 7, "index": 10,
"special_type": 0, "special_type": 0,
"time": 0,
"effects": "", "effects": "",
"box_id": 0, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
"upper_limit": 999, "upper_limit": 99999999,
"uselv": 0, "uselv": 0,
"isani": 0, "isani": 0,
"star": 4, "star": 0,
"race": 0, "race": 0,
"img": "wp_icon_0002", "img": "wp_icon_0002",
"ico": "wp_icon_0002", "ico": "wp_icon_0002",
"intr": "货币", "intr": {
"key": "itemdesc_2",
"text": "货币"
},
"sale": [ "sale": [
{ {
"a": "attr", "a": "attr",
"t": "gold", "t": "gold",
"n": 6000 "n": 1000
} }
] ]
} }

View File

@ -10,8 +10,8 @@ import (
) )
const ( const (
game_global = "game_global.json" game_global = "game_global.json"
game_cominitial = "game_cominitial.json" game_initial = "game_initial.json"
) )
///配置管理基础组件 ///配置管理基础组件
@ -23,7 +23,7 @@ type MCompConfigure struct {
func (this *MCompConfigure) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *MCompConfigure) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options) err = this.ModuleCompBase.Init(service, module, comp, options)
err = this.LoadConfigure(game_global, cfg.NewGame_global) err = this.LoadConfigure(game_global, cfg.NewGame_global)
err = this.LoadConfigure(game_cominitial, cfg.NewGame_comInitial) err = this.LoadConfigure(game_initial, cfg.NewGame_initial)
return return
} }
@ -52,7 +52,7 @@ func (this *MCompConfigure) GetConfigure(name string) (v interface{}, err error)
//全局配置 //全局配置
func (this *MCompConfigure) GetGlobalConf(key string) string { func (this *MCompConfigure) GetGlobalConf(key string) string {
if v, err := this.GetConfigure(game_cominitial); err != nil { if v, err := this.GetConfigure(game_initial); err != nil {
log.Errorf("get global conf err:%v", err) log.Errorf("get global conf err:%v", err)
return "" return ""
} else { } else {
@ -72,15 +72,15 @@ func (this *MCompConfigure) GetGlobalConf(key string) string {
return "" return ""
} }
func (this *MCompConfigure) GetGlobalInitConf() (configure *cfg.Game_comInitial, err error) { func (this *MCompConfigure) GetGlobalInitConf() (configure *cfg.Game_initial, err error) {
var ( var (
v interface{} v interface{}
ok bool ok bool
) )
if v, err = this.GetConfigure(game_cominitial); err != nil { if v, err = this.GetConfigure(game_initial); err != nil {
return return
} else { } else {
if configure, ok = v.(*cfg.Game_comInitial); !ok { if configure, ok = v.(*cfg.Game_initial); !ok {
err = fmt.Errorf("%T no is *cfg.Game_comInitial", v) err = fmt.Errorf("%T no is *cfg.Game_comInitial", v)
return return
} }

View File

@ -25,6 +25,7 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
this.MCompConfigure.Init(service, module, comp, options) this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Items) this.module = module.(*Items)
err = this.LoadConfigure(game_item, cfg.NewGame_item) err = this.LoadConfigure(game_item, cfg.NewGame_item)
err = this.LoadConfigure(game_propsgroup, cfg.NewGame_propsgroup)
return return
} }

View File

@ -30,6 +30,7 @@ func newSys(options Options) (sys *Configure, err error) {
configure: make(map[string]interface{}), configure: make(map[string]interface{}),
fileinfos: make(map[string]*FileInfo), fileinfos: make(map[string]*FileInfo),
} }
sys.Start()
return return
} }

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <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
type Game_comInitial struct {
_dataMap map[string]*Game_comInitialData
_dataList []*Game_comInitialData
}
func NewGame_comInitial(_buf []map[string]interface{}) (*Game_comInitial, error) {
_dataList := make([]*Game_comInitialData, 0, len(_buf))
dataMap := make(map[string]*Game_comInitialData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_comInitialData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Index] = _v
}
}
return &Game_comInitial{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_comInitial) GetDataMap() map[string]*Game_comInitialData {
return table._dataMap
}
func (table *Game_comInitial) GetDataList() []*Game_comInitialData {
return table._dataList
}
func (table *Game_comInitial) Get(key string) *Game_comInitialData {
return table._dataMap[key]
}

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <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
type Game_initial struct {
_dataMap map[string]*Game_initialData
_dataList []*Game_initialData
}
func NewGame_initial(_buf []map[string]interface{}) (*Game_initial, error) {
_dataList := make([]*Game_initialData, 0, len(_buf))
dataMap := make(map[string]*Game_initialData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_initialData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Index] = _v
}
}
return &Game_initial{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_initial) GetDataMap() map[string]*Game_initialData {
return table._dataMap
}
func (table *Game_initial) GetDataList() []*Game_initialData {
return table._dataList
}
func (table *Game_initial) Get(key string) *Game_initialData {
return table._dataMap[key]
}

View File

@ -10,17 +10,17 @@ package cfg
import "errors" import "errors"
type Game_comInitialData struct { type Game_initialData struct {
Index string Index string
Var []*Game_atn Var []*Game_atn
} }
func (Game_comInitialData) GetTypeId() int { func (Game_initialData) GetTypeId() int {
return 1849654857 return -1101258478
} }
func NewGame_comInitialData(_buf map[string]interface{}) (_v *Game_comInitialData, err error) { func NewGame_initialData(_buf map[string]interface{}) (_v *Game_initialData, err error) {
_v = &Game_comInitialData{} _v = &Game_initialData{}
{ var _ok_ bool; if _v.Index, _ok_ = _buf["index"].(string); !_ok_ { err = errors.New("index error"); return } } { var _ok_ bool; if _v.Index, _ok_ = _buf["index"].(string); !_ok_ { err = errors.New("index error"); return } }
{ {
var _arr_ []interface{} var _arr_ []interface{}

View File

@ -18,6 +18,7 @@ type Game_itemData struct {
Bagtype int32 Bagtype int32
Index int32 Index int32
SpecialType int32 SpecialType int32
Time int32
Effects string Effects string
BoxId int32 BoxId int32
SynthetizeNum int32 SynthetizeNum int32
@ -41,12 +42,13 @@ func (Game_itemData) GetTypeId() int {
func NewGame_itemData(_buf map[string]interface{}) (_v *Game_itemData, err error) { func NewGame_itemData(_buf map[string]interface{}) (_v *Game_itemData, err error) {
_v = &Game_itemData{} _v = &Game_itemData{}
{ 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["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["usetype"].(float64); !_ok_ { err = errors.New("usetype error"); return }; _v.Usetype = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["usetype"].(float64); !_ok_ { err = errors.New("usetype error"); return }; _v.Usetype = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["color"].(float64); !_ok_ { err = errors.New("color error"); return }; _v.Color = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["color"].(float64); !_ok_ { err = errors.New("color error"); return }; _v.Color = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bagtype"].(float64); !_ok_ { err = errors.New("bagtype error"); return }; _v.Bagtype = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bagtype"].(float64); !_ok_ { err = errors.New("bagtype error"); return }; _v.Bagtype = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["index"].(float64); !_ok_ { err = errors.New("index error"); return }; _v.Index = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["index"].(float64); !_ok_ { err = errors.New("index error"); return }; _v.Index = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["special_type"].(float64); !_ok_ { err = errors.New("special_type error"); return }; _v.SpecialType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["special_type"].(float64); !_ok_ { err = errors.New("special_type error"); return }; _v.SpecialType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
{ var _ok_ bool; if _v.Effects, _ok_ = _buf["effects"].(string); !_ok_ { err = errors.New("effects error"); return } } { var _ok_ bool; if _v.Effects, _ok_ = _buf["effects"].(string); !_ok_ { err = errors.New("effects error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["box_id"].(float64); !_ok_ { err = errors.New("box_id error"); return }; _v.BoxId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["box_id"].(float64); !_ok_ { err = errors.New("box_id error"); return }; _v.BoxId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["synthetize_num"].(float64); !_ok_ { err = errors.New("synthetize_num error"); return }; _v.SynthetizeNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["synthetize_num"].(float64); !_ok_ { err = errors.New("synthetize_num error"); return }; _v.SynthetizeNum = int32(_tempNum_) }
@ -59,7 +61,7 @@ func NewGame_itemData(_buf map[string]interface{}) (_v *Game_itemData, err error
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["race"].(float64); !_ok_ { err = errors.New("race error"); return }; _v.Race = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["race"].(float64); !_ok_ { err = errors.New("race error"); return }; _v.Race = int32(_tempNum_) }
{ var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } } { var _ok_ bool; if _v.Img, _ok_ = _buf["img"].(string); !_ok_ { err = errors.New("img error"); return } }
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } } { var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
{ var _ok_ bool; if _v.Intr, _ok_ = _buf["intr"].(string); !_ok_ { err = errors.New("intr error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["intr"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Intr error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Intr, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool