护月等级配置解析

This commit is contained in:
meixiongfeng 2023-11-14 15:01:33 +08:00
parent 2aba12b680
commit 0fa6eb7406
15 changed files with 1467 additions and 1153 deletions

View File

@ -7,7 +7,7 @@
"parameter": "", "parameter": "",
"interface": "", "interface": "",
"condition": "worldtaskexit_accept_20010", "condition": "worldtaskexit_accept_20010",
"followtj": "OpenNpcOption_主线入口_原石", "followtj": "",
"followguide": 1000102, "followguide": 1000102,
"finger": [ "finger": [
"taskDedailsPopup", "taskDedailsPopup",
@ -40,174 +40,21 @@
{ {
"id": 1000102, "id": 1000102,
"group": 1, "group": 1,
"type": 3, "type": 5,
"startPar": "", "startPar": "",
"parameter": "", "parameter": "",
"interface": "", "interface": "",
"condition": "", "condition": "",
"followtj": "", "followtj": "JpystickMove",
"followguide": 0, "followguide": 0,
"finger": [ "finger": [
"command", "joystick"
"mainCom$.optionList$",
"0"
], ],
"offset": { "offset": {
"x": 0, "x": 0,
"y": 0 "y": 0
}, },
"fingerTime": 0, "fingerTime": 0.5,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000201,
"group": 2,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "worldtasksubfinish_20010",
"followtj": "OpenNpcOption_20010_熊猫_1",
"followguide": 1000202,
"finger": [
"command",
"mainCom$.taskpanel$.mainTaskList.tasklist$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0.1,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000202,
"group": 2,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "",
"followguide": 0,
"finger": [
"command",
"mainCom$.optionList$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000301,
"group": 3,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "worldtaskexit_submit_20010",
"followtj": "TriggerQuest_20012",
"followguide": 1000302,
"finger": [
"taskDedailsPopup",
"btn_star$"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000302,
"group": 3,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "CloseItemPopup",
"followguide": 1000303,
"finger": [],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": { "objSize": {
"x": 0, "x": 0,
"y": 0 "y": 0
@ -222,358 +69,7 @@
"mask": 1, "mask": 1,
"lock": 1, "lock": 1,
"uishow": 0, "uishow": 0,
"skiptime": 5000, "skiptime": 10000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000303,
"group": 3,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "OpenNpcOption_20020_熊猫_船甲板",
"followguide": 1000304,
"finger": [
"command",
"mainCom$.taskpanel$.mainTaskList.tasklist$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0.1,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000304,
"group": 3,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "",
"followguide": 0,
"finger": [
"maininterface",
"mainCom$.optionList$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000401,
"group": 4,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "worldtaskexit_accept_20012",
"followtj": "OpenNpcOption_20020_小怪_船甲板",
"followguide": 1000402,
"finger": [
"taskDedailsPopup",
"btn_star$"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000402,
"group": 4,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "",
"followguide": 1000403,
"finger": [
"maininterface",
"mainCom$.optionList$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000403,
"group": 4,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "OpenFight",
"followguide": 1000404,
"finger": [
"battleready",
"btn_start$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "1000102",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1000404,
"group": 4,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "",
"followguide": 0,
"finger": [
"zhandou",
"skilllist$",
"2",
"skillbtn"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0.3,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "1000201",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1001001,
"group": 10,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "worldtaskexit_accept_20050",
"followtj": "",
"followguide": 1001002,
"finger": [
"taskDedailsPopup",
"btn_star$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 1001002,
"group": 10,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "",
"followtj": "",
"followguide": 0,
"finger": [
"maininterface",
"btn_compass$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "",
"speakerface": 0,
"sound": "",
"mask": 1,
"lock": 1,
"uishow": 0,
"skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
},
{
"id": 2000101,
"group": 101,
"type": 3,
"startPar": "",
"parameter": "",
"interface": "",
"condition": "OpenRecruit",
"followtj": "",
"followguide": 0,
"finger": [
"recruit",
"btn_onedraw$",
"0"
],
"offset": {
"x": 0,
"y": 0
},
"fingerTime": 0,
"objSize": {
"x": 0,
"y": 0
},
"objOffset": {
"x": 0,
"y": 0
},
"txt": "1000202",
"speakerface": 0,
"sound": "",
"mask": 0,
"lock": 0,
"uishow": 0,
"skiptime": 5000,
"skip": 0, "skip": 0,
"skipgroup": 0, "skipgroup": 0,
"reward": [] "reward": []

View File

@ -231,7 +231,22 @@
{ {
"a": "attr", "a": "attr",
"t": "diamond", "t": "diamond",
"n": 50 "n": 1000
},
{
"a": "item",
"t": "10000008",
"n": 10
},
{
"a": "item",
"t": "10000009",
"n": 10
},
{
"a": "item",
"t": "10000010",
"n": 5
} }
], ],
"duration": 720 "duration": 720

53
bin/json/game_moonlv.json Normal file
View File

@ -0,0 +1,53 @@
[
{
"Id": 1,
"Level": 1,
"TaskGroupId": 10001,
"Reward": [
{
"a": "item",
"t": "10000001",
"n": 5
},
{
"a": "attr",
"t": "starcoin",
"n": 20
}
]
},
{
"Id": 2,
"Level": 2,
"TaskGroupId": 10002,
"Reward": [
{
"a": "item",
"t": "10000001",
"n": 5
},
{
"a": "attr",
"t": "starcoin",
"n": 20
}
]
},
{
"Id": 3,
"Level": 3,
"TaskGroupId": 10003,
"Reward": [
{
"a": "item",
"t": "10000001",
"n": 5
},
{
"a": "attr",
"t": "starcoin",
"n": 20
}
]
}
]

272
bin/json/game_moontask.json Normal file
View File

@ -0,0 +1,272 @@
[
{
"Id": 1,
"TaskGroup": 1001,
"TaskId": 110001,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 2,
"TaskGroup": 1001,
"TaskId": 110003,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 3,
"TaskGroup": 1001,
"TaskId": 110004,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 4,
"TaskGroup": 1001,
"TaskId": 110005,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 5,
"TaskGroup": 1001,
"TaskId": 110006,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 6,
"TaskGroup": 1001,
"TaskId": 110007,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 7,
"TaskGroup": 1002,
"TaskId": 110008,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 8,
"TaskGroup": 1002,
"TaskId": 110009,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 9,
"TaskGroup": 1002,
"TaskId": 110010,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 10,
"TaskGroup": 1002,
"TaskId": 110012,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 11,
"TaskGroup": 1002,
"TaskId": 110013,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 12,
"TaskGroup": 1003,
"TaskId": 110014,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 13,
"TaskGroup": 1003,
"TaskId": 110015,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 14,
"TaskGroup": 1003,
"TaskId": 110016,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
},
{
"Id": 15,
"TaskGroup": 1003,
"TaskId": 110017,
"TaskReward": [
{
"a": "attr",
"t": "gold",
"n": 5000
},
{
"a": "item",
"t": "10000001",
"n": 10
}
],
"JumpFunction": 0
}
]

View File

@ -7,8 +7,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20031
} }
], ],
"wkqbx": 2, "wkqbx": 2,
@ -61,8 +61,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20034
} }
], ],
"wkqbx": 2, "wkqbx": 2,
@ -142,8 +142,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20034
} }
], ],
"wkqbx": 2, "wkqbx": 2,
@ -304,8 +304,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20032
} }
], ],
"wkqbx": 2, "wkqbx": 2,
@ -1492,8 +1492,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20033
} }
], ],
"wkqbx": 2, "wkqbx": 2,
@ -2349,8 +2349,8 @@
}, },
"main": [ "main": [
{ {
"key": 1, "key": 3,
"param": 1 "param": 20050
} }
], ],
"wkqbx": 0, "wkqbx": 0,

View File

@ -365,7 +365,7 @@
"Levelid": 0, "Levelid": 0,
"datas": [ "datas": [
"GameMain", "GameMain",
"梅林", "20012_梅林_船甲板",
"901" "901"
], ],
"event": [ "event": [
@ -380,7 +380,7 @@
"Levelid": 0, "Levelid": 0,
"datas": [ "datas": [
"GameMain", "GameMain",
"20020_小怪_船甲板1", "20020_小怪_船甲板",
"901" "901"
], ],
"event": [ "event": [
@ -410,7 +410,7 @@
"Levelid": 0, "Levelid": 0,
"datas": [ "datas": [
"GameMain", "GameMain",
"20060-乌龟大师", "功能入口-招募",
"901" "901"
], ],
"event": [ "event": [
@ -609,8 +609,8 @@
"901" "901"
], ],
"event": [ "event": [
2, 1,
10100 103
], ],
"goto": 0 "goto": 0
}, },
@ -629,6 +629,21 @@
], ],
"goto": 0 "goto": 0
}, },
{
"id": 200341,
"heroid": 45001,
"Levelid": 0,
"datas": [
"GameMain",
"功能入口-烹饪",
"901"
],
"event": [
2,
10100
],
"goto": 0
},
{ {
"id": 100421, "id": 100421,
"heroid": 35002, "heroid": 35002,

File diff suppressed because it is too large Load Diff

View File

@ -7,17 +7,20 @@ import (
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/sys/configure" "go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"sync"
) )
const ( const (
pandaJx = "game_pandamasjx.json" // 武馆教习 monnlv = "game_moonlv.json"
monntask = "game_moontask.json"
) )
// /配置管理基础组件 // /配置管理基础组件
type configureComp struct { type configureComp struct {
modules.MCompConfigure modules.MCompConfigure
module *Moonlv module *Moonlv
hlock sync.RWMutex
taskgroup map[int32][]*cfg.GameMoonTaskData
} }
// 组件初始化接口 // 组件初始化接口
@ -25,11 +28,27 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
err = this.MCompConfigure.Init(service, module, comp, options) err = this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Moonlv) this.module = module.(*Moonlv)
err = this.LoadMultiConfigure(map[string]interface{}{ err = this.LoadMultiConfigure(map[string]interface{}{
pandaJx: cfg.NewGamePandamasJx, monnlv: cfg.NewGameMoonLv,
monntask: cfg.NewGameMoonTask,
}) })
configure.RegisterConfigure(monntask, cfg.NewGameMoonTask, this.LoadGameMoonTaskData)
return return
} }
func (this *configureComp) LoadGameMoonTaskData() {
if v, err := this.GetConfigure(monntask); err == nil {
if configure, ok := v.(*cfg.GameMoonTask); ok {
this.hlock.Lock()
this.taskgroup = make(map[int32][]*cfg.GameMoonTaskData, 0)
defer this.hlock.Unlock()
for _, value := range configure.GetDataList() {
this.taskgroup[value.TaskGroup] = append(this.taskgroup[value.TaskGroup], value)
}
return
}
} else {
log.Errorf("get LoadGameMoonTaskData conf err:%v", err)
}
}
// 加载多个配置文件 // 加载多个配置文件
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) {
@ -48,17 +67,17 @@ func (this *configureComp) GetConfigure(name string) (v interface{}, err error)
return configure.GetConfigure(name) return configure.GetConfigure(name)
} }
// 获取教习数据 func (this *configureComp) GetMoonLvConf(lv int32) (conf *cfg.GameMoonLvData, err error) {
func (this *configureComp) GetPandoJxConf(id string) (conf *cfg.GamePandamasJxData, err error) { var (
v interface{}
if v, err := this.GetConfigure(pandaJx); err == nil { )
if configure, ok := v.(*cfg.GamePandamasJx); ok { if v, err = this.GetConfigure(monnlv); err == nil {
if conf = configure.Get(id); conf == nil { if configure, ok := v.(*cfg.GameMoonLv); ok {
err = comm.NewNotFoundConfErr("atlas", pandaJx, id) if conf = configure.Get(lv); conf != nil {
this.module.Errorln(err) return
} }
} }
} }
err = comm.NewNotFoundConfErr("atlas", pandaJx, id) err = comm.NewNotFoundConfErr("moonlv", monnlv, lv)
return return
} }

View File

@ -3,7 +3,9 @@ package moonlv
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"go_dreamfactory/pb"
) )
type Moonlv struct { type Moonlv struct {
@ -36,3 +38,7 @@ func (this *Moonlv) OnInstallComp() {
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
this.modelMoonlv = this.RegisterComp(new(modelMoonlv)).(*modelMoonlv) this.modelMoonlv = this.RegisterComp(new(modelMoonlv)).(*modelMoonlv)
} }
func (this *Moonlv) BuriedsNotify(session comm.IUserSession, conds []*pb.ConIProgress) {
this.Debug("护月任务通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "conds", Value: conds})
}

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

View File

@ -0,0 +1,54 @@
//------------------------------------------------------------------------------
// <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 GameMoonLvData struct {
Id int32
Level int32
TaskGroupId int32
Reward []*Gameatn
}
const TypeId_GameMoonLvData = -360801743
func (*GameMoonLvData) GetTypeId() int32 {
return -360801743
}
func (_v *GameMoonLvData)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["Level"].(float64); !_ok_ { err = errors.New("Level error"); return }; _v.Level = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["TaskGroupId"].(float64); !_ok_ { err = errors.New("TaskGroupId error"); return }; _v.TaskGroupId = int32(_tempNum_) }
{
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_)
}
}
return
}
func DeserializeGameMoonLvData(_buf map[string]interface{}) (*GameMoonLvData, error) {
v := &GameMoonLvData{}
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 GameMoonTask struct {
_dataMap map[int32]*GameMoonTaskData
_dataList []*GameMoonTaskData
}
func NewGameMoonTask(_buf []map[string]interface{}) (*GameMoonTask, error) {
_dataList := make([]*GameMoonTaskData, 0, len(_buf))
dataMap := make(map[int32]*GameMoonTaskData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameMoonTaskData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameMoonTask{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameMoonTask) GetDataMap() map[int32]*GameMoonTaskData {
return table._dataMap
}
func (table *GameMoonTask) GetDataList() []*GameMoonTaskData {
return table._dataList
}
func (table *GameMoonTask) Get(key int32) *GameMoonTaskData {
return table._dataMap[key]
}

View File

@ -0,0 +1,56 @@
//------------------------------------------------------------------------------
// <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 GameMoonTaskData struct {
Id int32
TaskGroup int32
TaskId int32
TaskReward []*Gameatn
JumpFunction int32
}
const TypeId_GameMoonTaskData = 2115127660
func (*GameMoonTaskData) GetTypeId() int32 {
return 2115127660
}
func (_v *GameMoonTaskData)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["TaskGroup"].(float64); !_ok_ { err = errors.New("TaskGroup error"); return }; _v.TaskGroup = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["TaskId"].(float64); !_ok_ { err = errors.New("TaskId error"); return }; _v.TaskId = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["TaskReward"].([]interface{}); !_ok_ { err = errors.New("TaskReward error"); return }
_v.TaskReward = 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.TaskReward = append(_v.TaskReward, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["JumpFunction"].(float64); !_ok_ { err = errors.New("JumpFunction error"); return }; _v.JumpFunction = int32(_tempNum_) }
return
}
func DeserializeGameMoonTaskData(_buf map[string]interface{}) (*GameMoonTaskData, error) {
v := &GameMoonTaskData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -34,6 +34,7 @@ type GameWorldTaskData struct {
Tasktips int32 Tasktips int32
LockAdd int32 LockAdd int32
Finish []int32 Finish []int32
Finishparameter string
Fnishipoint []string Fnishipoint []string
Reword []*Gameatn Reword []*Gameatn
Module []string Module []string
@ -121,6 +122,7 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error)
} }
} }
{ var _ok_ bool; if _v.Finishparameter, _ok_ = _buf["finishparameter"].(string); !_ok_ { err = errors.New("finishparameter error"); return } }
{ {
var _arr_ []interface{} var _arr_ []interface{}
var _ok_ bool var _ok_ bool

View File

@ -301,6 +301,8 @@ type Tables struct {
CatchbugLllustrated *GameCatchbugLllustrated CatchbugLllustrated *GameCatchbugLllustrated
CatchbugSkill *GameCatchbugSkill CatchbugSkill *GameCatchbugSkill
Effect *GameEffect Effect *GameEffect
MoonLv *GameMoonLv
MoonTask *GameMoonTask
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -2048,5 +2050,17 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Effect, err = NewGameEffect(buf) ; err != nil { if tables.Effect, err = NewGameEffect(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_moonlv") ; err != nil {
return nil, err
}
if tables.MoonLv, err = NewGameMoonLv(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_moontask") ; err != nil {
return nil, err
}
if tables.MoonTask, err = NewGameMoonTask(buf) ; err != nil {
return nil, err
}
return tables, nil return tables, nil
} }