From 0794cdd4b9a779fefe15f8adcb6a2de4f239b170 Mon Sep 17 00:00:00 2001
From: meixiongfeng <766881921@qq.com>
Date: Fri, 22 Jul 2022 19:57:56 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E8=A1=A8=E8=8E=B7=E5=BE=97=E9=81=93=E5=85=B7=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bin/json/game_cominitial.json | 50 ++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 15 deletions(-)
diff --git a/bin/json/game_cominitial.json b/bin/json/game_cominitial.json
index 54507b25e..714f3a907 100644
--- a/bin/json/game_cominitial.json
+++ b/bin/json/game_cominitial.json
@@ -11,16 +11,6 @@
},
{
"index": "2",
- "var": [
- {
- "a": "item",
- "t": "1",
- "n": 1
- }
- ]
- },
- {
- "index": "3",
"var": [
{
"a": "attr",
@@ -30,7 +20,7 @@
]
},
{
- "index": "4",
+ "index": "3",
"var": [
{
"a": "hero",
@@ -40,7 +30,7 @@
]
},
{
- "index": "5",
+ "index": "4",
"var": [
{
"a": "hero",
@@ -50,7 +40,7 @@
]
},
{
- "index": "6",
+ "index": "5",
"var": [
{
"a": "hero",
@@ -60,11 +50,41 @@
]
},
{
- "index": "7",
+ "index": "6",
"var": [
{
"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
}
]
From 6397161f9210f5b136dc72ef710b3cf4a775fd23 Mon Sep 17 00:00:00 2001
From: meixiongfeng <766881921@qq.com>
Date: Fri, 22 Jul 2022 20:03:59 +0800
Subject: [PATCH 2/6] =?UTF-8?q?cominit=20=E8=A1=A8=E5=90=8D=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...game_cominitial.json => game_initial.json} | 0
modules/comp_configure.go | 14 +++----
sys/configure/structs/game.comInitial.go | 42 -------------------
sys/configure/structs/game.initial.go | 42 +++++++++++++++++++
....comInitialData.go => game.initialData.go} | 10 ++---
5 files changed, 54 insertions(+), 54 deletions(-)
rename bin/json/{game_cominitial.json => game_initial.json} (100%)
delete mode 100644 sys/configure/structs/game.comInitial.go
create mode 100644 sys/configure/structs/game.initial.go
rename sys/configure/structs/{game.comInitialData.go => game.initialData.go} (84%)
diff --git a/bin/json/game_cominitial.json b/bin/json/game_initial.json
similarity index 100%
rename from bin/json/game_cominitial.json
rename to bin/json/game_initial.json
diff --git a/modules/comp_configure.go b/modules/comp_configure.go
index 0ecc8a2c4..e382a9b62 100644
--- a/modules/comp_configure.go
+++ b/modules/comp_configure.go
@@ -10,8 +10,8 @@ import (
)
const (
- game_global = "game_global.json"
- game_cominitial = "game_cominitial.json"
+ game_global = "game_global.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) {
err = this.ModuleCompBase.Init(service, module, comp, options)
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
}
@@ -52,7 +52,7 @@ func (this *MCompConfigure) GetConfigure(name string) (v interface{}, err error)
//全局配置
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)
return ""
} else {
@@ -72,15 +72,15 @@ func (this *MCompConfigure) GetGlobalConf(key string) string {
return ""
}
-func (this *MCompConfigure) GetGlobalInitConf() (configure *cfg.Game_comInitial, err error) {
+func (this *MCompConfigure) GetGlobalInitConf() (configure *cfg.Game_initial, err error) {
var (
v interface{}
ok bool
)
- if v, err = this.GetConfigure(game_cominitial); err != nil {
+ if v, err = this.GetConfigure(game_initial); err != nil {
return
} 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)
return
}
diff --git a/sys/configure/structs/game.comInitial.go b/sys/configure/structs/game.comInitial.go
deleted file mode 100644
index 7b3e7d1ab..000000000
--- a/sys/configure/structs/game.comInitial.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 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]
-}
-
-
diff --git a/sys/configure/structs/game.initial.go b/sys/configure/structs/game.initial.go
new file mode 100644
index 000000000..303796eea
--- /dev/null
+++ b/sys/configure/structs/game.initial.go
@@ -0,0 +1,42 @@
+
+//------------------------------------------------------------------------------
+//
+// 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 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]
+}
+
+
diff --git a/sys/configure/structs/game.comInitialData.go b/sys/configure/structs/game.initialData.go
similarity index 84%
rename from sys/configure/structs/game.comInitialData.go
rename to sys/configure/structs/game.initialData.go
index 5439f9597..13cb1314a 100644
--- a/sys/configure/structs/game.comInitialData.go
+++ b/sys/configure/structs/game.initialData.go
@@ -10,17 +10,17 @@ package cfg
import "errors"
-type Game_comInitialData struct {
+type Game_initialData struct {
Index string
Var []*Game_atn
}
-func (Game_comInitialData) GetTypeId() int {
- return 1849654857
+func (Game_initialData) GetTypeId() int {
+ return -1101258478
}
-func NewGame_comInitialData(_buf map[string]interface{}) (_v *Game_comInitialData, err error) {
- _v = &Game_comInitialData{}
+func NewGame_initialData(_buf map[string]interface{}) (_v *Game_initialData, err error) {
+ _v = &Game_initialData{}
{ var _ok_ bool; if _v.Index, _ok_ = _buf["index"].(string); !_ok_ { err = errors.New("index error"); return } }
{
var _arr_ []interface{}
From ad6c7b9a183fb61d6f095508bc7663abdebd5449 Mon Sep 17 00:00:00 2001
From: liwei1dao
Date: Fri, 22 Jul 2022 20:10:29 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=87=BA=E5=94=AE=E9=85=8D=E7=BD=AE=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bin/json/game_item.json | 460 +++++++++++++++++++++-------------------
1 file changed, 236 insertions(+), 224 deletions(-)
diff --git a/bin/json/game_item.json b/bin/json/game_item.json
index 2645df38c..6773baf2e 100644
--- a/bin/json/game_item.json
+++ b/bin/json/game_item.json
@@ -1,186 +1,124 @@
[
{
- "id": 10001,
- "name": "绿色材料",
- "usetype": 1,
- "color": 1,
+ "id": "10001",
+ "name": {
+ "key": "itemname_10001",
+ "text": "初级经验精灵"
+ },
+ "usetype": 3,
+ "color": 3,
"bagtype": 1,
"index": 1,
"special_type": 0,
- "effects": "",
- "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,
+ "time": 0,
"effects": "effects1",
"box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
- "upper_limit": 1,
+ "upper_limit": -1,
"uselv": 0,
"isani": 1,
- "star": 6,
+ "star": 4,
"race": 4,
- "img": "item5",
- "ico": "item5",
- "intr": "红色材料,最顶级的材料",
+ "img": "wp_icon_0002",
+ "ico": "wp_icon_0002",
+ "intr": {
+ "key": "itemdesc_10001",
+ "text": "使用后可以强化英雄"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 6000
+ "n": 1000
}
]
},
{
- "id": 10006,
- "name": "5星阿宝碎片",
- "usetype": 3,
- "color": 5,
- "bagtype": 2,
- "index": 6,
+ "id": "10002",
+ "name": {
+ "key": "itemname_10002",
+ "text": "石头"
+ },
+ "usetype": 2,
+ "color": 3,
+ "bagtype": 1,
+ "index": 3,
"special_type": 0,
+ "time": 0,
"effects": "",
- "box_id": 10001,
+ "box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
- "star": 6,
+ "star": 0,
"race": 0,
- "img": "item6",
- "ico": "item6",
- "intr": "集齐50个碎片合成阿宝",
+ "img": "wp_icon_0001",
+ "ico": "wp_icon_0001",
+ "intr": {
+ "key": "itemdesc_10002",
+ "text": "一块测试功能的石头,他可能是某个不能使用的活动道具"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 2000
+ "n": 1000
}
]
},
{
- "id": 10007,
- "name": "金币自选箱子",
+ "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": 7,
+ "index": 4,
"special_type": 0,
+ "time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
@@ -189,27 +127,34 @@
"upper_limit": 999,
"uselv": 0,
"isani": 0,
- "star": 5,
+ "star": 0,
"race": 0,
- "img": "item7",
- "ico": "item7",
- "intr": "可以在以下道具中选择任选1个",
+ "img": "wp_icon_0002",
+ "ico": "wp_icon_0002",
+ "intr": {
+ "key": "itemdesc_10004",
+ "text": "可以在以下道具中选择任选1个"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 3000
+ "n": 1000
}
]
},
{
- "id": 10008,
- "name": "随机金币箱子",
+ "id": "10005",
+ "name": {
+ "key": "itemname_10005",
+ "text": "随机金币箱子"
+ },
"usetype": 5,
"color": 4,
"bagtype": 1,
- "index": 8,
+ "index": 5,
"special_type": 0,
+ "time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 0,
@@ -218,56 +163,142 @@
"upper_limit": 999,
"uselv": 0,
"isani": 0,
- "star": 5,
+ "star": 0,
"race": 0,
- "img": "item8",
- "ico": "item8",
- "intr": "可以下一下道具中随机获取1个",
+ "img": "wp_icon_0001",
+ "ico": "wp_icon_0001",
+ "intr": {
+ "key": "itemdesc_10005",
+ "text": "可以下一下道具中随机获取1个"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 4000
+ "n": 1000
}
]
},
{
- "id": 10009,
- "name": "金币箱子",
+ "id": "10006",
+ "name": {
+ "key": "itemname_10006",
+ "text": "金币箱子"
+ },
"usetype": 6,
"color": 4,
"bagtype": 1,
+ "index": 6,
+ "special_type": 0,
+ "time": 0,
+ "effects": "",
+ "box_id": 20001,
+ "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_10006",
+ "text": "打开后可以获得金币"
+ },
+ "sale": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 1000
+ }
+ ]
+ },
+ {
+ "id": "10007",
+ "name": {
+ "key": "itemname_10007",
+ "text": "2小时金币"
+ },
+ "usetype": 7,
+ "color": 4,
+ "bagtype": 1,
+ "index": 7,
+ "special_type": 120,
+ "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_10007",
+ "text": "使用后获得2小时金币收益"
+ },
+ "sale": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 1000
+ }
+ ]
+ },
+ {
+ "id": "10008",
+ "name": {
+ "key": "itemname_10008",
+ "text": "特殊2小时金币"
+ },
+ "usetype": 7,
+ "color": 4,
+ "bagtype": 1,
+ "index": 8,
+ "special_type": 120,
+ "time": 2,
+ "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_10008",
+ "text": "使用后获得2小时金币收益,但是他会在2分钟内消失,测下功能。"
+ },
+ "sale": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 1000
+ }
+ ]
+ },
+ {
+ "id": "1",
+ "name": {
+ "key": "itemname_1",
+ "text": "宝箱自选"
+ },
+ "usetype": 4,
+ "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,
- "color": 4,
- "bagtype": 1,
- "index": 10,
- "special_type": 120,
+ "time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
@@ -276,74 +307,55 @@
"upper_limit": 999,
"uselv": 0,
"isani": 0,
- "star": 5,
- "race": 0,
- "img": "item9",
- "ico": "item9",
- "intr": "使用后获得2小时金币收益",
- "sale": [
- {
- "a": "attr",
- "t": "gold",
- "n": 6000
- }
- ]
- },
- {
- "id": 1,
- "name": "宝箱自选",
- "usetype": 4,
- "color": 4,
- "bagtype": 1,
- "index": 7,
- "special_type": 0,
- "effects": "",
- "box_id": 0,
- "synthetize_num": 0,
- "access": 0,
- "use_skip": 0,
- "upper_limit": 999,
- "uselv": 0,
- "isani": 0,
- "star": 5,
+ "star": 0,
"race": 0,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
- "intr": "可以在以下道具中选择任选1个",
+ "intr": {
+ "key": "itemdesc_1",
+ "text": "可以在以下道具中选择任选1个"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 6000
+ "n": 1000
}
]
},
{
- "id": 2,
- "name": "金币",
+ "id": "2",
+ "name": {
+ "key": "itemname_2",
+ "text": "金币"
+ },
"usetype": 4,
"color": 3,
"bagtype": 1,
- "index": 7,
+ "index": 10,
"special_type": 0,
+ "time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
- "upper_limit": 999,
+ "upper_limit": 99999999,
"uselv": 0,
"isani": 0,
- "star": 4,
+ "star": 0,
"race": 0,
"img": "wp_icon_0002",
"ico": "wp_icon_0002",
- "intr": "货币",
+ "intr": {
+ "key": "itemdesc_2",
+ "text": "货币"
+ },
"sale": [
{
"a": "attr",
"t": "gold",
- "n": 6000
+ "n": 1000
}
]
}
From 5e7876c886f3659d6aa293a5b2eb81813e330d8a Mon Sep 17 00:00:00 2001
From: liwei1dao
Date: Fri, 22 Jul 2022 20:16:02 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=81=93=E5=85=B7?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sys/configure/structs/game.item.go | 8 ++++----
sys/configure/structs/game.itemData.go | 10 ++++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/sys/configure/structs/game.item.go b/sys/configure/structs/game.item.go
index 79a6cda49..0c8c4c846 100644
--- a/sys/configure/structs/game.item.go
+++ b/sys/configure/structs/game.item.go
@@ -9,13 +9,13 @@
package cfg
type Game_item struct {
- _dataMap map[int32]*Game_itemData
+ _dataMap map[string]*Game_itemData
_dataList []*Game_itemData
}
func NewGame_item(_buf []map[string]interface{}) (*Game_item, error) {
_dataList := make([]*Game_itemData, 0, len(_buf))
- dataMap := make(map[int32]*Game_itemData)
+ dataMap := make(map[string]*Game_itemData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_itemData(_ele_); err2 != nil {
return nil, err2
@@ -27,7 +27,7 @@ func NewGame_item(_buf []map[string]interface{}) (*Game_item, error) {
return &Game_item{_dataList:_dataList, _dataMap:dataMap}, nil
}
-func (table *Game_item) GetDataMap() map[int32]*Game_itemData {
+func (table *Game_item) GetDataMap() map[string]*Game_itemData {
return table._dataMap
}
@@ -35,7 +35,7 @@ func (table *Game_item) GetDataList() []*Game_itemData {
return table._dataList
}
-func (table *Game_item) Get(key int32) *Game_itemData {
+func (table *Game_item) Get(key string) *Game_itemData {
return table._dataMap[key]
}
diff --git a/sys/configure/structs/game.itemData.go b/sys/configure/structs/game.itemData.go
index b5fcbaf3f..c02817a87 100644
--- a/sys/configure/structs/game.itemData.go
+++ b/sys/configure/structs/game.itemData.go
@@ -11,13 +11,14 @@ package cfg
import "errors"
type Game_itemData struct {
- Id int32
+ Id string
Name string
Usetype int32
Color int32
Bagtype int32
Index int32
SpecialType int32
+ Time int32
Effects string
BoxId int32
SynthetizeNum int32
@@ -40,13 +41,14 @@ func (Game_itemData) GetTypeId() int {
func NewGame_itemData(_buf map[string]interface{}) (_v *Game_itemData, err error) {
_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; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } }
+ { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id 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["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["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["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; 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_) }
@@ -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; 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.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 _ok_ bool
From 531652ae4b34b5b1b4748af12deb5678a39f77ad Mon Sep 17 00:00:00 2001
From: liwei1dao
Date: Fri, 22 Jul 2022 20:22:10 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=81=93=E5=85=B7?=
=?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
bin/json/game_item.json | 20 ++++++++++----------
sys/configure/structs/game.item.go | 8 ++++----
sys/configure/structs/game.itemData.go | 4 ++--
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/bin/json/game_item.json b/bin/json/game_item.json
index 6773baf2e..48729d79a 100644
--- a/bin/json/game_item.json
+++ b/bin/json/game_item.json
@@ -1,6 +1,6 @@
[
{
- "id": "10001",
+ "id": 10001,
"name": {
"key": "itemname_10001",
"text": "初级经验精灵"
@@ -36,7 +36,7 @@
]
},
{
- "id": "10002",
+ "id": 10002,
"name": {
"key": "itemname_10002",
"text": "石头"
@@ -72,7 +72,7 @@
]
},
{
- "id": "10003",
+ "id": 10003,
"name": {
"key": "itemname_10003",
"text": "5星阿宝碎片"
@@ -108,7 +108,7 @@
]
},
{
- "id": "10004",
+ "id": 10004,
"name": {
"key": "itemname_10004",
"text": "金币自选箱子"
@@ -144,7 +144,7 @@
]
},
{
- "id": "10005",
+ "id": 10005,
"name": {
"key": "itemname_10005",
"text": "随机金币箱子"
@@ -180,7 +180,7 @@
]
},
{
- "id": "10006",
+ "id": 10006,
"name": {
"key": "itemname_10006",
"text": "金币箱子"
@@ -216,7 +216,7 @@
]
},
{
- "id": "10007",
+ "id": 10007,
"name": {
"key": "itemname_10007",
"text": "2小时金币"
@@ -252,7 +252,7 @@
]
},
{
- "id": "10008",
+ "id": 10008,
"name": {
"key": "itemname_10008",
"text": "特殊2小时金币"
@@ -288,7 +288,7 @@
]
},
{
- "id": "1",
+ "id": 1,
"name": {
"key": "itemname_1",
"text": "宝箱自选"
@@ -324,7 +324,7 @@
]
},
{
- "id": "2",
+ "id": 2,
"name": {
"key": "itemname_2",
"text": "金币"
diff --git a/sys/configure/structs/game.item.go b/sys/configure/structs/game.item.go
index 0c8c4c846..79a6cda49 100644
--- a/sys/configure/structs/game.item.go
+++ b/sys/configure/structs/game.item.go
@@ -9,13 +9,13 @@
package cfg
type Game_item struct {
- _dataMap map[string]*Game_itemData
+ _dataMap map[int32]*Game_itemData
_dataList []*Game_itemData
}
func NewGame_item(_buf []map[string]interface{}) (*Game_item, error) {
_dataList := make([]*Game_itemData, 0, len(_buf))
- dataMap := make(map[string]*Game_itemData)
+ dataMap := make(map[int32]*Game_itemData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_itemData(_ele_); err2 != nil {
return nil, err2
@@ -27,7 +27,7 @@ func NewGame_item(_buf []map[string]interface{}) (*Game_item, error) {
return &Game_item{_dataList:_dataList, _dataMap:dataMap}, nil
}
-func (table *Game_item) GetDataMap() map[string]*Game_itemData {
+func (table *Game_item) GetDataMap() map[int32]*Game_itemData {
return table._dataMap
}
@@ -35,7 +35,7 @@ func (table *Game_item) GetDataList() []*Game_itemData {
return table._dataList
}
-func (table *Game_item) Get(key string) *Game_itemData {
+func (table *Game_item) Get(key int32) *Game_itemData {
return table._dataMap[key]
}
diff --git a/sys/configure/structs/game.itemData.go b/sys/configure/structs/game.itemData.go
index c02817a87..7c73ad249 100644
--- a/sys/configure/structs/game.itemData.go
+++ b/sys/configure/structs/game.itemData.go
@@ -11,7 +11,7 @@ package cfg
import "errors"
type Game_itemData struct {
- Id string
+ Id int32
Name string
Usetype int32
Color int32
@@ -41,7 +41,7 @@ func (Game_itemData) GetTypeId() int {
func NewGame_itemData(_buf map[string]interface{}) (_v *Game_itemData, err error) {
_v = &Game_itemData{}
- { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } }
+ { 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 __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["color"].(float64); !_ok_ { err = errors.New("color error"); return }; _v.Color = int32(_tempNum_) }
From a2c64d9c8f534e604c552dd1a7d317dca2ccf689 Mon Sep 17 00:00:00 2001
From: liwei1dao
Date: Fri, 22 Jul 2022 20:33:25 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E9=81=93=E5=85=B7?=
=?UTF-8?q?=E5=87=BA=E5=94=AE=E5=92=8C=E4=BD=BF=E7=94=A8=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/items/configure.go | 1 +
sys/configure/configure.go | 1 +
2 files changed, 2 insertions(+)
diff --git a/modules/items/configure.go b/modules/items/configure.go
index 781e34e9a..5be4b4c8b 100644
--- a/modules/items/configure.go
+++ b/modules/items/configure.go
@@ -25,6 +25,7 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Items)
err = this.LoadConfigure(game_item, cfg.NewGame_item)
+ err = this.LoadConfigure(game_propsgroup, cfg.NewGame_propsgroup)
return
}
diff --git a/sys/configure/configure.go b/sys/configure/configure.go
index 11255c011..b5754313b 100644
--- a/sys/configure/configure.go
+++ b/sys/configure/configure.go
@@ -30,6 +30,7 @@ func newSys(options Options) (sys *Configure, err error) {
configure: make(map[string]interface{}),
fileinfos: make(map[string]*FileInfo),
}
+ sys.Start()
return
}