上传配置表

This commit is contained in:
liwei 2023-08-09 16:31:11 +08:00
parent 4ef118b97f
commit cfb6ad7b74
10 changed files with 360 additions and 348 deletions

View File

@ -1,227 +1,94 @@
[
{
"id": 1,
"parameter": 0,
"passcheck_type": 4
"taskgroup": 10010,
"taskdetail": [
60000010,
60000020,
60000030,
60000040,
60000050
],
"weight": 2500,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 50
},
{
"a": "attr",
"t": "ps",
"n": 30
}
]
},
{
"id": 2,
"parameter": 200,
"passcheck_type": 4
"taskgroup": 10020,
"taskdetail": [
60000010,
60000020,
60000030,
60000040,
60000050
],
"weight": 2500,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 50
},
{
"a": "attr",
"t": "ps",
"n": 30
}
]
},
{
"id": 3,
"parameter": 400,
"passcheck_type": 4
"taskgroup": 10030,
"taskdetail": [
60000010,
60000020,
60000030,
60000040,
60000050
],
"weight": 2500,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 50
},
{
"a": "attr",
"t": "ps",
"n": 30
}
]
},
{
"id": 4,
"parameter": 600,
"passcheck_type": 4
},
{
"id": 5,
"parameter": 800,
"passcheck_type": 4
},
{
"id": 6,
"parameter": 1000,
"passcheck_type": 4
},
{
"id": 7,
"parameter": 1200,
"passcheck_type": 4
},
{
"id": 8,
"parameter": 1400,
"passcheck_type": 4
},
{
"id": 9,
"parameter": 1600,
"passcheck_type": 4
},
{
"id": 10,
"parameter": 1800,
"passcheck_type": 4
},
{
"id": 11,
"parameter": 2000,
"passcheck_type": 4
},
{
"id": 12,
"parameter": 2200,
"passcheck_type": 4
},
{
"id": 13,
"parameter": 2400,
"passcheck_type": 4
},
{
"id": 14,
"parameter": 2600,
"passcheck_type": 4
},
{
"id": 15,
"parameter": 2800,
"passcheck_type": 4
},
{
"id": 16,
"parameter": 3000,
"passcheck_type": 4
},
{
"id": 17,
"parameter": 3200,
"passcheck_type": 4
},
{
"id": 18,
"parameter": 3400,
"passcheck_type": 4
},
{
"id": 19,
"parameter": 3600,
"passcheck_type": 4
},
{
"id": 20,
"parameter": 3800,
"passcheck_type": 4
},
{
"id": 21,
"parameter": 4000,
"passcheck_type": 4
},
{
"id": 22,
"parameter": 4200,
"passcheck_type": 4
},
{
"id": 23,
"parameter": 4400,
"passcheck_type": 4
},
{
"id": 24,
"parameter": 4600,
"passcheck_type": 4
},
{
"id": 25,
"parameter": 4800,
"passcheck_type": 4
},
{
"id": 26,
"parameter": 5000,
"passcheck_type": 4
},
{
"id": 27,
"parameter": 5200,
"passcheck_type": 4
},
{
"id": 28,
"parameter": 5400,
"passcheck_type": 4
},
{
"id": 29,
"parameter": 5600,
"passcheck_type": 4
},
{
"id": 30,
"parameter": 5800,
"passcheck_type": 4
},
{
"id": 31,
"parameter": 6000,
"passcheck_type": 4
},
{
"id": 32,
"parameter": 6200,
"passcheck_type": 4
},
{
"id": 33,
"parameter": 6400,
"passcheck_type": 4
},
{
"id": 34,
"parameter": 6600,
"passcheck_type": 4
},
{
"id": 35,
"parameter": 6800,
"passcheck_type": 4
},
{
"id": 36,
"parameter": 7000,
"passcheck_type": 4
},
{
"id": 37,
"parameter": 7200,
"passcheck_type": 4
},
{
"id": 38,
"parameter": 7400,
"passcheck_type": 4
},
{
"id": 39,
"parameter": 7600,
"passcheck_type": 4
},
{
"id": 40,
"parameter": 7800,
"passcheck_type": 4
},
{
"id": 41,
"parameter": 8000,
"passcheck_type": 4
},
{
"id": 42,
"parameter": 8200,
"passcheck_type": 4
},
{
"id": 43,
"parameter": 8400,
"passcheck_type": 4
},
{
"id": 44,
"parameter": 8600,
"passcheck_type": 4
},
{
"id": 45,
"parameter": 8800,
"passcheck_type": 4
"taskgroup": 10040,
"taskdetail": [
60000010,
60000020,
60000030,
60000040,
60000050
],
"weight": 2500,
"reward": [
{
"a": "attr",
"t": "diamond",
"n": 50
},
{
"a": "attr",
"t": "ps",
"n": 30
}
]
}
]

View File

@ -1,8 +1,14 @@
[
{
"heroid": 25001,
"opentime": "2023/8/14 0:00:00",
"newheroday": 2,
"reward": []
"opentime": "2023/8/8 0:00:00",
"newheroday": 4,
"reward": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
}
]

View File

@ -5,9 +5,14 @@
"chapter": 1001,
"onlevel": 0,
"onlevelstory": [],
"point": {
"x": 2,
"y": 1
},
"level": 101,
"levellink": [
102
2,
3
],
"leveltype": 1,
"startstory": 10254,
@ -20,8 +25,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_01",
"text": "测试文本1"
},
"circle": "",
"qq": 0,
@ -34,12 +39,12 @@
"chapter": 1001,
"onlevel": 1,
"onlevelstory": [],
"point": {
"x": 2,
"y": 2
},
"level": 102,
"levellink": [
101,
103,
104
],
"levellink": [],
"leveltype": 2,
"startstory": 10254,
"battle": 101,
@ -51,8 +56,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_02",
"text": "测试文本2"
},
"circle": "",
"qq": 0,
@ -63,12 +68,15 @@
"key": 3,
"hero": 25001,
"chapter": 1001,
"onlevel": 2,
"onlevel": 1,
"onlevelstory": [],
"point": {
"x": 1,
"y": 3
},
"level": 103,
"levellink": [
102,
104
4
],
"leveltype": 3,
"startstory": 10254,
@ -81,8 +89,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_03",
"text": "测试文本3"
},
"circle": "",
"qq": 0,
@ -95,18 +103,21 @@
"chapter": 1001,
"onlevel": 3,
"onlevelstory": [],
"point": {
"x": 2,
"y": 4
},
"level": 104,
"levellink": [
102,
103
5
],
"leveltype": 4,
"startstory": 0,
"battle": 0,
"reward": [],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_04",
"text": "测试文本4"
},
"circle": "",
"qq": 0,
@ -119,10 +130,12 @@
"chapter": 1001,
"onlevel": 4,
"onlevelstory": [],
"point": {
"x": 3,
"y": 5
},
"level": 105,
"levellink": [
104
],
"levellink": [],
"leveltype": 5,
"startstory": 10254,
"battle": 101,
@ -134,8 +147,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_05",
"text": "测试文本5"
},
"circle": "",
"qq": 0,
@ -148,9 +161,14 @@
"chapter": 1002,
"onlevel": 5,
"onlevelstory": [],
"point": {
"x": 2,
"y": 1
},
"level": 101,
"levellink": [
102
7,
8
],
"leveltype": 1,
"startstory": 10254,
@ -163,8 +181,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_06",
"text": "测试文本6"
},
"circle": "",
"qq": 0,
@ -177,12 +195,12 @@
"chapter": 1002,
"onlevel": 6,
"onlevelstory": [],
"point": {
"x": 2,
"y": 2
},
"level": 102,
"levellink": [
101,
103,
104
],
"levellink": [],
"leveltype": 2,
"startstory": 10254,
"battle": 101,
@ -194,8 +212,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_07",
"text": "测试文本7"
},
"circle": "",
"qq": 0,
@ -208,10 +226,13 @@
"chapter": 1002,
"onlevel": 7,
"onlevelstory": [],
"point": {
"x": 1,
"y": 3
},
"level": 103,
"levellink": [
102,
104
9
],
"leveltype": 3,
"startstory": 10254,
@ -224,8 +245,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_08",
"text": "测试文本8"
},
"circle": "",
"qq": 0,
@ -238,18 +259,21 @@
"chapter": 1002,
"onlevel": 8,
"onlevelstory": [],
"point": {
"x": 2,
"y": 4
},
"level": 104,
"levellink": [
102,
103
10
],
"leveltype": 4,
"startstory": 0,
"battle": 0,
"reward": [],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_09",
"text": "测试文本9"
},
"circle": "",
"qq": 0,
@ -262,10 +286,12 @@
"chapter": 1002,
"onlevel": 9,
"onlevelstory": [],
"point": {
"x": 3,
"y": 5
},
"level": 105,
"levellink": [
104
],
"levellink": [],
"leveltype": 5,
"startstory": 10254,
"battle": 101,
@ -277,8 +303,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_10",
"text": "测试文本10"
},
"circle": "",
"qq": 0,
@ -291,9 +317,14 @@
"chapter": 1003,
"onlevel": 10,
"onlevelstory": [],
"point": {
"x": 2,
"y": 1
},
"level": 101,
"levellink": [
102
12,
13
],
"leveltype": 1,
"startstory": 10254,
@ -306,8 +337,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_11",
"text": "测试文本11"
},
"circle": "",
"qq": 0,
@ -320,12 +351,12 @@
"chapter": 1003,
"onlevel": 11,
"onlevelstory": [],
"point": {
"x": 2,
"y": 2
},
"level": 102,
"levellink": [
101,
103,
104
],
"levellink": [],
"leveltype": 2,
"startstory": 10254,
"battle": 101,
@ -337,8 +368,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_12",
"text": "测试文本12"
},
"circle": "",
"qq": 0,
@ -351,10 +382,13 @@
"chapter": 1003,
"onlevel": 12,
"onlevelstory": [],
"point": {
"x": 1,
"y": 3
},
"level": 103,
"levellink": [
102,
104
14
],
"leveltype": 3,
"startstory": 10254,
@ -367,8 +401,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_13",
"text": "测试文本13"
},
"circle": "",
"qq": 0,
@ -381,10 +415,13 @@
"chapter": 1003,
"onlevel": 13,
"onlevelstory": [],
"point": {
"x": 2,
"y": 4
},
"level": 104,
"levellink": [
102,
103
15
],
"leveltype": 4,
"startstory": 10254,
@ -397,8 +434,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_14",
"text": "测试文本14"
},
"circle": "",
"qq": 0,
@ -411,10 +448,12 @@
"chapter": 1003,
"onlevel": 14,
"onlevelstory": [],
"point": {
"x": 3,
"y": 5
},
"level": 105,
"levellink": [
104
],
"levellink": [],
"leveltype": 5,
"startstory": 10254,
"battle": 101,
@ -426,8 +465,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_15",
"text": "测试文本15"
},
"circle": "",
"qq": 0,
@ -440,9 +479,13 @@
"chapter": 1004,
"onlevel": 15,
"onlevelstory": [],
"point": {
"x": 2,
"y": 1
},
"level": 101,
"levellink": [
102
17
],
"leveltype": 1,
"startstory": 10254,
@ -455,8 +498,8 @@
}
],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_16",
"text": "测试文本16"
},
"circle": "",
"qq": 0,
@ -469,17 +512,19 @@
"chapter": 1004,
"onlevel": 16,
"onlevelstory": [],
"point": {
"x": 2,
"y": 2
},
"level": 102,
"levellink": [
101
],
"levellink": [],
"leveltype": 4,
"startstory": 0,
"battle": 0,
"reward": [],
"txt": {
"key": "",
"text": ""
"key": "heroupstory_heroupstory_chapter_17",
"text": "测试文本17"
},
"circle": "",
"qq": 0,

View File

@ -13638,7 +13638,7 @@
"reddottype": 0,
"effects": "",
"modelName": "",
"box_id": 0,
"box_id": 22000001,
"synthetize_num": 0,
"synthetize_deplete": [],
"synthetize_get": [],

View File

@ -45646,5 +45646,101 @@
"playerlvmin": 0,
"playerlvmax": 0,
"notice": 0
},
{
"id": 1903,
"lotteryid": 22000001,
"description": "初级回响自选箱",
"type": 3,
"groupwt": 1000,
"groupid": 1,
"subtype": 1,
"groupnum": 1,
"itemid": {
"a": "item",
"t": "15000101",
"n": 1
},
"itemdes": "15000101",
"itemwt": 1000,
"min": 1,
"max": 1,
"VIPmin": 0,
"VIPmax": 15,
"playerlvmin": 0,
"playerlvmax": 0,
"notice": 0
},
{
"id": 1904,
"lotteryid": 22000001,
"description": "初级回响自选箱",
"type": 3,
"groupwt": 1,
"groupid": 1,
"subtype": 1,
"groupnum": 1,
"itemid": {
"a": "item",
"t": "15000102",
"n": 1
},
"itemdes": "15000102",
"itemwt": 1000,
"min": 1,
"max": 1,
"VIPmin": 0,
"VIPmax": 15,
"playerlvmin": 0,
"playerlvmax": 0,
"notice": 0
},
{
"id": 1905,
"lotteryid": 22000001,
"description": "初级回响自选箱",
"type": 3,
"groupwt": 1,
"groupid": 1,
"subtype": 1,
"groupnum": 1,
"itemid": {
"a": "item",
"t": "15000103",
"n": 1
},
"itemdes": "15000103",
"itemwt": 1000,
"min": 1,
"max": 1,
"VIPmin": 0,
"VIPmax": 15,
"playerlvmin": 0,
"playerlvmax": 0,
"notice": 0
},
{
"id": 1906,
"lotteryid": 22000001,
"description": "初级回响自选箱",
"type": 3,
"groupwt": 1,
"groupid": 1,
"subtype": 1,
"groupnum": 1,
"itemid": {
"a": "item",
"t": "15000104",
"n": 1
},
"itemdes": "15000104",
"itemwt": 1000,
"min": 1,
"max": 1,
"VIPmin": 0,
"VIPmax": 15,
"playerlvmin": 0,
"playerlvmax": 0,
"notice": 0
}
]

View File

@ -49,7 +49,7 @@
"main": [
{
"key": 1,
"param": 10
"param": 1
}
],
"wkqbx": 2,

View File

@ -23,10 +23,8 @@ const (
///配置管理基础组件
type configureComp struct {
modules.MCompConfigure
module *Pagoda
hlock sync.RWMutex
_checkType map[int32][]*cfg.GamePassCheckData // key type
module *Pagoda
hlock sync.RWMutex
_mapPagoda map[int32]*cfg.GamePagodaData
_mapFloor map[int32]int32 // key 页签 value 层数
_mapRace map[int32]*cfg.GameCirculateData // 阵营塔
@ -43,7 +41,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
game_circulate: cfg.NewGameCirculate,
})
configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.LoadPassCheck)
configure.RegisterConfigure(game_pagoda, cfg.NewGamePagoda, this.LoadPagoda)
configure.RegisterConfigure(game_circulate, cfg.NewGameCirculate, this.LoadCirculate)
return
@ -108,25 +105,6 @@ func (this *configureComp) GetPagodaFloor(PagodaType int32) int32 {
return maxFloor
}
// 通过类型获取战令数据
func (this *configureComp) GetPassCheckByTtype(cType int32) []*cfg.GamePassCheckData {
if data, ok := this._checkType[cType]; ok {
return data
}
return nil
}
// 获取该类型的计费点
func (this *configureComp) GetPassCheckPointByTtype(cType int32) string {
if data, ok := this._checkType[cType]; ok {
if len(data) > 0 {
return data[0].PayId
}
}
this.module.Errorf("can't find PassCheckPointByTtype err Type:%d", cType)
return ""
}
// 通过id获取信息
func (this *configureComp) GetPassCheckByID(id int32) *cfg.GamePassCheckData {
if v, err := this.GetConfigure(game_passcheck); err == nil {
@ -137,23 +115,6 @@ func (this *configureComp) GetPassCheckByID(id int32) *cfg.GamePassCheckData {
return nil
}
func (this *configureComp) LoadPassCheck() {
var err error
if v, err := this.GetConfigure(game_passcheck); err == nil {
if configure, ok := v.(*cfg.GamePassCheck); ok {
this.hlock.Lock()
defer this.hlock.Unlock()
this._checkType = make(map[int32][]*cfg.GamePassCheckData, 0)
for _, value := range configure.GetDataList() {
this._checkType[value.PasscheckType] = append(this._checkType[value.PasscheckType], value)
}
return
}
}
log.Errorf("get game_pagoda conf err:%v", err)
return
}
func (this *configureComp) GetPagodaConfigData(id int32) (data *cfg.GamePagodaData, err error) {
var (
v interface{}

View File

@ -21,7 +21,7 @@ func NewGameAnnulartaskAll(_buf []map[string]interface{}) (*GameAnnulartaskAll,
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
dataMap[_v.Taskgroup] = _v
}
}
return &GameAnnulartaskAll{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,9 +11,10 @@ package cfg
import "errors"
type GameAnnulartaskAllData struct {
Id int32
Parameter int32
PasscheckType int32
Taskgroup int32
Taskdetail []int32
Weight int32
Reward []*Gameatn
}
const TypeId_GameAnnulartaskAllData = 561445145
@ -23,9 +24,36 @@ func (*GameAnnulartaskAllData) GetTypeId() int32 {
}
func (_v *GameAnnulartaskAllData)Deserialize(_buf map[string]interface{}) (err error) {
{ 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["parameter"].(float64); !_ok_ { err = errors.New("parameter error"); return }; _v.Parameter = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["passcheck_type"].(float64); !_ok_ { err = errors.New("passcheck_type error"); return }; _v.PasscheckType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskgroup"].(float64); !_ok_ { err = errors.New("taskgroup error"); return }; _v.Taskgroup = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["taskdetail"].([]interface{}); !_ok_ { err = errors.New("taskdetail error"); return }
_v.Taskdetail = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Taskdetail = append(_v.Taskdetail, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reward = make([]*Gameatn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Gameatn
{ 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 = DeserializeGameatn(_x_); err != nil { return } }
_v.Reward = append(_v.Reward, _list_v_)
}
}
return
}

View File

@ -9,6 +9,7 @@
package cfg
import "errors"
import "bright/serialization"
type GameHeroupstoryChapterData struct {
Key int32
@ -16,6 +17,7 @@ type GameHeroupstoryChapterData struct {
Chapter int32
Onlevel int32
Onlevelstory []int32
Point serialization.Vector2
Level int32
Levellink []int32
Leveltype int32
@ -54,6 +56,13 @@ func (_v *GameHeroupstoryChapterData)Deserialize(_buf map[string]interface{}) (e
}
}
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["point"].(map[string]interface{}); !_ok_ { err = errors.New("point error"); return }
var _x_, _y_ float32;
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
_v.Point = serialization.NewVector2(_x_, _y_)
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["level"].(float64); !_ok_ { err = errors.New("level error"); return }; _v.Level = int32(_tempNum_) }
{
var _arr_ []interface{}