This commit is contained in:
liwei 2023-07-26 15:15:34 +08:00
commit 47b5bf4c3c
8 changed files with 222 additions and 249 deletions

View File

@ -0,0 +1,7 @@
[
{
"BossId": 28110501,
"FriendlyBuffGroup": 300002,
"EnemyBuffGroup": 300001
}
]

View File

@ -27,8 +27,8 @@ type configureComp struct {
module *Stonehenge module *Stonehenge
hlock sync.RWMutex hlock sync.RWMutex
// stronestage // stronestage
stage map[int64]*cfg.GameStoneStageData stage map[int64]*cfg.GameStoneStageData
szStage map[int32]int32 // k 关卡ID v 层数
// buff // buff
buff map[int32]map[int32]struct{} // key buff 类型 value buffid buff map[int32]map[int32]struct{} // key buff 类型 value buffid
// 房间随机 // 房间随机
@ -93,6 +93,8 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
// sz[144004312] = struct{}{} // sz[144004312] = struct{}{}
// sz[124006311] = struct{}{} // sz[124006311] = struct{}{}
// this.GetBuffGroupDataByLottery(100001, 1, sz) // this.GetBuffGroupDataByLottery(100001, 1, sz)
this.CheckStage()
return return
} }
@ -152,7 +154,7 @@ func (this *configureComp) GetEventLotterConfById(id int32) (data *cfg.GameEvent
} }
// 实际掉落逻辑 (传入 掉落组ID vip等级 玩家等级 返回获得的道具) // 实际掉落逻辑 (传入 掉落组ID vip等级 玩家等级 返回获得的道具)
func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (buff []int32) { func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (event []int32) {
if _, ok := this._lotteryType1E[lotteryId]; !ok { if _, ok := this._lotteryType1E[lotteryId]; !ok {
if _, ok := this._lotteryType2E[lotteryId]; !ok { if _, ok := this._lotteryType2E[lotteryId]; !ok {
@ -200,7 +202,7 @@ func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (buff []i
} }
index := comm.GetRandW(szW) index := comm.GetRandW(szW)
_data := this.GetEventLotterConfById(szID[index]) _data := this.GetEventLotterConfById(szID[index])
buff = append(buff, _data.EventID) event = append(event, _data.EventID)
} }
return return
} else if this.StypeE[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比) } else if this.StypeE[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比)
@ -212,7 +214,7 @@ func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (buff []i
} }
//fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v) //fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v)
if wt >= comm.GetRandNum(0, 1000) { // 命中 if wt >= comm.GetRandNum(0, 1000) { // 命中
buff = append(buff, _data.EventID) event = append(event, _data.EventID)
} }
} }
} }
@ -253,7 +255,7 @@ func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (buff []i
} }
index := comm.GetRandW(szW) index := comm.GetRandW(szW)
_data := this.GetEventLotterConfById(szID[index]) _data := this.GetEventLotterConfById(szID[index])
buff = append(buff, _data.EventID) event = append(event, _data.EventID)
} }
} else if this.StypeE[key] == 2 { } else if this.StypeE[key] == 2 {
for _, v := range this._groupType2E[key] { for _, v := range this._groupType2E[key] {
@ -263,7 +265,7 @@ func (this *configureComp) GetEventGroupDataByLottery(lotteryId int32) (buff []i
wt = _data.EventWt wt = _data.EventWt
} }
if wt >= comm.GetRandNum(0, 1000) { // 命中 if wt >= comm.GetRandNum(0, 1000) { // 命中
buff = append(buff, _data.EventID) event = append(event, _data.EventID)
} }
} }
} }
@ -332,7 +334,7 @@ func (this *configureComp) GetRoomLotterConfById(id int32) (data *cfg.GameRoomlo
} }
// 实际掉落逻辑 (传入 掉落组ID vip等级 玩家等级 返回获得的道具) // 实际掉落逻辑 (传入 掉落组ID vip等级 玩家等级 返回获得的道具)
func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (buff []int32) { func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (rooms []int32) {
if _, ok := this._lotteryType1R[lotteryId]; !ok { if _, ok := this._lotteryType1R[lotteryId]; !ok {
if _, ok := this._lotteryType2R[lotteryId]; !ok { if _, ok := this._lotteryType2R[lotteryId]; !ok {
@ -380,7 +382,7 @@ func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (buff []in
} }
index := comm.GetRandW(szW) index := comm.GetRandW(szW)
_data := this.GetRoomLotterConfById(szID[index]) _data := this.GetRoomLotterConfById(szID[index])
buff = append(buff, _data.RoomID) rooms = append(rooms, _data.RoomID)
} }
return return
} else if this.StypeR[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比) } else if this.StypeR[key] == 2 { // 该小组中的道具为概率掉落,每个道具都会随机一次是否会掉落(单位为千分比)
@ -392,7 +394,7 @@ func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (buff []in
} }
//fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v) //fmt.Printf("大组类型1小组类型2获得道具 :%v, 该道具Cid:%d", _data.Itemid, v)
if wt >= comm.GetRandNum(0, 1000) { // 命中 if wt >= comm.GetRandNum(0, 1000) { // 命中
buff = append(buff, _data.RoomID) rooms = append(rooms, _data.RoomID)
} }
} }
} }
@ -433,7 +435,7 @@ func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (buff []in
} }
index := comm.GetRandW(szW) index := comm.GetRandW(szW)
_data := this.GetRoomLotterConfById(szID[index]) _data := this.GetRoomLotterConfById(szID[index])
buff = append(buff, _data.RoomID) rooms = append(rooms, _data.RoomID)
} }
} else if this.StypeR[key] == 2 { } else if this.StypeR[key] == 2 {
for _, v := range this._groupType2R[key] { for _, v := range this._groupType2R[key] {
@ -443,7 +445,7 @@ func (this *configureComp) GetRoomGroupDataByLottery(lotteryId int32) (buff []in
wt = _data.RoomWt wt = _data.RoomWt
} }
if wt >= comm.GetRandNum(0, 1000) { // 命中 if wt >= comm.GetRandNum(0, 1000) { // 命中
buff = append(buff, _data.RoomID) rooms = append(rooms, _data.RoomID)
} }
} }
} }
@ -575,9 +577,11 @@ func (this *configureComp) LoadGameStoneStage() {
this.hlock.Lock() this.hlock.Lock()
defer this.hlock.Unlock() defer this.hlock.Unlock()
this.stage = make(map[int64]*cfg.GameStoneStageData, 0) this.stage = make(map[int64]*cfg.GameStoneStageData, 0)
this.szStage = make(map[int32]int32, 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
this.szStage[v.StageId]++
} }
} }
} }
@ -613,3 +617,32 @@ func (this *configureComp) LoadGameStoneBuff() {
func (this *configureComp) GetGameStoneBuff(addType int32) (m map[int32]struct{}) { func (this *configureComp) GetGameStoneBuff(addType int32) (m map[int32]struct{}) {
return this.buff[addType] return this.buff[addType]
} }
func (this *configureComp) CheckStage() {
var (
boosEvent map[int32]int32 // key stageid value rommid
)
boosEvent = make(map[int32]int32, 0)
for k, v := range this.szStage {
if c := this.GetStageConfByStageid(k, v-1); c != nil {
// 根据传送门组生成传送门
if rooms := this.GetRoomGroupDataByLottery(c.PortalGroup); len(rooms) > 0 {
boosEvent[k] = rooms[0]
}
}
}
// if v, err := this.GetConfigure(game_stageconf); err == nil {
// if configure, ok := v.(*cfg.GameStoneStage); ok {
// this.hlock.Lock()
// defer this.hlock.Unlock()
// this.stage = make(map[int64]*cfg.GameStoneStageData, 0)
// for _, v := range configure.GetDataList() {
// key := int64(v.StageId)<<16 + int64(v.RoomId)
// this.stage[key] = v
// }
// }
// }
return
}

View File

@ -3,6 +3,7 @@ package stonehenge
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/event"
"go_dreamfactory/lego/sys/mgo" "go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb" "go_dreamfactory/pb"
@ -31,6 +32,15 @@ func (this *MStonehenge) Init(service core.IService, module core.IModule, comp c
}) })
return return
} }
func (this *MStonehenge) Start() (err error) {
err = this.MCompModel.Start()
event.RegisterGO(core.Event_ServiceStartEnd, func() {
err = this.loadStoneBoos()
})
return
}
func (this *MStonehenge) GetStonehengeData(uid string) *pb.DBStonehenge { func (this *MStonehenge) GetStonehengeData(uid string) *pb.DBStonehenge {
stone := &pb.DBStonehenge{} stone := &pb.DBStonehenge{}
@ -53,3 +63,8 @@ func (this *MStonehenge) ChangeStonehengeData(uid string, update map[string]inte
return this.Change(uid, update) return this.Change(uid, update)
} }
func (this *MStonehenge) loadStoneBoos() (err error) {
return
}

View File

@ -11,139 +11,56 @@ package cfg
import "errors" import "errors"
type GameStoneBattleData struct { type GameStoneBattleData struct {
BattleStageId int32 BattleStageId int32
EnemyShowIcon int32 EnemyShowIcon int32
Atk int32 Atk int32
Hp int32 Hp int32
Def int32 Def int32
SpeedValue int32 SpeedValue int32
EffreValue int32 EffreValue int32
BattleReadyID int32 BattleReadyID int32
FormatList []int32 FormatList []int32
RewardLottery int32 RewardLottery int32
} }
const TypeId_GameStoneBattleData = 469689547 const TypeId_GameStoneBattleData = 469689547
func (*GameStoneBattleData) GetTypeId() int32 { func (*GameStoneBattleData) GetTypeId() int32 {
return 469689547 return 469689547
} }
func (_v *GameStoneBattleData) Deserialize(_buf map[string]interface{}) (err error) { 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 _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EnemyShowIcon"].(float64); !_ok_ { err = errors.New("EnemyShowIcon error"); return }; _v.EnemyShowIcon = int32(_tempNum_) }
var _tempNum_ float64 { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Atk"].(float64); !_ok_ { err = errors.New("Atk error"); return }; _v.Atk = int32(_tempNum_) }
if _tempNum_, _ok_ = _buf["BattleStageId"].(float64); !_ok_ { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Hp"].(float64); !_ok_ { err = errors.New("Hp error"); return }; _v.Hp = int32(_tempNum_) }
err = errors.New("BattleStageId error") { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Def"].(float64); !_ok_ { err = errors.New("Def error"); return }; _v.Def = int32(_tempNum_) }
return { 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_) }
_v.BattleStageId = 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 var _ok_ bool
var _tempNum_ float64 if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
if _tempNum_, _ok_ = _buf["EnemyShowIcon"].(float64); !_ok_ {
err = errors.New("EnemyShowIcon error")
return
}
_v.EnemyShowIcon = 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_)) _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_)
}
}
for _, _e_ := range _arr_ { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["RewardLottery"].(float64); !_ok_ { err = errors.New("RewardLottery error"); return }; _v.RewardLottery = int32(_tempNum_) }
var _list_v_ int32 return
{
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_)
}
}
{
var _ok_ bool
var _tempNum_ float64
if _tempNum_, _ok_ = _buf["RewardLottery"].(float64); !_ok_ {
err = errors.New("RewardLottery error")
return
}
_v.RewardLottery = int32(_tempNum_)
}
return
} }
func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) { func DeserializeGameStoneBattleData(_buf map[string]interface{}) (*GameStoneBattleData, error) {
v := &GameStoneBattleData{} v := &GameStoneBattleData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {
return nil, err 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 GameStoneBoss struct {
_dataMap map[int32]*GameStoneBossData
_dataList []*GameStoneBossData
}
func NewGameStoneBoss(_buf []map[string]interface{}) (*GameStoneBoss, error) {
_dataList := make([]*GameStoneBossData, 0, len(_buf))
dataMap := make(map[int32]*GameStoneBossData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameStoneBossData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.BossId] = _v
}
}
return &GameStoneBoss{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameStoneBoss) GetDataMap() map[int32]*GameStoneBossData {
return table._dataMap
}
func (table *GameStoneBoss) GetDataList() []*GameStoneBossData {
return table._dataList
}
func (table *GameStoneBoss) Get(key int32) *GameStoneBossData {
return table._dataMap[key]
}

View File

@ -0,0 +1,39 @@
//------------------------------------------------------------------------------
// <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 GameStoneBossData struct {
BossId int32
FriendlyBuffGroup int32
EnemyBuffGroup int32
}
const TypeId_GameStoneBossData = -2103514304
func (*GameStoneBossData) GetTypeId() int32 {
return -2103514304
}
func (_v *GameStoneBossData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BossId"].(float64); !_ok_ { err = errors.New("BossId error"); return }; _v.BossId = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["FriendlyBuffGroup"].(float64); !_ok_ { err = errors.New("FriendlyBuffGroup error"); return }; _v.FriendlyBuffGroup = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["EnemyBuffGroup"].(float64); !_ok_ { err = errors.New("EnemyBuffGroup error"); return }; _v.EnemyBuffGroup = int32(_tempNum_) }
return
}
func DeserializeGameStoneBossData(_buf map[string]interface{}) (*GameStoneBossData, error) {
v := &GameStoneBossData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -11,128 +11,41 @@ package cfg
import "errors" import "errors"
type GameStoneBuffData struct { type GameStoneBuffData struct {
BuffId int32 BuffId int32
Type int32 Type int32
SkillId int32 SkillId int32
BuffLevel int32 BuffLevel int32
Quality int32 Quality int32
BuffIcon string BuffIcon string
BuffStory string BuffStory string
BuffUpgradeCost *Gameatn BuffUpgradeCost *Gameatn
BuffSell *Gameatn BuffSell *Gameatn
} }
const TypeId_GameStoneBuffData = -1457644250 const TypeId_GameStoneBuffData = -1457644250
func (*GameStoneBuffData) GetTypeId() int32 { func (*GameStoneBuffData) GetTypeId() int32 {
return -1457644250 return -1457644250
} }
func (_v *GameStoneBuffData) 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 _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }
var _tempNum_ float64 { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["SkillId"].(float64); !_ok_ { err = errors.New("SkillId error"); return }; _v.SkillId = int32(_tempNum_) }
if _tempNum_, _ok_ = _buf["BuffId"].(float64); !_ok_ { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BuffLevel"].(float64); !_ok_ { err = errors.New("BuffLevel error"); return }; _v.BuffLevel = int32(_tempNum_) }
err = errors.New("BuffId error") { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Quality"].(float64); !_ok_ { err = errors.New("Quality error"); return }; _v.Quality = int32(_tempNum_) }
return { var _ok_ bool; if _v.BuffIcon, _ok_ = _buf["BuffIcon"].(string); !_ok_ { err = errors.New("BuffIcon error"); return } }
} {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["BuffStory"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.BuffStory error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.BuffStory, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
_v.BuffId = int32(_tempNum_) { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["BuffUpgradeCost"].(map[string]interface{}); !_ok_ { err = errors.New("BuffUpgradeCost error"); return }; if _v.BuffUpgradeCost, err = DeserializeGameatn(_x_); err != nil { return } }
} { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["BuffSell"].(map[string]interface{}); !_ok_ { err = errors.New("BuffSell error"); return }; if _v.BuffSell, err = DeserializeGameatn(_x_); err != nil { return } }
{ return
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["SkillId"].(float64); !_ok_ {
err = errors.New("SkillId error")
return
}
_v.SkillId = int32(_tempNum_)
}
{
var _ok_ bool
var _tempNum_ float64
if _tempNum_, _ok_ = _buf["BuffLevel"].(float64); !_ok_ {
err = errors.New("BuffLevel error")
return
}
_v.BuffLevel = int32(_tempNum_)
}
{
var _ok_ bool
var _tempNum_ float64
if _tempNum_, _ok_ = _buf["Quality"].(float64); !_ok_ {
err = errors.New("Quality error")
return
}
_v.Quality = int32(_tempNum_)
}
{
var _ok_ bool
if _v.BuffIcon, _ok_ = _buf["BuffIcon"].(string); !_ok_ {
err = errors.New("BuffIcon error")
return
}
}
{
var _ok_ bool
var __json_text__ map[string]interface{}
if __json_text__, _ok_ = _buf["BuffStory"].(map[string]interface{}); !_ok_ {
err = errors.New("_v.BuffStory error")
return
}
{
var _ok_ bool
if _, _ok_ = __json_text__["key"].(string); !_ok_ {
err = errors.New("key error")
return
}
}
{
var _ok_ bool
if _v.BuffStory, _ok_ = __json_text__["text"].(string); !_ok_ {
err = errors.New("text error")
return
}
}
}
{
var _ok_ bool
var _x_ map[string]interface{}
if _x_, _ok_ = _buf["BuffUpgradeCost"].(map[string]interface{}); !_ok_ {
err = errors.New("BuffUpgradeCost error")
return
}
if _v.BuffUpgradeCost, err = DeserializeGameatn(_x_); err != nil {
return
}
}
{
var _ok_ bool
var _x_ map[string]interface{}
if _x_, _ok_ = _buf["BuffSell"].(map[string]interface{}); !_ok_ {
err = errors.New("BuffSell error")
return
}
if _v.BuffSell, err = DeserializeGameatn(_x_); err != nil {
return
}
}
return
} }
func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) { func DeserializeGameStoneBuffData(_buf map[string]interface{}) (*GameStoneBuffData, error) {
v := &GameStoneBuffData{} v := &GameStoneBuffData{}
if err := v.Deserialize(_buf); err == nil { if err := v.Deserialize(_buf); err == nil {
return v, nil return v, nil
} else { } else {
return nil, err return nil, err
} }
} }

View File

@ -211,6 +211,7 @@ type Tables struct {
GameSummaryTab *GameGameSummaryTab GameSummaryTab *GameGameSummaryTab
GameSummary *GameGameSummary GameSummary *GameGameSummary
CompositeAll *GameCompositeAll CompositeAll *GameCompositeAll
StoneBoss *GameStoneBoss
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -1418,5 +1419,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.CompositeAll, err = NewGameCompositeAll(buf) ; err != nil { if tables.CompositeAll, err = NewGameCompositeAll(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_stoneboss") ; err != nil {
return nil, err
}
if tables.StoneBoss, err = NewGameStoneBoss(buf) ; err != nil {
return nil, err
}
return tables, nil return tables, nil
} }