协议优化 配置解析

This commit is contained in:
meixiongfeng 2023-07-10 11:19:22 +08:00
parent ff98a1fba8
commit 6adbd3be87
8 changed files with 4518 additions and 77 deletions

4257
bin/json/game_circulate.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10120", "t": "10110",
"n": 1 "n": 1
} }
], ],
@ -152,7 +152,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10121", "t": "10111",
"n": 1 "n": 1
} }
], ],
@ -241,7 +241,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10122", "t": "10112",
"n": 1 "n": 1
} }
], ],
@ -330,7 +330,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10123", "t": "10113",
"n": 1 "n": 1
} }
], ],
@ -419,7 +419,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10124", "t": "10114",
"n": 1 "n": 1
} }
], ],
@ -513,7 +513,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10125", "t": "10115",
"n": 1 "n": 1
} }
], ],
@ -602,7 +602,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10124", "t": "10114",
"n": 1 "n": 1
} }
], ],
@ -691,7 +691,7 @@
}, },
{ {
"a": "equi", "a": "equi",
"t": "10125", "t": "10115",
"n": 1 "n": 1
} }
], ],

View File

@ -17,6 +17,7 @@ const (
game_pagodaseasonreward = "game_pagodaseasonreward.json" game_pagodaseasonreward = "game_pagodaseasonreward.json"
game_pagodataskreward = "game_pagodataskreward.json" game_pagodataskreward = "game_pagodataskreward.json"
game_passcheck = "game_passcheck.json" game_passcheck = "game_passcheck.json"
game_circulate = "game_circulate.json"
) )
///配置管理基础组件 ///配置管理基础组件
@ -27,7 +28,8 @@ type configureComp struct {
_checkType map[int32][]*cfg.GamePassCheckData // key type _checkType map[int32][]*cfg.GamePassCheckData // key type
_mapPagoda map[int32]*cfg.GamePagodaData _mapPagoda map[int32]*cfg.GamePagodaData
_mapFloor map[int32]int32 // key 页签 value 层数 _mapFloor map[int32]int32 // key 页签 value 层数
_mapRace map[int32]*cfg.GameCirculateData // 阵营塔
} }
//组件初始化接口 //组件初始化接口
@ -41,7 +43,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.LoadPassCheck) configure.RegisterConfigure(game_passcheck, cfg.NewGamePassCheck, this.LoadPassCheck)
configure.RegisterConfigure(game_pagoda, cfg.NewGamePagoda, this.LoadPagoda) configure.RegisterConfigure(game_pagoda, cfg.NewGamePagoda, this.LoadPagoda)
configure.RegisterConfigure(game_circulate, cfg.NewGameCirculate, this.LoadCirculate)
return return
} }
@ -167,7 +169,6 @@ func (this *configureComp) GetPagodaConfigData(id int32) (data *cfg.GamePagodaDa
} }
func (this *configureComp) LoadPagoda() { func (this *configureComp) LoadPagoda() {
var err error
if v, err := this.GetConfigure(game_pagoda); err == nil { if v, err := this.GetConfigure(game_pagoda); err == nil {
if configure, ok := v.(*cfg.GamePagoda); ok { if configure, ok := v.(*cfg.GamePagoda); ok {
this.hlock.Lock() this.hlock.Lock()
@ -182,7 +183,6 @@ func (this *configureComp) LoadPagoda() {
return return
} }
} }
log.Errorf("get game_pagoda conf err:%v", err)
return return
} }
@ -197,3 +197,20 @@ func (this *configureComp) GetPagodaConfBytab(tab int32, ly int32) (data *cfg.Ga
err = comm.NewNotFoundConfErr("pagoda", game_pagoda, fmt.Errorf("tab %d ,ly %d not found", tab, ly)) err = comm.NewNotFoundConfErr("pagoda", game_pagoda, fmt.Errorf("tab %d ,ly %d not found", tab, ly))
return return
} }
func (this *configureComp) LoadCirculate() {
if v, err := this.GetConfigure(game_circulate); err == nil {
if configure, ok := v.(*cfg.GameCirculate); ok {
this.hlock.Lock()
defer this.hlock.Unlock()
this._mapRace = make(map[int32]*cfg.GameCirculateData)
for _, value := range configure.GetDataList() {
this._mapRace[value.Restriction] = value
}
return
}
}
return
}

View File

@ -312,10 +312,11 @@ type RaceData struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Buf []int32 `protobuf:"varint,1,rep,packed,name=buf,proto3" json:"buf"` Race int32 `protobuf:"varint,1,opt,name=race,proto3" json:"race"` // 阵营ID 0:循环塔 1: 阵营1
Rtime int64 `protobuf:"varint,2,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用 Buf []int32 `protobuf:"varint,2,rep,packed,name=buf,proto3" json:"buf"`
Defeat int32 `protobuf:"varint,3,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数 Rtime int64 `protobuf:"varint,3,opt,name=rtime,proto3" json:"rtime"` // 刷新时间 客户端不用
Floor map[int32]int64 `protobuf:"bytes,4,rep,name=floor,proto3" json:"floor" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //key 层数 value 耗时 Defeat int32 `protobuf:"varint,4,opt,name=defeat,proto3" json:"defeat"` // 今日战胜的次数
Floor map[int32]int64 `protobuf:"bytes,5,rep,name=floor,proto3" json:"floor" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //key 层数 value 耗时
} }
func (x *RaceData) Reset() { func (x *RaceData) Reset() {
@ -350,6 +351,13 @@ func (*RaceData) Descriptor() ([]byte, []int) {
return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{3} return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{3}
} }
func (x *RaceData) GetRace() int32 {
if x != nil {
return x.Race
}
return 0
}
func (x *RaceData) GetBuf() []int32 { func (x *RaceData) GetBuf() []int32 {
if x != nil { if x != nil {
return x.Buf return x.Buf
@ -431,19 +439,20 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb0, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc4, 0x01, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44,
0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x66, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x05, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x66, 0x18, 0x02,
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x20, 0x03, 0x28, 0x05, 0x52, 0x03, 0x62, 0x75, 0x66, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69,
0x65, 0x66, 0x65, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x64, 0x65, 0x66, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x12,
0x65, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x03, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x46, 0x6c, 0x06, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72,
0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x1a, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74,
0x38, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x61, 0x2e, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x6c,
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x6f, 0x6f, 0x72, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72,
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -972,8 +972,8 @@ type PagodaCallengeRaceOverResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Race *DBPagodaRace `protobuf:"bytes,1,opt,name=race,proto3" json:"race"` Race *RaceData `protobuf:"bytes,1,opt,name=race,proto3" json:"race"`
Reward []*UserAtno `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` Reward []*UserAtno `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"`
} }
func (x *PagodaCallengeRaceOverResp) Reset() { func (x *PagodaCallengeRaceOverResp) Reset() {
@ -1008,7 +1008,7 @@ func (*PagodaCallengeRaceOverResp) Descriptor() ([]byte, []int) {
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{19} return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{19}
} }
func (x *PagodaCallengeRaceOverResp) GetRace() *DBPagodaRace { func (x *PagodaCallengeRaceOverResp) GetRace() *RaceData {
if x != nil { if x != nil {
return x.Race return x.Race
} }
@ -1066,7 +1066,7 @@ type PagodaGetRaceResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Race []*DBPagodaRace `protobuf:"bytes,1,rep,name=race,proto3" json:"race"` Race map[int32]*RaceData `protobuf:"bytes,1,rep,name=race,proto3" json:"race" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // 塔信息
} }
func (x *PagodaGetRaceResp) Reset() { func (x *PagodaGetRaceResp) Reset() {
@ -1101,7 +1101,7 @@ func (*PagodaGetRaceResp) Descriptor() ([]byte, []int) {
return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{21} return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{21}
} }
func (x *PagodaGetRaceResp) GetRace() []*DBPagodaRace { func (x *PagodaGetRaceResp) GetRace() map[int32]*RaceData {
if x != nil { if x != nil {
return x.Race return x.Race
} }
@ -1187,18 +1187,23 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{
0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x62, 0x0a, 0x1a, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x5e, 0x0a, 0x1a,
0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x61,
0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x04, 0x72, 0x61,
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44,
0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x61, 0x74, 0x61, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x72, 0x65, 0x77,
0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72,
0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x12, 0x0a, 0x10,
0x22, 0x12, 0x0a, 0x10, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x61, 0x63, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71,
0x65, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x61,
0x74, 0x52, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x30, 0x0a, 0x04, 0x72, 0x61, 0x63, 0x65, 0x18, 0x01,
0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74,
0x64, 0x61, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x52, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x45, 0x6e, 0x74,
0x72, 0x79, 0x52, 0x04, 0x72, 0x61, 0x63, 0x65, 0x1a, 0x42, 0x0a, 0x09, 0x52, 0x61, 0x63, 0x65,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74,
0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
@ -1214,7 +1219,7 @@ func file_pagoda_pagoda_msg_proto_rawDescGZIP() []byte {
return file_pagoda_pagoda_msg_proto_rawDescData return file_pagoda_pagoda_msg_proto_rawDescData
} }
var file_pagoda_pagoda_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 22) var file_pagoda_pagoda_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{ var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{
(*PagodaGetListReq)(nil), // 0: PagodaGetListReq (*PagodaGetListReq)(nil), // 0: PagodaGetListReq
(*PagodaGetListResp)(nil), // 1: PagodaGetListResp (*PagodaGetListResp)(nil), // 1: PagodaGetListResp
@ -1238,38 +1243,40 @@ var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{
(*PagodaCallengeRaceOverResp)(nil), // 19: PagodaCallengeRaceOverResp (*PagodaCallengeRaceOverResp)(nil), // 19: PagodaCallengeRaceOverResp
(*PagodaGetRaceReq)(nil), // 20: PagodaGetRaceReq (*PagodaGetRaceReq)(nil), // 20: PagodaGetRaceReq
(*PagodaGetRaceResp)(nil), // 21: PagodaGetRaceResp (*PagodaGetRaceResp)(nil), // 21: PagodaGetRaceResp
(*DBPagoda)(nil), // 22: DBPagoda nil, // 22: PagodaGetRaceResp.RaceEntry
(*BattleFormation)(nil), // 23: BattleFormation (*DBPagoda)(nil), // 23: DBPagoda
(*BattleInfo)(nil), // 24: BattleInfo (*BattleFormation)(nil), // 24: BattleFormation
(*BattleReport)(nil), // 25: BattleReport (*BattleInfo)(nil), // 25: BattleInfo
(*DBPagodaRecord)(nil), // 26: DBPagodaRecord (*BattleReport)(nil), // 26: BattleReport
(*UserAssets)(nil), // 27: UserAssets (*DBPagodaRecord)(nil), // 27: DBPagodaRecord
(*DBPagodaRace)(nil), // 28: DBPagodaRace (*UserAssets)(nil), // 28: UserAssets
(*UserAtno)(nil), // 29: UserAtno (*RaceData)(nil), // 29: RaceData
(*UserAtno)(nil), // 30: UserAtno
} }
var file_pagoda_pagoda_msg_proto_depIdxs = []int32{ var file_pagoda_pagoda_msg_proto_depIdxs = []int32{
22, // 0: PagodaGetListResp.data:type_name -> DBPagoda 23, // 0: PagodaGetListResp.data:type_name -> DBPagoda
22, // 1: PagodaGetRewardResp.data:type_name -> DBPagoda 23, // 1: PagodaGetRewardResp.data:type_name -> DBPagoda
23, // 2: PagodaChallengeReq.battle:type_name -> BattleFormation 24, // 2: PagodaChallengeReq.battle:type_name -> BattleFormation
24, // 3: PagodaChallengeResp.info:type_name -> BattleInfo 25, // 3: PagodaChallengeResp.info:type_name -> BattleInfo
25, // 4: PagodaChallengeOverReq.report:type_name -> BattleReport 26, // 4: PagodaChallengeOverReq.report:type_name -> BattleReport
22, // 5: PagodaChallengeOverResp.data:type_name -> DBPagoda 23, // 5: PagodaChallengeOverResp.data:type_name -> DBPagoda
26, // 6: PagodaRankListResp.ranks:type_name -> DBPagodaRecord 27, // 6: PagodaRankListResp.ranks:type_name -> DBPagodaRecord
26, // 7: PagodaQueryRecordResp.data:type_name -> DBPagodaRecord 27, // 7: PagodaQueryRecordResp.data:type_name -> DBPagodaRecord
22, // 8: PagodaActivateResp.data:type_name -> DBPagoda 23, // 8: PagodaActivateResp.data:type_name -> DBPagoda
22, // 9: PagodaWarOrderResp.data:type_name -> DBPagoda 23, // 9: PagodaWarOrderResp.data:type_name -> DBPagoda
27, // 10: PagodaWarOrderResp.itmes:type_name -> UserAssets 28, // 10: PagodaWarOrderResp.itmes:type_name -> UserAssets
23, // 11: PagodaCallengeRaceReq.battle:type_name -> BattleFormation 24, // 11: PagodaCallengeRaceReq.battle:type_name -> BattleFormation
24, // 12: PagodaCallengeRaceResp.info:type_name -> BattleInfo 25, // 12: PagodaCallengeRaceResp.info:type_name -> BattleInfo
25, // 13: PagodaCallengeRaceOverReq.report:type_name -> BattleReport 26, // 13: PagodaCallengeRaceOverReq.report:type_name -> BattleReport
28, // 14: PagodaCallengeRaceOverResp.race:type_name -> DBPagodaRace 29, // 14: PagodaCallengeRaceOverResp.race:type_name -> RaceData
29, // 15: PagodaCallengeRaceOverResp.reward:type_name -> UserAtno 30, // 15: PagodaCallengeRaceOverResp.reward:type_name -> UserAtno
28, // 16: PagodaGetRaceResp.race:type_name -> DBPagodaRace 22, // 16: PagodaGetRaceResp.race:type_name -> PagodaGetRaceResp.RaceEntry
17, // [17:17] is the sub-list for method output_type 29, // 17: PagodaGetRaceResp.RaceEntry.value:type_name -> RaceData
17, // [17:17] is the sub-list for method input_type 18, // [18:18] is the sub-list for method output_type
17, // [17:17] is the sub-list for extension type_name 18, // [18:18] is the sub-list for method input_type
17, // [17:17] is the sub-list for extension extendee 18, // [18:18] is the sub-list for extension type_name
0, // [0:17] is the sub-list for field type_name 18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
} }
func init() { file_pagoda_pagoda_msg_proto_init() } func init() { file_pagoda_pagoda_msg_proto_init() }
@ -1552,7 +1559,7 @@ func file_pagoda_pagoda_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_pagoda_pagoda_msg_proto_rawDesc, RawDescriptor: file_pagoda_pagoda_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 22, NumMessages: 23,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

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 GameCirculate struct {
_dataMap map[int32]*GameCirculateData
_dataList []*GameCirculateData
}
func NewGameCirculate(_buf []map[string]interface{}) (*GameCirculate, error) {
_dataList := make([]*GameCirculateData, 0, len(_buf))
dataMap := make(map[int32]*GameCirculateData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameCirculateData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameCirculate{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCirculate) GetDataMap() map[int32]*GameCirculateData {
return table._dataMap
}
func (table *GameCirculate) GetDataList() []*GameCirculateData {
return table._dataList
}
func (table *GameCirculate) Get(key int32) *GameCirculateData {
return table._dataMap[key]
}

View File

@ -0,0 +1,102 @@
//------------------------------------------------------------------------------
// <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 GameCirculateData struct {
Id int32
Name int32
Restriction int32
BattlereadyID int32
Openingtime []int32
Unlock int32
Floors int32
Gaineffect int32
TabIcon string
TabTitle string
Monsterlineup []int32
Reward []*Gameatn
Exp int32
NameDisplay string
ModelDisplay int32
}
const TypeId_GameCirculateData = -253541710
func (*GameCirculateData) GetTypeId() int32 {
return -253541710
}
func (_v *GameCirculateData)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["name"].(float64); !_ok_ { err = errors.New("name error"); return }; _v.Name = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["restriction"].(float64); !_ok_ { err = errors.New("restriction error"); return }; _v.Restriction = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["battlereadyID"].(float64); !_ok_ { err = errors.New("battlereadyID error"); return }; _v.BattlereadyID = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["openingtime"].([]interface{}); !_ok_ { err = errors.New("openingtime error"); return }
_v.Openingtime = 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.Openingtime = append(_v.Openingtime, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["unlock"].(float64); !_ok_ { err = errors.New("unlock error"); return }; _v.Unlock = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["floors"].(float64); !_ok_ { err = errors.New("floors error"); return }; _v.Floors = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gaineffect"].(float64); !_ok_ { err = errors.New("gaineffect error"); return }; _v.Gaineffect = int32(_tempNum_) }
{ var _ok_ bool; if _v.TabIcon, _ok_ = _buf["tabIcon"].(string); !_ok_ { err = errors.New("tabIcon error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["tabTitle"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TabTitle error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TabTitle, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["monsterlineup"].([]interface{}); !_ok_ { err = errors.New("monsterlineup error"); return }
_v.Monsterlineup = 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.Monsterlineup = append(_v.Monsterlineup, _list_v_)
}
}
{
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_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exp"].(float64); !_ok_ { err = errors.New("exp error"); return }; _v.Exp = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.NameDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.NameDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["model_display"].(float64); !_ok_ { err = errors.New("model_display error"); return }; _v.ModelDisplay = int32(_tempNum_) }
return
}
func DeserializeGameCirculateData(_buf map[string]interface{}) (*GameCirculateData, error) {
v := &GameCirculateData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -184,6 +184,7 @@ type Tables struct {
CardPool *GameCardPool CardPool *GameCardPool
Robot *GameRobot Robot *GameRobot
Passon *GamePasson Passon *GamePasson
Circulate *GameCirculate
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -1229,5 +1230,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Passon, err = NewGamePasson(buf) ; err != nil { if tables.Passon, err = NewGamePasson(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_circulate") ; err != nil {
return nil, err
}
if tables.Circulate, err = NewGameCirculate(buf) ; err != nil {
return nil, err
}
return tables, nil return tables, nil
} }