六合塔修改

This commit is contained in:
meixiongfeng 2024-01-11 19:50:11 +08:00
parent 30d6fabb5a
commit 4a68d0d46f
11 changed files with 41347 additions and 34464 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
[
{
"key": 1,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 1,
@ -37,7 +36,6 @@
},
{
"key": 2,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 1,
@ -68,7 +66,6 @@
},
{
"key": 3,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 1,
@ -99,7 +96,6 @@
},
{
"key": 4,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 1,
@ -130,7 +126,6 @@
},
{
"key": 5,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 1,
@ -172,7 +167,6 @@
},
{
"key": 6,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 1,
@ -203,7 +197,6 @@
},
{
"key": 7,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 1,
@ -234,7 +227,6 @@
},
{
"key": 8,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 1,
@ -265,7 +257,6 @@
},
{
"key": 9,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 1,
@ -296,7 +287,6 @@
},
{
"key": 10,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 1,
@ -339,7 +329,6 @@
},
{
"key": 11,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 2,
@ -370,7 +359,6 @@
},
{
"key": 12,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 2,
@ -401,7 +389,6 @@
},
{
"key": 13,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 2,
@ -432,7 +419,6 @@
},
{
"key": 14,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 2,
@ -463,7 +449,6 @@
},
{
"key": 15,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 2,
@ -505,7 +490,6 @@
},
{
"key": 16,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 2,
@ -536,7 +520,6 @@
},
{
"key": 17,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 2,
@ -567,7 +550,6 @@
},
{
"key": 18,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 2,
@ -598,7 +580,6 @@
},
{
"key": 19,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 2,
@ -629,7 +610,6 @@
},
{
"key": 20,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 2,
@ -672,7 +652,6 @@
},
{
"key": 21,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 3,
@ -703,7 +682,6 @@
},
{
"key": 22,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 3,
@ -734,7 +712,6 @@
},
{
"key": 23,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 3,
@ -765,7 +742,6 @@
},
{
"key": 24,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 3,
@ -796,7 +772,6 @@
},
{
"key": 25,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 3,
@ -838,7 +813,6 @@
},
{
"key": 26,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 3,
@ -869,7 +843,6 @@
},
{
"key": 27,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 3,
@ -900,7 +873,6 @@
},
{
"key": 28,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 3,
@ -931,7 +903,6 @@
},
{
"key": 29,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 3,
@ -962,7 +933,6 @@
},
{
"key": 30,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 3,
@ -1005,7 +975,6 @@
},
{
"key": 31,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 4,
@ -1036,7 +1005,6 @@
},
{
"key": 32,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 4,
@ -1067,7 +1035,6 @@
},
{
"key": 33,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 4,
@ -1098,7 +1065,6 @@
},
{
"key": 34,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 4,
@ -1129,7 +1095,6 @@
},
{
"key": 35,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 4,
@ -1171,7 +1136,6 @@
},
{
"key": 36,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 4,
@ -1202,7 +1166,6 @@
},
{
"key": 37,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 4,
@ -1233,7 +1196,6 @@
},
{
"key": 38,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 4,
@ -1264,7 +1226,6 @@
},
{
"key": 39,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 4,
@ -1295,7 +1256,6 @@
},
{
"key": 40,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 4,
@ -1338,7 +1298,6 @@
},
{
"key": 41,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 5,
@ -1369,7 +1328,6 @@
},
{
"key": 42,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 5,
@ -1400,7 +1358,6 @@
},
{
"key": 43,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 5,
@ -1431,7 +1388,6 @@
},
{
"key": 44,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 5,
@ -1462,7 +1418,6 @@
},
{
"key": 45,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 5,
@ -1504,7 +1459,6 @@
},
{
"key": 46,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 5,
@ -1535,7 +1489,6 @@
},
{
"key": 47,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 5,
@ -1566,7 +1519,6 @@
},
{
"key": 48,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 5,
@ -1597,7 +1549,6 @@
},
{
"key": 49,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 5,
@ -1628,7 +1579,6 @@
},
{
"key": 50,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 5,
@ -1671,7 +1621,6 @@
},
{
"key": 51,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 6,
@ -1702,7 +1651,6 @@
},
{
"key": 52,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 6,
@ -1733,7 +1681,6 @@
},
{
"key": 53,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 6,
@ -1764,7 +1711,6 @@
},
{
"key": 54,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 6,
@ -1795,7 +1741,6 @@
},
{
"key": 55,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 6,
@ -1837,7 +1782,6 @@
},
{
"key": 56,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 6,
@ -1868,7 +1812,6 @@
},
{
"key": 57,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 6,
@ -1899,7 +1842,6 @@
},
{
"key": 58,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 6,
@ -1930,7 +1872,6 @@
},
{
"key": 59,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 6,
@ -1961,7 +1902,6 @@
},
{
"key": 60,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 6,
@ -2004,7 +1944,6 @@
},
{
"key": 61,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 7,
@ -2035,7 +1974,6 @@
},
{
"key": 62,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 7,
@ -2066,7 +2004,6 @@
},
{
"key": 63,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 7,
@ -2097,7 +2034,6 @@
},
{
"key": 64,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 7,
@ -2128,7 +2064,6 @@
},
{
"key": 65,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 7,
@ -2170,7 +2105,6 @@
},
{
"key": 66,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 7,
@ -2201,7 +2135,6 @@
},
{
"key": 67,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 7,
@ -2232,7 +2165,6 @@
},
{
"key": 68,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 7,
@ -2263,7 +2195,6 @@
},
{
"key": 69,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 7,
@ -2294,7 +2225,6 @@
},
{
"key": 70,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 7,
@ -2337,7 +2267,6 @@
},
{
"key": 71,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 8,
@ -2368,7 +2297,6 @@
},
{
"key": 72,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 8,
@ -2399,7 +2327,6 @@
},
{
"key": 73,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 8,
@ -2430,7 +2357,6 @@
},
{
"key": 74,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 8,
@ -2461,7 +2387,6 @@
},
{
"key": 75,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 8,
@ -2503,7 +2428,6 @@
},
{
"key": 76,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 8,
@ -2534,7 +2458,6 @@
},
{
"key": 77,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 8,
@ -2565,7 +2488,6 @@
},
{
"key": 78,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 8,
@ -2596,7 +2518,6 @@
},
{
"key": 79,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 8,
@ -2627,7 +2548,6 @@
},
{
"key": 80,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 8,
@ -2670,7 +2590,6 @@
},
{
"key": 81,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 9,
@ -2701,7 +2620,6 @@
},
{
"key": 82,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 9,
@ -2732,7 +2650,6 @@
},
{
"key": 83,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 9,
@ -2763,7 +2680,6 @@
},
{
"key": 84,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 9,
@ -2794,7 +2710,6 @@
},
{
"key": 85,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 9,
@ -2836,7 +2751,6 @@
},
{
"key": 86,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 9,
@ -2867,7 +2781,6 @@
},
{
"key": 87,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 9,
@ -2898,7 +2811,6 @@
},
{
"key": 88,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 9,
@ -2929,7 +2841,6 @@
},
{
"key": 89,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 9,
@ -2960,7 +2871,6 @@
},
{
"key": 90,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 9,
@ -3003,7 +2913,6 @@
},
{
"key": 91,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 1,
"tab": 10,
@ -3034,7 +2943,6 @@
},
{
"key": 92,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 2,
"tab": 10,
@ -3065,7 +2973,6 @@
},
{
"key": 93,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 3,
"tab": 10,
@ -3096,7 +3003,6 @@
},
{
"key": 94,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 4,
"tab": 10,
@ -3127,7 +3033,6 @@
},
{
"key": 95,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 5,
"tab": 10,
@ -3169,7 +3074,6 @@
},
{
"key": 96,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 6,
"tab": 10,
@ -3200,7 +3104,6 @@
},
{
"key": 97,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 7,
"tab": 10,
@ -3231,7 +3134,6 @@
},
{
"key": 98,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 8,
"tab": 10,
@ -3262,7 +3164,6 @@
},
{
"key": 99,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 9,
"tab": 10,
@ -3293,7 +3194,6 @@
},
{
"key": 100,
"pagoda_type": 101,
"Level_type": 1,
"layer_num": 10,
"tab": 10,

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,8 @@ package pagoda
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
"go_dreamfactory/utils"
)
//参数校验
@ -14,35 +16,36 @@ func (this *apiComp) GetRaceCheck(session comm.IUserSession, req *pb.PagodaGetRa
///获取阵营爬塔信息
func (this *apiComp) GetRace(session comm.IUserSession, req *pb.PagodaGetRaceReq) (errdata *pb.ErrorData) {
// var (
// list *pb.DBPagodaRace
// err error
// update map[string]interface{}
// )
// update = make(map[string]interface{}, 0)
// list, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId())
// if err != nil {
// errdata = &pb.ErrorData{
// Code: pb.ErrorCode_DBError,
// Title: pb.ErrorCode_DBError.ToString(),
// Message: err.Error(),
// }
// return
// }
var (
list *pb.DBPagodaRace
err error
update map[string]interface{}
)
update = make(map[string]interface{}, 0)
list, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId())
if err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
// 初始化每天挑战塔的层数
// if !utils.IsToday(list.Rtime) {
// list.Rtime = configure.Now().Unix()
// update["rtime"] = list.Rtime
// }
if !utils.IsToday(list.Rtime) {
list.Rtime = configure.Now().Unix()
list.Battlecount = 0
update["battlecount"] = list.Battlecount
update["rtime"] = list.Rtime
}
// if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), update); err != nil {
// errdata = &pb.ErrorData{
// Code: pb.ErrorCode_DBError,
// Title: pb.ErrorCode_DBError.ToString(),
// Message: err.Error(),
// }
// }
if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), update); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
}
session.SendMsg(string(this.module.GetType()), PagodaGetRaceResp, &pb.PagodaGetRaceResp{})
return

View File

@ -120,16 +120,5 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
Heroexp: changExp,
})
// 任务相关
var tasks []*pb.BuriedParam
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype232, conf.Restriction, conf.Floors))
if conf.Restriction >= 10 {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype231, conf.Floors))
}
go this.module.AsynHandleSession(session.Clone(), func(session comm.IUserSession) {
this.module.ModuleBuried.TriggerBuried(session, tasks...)
this.module.WriteUserLog(session.GetUserId(), req, comm.GMResAddType, "PagodaChallengeRaceOverReq", atno)
})
return
}

View File

@ -95,11 +95,7 @@ func (this *configureComp) GetPagodaFloor(PagodaType int32) int32 {
log.Errorf("%T no is *cfg.Game_pagodaData", v)
return 0
}
for _, value := range configure.GetDataList() {
if value.PagodaType == PagodaType {
maxFloor++
}
}
maxFloor = int32(len(configure.GetDataList()))
} else {
log.Errorf("get game_pagodataskreward conf err:%v", err)
@ -169,12 +165,11 @@ func (this *configureComp) LoadCirculate() {
defer this.hlock.Unlock()
this._mapRace = make(map[int32]*cfg.GameCirculateData)
for _, value := range configure.GetDataList() {
this._mapRace[value.Restriction<<16+value.Floors] = value
if value.Name == 1 {
if _, ok := _m[value.Restriction]; !ok {
_m[value.Restriction] = struct{}{}
this.circulate = append(this.circulate, value.Restriction)
}
this._mapRace[value.Itype<<16+value.Floors] = value
if _, ok := _m[value.Itype]; !ok {
_m[value.Itype] = struct{}{}
this.circulate = append(this.circulate, value.Itype)
}
}
return

View File

@ -12,8 +12,7 @@ import "errors"
type GameCirculateData struct {
Id int32
Name int32
Restriction int32
Itype int32
BattlereadyID int32
OpenDesc string
Openingtime []int32
@ -24,7 +23,7 @@ type GameCirculateData struct {
TabIcon string
TabTitle string
Monsterlineup []int32
KeyReward *Gameatn
KeyReward []*Gameatn
Reward []*Gameatn
Exp int32
NameDisplay string
@ -39,8 +38,7 @@ func (*GameCirculateData) GetTypeId() int32 {
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["itype"].(float64); !_ok_ { err = errors.New("itype error"); return }; _v.Itype = 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 _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["openDesc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.OpenDesc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.OpenDesc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
@ -90,7 +88,20 @@ func (_v *GameCirculateData)Deserialize(_buf map[string]interface{}) (err error)
}
}
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["keyReward"].(map[string]interface{}); !_ok_ { err = errors.New("keyReward error"); return }; if _v.KeyReward, err = DeserializeGameatn(_x_); err != nil { return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["keyReward"].([]interface{}); !_ok_ { err = errors.New("keyReward error"); return }
_v.KeyReward = 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.KeyReward = append(_v.KeyReward, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool

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

View File

@ -0,0 +1,143 @@
//------------------------------------------------------------------------------
// <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 GameSixDirectionsData struct {
Id int32
Groud int32
Startype []int32
Starnum []int32
Groudreward int32
BattlereadyID int32
OpenDesc string
Openingtime []int32
Unlock string
Floors int32
Monsterlineup []int32
KeyReward []*Gameatn
Reward []*Gameatn
Exp int32
NameDisplay string
ModelDisplay int32
}
const TypeId_GameSixDirectionsData = -387737308
func (*GameSixDirectionsData) GetTypeId() int32 {
return -387737308
}
func (_v *GameSixDirectionsData)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["groud"].(float64); !_ok_ { err = errors.New("groud error"); return }; _v.Groud = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["startype"].([]interface{}); !_ok_ { err = errors.New("startype error"); return }
_v.Startype = 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.Startype = append(_v.Startype, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["starnum"].([]interface{}); !_ok_ { err = errors.New("starnum error"); return }
_v.Starnum = 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.Starnum = append(_v.Starnum, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["groudreward"].(float64); !_ok_ { err = errors.New("groudreward error"); return }; _v.Groudreward = 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 _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["openDesc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.OpenDesc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.OpenDesc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{
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; if _v.Unlock, _ok_ = _buf["unlock"].(string); !_ok_ { err = errors.New("unlock error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["floors"].(float64); !_ok_ { err = errors.New("floors error"); return }; _v.Floors = int32(_tempNum_) }
{
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["keyReward"].([]interface{}); !_ok_ { err = errors.New("keyReward error"); return }
_v.KeyReward = 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.KeyReward = append(_v.KeyReward, _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 DeserializeGameSixDirectionsData(_buf map[string]interface{}) (*GameSixDirectionsData, error) {
v := &GameSixDirectionsData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -198,6 +198,7 @@ type Tables struct {
Robot *GameRobot
Passon *GamePasson
Circulate *GameCirculate
SixDirections *GameSixDirections
drawReward *GamedrawReward
drawReplace *GamedrawReplace
drawcardReward *GamedrawcardReward
@ -327,7 +328,6 @@ type Tables struct {
IntegralReward *GameIntegralReward
IntegralCondition *GameIntegralCondition
IntegralTime *GameIntegralTime
Restore *GameRestore
CatchbugSetstage *GameCatchbugSetstage
BuzkashiCombo *GameBuzkashiCombo
}
@ -1459,6 +1459,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Circulate, err = NewGameCirculate(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_sixdirections") ; err != nil {
return nil, err
}
if tables.SixDirections, err = NewGameSixDirections(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_drawreward") ; err != nil {
return nil, err
}
@ -2233,12 +2239,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.IntegralTime, err = NewGameIntegralTime(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_restore") ; err != nil {
return nil, err
}
if tables.Restore, err = NewGameRestore(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_catchbugsetstage") ; err != nil {
return nil, err
}

View File

@ -12,7 +12,6 @@ import "errors"
type GamePagodaData struct {
Key int32
PagodaType int32
LevelType int32
LayerNum int32
Tab int32
@ -36,7 +35,6 @@ func (*GamePagodaData) GetTypeId() int32 {
func (_v *GamePagodaData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pagoda_type"].(float64); !_ok_ { err = errors.New("pagoda_type error"); return }; _v.PagodaType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Level_type"].(float64); !_ok_ { err = errors.New("Level_type error"); return }; _v.LevelType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["layer_num"].(float64); !_ok_ { err = errors.New("layer_num error"); return }; _v.LayerNum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["tab"].(float64); !_ok_ { err = errors.New("tab error"); return }; _v.Tab = int32(_tempNum_) }