This commit is contained in:
meixiongfeng 2023-07-25 20:05:13 +08:00
parent 2985f7d570
commit 301f4c6af1
24 changed files with 525 additions and 256 deletions

View File

@ -2,65 +2,161 @@
{ {
"Id": 1, "Id": 1,
"GroupId": 100001, "GroupId": 100001,
"buffID": 251023111, "buffID": 125004311,
"GroupNum": 3, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 2, "Id": 2,
"GroupId": 100001, "GroupId": 100001,
"buffID": 251023112, "buffID": 125004312,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 3, "Id": 3,
"GroupId": 100001, "GroupId": 100001,
"buffID": 200000001, "buffID": 135006211,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 4, "Id": 4,
"GroupId": 100001, "GroupId": 100001,
"buffID": 200000002, "buffID": 135006212,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 5, "Id": 5,
"GroupId": 100001, "GroupId": 100001,
"buffID": 253005111, "buffID": 135006311,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 6, "Id": 6,
"GroupId": 100001, "GroupId": 100001,
"buffID": 253005112, "buffID": 135006312,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 50, "BuffWt": 50,
"TypeWt": 60 "TypeWt": 600
}, },
{ {
"Id": 7, "Id": 7,
"GroupId": 100001, "GroupId": 100001,
"buffID": 225002011, "buffID": 144004311,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 500, "BuffWt": 50,
"TypeWt": 600 "TypeWt": 600
}, },
{ {
"Id": 8, "Id": 8,
"GroupId": 100001, "GroupId": 100001,
"buffID": 225002012, "buffID": 144004312,
"GroupNum": 0, "GroupNum": 3,
"BuffWt": 500, "BuffWt": 50,
"TypeWt": 600
},
{
"Id": 9,
"GroupId": 100001,
"buffID": 124006311,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 10,
"GroupId": 100001,
"buffID": 124006312,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 11,
"GroupId": 100001,
"buffID": 144002311,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 12,
"GroupId": 100001,
"buffID": 144002312,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 13,
"GroupId": 100001,
"buffID": 151513211,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 14,
"GroupId": 100001,
"buffID": 151513212,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 15,
"GroupId": 100001,
"buffID": 143002311,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 16,
"GroupId": 100001,
"buffID": 143002312,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 17,
"GroupId": 100001,
"buffID": 115005311,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 18,
"GroupId": 100001,
"buffID": 115005312,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 19,
"GroupId": 100001,
"buffID": 143006311,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600
},
{
"Id": 20,
"GroupId": 100001,
"buffID": 143006312,
"GroupNum": 3,
"BuffWt": 50,
"TypeWt": 600 "TypeWt": 600
} }
] ]

View File

@ -0,0 +1,62 @@
[
{
"BattleStageId": 110101,
"Atk": 0,
"Hp": 0,
"Def": 0,
"SpeedValue": 0,
"EffreValue": 0,
"BattleReadyID": 118,
"FormatList": [
101011
]
},
{
"BattleStageId": 110102,
"Atk": 0,
"Hp": 0,
"Def": 0,
"SpeedValue": 0,
"EffreValue": 0,
"BattleReadyID": 118,
"FormatList": [
101012
]
},
{
"BattleStageId": 110103,
"Atk": 0,
"Hp": 0,
"Def": 0,
"SpeedValue": 0,
"EffreValue": 0,
"BattleReadyID": 118,
"FormatList": [
101013
]
},
{
"BattleStageId": 110104,
"Atk": 0,
"Hp": 0,
"Def": 0,
"SpeedValue": 0,
"EffreValue": 0,
"BattleReadyID": 118,
"FormatList": [
101021
]
},
{
"BattleStageId": 110105,
"Atk": 0,
"Hp": 0,
"Def": 0,
"SpeedValue": 0,
"EffreValue": 0,
"BattleReadyID": 118,
"FormatList": [
101022
]
}
]

View File

@ -25,9 +25,9 @@ func (this *apiComp) EnterLevel(session comm.IUserSession, req *pb.StonehengeEnt
update map[string]interface{} update map[string]interface{}
heros []*pb.DBHero heros []*pb.DBHero
portal int32 // 生成传送门 构造房间数据 portal int32 // 生成传送门 构造房间数据
confStage *cfg.GameStroneStageData confStage *cfg.GameStoneStageData
roomlotteryConf *cfg.GameRoomlotteryData roomlotteryConf *cfg.GameRoomlotteryData
roomConf *cfg.GameStroneRoomData roomConf *cfg.GameStoneRoomData
szBuff []int32 szBuff []int32
err error err error
) )

View File

@ -22,10 +22,10 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
var ( var (
stone *pb.DBStonehenge stone *pb.DBStonehenge
update map[string]interface{} update map[string]interface{}
roomConf *cfg.GameStroneRoomData roomConf *cfg.GameStoneRoomData
err error err error
newEvent int32 // 是否有新的事件 newEvent int32 // 是否有新的事件
eventConf *cfg.GameStroneEventData eventConf *cfg.GameStoneEventData
) )
update = make(map[string]interface{}) update = make(map[string]interface{})
if errdata = this.EventCheck(session, req); errdata != nil { if errdata = this.EventCheck(session, req); errdata != nil {

View File

@ -15,10 +15,10 @@ const (
game_bufflottery = "game_bufflottery.json" game_bufflottery = "game_bufflottery.json"
game_eventlottery = "game_eventlottery.json" game_eventlottery = "game_eventlottery.json"
game_roomlottery = "game_roomlottery.json" game_roomlottery = "game_roomlottery.json"
game_roomconf = "game_stroneroom.json" game_roomconf = "game_stoneroom.json"
game_stageconf = "game_stronestage.json" game_stageconf = "game_stonestage.json"
game_buffconf = "game_stronebuff.json" game_buffconf = "game_stonebuff.json"
game_eventconf = "game_stroneevent.json" game_eventconf = "game_stoneevent.json"
) )
///背包配置管理组件 ///背包配置管理组件
@ -27,7 +27,7 @@ type configureComp struct {
module *Stonehenge module *Stonehenge
hlock sync.RWMutex hlock sync.RWMutex
// stronestage // stronestage
stage map[int64]*cfg.GameStroneStageData stage map[int64]*cfg.GameStoneStageData
// buff // buff
buff map[int32]map[int32]struct{} // key buff 类型 value buffid buff map[int32]map[int32]struct{} // key buff 类型 value buffid
@ -76,13 +76,13 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
err = this.LoadConfigure(game_roomlottery, cfg.NewGameRoomlottery) err = this.LoadConfigure(game_roomlottery, cfg.NewGameRoomlottery)
configure.RegisterConfigure(game_roomlottery, cfg.NewGameRoomlottery, this.LoadRoomGroupData) configure.RegisterConfigure(game_roomlottery, cfg.NewGameRoomlottery, this.LoadRoomGroupData)
err = this.LoadConfigure(game_stageconf, cfg.NewGameStroneStage) err = this.LoadConfigure(game_stageconf, cfg.NewGameStoneStage)
err = this.LoadConfigure(game_buffconf, cfg.NewGameStroneBuff) err = this.LoadConfigure(game_buffconf, cfg.NewGameStoneBuff)
err = this.LoadConfigure(game_eventconf, cfg.NewGameStroneEvent) err = this.LoadConfigure(game_eventconf, cfg.NewGameStoneEvent)
err = this.LoadConfigure(game_roomconf, cfg.NewGameStroneRoom) err = this.LoadConfigure(game_roomconf, cfg.NewGameStoneRoom)
configure.RegisterConfigure(game_stageconf, cfg.NewGameStroneStage, this.LoadGameStroneStage) configure.RegisterConfigure(game_stageconf, cfg.NewGameStoneStage, this.LoadGameStroneStage)
configure.RegisterConfigure(game_buffconf, cfg.NewGameStroneBuff, this.LoadGameStroneBuff) configure.RegisterConfigure(game_buffconf, cfg.NewGameStoneBuff, this.LoadGameStroneBuff)
return return
} }
@ -478,12 +478,12 @@ func (this *configureComp) GetBuffGroupDataByLottery(lotteryId int32, addType in
return return
} }
func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStroneRoomData, err error) { func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStoneRoomData, err error) {
var ( var (
v interface{} v interface{}
) )
if v, err = this.GetConfigure(game_roomconf); err == nil { if v, err = this.GetConfigure(game_roomconf); err == nil {
if configure, ok := v.(*cfg.GameStroneRoom); ok { if configure, ok := v.(*cfg.GameStoneRoom); ok {
if conf = configure.Get(roomid); conf != nil { if conf = configure.Get(roomid); conf != nil {
return return
} }
@ -493,12 +493,12 @@ func (this *configureComp) GetStoneRoomDataById(roomid int32) (conf *cfg.GameStr
return return
} }
func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStroneBuffData, err error) { func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStoneBuffData, err error) {
var ( var (
v interface{} v interface{}
) )
if v, err = this.GetConfigure(game_buffconf); err == nil { if v, err = this.GetConfigure(game_buffconf); err == nil {
if configure, ok := v.(*cfg.GameStroneBuff); ok { if configure, ok := v.(*cfg.GameStoneBuff); ok {
if conf = configure.Get(buffid); conf != nil { if conf = configure.Get(buffid); conf != nil {
return return
} }
@ -508,12 +508,12 @@ func (this *configureComp) GetStoneBuffDataById(buffid int32) (conf *cfg.GameStr
return return
} }
func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameStroneEventData, err error) { func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameStoneEventData, err error) {
var ( var (
v interface{} v interface{}
) )
if v, err = this.GetConfigure(game_eventconf); err == nil { if v, err = this.GetConfigure(game_eventconf); err == nil {
if configure, ok := v.(*cfg.GameStroneEvent); ok { if configure, ok := v.(*cfg.GameStoneEvent); ok {
if conf = configure.Get(eventid); conf != nil { if conf = configure.Get(eventid); conf != nil {
return return
} }
@ -527,10 +527,10 @@ func (this *configureComp) GetStoneEventDataById(eventid int32) (conf *cfg.GameS
func (this *configureComp) LoadGameStroneStage() { func (this *configureComp) LoadGameStroneStage() {
if v, err := this.GetConfigure(game_stageconf); err == nil { if v, err := this.GetConfigure(game_stageconf); err == nil {
if configure, ok := v.(*cfg.GameStroneStage); ok { if configure, ok := v.(*cfg.GameStoneStage); ok {
this.hlock.Lock() this.hlock.Lock()
defer this.hlock.Unlock() defer this.hlock.Unlock()
this.stage = make(map[int64]*cfg.GameStroneStageData, 0) this.stage = make(map[int64]*cfg.GameStoneStageData, 0)
for _, v := range configure.GetDataList() { for _, v := range configure.GetDataList() {
key := int64(v.StageId)<<16 + int64(v.RoomId) key := int64(v.StageId)<<16 + int64(v.RoomId)
this.stage[key] = v this.stage[key] = v
@ -542,7 +542,7 @@ func (this *configureComp) LoadGameStroneStage() {
} }
// 参数1 关卡id 参数2 层数id // 参数1 关卡id 参数2 层数id
func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (conf *cfg.GameStroneStageData) { func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (conf *cfg.GameStoneStageData) {
key := int64(stgeid)<<16 + int64(roomid) key := int64(stgeid)<<16 + int64(roomid)
return this.stage[key] return this.stage[key]
} }
@ -550,7 +550,7 @@ func (this *configureComp) GetStageConfByStageid(stgeid int32, roomid int32) (co
func (this *configureComp) LoadGameStroneBuff() { func (this *configureComp) LoadGameStroneBuff() {
if v, err := this.GetConfigure(game_buffconf); err == nil { if v, err := this.GetConfigure(game_buffconf); err == nil {
if configure, ok := v.(*cfg.GameStroneBuff); ok { if configure, ok := v.(*cfg.GameStoneBuff); ok {
this.hlock.Lock() this.hlock.Lock()
defer this.hlock.Unlock() defer this.hlock.Unlock()
this.buff = make(map[int32]map[int32]struct{}, 0) this.buff = make(map[int32]map[int32]struct{}, 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 GameStoneBattle struct {
_dataMap map[int32]*GameStoneBattleData
_dataList []*GameStoneBattleData
}
func NewGameStoneBattle(_buf []map[string]interface{}) (*GameStoneBattle, error) {
_dataList := make([]*GameStoneBattleData, 0, len(_buf))
dataMap := make(map[int32]*GameStoneBattleData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameStoneBattleData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.BattleStageId] = _v
}
}
return &GameStoneBattle{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameStoneBattle) GetDataMap() map[int32]*GameStoneBattleData {
return table._dataMap
}
func (table *GameStoneBattle) GetDataList() []*GameStoneBattleData {
return table._dataList
}
func (table *GameStoneBattle) Get(key int32) *GameStoneBattleData {
return table._dataMap[key]
}

View File

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <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 GameStoneBattleData struct {
BattleStageId int32
Atk int32
Hp int32
Def int32
SpeedValue int32
EffreValue int32
BattleReadyID int32
FormatList []int32
}
const TypeId_GameStoneBattleData = 469689547
func (*GameStoneBattleData) GetTypeId() int32 {
return 469689547
}
func (_v *GameStoneBattleData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleStageId"].(float64); !_ok_ { err = errors.New("BattleStageId error"); return }; _v.BattleStageId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Atk"].(float64); !_ok_ { err = errors.New("Atk error"); return }; _v.Atk = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Hp"].(float64); !_ok_ { err = errors.New("Hp error"); return }; _v.Hp = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Def"].(float64); !_ok_ { err = errors.New("Def error"); return }; _v.Def = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SpeedValue"].(float64); !_ok_ { err = errors.New("SpeedValue error"); return }; _v.SpeedValue = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EffreValue"].(float64); !_ok_ { err = errors.New("EffreValue error"); return }; _v.EffreValue = 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["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
_v.FormatList = 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.FormatList = append(_v.FormatList, _list_v_)
}
}
return
}
func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) {
v := &GameStoneBattleData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

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

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GameStroneBuffData struct { type GameStoneBuffData struct {
BuffId int32 BuffId int32
BuffGroupId int32 BuffGroupId int32
Type int32 Type int32
@ -23,13 +23,13 @@ type GameStroneBuffData struct {
BuffSell *Gameatn BuffSell *Gameatn
} }
const TypeId_GameStroneBuffData = 1812104654 const TypeId_GameStoneBuffData = -1457644250
func (*GameStroneBuffData) GetTypeId() int32 { func (*GameStoneBuffData) GetTypeId() int32 {
return 1812104654 return -1457644250
} }
func (_v *GameStroneBuffData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameStoneBuffData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ { err = errors.New("BuffId error"); return }; _v.BuffId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ { err = errors.New("BuffId error"); return }; _v.BuffId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffGroupId"].(float64); !_ok_ { err = errors.New("BuffGroupId error"); return }; _v.BuffGroupId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffGroupId"].(float64); !_ok_ { err = errors.New("BuffGroupId error"); return }; _v.BuffGroupId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }
@ -43,8 +43,8 @@ func (_v *GameStroneBuffData)Deserialize(_buf map[string]interface{}) (err error
return return
} }
func DeserializeGameStroneBuffData(_buf map[string]interface{}) (*GameStroneBuffData, error) { func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) {
v := &GameStroneBuffData{} v := &GameStoneBuffData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

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

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GameStroneEventData struct { type GameStoneEventData struct {
EventId int32 EventId int32
EventTitle string EventTitle string
EventType int32 EventType int32
@ -24,13 +24,13 @@ type GameStroneEventData struct {
Probability int32 Probability int32
} }
const TypeId_GameStroneEventData = 341060691 const TypeId_GameStoneEventData = 2058059771
func (*GameStroneEventData) GetTypeId() int32 { func (*GameStoneEventData) GetTypeId() int32 {
return 341060691 return 2058059771
} }
func (_v *GameStroneEventData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameStoneEventData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventId"].(float64); !_ok_ { err = errors.New("EventId error"); return }; _v.EventId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventId"].(float64); !_ok_ { err = errors.New("EventId error"); return }; _v.EventId = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["EventTitle"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.EventTitle error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.EventTitle, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["EventTitle"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.EventTitle error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.EventTitle, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventType"].(float64); !_ok_ { err = errors.New("EventType error"); return }; _v.EventType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EventType"].(float64); !_ok_ { err = errors.New("EventType error"); return }; _v.EventType = int32(_tempNum_) }
@ -58,8 +58,8 @@ func (_v *GameStroneEventData)Deserialize(_buf map[string]interface{}) (err erro
return return
} }
func DeserializeGameStroneEventData(_buf map[string]interface{}) (*GameStroneEventData, error) { func DeserializeGameStoneEventData(_buf map[string]interface{}) (*GameStoneEventData, error) {
v := &GameStroneEventData{} v := &GameStoneEventData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

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

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GameStroneRoomData struct { type GameStoneRoomData struct {
RoomId int32 RoomId int32
RoomName string RoomName string
SceneName string SceneName string
@ -24,13 +24,13 @@ type GameStroneRoomData struct {
Condition int32 Condition int32
} }
const TypeId_GameStroneRoomData = -1133628842 const TypeId_GameStoneRoomData = -108410450
func (*GameStroneRoomData) GetTypeId() int32 { func (*GameStoneRoomData) GetTypeId() int32 {
return -1133628842 return -108410450
} }
func (_v *GameStroneRoomData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameStoneRoomData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RoomId"].(float64); !_ok_ { err = errors.New("RoomId error"); return }; _v.RoomId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RoomId"].(float64); !_ok_ { err = errors.New("RoomId error"); return }; _v.RoomId = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["RoomName"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.RoomName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.RoomName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["RoomName"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.RoomName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.RoomName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.SceneName, _ok_ = _buf["SceneName"].(string); !_ok_ { err = errors.New("SceneName error"); return } } { var _ok_ bool; if _v.SceneName, _ok_ = _buf["SceneName"].(string); !_ok_ { err = errors.New("SceneName error"); return } }
@ -45,8 +45,8 @@ func (_v *GameStroneRoomData)Deserialize(_buf map[string]interface{}) (err error
return return
} }
func DeserializeGameStroneRoomData(_buf map[string]interface{}) (*GameStroneRoomData, error) { func DeserializeGameStoneRoomData(_buf map[string]interface{}) (*GameStoneRoomData, error) {
v := &GameStroneRoomData{} v := &GameStoneRoomData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

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

View File

@ -10,7 +10,7 @@ package cfg
import "errors" import "errors"
type GameStroneStageData struct { type GameStoneStageData struct {
Id int32 Id int32
StageId int32 StageId int32
PreviouStage int32 PreviouStage int32
@ -28,13 +28,13 @@ type GameStroneStageData struct {
StageValue int32 StageValue int32
} }
const TypeId_GameStroneStageData = 2146544311 const TypeId_GameStoneStageData = -431423905
func (*GameStroneStageData) GetTypeId() int32 { func (*GameStoneStageData) GetTypeId() int32 {
return 2146544311 return -431423905
} }
func (_v *GameStroneStageData)Deserialize(_buf map[string]interface{}) (err error) { func (_v *GameStoneStageData)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["Id"].(float64); !_ok_ { err = errors.New("Id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["StageId"].(float64); !_ok_ { err = errors.New("StageId error"); return }; _v.StageId = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["StageId"].(float64); !_ok_ { err = errors.New("StageId error"); return }; _v.StageId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["PreviouStage"].(float64); !_ok_ { err = errors.New("PreviouStage error"); return }; _v.PreviouStage = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["PreviouStage"].(float64); !_ok_ { err = errors.New("PreviouStage error"); return }; _v.PreviouStage = int32(_tempNum_) }
@ -92,8 +92,8 @@ func (_v *GameStroneStageData)Deserialize(_buf map[string]interface{}) (err erro
return return
} }
func DeserializeGameStroneStageData(_buf map[string]interface{}) (*GameStroneStageData, error) { func DeserializeGameStoneStageData(_buf map[string]interface{}) (*GameStoneStageData, error) {
v := &GameStroneStageData{} v := &GameStoneStageData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {

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

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

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

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

View File

@ -203,10 +203,11 @@ type Tables struct {
Roomlottery *GameRoomlottery Roomlottery *GameRoomlottery
Bufflottery *GameBufflottery Bufflottery *GameBufflottery
Eventlottery *GameEventlottery Eventlottery *GameEventlottery
StroneBuff *GameStroneBuff StoneBuff *GameStoneBuff
StroneRoom *GameStroneRoom StoneRoom *GameStoneRoom
StroneStage *GameStroneStage StoneStage *GameStoneStage
StroneEvent *GameStroneEvent StoneEvent *GameStoneEvent
StoneBattle *GameStoneBattle
GameSummaryTab *GameGameSummaryTab GameSummaryTab *GameGameSummaryTab
GameSummary *GameGameSummary GameSummary *GameGameSummary
CompositeAll *GameCompositeAll CompositeAll *GameCompositeAll
@ -1369,28 +1370,34 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Eventlottery, err = NewGameEventlottery(buf) ; err != nil { if tables.Eventlottery, err = NewGameEventlottery(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_stronebuff") ; err != nil { if buf, err = loader("game_stonebuff") ; err != nil {
return nil, err return nil, err
} }
if tables.StroneBuff, err = NewGameStroneBuff(buf) ; err != nil { if tables.StoneBuff, err = NewGameStoneBuff(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_stroneroom") ; err != nil { if buf, err = loader("game_stoneroom") ; err != nil {
return nil, err return nil, err
} }
if tables.StroneRoom, err = NewGameStroneRoom(buf) ; err != nil { if tables.StoneRoom, err = NewGameStoneRoom(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_stronestage") ; err != nil { if buf, err = loader("game_stonestage") ; err != nil {
return nil, err return nil, err
} }
if tables.StroneStage, err = NewGameStroneStage(buf) ; err != nil { if tables.StoneStage, err = NewGameStoneStage(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_stroneevent") ; err != nil { if buf, err = loader("game_stoneevent") ; err != nil {
return nil, err return nil, err
} }
if tables.StroneEvent, err = NewGameStroneEvent(buf) ; err != nil { if tables.StoneEvent, err = NewGameStoneEvent(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_stonebattle") ; err != nil {
return nil, err
}
if tables.StoneBattle, err = NewGameStoneBattle(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_gamesummarytab") ; err != nil { if buf, err = loader("game_gamesummarytab") ; err != nil {