上传代码

This commit is contained in:
liwei1dao 2024-01-24 21:08:42 +08:00
parent 74c979181d
commit 8d7ff80c05
16 changed files with 2305 additions and 2381 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,398 @@
[
{
"skillid": 310001001,
"type": 1,
"val": 1,
"show": 1,
"incompatibility": [
310001002
],
"name": {
"key": "IntegralBoss_Integralbuff_name_01",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_01",
"text": "我方守护者生命上限提升30%"
}
},
{
"skillid": 310001002,
"type": 1,
"val": 2,
"show": 1,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_02",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_02",
"text": "我方守护者受到伤害降低30%"
}
},
{
"skillid": 310001003,
"type": 1,
"val": 3,
"show": 1,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_03",
"text": "我方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_03",
"text": "守护者血量低于30%时伤害提升60%"
}
},
{
"skillid": 310001004,
"type": 2,
"val": 1,
"show": 1,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_04",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_04",
"text": "敌方全体伤害提升10%"
}
},
{
"skillid": 310001005,
"type": 2,
"val": 2,
"show": 1,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_05",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_05",
"text": "敌方全体伤害提升20%"
}
},
{
"skillid": 310001006,
"type": 2,
"val": 3,
"show": 1,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_06",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_06",
"text": "敌方全体伤害提升30%"
}
},
{
"skillid": 310001007,
"type": 2,
"val": 1,
"show": 2,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_07",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_07",
"text": "敌方全体速度+2"
}
},
{
"skillid": 310001008,
"type": 2,
"val": 2,
"show": 2,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_08",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_08",
"text": "敌方全体速度+3"
}
},
{
"skillid": 310001009,
"type": 2,
"val": 3,
"show": 2,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_09",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_09",
"text": "敌方全体速度+4"
}
},
{
"skillid": 310001010,
"type": 2,
"val": 1,
"show": 3,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_10",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_10",
"text": "我方守护者受到的治疗效果降低10%"
}
},
{
"skillid": 310001011,
"type": 2,
"val": 2,
"show": 3,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_11",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_11",
"text": "我方守护者受到的治疗效果降低20%"
}
},
{
"skillid": 310001012,
"type": 2,
"val": 3,
"show": 3,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_12",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_12",
"text": "我方守护者受到的治疗效果降低30%"
}
},
{
"skillid": 310001013,
"type": 2,
"val": 1,
"show": 4,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_13",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_13",
"text": "战斗开始后我方随机2名守护者获得2回合的流血"
}
},
{
"skillid": 310001014,
"type": 2,
"val": 1,
"show": 5,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_14",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_14",
"text": "敌方造成的流血和眩晕将额外增加1回合持续时间"
}
},
{
"skillid": 310001015,
"type": 2,
"val": 2,
"show": 5,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_15",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_15",
"text": "敌方攻击眩晕状态的敌人时无视受击者15%防御"
}
},
{
"skillid": 310001016,
"type": 2,
"val": 3,
"show": 5,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_16",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_16",
"text": "敌方攻击处于流血状态的敌人时额外增加40%暴击伤害"
}
},
{
"skillid": 310001017,
"type": 2,
"val": 1,
"show": 6,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_17",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_17",
"text": "每3回合驱散敌方全部减益1次"
}
},
{
"skillid": 310001018,
"type": 2,
"val": 2,
"show": 6,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_18",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_18",
"text": "除BOSS外所有友方技能最大冷却时间增加1回合"
}
},
{
"skillid": 310001019,
"type": 2,
"val": 3,
"show": 6,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_19",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_19",
"text": "每3回合驱散我方守护者全部增益1次"
}
},
{
"skillid": 310001020,
"type": 2,
"val": 1,
"show": 7,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_20",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_20",
"text": "战斗开始后我方全体各自失去20%生命"
}
},
{
"skillid": 310001021,
"type": 2,
"val": 1,
"show": 8,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_21",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_21",
"text": "敌方会心提升20%"
}
},
{
"skillid": 310001022,
"type": 2,
"val": 2,
"show": 8,
"incompatibility": [
310001001
],
"name": {
"key": "IntegralBoss_Integralbuff_name_22",
"text": "敌方增益"
},
"icon": "wp_icon_10021",
"des": {
"key": "IntegralBoss_Integralbuff_des_22",
"text": "敌方全体免疫控制效果(小怪生效)"
}
}
]

View File

@ -145,7 +145,7 @@
"key": "mainchapter_main_chapter_describe_3",
"text": "探索罪恶都市,完成拼图。每一块拼图完成都有神秘奖励!拼图集齐后可以获得美肚鲨!"
},
"achunlock": 11001001,
"achunlock": 11003005,
"venturecurrency": [
{
"a": "item",
@ -190,7 +190,7 @@
"key": "mainchapter_main_chapter_describe_4",
"text": "探索精灵王国,完成拼图。每一块拼图完成都有神秘奖励!拼图集齐后可以获得穿靴子的猫!"
},
"achunlock": 11001001,
"achunlock": 11004005,
"venturecurrency": [
{
"a": "item",

View File

@ -3006,5 +3006,30 @@
"key": "opencond_opencond_kqbx_text_115",
"text": "是否加入工会功能开启"
}
},
{
"id": "playersyn",
"name": {
"key": "opencond_opencond_name_116",
"text": "多人同屏"
},
"opencondi": [
18000042
],
"wkqbx": 0,
"img": "",
"prompt": {
"key": "",
"text": ""
},
"uiid": 0,
"activateType": false,
"notify": [],
"kqbx": false,
"kqbx_ui": "",
"kqbx_text": {
"key": "",
"text": ""
}
}
]

View File

@ -18,6 +18,7 @@ type configureComp struct {
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Egghunt)
err = this.LoadConfigure(game_repeatall, cfg.NewGameRepeatAll)
return
}

View File

@ -3,7 +3,6 @@ package enchant
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs"
)
// 参数校验
@ -43,14 +42,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
}
return
}
if len(cfgData) <= 0 { /// 启动前校验
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
Title: pb.ErrorCode_ConfigNoFound.ToString(),
}
return
}
if errdata = this.module.CheckRes(session, cfgData[0].PsConsume); errdata != nil {
if errdata = this.module.CheckRes(session, cfgData.PsConsume); errdata != nil {
return
}
@ -58,23 +50,13 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
if !ok { // 类型校验
enchant.Boss[req.BossType] = 0
}
// 获取分数
var score int32
var format []int32
var battleconf *cfg.GameEnchantBossData
score = int32(enchant.Boss[req.BossType])
for _, v := range cfgData {
if v.ScoreLow <= score && v.ScoreUp >= score {
format = v.Boss
battleconf = v
}
}
errdata, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
Rulesid: battleconf.BattleReadyID,
Rulesid: cfgData.BattleReadyID,
Ptype: pb.PlayType_enchant,
Title: "",
Format: req.Battle,
Mformat: format,
Mformat: cfgData.Boss,
})
if errdata != nil {
@ -84,7 +66,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.EnchantChallen
Info: &pb.BattleInfo{
Id: record.Id,
Title: record.Title,
Rulesid: battleconf.BattleReadyID,
Rulesid: cfgData.BattleReadyID,
Btype: record.Btype,
Ptype: record.Ptype,
RedCompId: record.RedCompId,

View File

@ -22,8 +22,8 @@ func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.Encha
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantChallengeOverReq) (errdata *pb.ErrorData) {
var (
mapData map[string]interface{}
bWin bool // 战斗是否胜利
score int32 // 通关获得分数
bWin bool // 战斗是否胜利
conf *cfg.GameEnchantbossRewardData
res []*cfg.Gameatn
atno []*pb.UserAtno
)
@ -53,6 +53,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
return
}
if conf, err = this.module.configure.getGameRepeatAllData(req.Report.Grade); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, // 道具数量不足
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
// check
errdata, bWin = this.module.battle.CheckBattleReport(session, req.Report)
if errdata != nil {
@ -60,20 +69,20 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
}
if !bWin { // 战斗失败了 直接返回
if errdata = this.module.ConsumeRes(session, cfgEnchant[0].PsMg, true); errdata != nil {
if errdata = this.module.ConsumeRes(session, cfgEnchant.PsMg, true); errdata != nil {
return
}
session.SendMsg(string(this.module.GetType()), EnchantChallengeOverResp, &pb.EnchantChallengeOverResp{Data: enchant})
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsMg)
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant.PsMg)
})
return
}
if errdata = this.module.ConsumeRes(session, cfgEnchant[0].PsConsume, true); errdata != nil {
if errdata = this.module.ConsumeRes(session, cfgEnchant.PsConsume, true); errdata != nil {
return
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant[0].PsConsume)
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResDelType, "EnchantChallengeOverReq", cfgEnchant.PsConsume)
})
userinfo, err := this.module.GetUserForSession(session)
if err != nil {
@ -93,14 +102,14 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.EnchantCha
}
enchant.Boss[req.BossType] = req.Score // 获得的积分
// 发放通关随机奖励
for _, v := range cfgEnchant {
if score >= v.ScoreLow && score <= v.ScoreUp {
for _, v1 := range v.RewardDrop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv)
res = append(res, reward...)
}
}
for _, v1 := range conf.Reward1Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv)
res = append(res, reward...)
}
for _, v1 := range conf.Reward2Drop {
reward := this.module.ModuleTools.GetGroupDataByLottery(v1, userinfo.Vip, userinfo.Lv)
res = append(res, reward...)
}
if len(res) > 0 {
if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil {

View File

@ -11,51 +11,62 @@ import (
)
const (
game_enchantboss = "game_enchantboss.json"
game_enchantshop = "game_enchantshop.json"
game_enchantboss = "game_enchantboss.json"
game_enchantshop = "game_enchantshop.json"
game_enchantbossreward = "game_enchantbossreward.json"
)
///配置管理基础组件
type configureComp struct {
hlock sync.RWMutex
modules.MCompConfigure
_enchantMap map[int32][]*cfg.GameEnchantBossData
module *Enchant
hlock sync.RWMutex
}
//组件初始化接口
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.MCompConfigure.Init(service, module, comp, options)
configure.RegisterConfigure(game_enchantboss, cfg.NewGameEnchantBoss, func() {
if v, err := this.GetConfigure(game_enchantboss); err == nil {
if configure, ok := v.(*cfg.GameEnchantBoss); ok {
this.hlock.Lock()
defer this.hlock.Unlock()
this._enchantMap = make(map[int32][]*cfg.GameEnchantBossData, 0)
for _, value := range configure.GetDataList() {
this._enchantMap[value.Bossid] = append(this._enchantMap[value.Bossid], value)
}
return
}
} else {
log.Errorf("get game_enchantboss conf err:%v", err)
}
return
})
this.module = module.(*Enchant)
err = this.LoadConfigure(game_enchantboss, cfg.NewGameEnchantBoss)
err = this.LoadConfigure(game_enchantshop, cfg.NewGameEnchantShop)
err = this.LoadConfigure(game_enchantbossreward, cfg.NewGameEnchantbossReward)
return
}
// 参数: boss类型 难度
func (this *configureComp) GetEnchantBossConfigData(bossId int32) (data []*cfg.GameEnchantBossData, err error) {
func (this *configureComp) GetEnchantBossConfigData(bossId int32) (conf *cfg.GameEnchantBossData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(game_enchantboss); err != nil {
this.module.Errorf("err:%v", err)
return
} else {
for _, v := range v.(*cfg.GameEnchantBoss).GetDataList() {
if v.Bossid == bossId {
conf = v
return
}
}
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_enchantboss, bossId)
}
return
}
// 读取装备出售系数配置
func (this *configureComp) getGameRepeatAllData(id int32) (conf *cfg.GameEnchantbossRewardData, err error) {
var (
v interface{}
ok bool
)
this.hlock.RLock()
defer this.hlock.RUnlock()
if data, ok = this._enchantMap[bossId]; !ok {
err = comm.NewNotFoundConfErr("enchant", game_enchantboss, bossId)
if v, err = this.GetConfigure(game_enchantbossreward); err != nil {
this.module.Errorf("err:%v", err)
return
} else {
if conf, ok = v.(*cfg.GameEnchantbossReward).GetDataMap()[id]; !ok {
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_enchantbossreward, id)
return
}
}
return
}

View File

@ -49,9 +49,8 @@ func (this *modelEnchant) getEnchantList(uid string) (result *pb.DBEnchant, err
// 红点检测
func (this *modelEnchant) checkReddot33(session comm.IUserSession) bool {
conf, _ := this.module.configure.GetEnchantBossConfigData(1)
if len(conf) > 0 {
if code := this.module.CheckRes(session, conf[0].PsConsume); code == nil {
if conf, err := this.module.configure.GetEnchantBossConfigData(1); err == nil {
if code := this.module.CheckRes(session, conf.PsConsume); code == nil {
return true
}
}

View File

@ -14,22 +14,17 @@ type GameEnchantBossData struct {
Id int32
Bossid int32
Name string
BattleReadyID int32
Grade string
ScoreLow int32
ScoreUp int32
RewardDrop []int32
Dropshow1 []*Gameatn
Dropshow2 []*Gameatn
Dropshow3 []*Gameatn
Dropshow []int32
Dropshow []*Gameatn
Bossmodel int32
MainText string
StrategyText string
BossSkill int32
Boss []int32
PsConsume []*Gameatn
PsMg []*Gameatn
BattleReadyID int32
Heroexp int32
BackPng string
BossIcon string
}
const TypeId_GameEnchantBossData = -287548876
@ -42,76 +37,16 @@ func (_v *GameEnchantBossData)Deserialize(_buf map[string]interface{}) (err erro
{ 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["bossid"].(float64); !_ok_ { err = errors.New("bossid error"); return }; _v.Bossid = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
{ var _ok_ bool; if _v.Grade, _ok_ = _buf["grade"].(string); !_ok_ { err = errors.New("grade error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score_low"].(float64); !_ok_ { err = errors.New("score_low error"); return }; _v.ScoreLow = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score_up"].(float64); !_ok_ { err = errors.New("score_up error"); return }; _v.ScoreUp = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward_drop"].([]interface{}); !_ok_ { err = errors.New("reward_drop error"); return }
_v.RewardDrop = 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.RewardDrop = append(_v.RewardDrop, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["dropshow1"].([]interface{}); !_ok_ { err = errors.New("dropshow1 error"); return }
_v.Dropshow1 = 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.Dropshow1 = append(_v.Dropshow1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["dropshow2"].([]interface{}); !_ok_ { err = errors.New("dropshow2 error"); return }
_v.Dropshow2 = 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.Dropshow2 = append(_v.Dropshow2, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["dropshow3"].([]interface{}); !_ok_ { err = errors.New("dropshow3 error"); return }
_v.Dropshow3 = 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.Dropshow3 = append(_v.Dropshow3, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["dropshow"].([]interface{}); !_ok_ { err = errors.New("dropshow error"); return }
_v.Dropshow = make([]int32, 0, len(_arr_))
_v.Dropshow = make([]*Gameatn, 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_) }
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.Dropshow = append(_v.Dropshow, _list_v_)
}
}
@ -119,7 +54,6 @@ func (_v *GameEnchantBossData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["bossmodel"].(float64); !_ok_ { err = errors.New("bossmodel error"); return }; _v.Bossmodel = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["main_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.MainText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.MainText, _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["strategy_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.StrategyText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.StrategyText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["boss_skill"].(float64); !_ok_ { err = errors.New("boss_skill error"); return }; _v.BossSkill = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
@ -162,6 +96,10 @@ func (_v *GameEnchantBossData)Deserialize(_buf map[string]interface{}) (err erro
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["heroexp"].(float64); !_ok_ { err = errors.New("heroexp error"); return }; _v.Heroexp = int32(_tempNum_) }
{ var _ok_ bool; if _v.BackPng, _ok_ = _buf["back_png"].(string); !_ok_ { err = errors.New("back_png error"); return } }
{ var _ok_ bool; if _v.BossIcon, _ok_ = _buf["bossIcon"].(string); !_ok_ { err = errors.New("bossIcon error"); return } }
return
}

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

View File

@ -0,0 +1,112 @@
//------------------------------------------------------------------------------
// <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 GameEnchantbossRewardData struct {
Score int32
Type int32
Dropshow1 []*Gameatn
Probability []int32
Reward1Drop []int32
Reward2 []*Gameatn
Reward2Drop []int32
}
const TypeId_GameEnchantbossRewardData = -233729437
func (*GameEnchantbossRewardData) GetTypeId() int32 {
return -233729437
}
func (_v *GameEnchantbossRewardData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = 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 _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["dropshow1"].([]interface{}); !_ok_ { err = errors.New("dropshow1 error"); return }
_v.Dropshow1 = 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.Dropshow1 = append(_v.Dropshow1, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["probability"].([]interface{}); !_ok_ { err = errors.New("probability error"); return }
_v.Probability = 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.Probability = append(_v.Probability, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward1_drop"].([]interface{}); !_ok_ { err = errors.New("reward1_drop error"); return }
_v.Reward1Drop = 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.Reward1Drop = append(_v.Reward1Drop, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward2"].([]interface{}); !_ok_ { err = errors.New("reward2 error"); return }
_v.Reward2 = 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.Reward2 = append(_v.Reward2, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reward2_drop"].([]interface{}); !_ok_ { err = errors.New("reward2_drop error"); return }
_v.Reward2Drop = 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.Reward2Drop = append(_v.Reward2Drop, _list_v_)
}
}
return
}
func DeserializeGameEnchantbossRewardData(_buf map[string]interface{}) (*GameEnchantbossRewardData, error) {
v := &GameEnchantbossRewardData{}
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 GameIntegralBuff struct {
_dataMap map[int32]*GameIntegralBuffData
_dataList []*GameIntegralBuffData
}
func NewGameIntegralBuff(_buf []map[string]interface{}) (*GameIntegralBuff, error) {
_dataList := make([]*GameIntegralBuffData, 0, len(_buf))
dataMap := make(map[int32]*GameIntegralBuffData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameIntegralBuffData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Skillid] = _v
}
}
return &GameIntegralBuff{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameIntegralBuff) GetDataMap() map[int32]*GameIntegralBuffData {
return table._dataMap
}
func (table *GameIntegralBuff) GetDataList() []*GameIntegralBuffData {
return table._dataList
}
func (table *GameIntegralBuff) Get(key int32) *GameIntegralBuffData {
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 GameIntegralBuffData struct {
Skillid int32
Type int32
Val int32
Show int32
Incompatibility []int32
Name string
Icon string
Des string
}
const TypeId_GameIntegralBuffData = 1837461221
func (*GameIntegralBuffData) GetTypeId() int32 {
return 1837461221
}
func (_v *GameIntegralBuffData)Deserialize(_buf map[string]interface{}) (err error) {
{ 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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["val"].(float64); !_ok_ { err = errors.New("val error"); return }; _v.Val = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["show"].(float64); !_ok_ { err = errors.New("show error"); return }; _v.Show = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["incompatibility"].([]interface{}); !_ok_ { err = errors.New("incompatibility error"); return }
_v.Incompatibility = 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.Incompatibility = append(_v.Incompatibility, _list_v_)
}
}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["des"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Des error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Des, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return
}
func DeserializeGameIntegralBuffData(_buf map[string]interface{}) (*GameIntegralBuffData, error) {
v := &GameIntegralBuffData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -331,6 +331,7 @@ type Tables struct {
IntegralBoss *GameIntegralBoss
IntegralReward *GameIntegralReward
IntegralCondition *GameIntegralCondition
IntegralBuff *GameIntegralBuff
IntegralTime *GameIntegralTime
Restore *GameRestore
CatchbugSetstage *GameCatchbugSetstage
@ -352,6 +353,7 @@ type Tables struct {
SystemStroyTalk *GameSystemStroyTalk
ActiveKing *GameActiveKing
ActiveTask *GameActiveTask
EnchantbossReward *GameEnchantbossReward
}
func NewTables(loader JsonLoader) (*Tables, error) {
@ -2279,6 +2281,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.IntegralCondition, err = NewGameIntegralCondition(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_integralbuff") ; err != nil {
return nil, err
}
if tables.IntegralBuff, err = NewGameIntegralBuff(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_integraltime") ; err != nil {
return nil, err
}
@ -2405,5 +2413,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.ActiveTask, err = NewGameActiveTask(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_enchantbossreward") ; err != nil {
return nil, err
}
if tables.EnchantbossReward, err = NewGameEnchantbossReward(buf) ; err != nil {
return nil, err
}
return tables, nil
}