Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into meixiongfeng

This commit is contained in:
meixiongfeng 2022-08-19 19:16:40 +08:00
commit 3e479c2321
48 changed files with 3761 additions and 995 deletions

1
.gitignore vendored
View File

@ -24,3 +24,4 @@ pb/proto
cmd/luban/
pb.bat
cmd/v2/.cache.meta
cmd/v2/my.db

View File

@ -0,0 +1,74 @@
[
{
"key": 101,
"expression_code": "#101",
"expression_type": 1,
"expression_icon": "lt_bq_icon001"
},
{
"key": 102,
"expression_code": "#102",
"expression_type": 1,
"expression_icon": "lt_bq_icon002"
},
{
"key": 103,
"expression_code": "#103",
"expression_type": 1,
"expression_icon": "lt_bq_icon003"
},
{
"key": 104,
"expression_code": "#104",
"expression_type": 1,
"expression_icon": "lt_bq_icon004"
},
{
"key": 105,
"expression_code": "#105",
"expression_type": 1,
"expression_icon": "lt_bq_icon005"
},
{
"key": 106,
"expression_code": "#106",
"expression_type": 1,
"expression_icon": "lt_bq_icon006"
},
{
"key": 107,
"expression_code": "#107",
"expression_type": 1,
"expression_icon": "lt_bq_icon007"
},
{
"key": 108,
"expression_code": "#108",
"expression_type": 1,
"expression_icon": "lt_bq_icon008"
},
{
"key": 109,
"expression_code": "#109",
"expression_type": 1,
"expression_icon": "lt_bq_icon009"
},
{
"key": 110,
"expression_code": "#110",
"expression_type": 1,
"expression_icon": "lt_bq_icon010"
},
{
"key": 111,
"expression_code": "#111",
"expression_type": 1,
"expression_icon": "lt_bq_icon011"
},
{
"key": 112,
"expression_code": "#112",
"expression_type": 1,
"expression_icon": "lt_bq_icon012"
}
]

View File

@ -1,146 +0,0 @@
[
{
"max_char": 100,
"task_reset": 8,
"init_gold": 100000,
"init_hero": [
15001,
25001
],
"cameramin": [
0,
0,
0
],
"max_getreward": [
10002,
99
],
"cameramax": [
-1.53,
1.1,
-8
],
"heroshownum": 2,
"equipsuitsum": [
4,
4,
4,
4,
2,
2
],
"friend_maxnum": 50,
"friend_minnum": 0,
"friend_maxgetnum": 20,
"friend_maxsendnum": 50,
"friend_date": 7,
"friend_recordtime": 7,
"friend_black": 50,
"channel_cd_world": 5,
"channel_cd_guild": 3,
"channel_cd_private": 3,
"channel_cd_public": 15,
"channel_lock_icon": 200,
"max_word": 200,
"max_chat": 99,
"max_object": 50,
"load_chat": 10,
"channel_allocation_max": 2000,
"channel_switching_max": 3000,
"draw_toplimit": 9999,
"draw10_star4_max": 8,
"draw10_star5_max": 2,
"draw_floor_star4": 20,
"draw_floor_star5": 100,
"duplicate_removal": 1,
"base_pool_cost": {
"a": "item",
"t": "10018",
"n": 1
},
"camp1_pool_cost": {
"a": "item",
"t": "10017",
"n": 1
},
"camp2_pool_cost": {
"a": "item",
"t": "10017",
"n": 1
},
"camp3_pool_cost": {
"a": "item",
"t": "10017",
"n": 1
},
"camp4_pool_cost": {
"a": "item",
"t": "10017",
"n": 1
},
"base_pool_10cost": {
"a": "item",
"t": "10018",
"n": 10
},
"camp1_pool_10cost": {
"a": "item",
"t": "10017",
"n": 10
},
"camp2_pool_10cost": {
"a": "item",
"t": "10017",
"n": 10
},
"camp3_pool_10cost": {
"a": "item",
"t": "10017",
"n": 10
},
"camp4_pool_10cost": {
"a": "item",
"t": "10017",
"n": 10
},
"camp1_pool1": "camp1_pool",
"camp2_pool1": "camp2_pool",
"camp3_pool1": "camp3_pool",
"camp4_pool1": "camp4_pool",
"base_pool1": {
"s": 1,
"e": 60,
"p": "base_pool1"
},
"base_pool2": {
"s": 61,
"e": 200,
"p": "base_pool2"
},
"base_pool3": {
"s": 201,
"e": 1000,
"p": "base_pool3"
},
"base_pool4": {
"s": 1000,
"e": 99999999,
"p": "base_pool4"
},
"base_pool_star3": 9000,
"base_pool_star4": 900,
"base_pool_star5": 100,
"camp_pool_star3": 9000,
"camp_pool_star4": 900,
"camp_pool_star5": 100,
"gourmet": 3600,
"smithy_maxplayer": 20,
"smithy_maxtime": 36000,
"chat_expression_small": [
"lt_bq_icon001,lt_bq_icon002,lt_bq_icon003,lt_bq_icon004,lt_bq_icon005,lt_bq_icon006,lt_bq_icon007,lt_bq_icon008,lt_bq_icon009,lt_bq_icon010,lt_bq_icon011,lt_bq_icon012"
],
"viking_num": 10,
"kungfu_time": 30
}
]

View File

@ -23,6 +23,16 @@
"index": 3,
"name": {
"key": "debug_server_02",
"text": "zcy"
},
"ips": "10.0.0.238:7891",
"debug": true,
"sid": "dfz"
},
{
"index": 4,
"name": {
"key": "debug_server_03",
"text": "mxf"
},
"ips": "10.0.0.85:7891",
@ -30,7 +40,7 @@
"sid": "dfmxf"
},
{
"index": 4,
"index": 5,
"name": {
"key": "server_10004",
"text": "凤凰城"
@ -40,7 +50,7 @@
"sid": "df01"
},
{
"index": 5,
"index": 6,
"name": {
"key": "server_10005",
"text": "翡翠宫"
@ -50,7 +60,7 @@
"sid": "df01"
},
{
"index": 6,
"index": 7,
"name": {
"key": "server_10006",
"text": "乌鸦岭"
@ -60,7 +70,7 @@
"sid": "df01"
},
{
"index": 7,
"index": 8,
"name": {
"key": "server_10003",
"text": "和平谷"

File diff suppressed because it is too large Load Diff

View File

@ -1156,5 +1156,79 @@
}
],
"synthetize_deplete": []
},
{
"id": "10017",
"name": {
"key": "itemname_10017",
"text": "阵营招募劵"
},
"usetype": 3,
"color": 5,
"bagtype": 1,
"index": 19,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_10017",
"ico": "wp_icon_10017",
"intr": {
"key": "itemdesc_10017",
"text": "作用于阵营招募界面"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"synthetize_deplete": []
},
{
"id": "10018",
"name": {
"key": "itemname_10018",
"text": "普通招募劵"
},
"usetype": 3,
"color": 5,
"bagtype": 1,
"index": 20,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 0,
"synthetize_num": 0,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 0,
"race": 0,
"img": "wp_icon_10018",
"ico": "wp_icon_10018",
"intr": {
"key": "itemdesc_10018",
"text": "作用于普通招募界面"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
],
"synthetize_deplete": []
}
]

View File

@ -38,10 +38,5 @@
"msgid": "chat.send",
"routrules": "~/worker",
"describe": "聊天消息发送"
},
{
"msgid": "forum.like",
"routrules": "~/worker",
"describe": "论坛点赞入口"
}
]

View File

@ -117,7 +117,7 @@
"key": "num_1002",
"text": "招募"
},
"main": "{\"lv\": 999}",
"main": "{\"lv\": 0}",
"optional": "",
"wkqbx": 0,
"kqbx": 0,
@ -213,7 +213,7 @@
"key": "num_1008",
"text": "心魔塔"
},
"main": "{\"lv\": 999}",
"main": "{\"lv\": 0}",
"optional": "",
"wkqbx": 0,
"kqbx": 0,

View File

@ -2,21 +2,21 @@
{
"id": 1001,
"type": 2,
"lasttask": 0,
"rdtasknum": [
"preTid": 0,
"condition": [
101
],
"aftertask": 1002,
"taskcd": 0,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [
"nextTid": 1002,
"CD": 0,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [
10001,
1002,
1003
],
"reword": [
"reward": [
{
"a": "attr",
"t": "diamond",
@ -32,22 +32,22 @@
{
"id": 1002,
"type": 2,
"lasttask": 1001,
"rdtasknum": [
"preTid": 1001,
"condition": [
101,
102
],
"aftertask": 1003,
"taskcd": 0,
"tag": 2,
"story": 3,
"completetask": 0,
"chooseid": [
"nextTid": 1003,
"CD": 0,
"objType": 2,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [
10011,
10012,
10013
],
"reword": [
"reward": [
{
"a": "attr",
"t": "diamond",
@ -63,18 +63,18 @@
{
"id": 1003,
"type": 2,
"lasttask": 1002,
"rdtasknum": [
"preTid": 1002,
"condition": [
101,
103
],
"aftertask": 1004,
"taskcd": 0,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [],
"reword": [
"nextTid": 1004,
"CD": 0,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
@ -90,18 +90,18 @@
{
"id": 1004,
"type": 2,
"lasttask": 1003,
"rdtasknum": [
"preTid": 1003,
"condition": [
101,
103
],
"aftertask": 1005,
"taskcd": 0,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [],
"reword": [
"nextTid": 1005,
"CD": 0,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
@ -117,18 +117,18 @@
{
"id": 1005,
"type": 2,
"lasttask": 1004,
"rdtasknum": [
"preTid": 1004,
"condition": [
104,
105
],
"aftertask": 1006,
"taskcd": 0,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [],
"reword": [
"nextTid": 1006,
"CD": 0,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
@ -144,20 +144,20 @@
{
"id": 1006,
"type": 2,
"lasttask": 1005,
"rdtasknum": [
"preTid": 1005,
"condition": [
106
],
"aftertask": 0,
"taskcd": 0,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [
"nextTid": 0,
"CD": 0,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [
10021,
10022
],
"reword": [
"reward": [
{
"a": "attr",
"t": "diamond",
@ -173,17 +173,17 @@
{
"id": 1007,
"type": 1,
"lasttask": 0,
"rdtasknum": [
"preTid": 0,
"condition": [
107
],
"aftertask": 1002,
"taskcd": 1,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [],
"reword": [
"nextTid": 1002,
"CD": 1,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [],
"reward": [
{
"a": "attr",
"t": "diamond",
@ -199,20 +199,20 @@
{
"id": 1008,
"type": 1,
"lasttask": 0,
"rdtasknum": [
"preTid": 0,
"condition": [
108
],
"aftertask": 1002,
"taskcd": -1,
"tag": 1,
"story": 3,
"completetask": 0,
"chooseid": [
"nextTid": 1002,
"CD": -1,
"objType": 1,
"storyBegin": 3,
"storyEnd": 0,
"chooseId": [
10041,
10042
],
"reword": [
"reward": [
{
"a": "attr",
"t": "diamond",

View File

@ -1,97 +1,97 @@
[
{
"chooseid": 10001,
"id": 10001,
"num": 1,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10002,
"id": 10002,
"num": 2,
"rdtaksnum": 107,
"need": [
"preTid": 107,
"needItem": [
0
]
},
{
"chooseid": 10003,
"id": 10003,
"num": 3,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10011,
"id": 10011,
"num": 1,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10012,
"id": 10012,
"num": 2,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10013,
"id": 10013,
"num": 3,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10021,
"id": 10021,
"num": 1,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10022,
"id": 10022,
"num": 2,
"rdtaksnum": 101,
"need": [
"preTid": 101,
"needItem": [
0
]
},
{
"chooseid": 10031,
"id": 10031,
"num": 1,
"rdtaksnum": 0,
"need": [
"preTid": 0,
"needItem": [
10012
]
},
{
"chooseid": 10032,
"id": 10032,
"num": 2,
"rdtaksnum": 0,
"need": [
"preTid": 0,
"needItem": [
0
]
},
{
"chooseid": 10041,
"id": 10041,
"num": 1,
"rdtaksnum": 0,
"need": [
"preTid": 0,
"needItem": [
10010
]
},
{
"chooseid": 10042,
"id": 10042,
"num": 2,
"rdtaksnum": 0,
"need": [
"preTid": 0,
"needItem": [
0
]
}

View File

@ -0,0 +1,58 @@
[
{
"id": 101,
"type": 1,
"data1": 90001,
"data2": 0,
"data3": 0
},
{
"id": 102,
"type": 2,
"data1": 3,
"data2": 0,
"data3": 0
},
{
"id": 103,
"type": 3,
"data1": 2,
"data2": 0,
"data3": 0
},
{
"id": 104,
"type": 4,
"data1": 90001,
"data2": 15,
"data3": 0
},
{
"id": 105,
"type": 4,
"data1": 25001,
"data2": 10,
"data3": 0
},
{
"id": 106,
"type": 5,
"data1": 90001,
"data2": 2,
"data3": 0
},
{
"id": 107,
"type": 4,
"data1": 25001,
"data2": 20,
"data3": 0
},
{
"id": 108,
"type": 6,
"data1": 90001,
"data2": 5,
"data3": 0
}
]

View File

@ -1,74 +0,0 @@
[
{
"rdtaksnum": 101,
"typdes": 2,
"datatime": 1,
"typtaskid": 1,
"data1": 90001,
"data2": 0,
"data3": 0
},
{
"rdtaksnum": 102,
"typdes": 2,
"datatime": 1,
"typtaskid": 2,
"data1": 3,
"data2": 0,
"data3": 0
},
{
"rdtaksnum": 103,
"typdes": 2,
"datatime": 1,
"typtaskid": 3,
"data1": 2,
"data2": 0,
"data3": 0
},
{
"rdtaksnum": 104,
"typdes": 2,
"datatime": 1,
"typtaskid": 4,
"data1": 90001,
"data2": 15,
"data3": 0
},
{
"rdtaksnum": 105,
"typdes": 2,
"datatime": 1,
"typtaskid": 4,
"data1": 25001,
"data2": 10,
"data3": 0
},
{
"rdtaksnum": 106,
"typdes": 2,
"datatime": 1,
"typtaskid": 5,
"data1": 90001,
"data2": 2,
"data3": 0
},
{
"rdtaksnum": 107,
"typdes": 2,
"datatime": 1,
"typtaskid": 4,
"data1": 25001,
"data2": 20,
"data3": 0
},
{
"rdtaksnum": 108,
"typdes": 2,
"datatime": 1,
"typtaskid": 6,
"data1": 90001,
"data2": 5,
"data3": 0
}
]

View File

@ -152,6 +152,7 @@ const (
USERINFO_BTN_REFRESH = "刷新"
USERINFO_PANEL_TITLE = "用户信息"
USERINFO_UID = "UID"
USERINFO_SERVER = "区服"
USERINFO_ACC = "账号"
USERINFO_NAME = "昵称"
USERINFO_TITLE = "头衔"

View File

@ -8,6 +8,7 @@ import (
"go_dreamfactory/cmd/v2/theme"
"go_dreamfactory/cmd/v2/ui"
"io"
"log"
"os"
"fyne.io/fyne/v2"
@ -28,6 +29,7 @@ var (
//
func init() {
_ = os.Setenv("FYNE_SCALE", "0.9")
var err error
if err = setupConfig(); err != nil {
@ -62,9 +64,10 @@ func main() {
app := app.NewWithID("protocol-test-tool")
app.SetIcon(theme.ResourceIconPng)
appUI := ui.NewUI(app, configService, connService, pttService, obs)
// logLifecycle(app)
//创建enter
w := fyne.CurrentApp().NewWindow("")
w := fyne.CurrentApp().NewWindow("传送门")
w.SetContent(container.NewGridWithColumns(2,
widget.NewButton("工具", func() {
toolWindow := ui.NewToolWindow(appUI)
@ -78,12 +81,27 @@ func main() {
})))
w.SetFixedSize(true)
w.Resize(fyne.NewSize(300, 100))
w.Show()
w.CenterOnScreen()
logrus.WithField("version", app.Metadata().Version).Info("app starting")
w.Show()
appUI.Run()
}
func logLifecycle(a fyne.App) {
a.Lifecycle().SetOnStarted(func() {
log.Println("Lifecycle: Started")
})
a.Lifecycle().SetOnStopped(func() {
log.Println("Lifecycle: Stopped")
})
a.Lifecycle().SetOnEnteredForeground(func() {
log.Println("Lifecycle: Entered Foreground")
})
a.Lifecycle().SetOnExitedForeground(func() {
log.Println("Lifecycle: Exited Foreground")
})
}
func setupPtt() (err error) {
pttService = service.NewPttService(connService)
return
@ -121,7 +139,7 @@ func setupLogger() (err error) {
logrus.SetOutput(os.Stdout)
//设置output,默认为stderr,可以为任何io.Writer比如文件*os.File
file, err := os.OpenFile("robot_v2.log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
file, err := os.OpenFile("robot.log", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0666)
writers := []io.Writer{
file,
os.Stdout}

View File

@ -1,7 +1,5 @@
package model
import "github.com/sirupsen/logrus"
type ItemModel struct {
Id string
Label string
@ -18,7 +16,6 @@ func NewItemModelList() *ItemModelList {
}
func (s *ItemModelList) AsInterfaceArray() []interface{} {
logrus.Debug(len(s.DataList))
rs := make([]interface{}, len(s.DataList))
for i := range s.DataList {
rs[i] = s.DataList[i]

View File

@ -37,17 +37,17 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
content.Objects = []fyne.CanvasObject{}
serverAddr := widget.NewEntry()
serverAddr.PlaceHolder = "服务器地址"
serverAddr.PlaceHolder = "服务器地址 例如: 10.0.1.11"
projectDir := widget.NewEntry()
projectDir.PlaceHolder = "项目目录"
projectDir.PlaceHolder = "项目目录 例如: E:\\projects\\workspace\\go_dreamfactory"
workDir := widget.NewEntry()
workDir.PlaceHolder = "LuBan目录"
workDir.PlaceHolder = "LuBan目录 例如: E:\\svn\\dreamworks\\client\\dreamworks\\ExcelFile"
// client
client := widget.NewEntry()
client.PlaceHolder = "配置Luban Client.exe路径"
client.PlaceHolder = "配置Luban Client.exe路径 例如: \\Luban.Client\\Luban.Client.exe"
//define
define := widget.NewEntry()
@ -72,7 +72,7 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
genType.PlaceHolder = "生成类型"
if gt != nil {
serverAddr.Text = gt.ServerAddr //10.0.1.11
serverAddr.Text = gt.ServerAddr
projectDir.Text = gt.ProjectDir //"E:\\projects\\workspace\\go_dreamfactory"
workDir.Text = gt.WorkDir // "E:\\svn\\dreamworks\\client\\dreamworks\\ExcelFile"
client.Text = gt.Client //"\\Luban.Client\\Luban.Client.exe"

View File

@ -96,18 +96,19 @@ func (this *toyUserInfo) dataListener() {
// _ = this.data.Append(fmt.Sprintf("%-3s\t: %s", common.USERINFO_UID, this.userInfo.DbUser.Uid))
_ = this.data.Append(this.getAcc()) //0
_ = this.data.Append(this.getName()) //1
_ = this.data.Append(this.getAvatar()) //2
_ = this.data.Append(this.getVip()) //3
_ = this.data.Append(this.getLv()) //4
_ = this.data.Append(this.getGold()) //5
_ = this.data.Append(this.getExp()) //6
_ = this.data.Append(this.getTitle()) //7
_ = this.data.Append(this.getActiveDay()) //8
_ = this.data.Append(this.getActiveWeek()) //9
_ = this.data.Append(this.getFriendPoint()) //10
_ = this.data.Append(this.getModiNameCount()) //11
_ = this.data.Append(this.getSign()) //12
_ = this.data.Append(this.getSid()) //1
_ = this.data.Append(this.getName()) //2
_ = this.data.Append(this.getAvatar()) //3
_ = this.data.Append(this.getVip()) //4
_ = this.data.Append(this.getLv()) //5
_ = this.data.Append(this.getGold()) //6
_ = this.data.Append(this.getExp()) //7
_ = this.data.Append(this.getTitle()) //8
_ = this.data.Append(this.getActiveDay()) //9
_ = this.data.Append(this.getActiveWeek()) //10
_ = this.data.Append(this.getFriendPoint()) //11
_ = this.data.Append(this.getModiNameCount()) //12
_ = this.data.Append(this.getSign()) //13
},
})
@ -122,7 +123,7 @@ func (this *toyUserInfo) dataListener() {
logrus.Error("unmarshal err")
}
// updatename
this.setProp(1, common.USERINFO_NAME, rsp.Name)
this.setProp(2, common.USERINFO_NAME, rsp.Name)
}
//update info
@ -133,17 +134,19 @@ func (this *toyUserInfo) dataListener() {
logrus.Error("unmarshal err")
return
}
this.setProp(2, common.USERINFO_AVATAR, rsp.Data.Avatar)
this.setProp(3, common.USERINFO_VIP, rsp.Data.Vip)
this.setProp(4, common.USERINFO_LV, rsp.Data.Lv)
this.setProp(5, common.USERINFO_GOLD, rsp.Data.Gold)
this.setProp(6, common.USERINFO_EXP, rsp.Data.Exp)
this.setProp(7, common.USERINFO_TITLE, rsp.Data.Title)
this.setProp(8, common.USERINFO_ACTIVE_DAY, rsp.Ex.Activeday)
this.setProp(9, common.USERINFO_ACTIVE_WEEK, rsp.Ex.Activeweek)
this.setProp(10, common.USERINFO_FRIENDPOINT, rsp.Ex.FriendPoint)
this.setProp(11, common.USERINFO_MODINAME, rsp.Ex.ModifynameCount)
this.setProp(12, common.USERINFO_SIGN, rsp.Ex.Sign)
this.setProp(1, common.USERINFO_SERVER, rsp.Data.Sid)
this.setProp(2, common.USERINFO_NAME, rsp.Data.Name)
this.setProp(3, common.USERINFO_AVATAR, rsp.Data.Avatar)
this.setProp(4, common.USERINFO_VIP, rsp.Data.Vip)
this.setProp(5, common.USERINFO_LV, rsp.Data.Lv)
this.setProp(6, common.USERINFO_GOLD, rsp.Data.Gold)
this.setProp(7, common.USERINFO_EXP, rsp.Data.Exp)
this.setProp(8, common.USERINFO_TITLE, rsp.Data.Title)
this.setProp(9, common.USERINFO_ACTIVE_DAY, rsp.Ex.Activeday)
this.setProp(10, common.USERINFO_ACTIVE_WEEK, rsp.Ex.Activeweek)
this.setProp(11, common.USERINFO_FRIENDPOINT, rsp.Ex.FriendPoint)
this.setProp(12, common.USERINFO_MODINAME, rsp.Ex.ModifynameCount)
this.setProp(13, common.USERINFO_SIGN, rsp.Ex.Sign)
}
},
})
@ -180,6 +183,10 @@ func (this *toyUserInfo) getAcc() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_ACC, this.userInfo.DbUser.Binduid)
}
func (this *toyUserInfo) getSid() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_SERVER, this.userInfo.DbUser.Sid)
}
func (this *toyUserInfo) getName() string {
return fmt.Sprintf("%-3s\t: %s", common.USERINFO_NAME, this.userInfo.DbUser.Name)
}

View File

@ -3,11 +3,12 @@ package ui
import (
"go_dreamfactory/cmd/v2/service"
"go_dreamfactory/cmd/v2/service/observer"
"go_dreamfactory/cmd/v2/theme"
"os"
"sync"
"go_dreamfactory/cmd/v2/theme"
"fyne.io/fyne/v2"
"github.com/BabySid/gobase"
)
type UI interface {
@ -52,6 +53,11 @@ func (ui *UIImpl) AddWindow(name string, w fyne.Window) {
}
func (ui *UIImpl) Run() {
defer func() {
_ = os.Unsetenv("FYNE_SCALE")
gobase.Exit()
}()
ui.app.Run()
}

View File

@ -15,6 +15,7 @@ import (
"github.com/sirupsen/logrus"
)
// 好友审批
type FriendAgreeView struct {
ListBaseView
}
@ -76,8 +77,10 @@ func (this *FriendAgreeView) dataListener() {
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
this.itemListData = model.NewItemModelList()
for _, v := range rsp.List {
fm := &model.ItemModel{
Id: v.UserId,

View File

@ -81,6 +81,7 @@ func (this *FriendListView) dataListener() {
if !comm.ProtoUnmarshal(data, rsp) {
logrus.Error("unmarshal err")
return
}
this.itemListData = model.NewItemModelList()

View File

@ -189,12 +189,12 @@ const (
// 随机任务类型
const (
RtaskTypeHeroTarget TaskType = 1 //英雄指定
RtaskTypeHeroLvTarget TaskType = 2 //指定英雄的等级
RtaskTypeEquipNum TaskType = 3 //装备数量
RtaskTypePoltId TaskType = 4 //剧情ID
RtaskTypeTaskDay TaskType = 5 //每日任务
RtaskTypeHeroTarget TaskType = 1 //英雄指定
RtaskTypeHeroLvTarget TaskType = 4 //指定英雄的等级
RtaskTypeEquipNum TaskType = 5 //指定英雄的装备数量
RtaskTypePoltId TaskType = 2 //剧情ID
RtaskTypeTaskDay TaskType = 3 //每日任务
RtaskTypeHeroStarTarget TaskType = 6 //指定英雄的星级
)
const (

View File

@ -3,6 +3,7 @@ package friend
import (
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
)
const (
@ -21,6 +22,7 @@ const (
FriendSubTypeRandList = "randlist"
FriendSubTypeAssistHero = "assisthero"
FriendSubTypeDel = "del"
FriendSbuTypeAssistlist = "assistlist"
)
type apiComp struct {
@ -33,3 +35,18 @@ func (this *apiComp) Init(service core.IService, module core.IModule, comp core.
this.moduleFriend = module.(*Friend)
return
}
func (this *apiComp) setDefaultFriendUserBaseInfo(userId string) *pb.FriendBase {
user := this.moduleFriend.ModuleUser.GetUser(userId)
if user != nil {
return &pb.FriendBase{
ServerId: user.Sid,
UserId: userId,
NickName: user.Name,
Level: user.Lv,
Avatar: user.Avatar,
OfflineTime: user.Offlinetime,
}
}
return nil
}

View File

@ -37,17 +37,10 @@ func (this *apiComp) ApplyList(session comm.IUserSession, req *pb.FriendApplyLis
}
for _, userId := range self.ApplyIds {
user := this.moduleFriend.ModuleUser.GetUser(userId)
if user == nil {
continue
base := this.setDefaultFriendUserBaseInfo(userId)
if base != nil {
list = append(list, base)
}
//TODO 组装FriendBase明细数据
list = append(list, &pb.FriendBase{
UserId: userId,
NickName: user.Name,
Level: user.Lv,
Avatar: user.Avatar,
})
}
return

View File

@ -0,0 +1,44 @@
package friend
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
func (this *apiComp) AssistlistCheck(session comm.IUserSession, req *pb.FriendAssistlistReq) (code pb.ErrorCode) {
return
}
func (this *apiComp) Assistlist(session comm.IUserSession, req *pb.FriendAssistlistReq) (code pb.ErrorCode, data proto.Message) {
var list []*pb.FriendBase
//获取玩家自己好友数据
self := this.moduleFriend.modelFriend.GetFriend(session.GetUserId())
if self == nil {
code = pb.ErrorCode_FriendSelfNoData
return
}
for _, uid := range self.FriendIds {
base := this.setDefaultFriendUserBaseInfo(uid)
if base != nil {
// 获取好友信息
target := this.moduleFriend.modelFriend.GetFriend(uid)
if target == nil {
continue
}
base.HeroObjId = target.AssistHeroId
list = append(list, base)
}
}
rsp := &pb.FriendAssistlistResp{
List: list,
HeroObjId: self.AssistHeroId,
}
if err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSbuTypeAssistlist, rsp); err != nil {
code = pb.ErrorCode_SystemError
}
return
}

View File

@ -38,16 +38,10 @@ func (this *apiComp) Blacklist(session comm.IUserSession, req *pb.FriendBlackLis
}
for _, userId := range self.BlackIds {
user := this.moduleFriend.ModuleUser.GetUser(userId)
if user == nil {
continue
base := this.setDefaultFriendUserBaseInfo(userId)
if base != nil {
list = append(list, base)
}
list = append(list, &pb.FriendBase{
UserId: userId,
NickName: user.Name,
Level: user.Lv,
})
}
return

View File

@ -18,13 +18,11 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (cod
self *pb.DBFriend
Resp *pb.FriendListResp
list []*pb.FriendBase
heroObjId string
)
defer func() {
Resp = &pb.FriendListResp{
List: list,
HeroObjId: heroObjId,
}
err := session.SendMsg(string(this.moduleFriend.GetType()), FriendSubTypeList, Resp)
if err != nil {
@ -38,28 +36,19 @@ func (this *apiComp) List(session comm.IUserSession, req *pb.FriendListReq) (cod
code = pb.ErrorCode_FriendSelfNoData
return
}
// 助战英雄ID
heroObjId = self.AssistHeroId
// 我的好友
for _, userId := range self.FriendIds {
// 获取好友详情
user := this.moduleFriend.ModuleUser.GetUser(userId)
if user == nil {
base := this.setDefaultFriendUserBaseInfo(userId)
if base == nil {
continue
}
base := &pb.FriendBase{
UserId: userId,
NickName: user.Name,
Level: user.Lv,
Avatar: user.Avatar,
}
// 判断用户在线状态
us := this.moduleFriend.ModuleUser.GetUserSession(userId)
if us == nil || us.SessionId == "" {
base.OfflineTime = user.Offlinetime //离线时间
if us != nil {
base.OfflineTime = 0 //在线
}
// 判断是否已点赞

View File

@ -1,7 +1,6 @@
package friend
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"go_dreamfactory/utils"
@ -25,10 +24,14 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR
}
// 只随机选择5个在线玩家
// var randOnlineUsers []string
var randOnlineUsers []string
if len(cu) > 5 {
fmt.Println(utils.Numbers(0, len(cu), 5))
randArr := utils.Numbers(0, len(cu), 5)
for _, v := range randArr {
if cu[v] != nil {
randOnlineUsers = append(randOnlineUsers, cu[v].Uid)
}
}
}
// 当前玩家好友数据
@ -40,33 +43,31 @@ func (this *apiComp) Randlist(session comm.IUserSession, req *pb.FriendRandlistR
var userList []*pb.FriendBase
for _, v := range cu {
for _, uid := range randOnlineUsers {
// 将自己从在线玩家中过滤掉
if v.Uid == session.GetUserId() {
if uid == session.GetUserId() {
continue
}
// 将自己的好友从在线玩家中过滤掉
if _, ok := utils.Findx(self.FriendIds, v.Uid); ok {
if _, ok := utils.Findx(self.FriendIds, uid); ok {
continue
}
// 判断当前在线好友是否在自己的申请列表中,如果存在也过滤掉
target := this.moduleFriend.modelFriend.GetFriend(v.Uid)
target := this.moduleFriend.modelFriend.GetFriend(uid)
if target == nil {
continue
}
// 获取在线好友的信息
user := this.moduleFriend.ModuleUser.GetUser(v.Uid)
user := this.moduleFriend.ModuleUser.GetUser(uid)
if user == nil {
continue
}
base := &pb.FriendBase{
UserId: user.Uid,
NickName: user.Name,
Level: user.Lv,
OfflineTime: user.Offlinetime,
base := this.setDefaultFriendUserBaseInfo(uid)
if base == nil {
continue
}
// 申请过的在线好友,设置申请状态

View File

@ -13,7 +13,7 @@ func (this *apiComp) ZanlistCheck(session comm.IUserSession, req *pb.FriendZanli
return
}
// Deprecated:
// Deprecated:
func (this *apiComp) Zanlist(session comm.IUserSession, req *pb.FriendZanlistReq) (code pb.ErrorCode, data proto.Message) {
if code = this.ZanlistCheck(session, req); code != pb.ErrorCode_Success {
return
@ -31,15 +31,10 @@ func (this *apiComp) Zanlist(session comm.IUserSession, req *pb.FriendZanlistReq
}
for _, v := range self.ZanIds {
user := this.moduleFriend.ModuleUser.GetUser(v)
if user == nil {
continue
base := this.setDefaultFriendUserBaseInfo(v)
if base != nil {
list = append(list, base)
}
list = append(list, &pb.FriendBase{
UserId: v,
NickName: user.Name,
})
}
rsp := &pb.FriendZanlistResp{

View File

@ -45,7 +45,7 @@ func (this *apiComp) Choose(session comm.IUserSession, req *pb.RtaskChooseReq) (
}
//发奖励
code = this.moduleRtask.DispenseRes(session, conf.Reword, true)
code = this.moduleRtask.DispenseRes(session, conf.Reward, true)
rsp := &pb.RtaskChooseResp{}

View File

@ -20,14 +20,14 @@ 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)
err = this.LoadMultiConfigure(map[string]interface{}{
gameRtask: cfg.NewGameRdtaskAll,
gameRtask: cfg.NewGameRdtask,
gameRtaskChoose: cfg.NewGameRdtaskChoose,
gameRtaskType: cfg.NewGameRdtaskType,
gameRtaskType: cfg.NewGameRdtaskCondi,
})
return
}
func (this *configureComp) getRtaskCfg() (data *cfg.GameRdtaskAll, err error) {
func (this *configureComp) getRtaskCfg() (data *cfg.GameRdtask, err error) {
var (
v interface{}
ok bool
@ -35,7 +35,7 @@ func (this *configureComp) getRtaskCfg() (data *cfg.GameRdtaskAll, err error) {
if v, err = this.GetConfigure(gameRtask); err != nil {
return
} else {
if data, ok = v.(*cfg.GameRdtaskAll); !ok {
if data, ok = v.(*cfg.GameRdtask); !ok {
err = fmt.Errorf("%T no is *cfg.GameRdtaskAll", v)
return
}
@ -43,7 +43,7 @@ func (this *configureComp) getRtaskCfg() (data *cfg.GameRdtaskAll, err error) {
return
}
func (this *configureComp) getRtaskTypeCfg() (data *cfg.GameRdtaskType, err error) {
func (this *configureComp) getRtaskTypeCfg() (data *cfg.GameRdtaskCondi, err error) {
var (
v interface{}
ok bool
@ -51,7 +51,7 @@ func (this *configureComp) getRtaskTypeCfg() (data *cfg.GameRdtaskType, err erro
if v, err = this.GetConfigure(gameRtask); err != nil {
return
} else {
if data, ok = v.(*cfg.GameRdtaskType); !ok {
if data, ok = v.(*cfg.GameRdtaskCondi); !ok {
err = fmt.Errorf("%T is *cfg.GameRdtaskType", v)
return
}
@ -60,7 +60,7 @@ func (this *configureComp) getRtaskTypeCfg() (data *cfg.GameRdtaskType, err erro
}
// 获取随机任务配置
func (this *configureComp) getRtaskList() (data []*cfg.GameRdtaskAllData, err error) {
func (this *configureComp) getRtaskList() (data []*cfg.GameRdtaskData, err error) {
cfg, err := this.getRtaskCfg()
if err != nil {
return
@ -72,7 +72,7 @@ func (this *configureComp) getRtaskList() (data []*cfg.GameRdtaskAllData, err er
}
// 查询任务类型
func (this *configureComp) getRtaskTypeById(typeId int32) (data *cfg.GameRdtaskTypeData, err error) {
func (this *configureComp) getRtaskTypeById(typeId int32) (data *cfg.GameRdtaskCondiData, err error) {
cfg, err := this.getRtaskTypeCfg()
if err != nil {
return
@ -86,7 +86,7 @@ func (this *configureComp) getRtaskTypeById(typeId int32) (data *cfg.GameRdtaskT
}
// 任务
func (this *configureComp) getRtaskById(taskId int32) (data *cfg.GameRdtaskAllData) {
func (this *configureComp) getRtaskById(taskId int32) (data *cfg.GameRdtaskData) {
cfg, err := this.getRtaskCfg()
if err != nil {
return
@ -100,14 +100,14 @@ func (this *configureComp) getRtaskById(taskId int32) (data *cfg.GameRdtaskAllDa
}
// 首个任务
func (this *configureComp) getFirstTask() *cfg.GameRdtaskAllData {
func (this *configureComp) getFirstTask() *cfg.GameRdtaskData {
cfg, err := this.getRtaskCfg()
if err != nil {
return nil
}
if cfg != nil {
for _, v := range cfg.GetDataList() {
if v.Aftertask == 0 {
if v.NextTid == 0 {
return v
}
}

View File

@ -41,7 +41,7 @@ func (this *ModelRtask) doRtaskHandle(uid string, param *pb.RtaskParam) (rtaskId
if len(rtask.FrtaskIds) == 0 {
conf := this.moduleRtask.configure.getFirstTask()
if conf != nil {
taskId = conf.Aftertask
taskId = conf.NextTid
}
} else {
//TODO
@ -60,27 +60,32 @@ func (this *ModelRtask) doRtaskHandle(uid string, param *pb.RtaskParam) (rtaskId
return
}
// 1 英雄指定
func (this *ModelRtask) HeroTarget(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool) {
// 英雄指定
func (this *ModelRtask) HeroTarget(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1
}
// 2 指定英雄的等级
func (this *ModelRtask) HeroLvTarget(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool) {
// 指定英雄的等级
func (this *ModelRtask) HeroLvTarget(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1 && cfg.Data1 == tp.Param2
}
// 3 指定英雄的指定装备的数量
func (this *ModelRtask) EquipNum(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool) {
// 指定英雄的指定装备的数量
func (this *ModelRtask) EquipNum(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1 && cfg.Data2 == tp.Param2 && cfg.Data3 == tp.Param3
}
// 4 剧情ID
func (this *ModelRtask) PoltId(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool) {
// 剧情ID
func (this *ModelRtask) PoltId(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1
}
// 5 每日任务
func (this *ModelRtask) TaskDay(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool) {
// 每日任务
func (this *ModelRtask) TaskDay(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1
}
// 指定英雄的星级
func (this *ModelRtask) HeroStarTarget(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool) {
return cfg.Data1 == tp.Param1 && cfg.Data2 == tp.Param2
}

View File

@ -18,12 +18,12 @@ type rtask struct {
// 限定条件
type rtaskCondi struct {
cfg *cfg.GameRdtaskTypeData
cfg *cfg.GameRdtaskCondiData
fn rtaskHandle
}
// 设定返回值
type rtaskHandle func(cfg *cfg.GameRdtaskTypeData, tp *pb.RtaskParam) (ok bool)
type rtaskHandle func(cfg *cfg.GameRdtaskCondiData, tp *pb.RtaskParam) (ok bool)
type ModuleRtask struct {
modules.ModuleBase
@ -73,7 +73,7 @@ func (this *ModuleRtask) initRtaskHandle() {
}
//遍历任务的限定条件
for _, rtaskTypeId := range v.Rdtasknum {
for _, rtaskTypeId := range v.Condition {
// 获取每个限定条件配置
if typeCfg, err2 := this.configure.getRtaskTypeById(rtaskTypeId); err2 == nil {
if typeCfg != nil {
@ -88,6 +88,11 @@ func (this *ModuleRtask) initRtaskHandle() {
cfg: typeCfg,
fn: this.modelRtask.HeroLvTarget,
})
case comm.RtaskTypeHeroStarTarget:
handlers = append(handlers, &rtaskCondi{
cfg: typeCfg,
fn: this.modelRtask.HeroStarTarget,
})
case comm.RtaskTypeEquipNum:
handlers = append(handlers, &rtaskCondi{
cfg: typeCfg,

View File

@ -80,7 +80,7 @@ type DBChat struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id"` //主键id
Channel ChatChannel `protobuf:"varint,2,opt,name=channel,proto3,enum=ChatChannel" json:"channel"` //频道
Suid string `protobuf:"bytes,3,opt,name=suid,proto3" json:"suid"` //发送用户id
Slv int32 `protobuf:"varint,4,opt,name=slv,proto3" json:"slv"` //发送者等级

View File

@ -30,11 +30,12 @@ type FriendBase struct {
Level int32 `protobuf:"varint,3,opt,name=level,proto3" json:"level"` //等级
Avatar string `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar"` //头像
Strength int64 `protobuf:"varint,5,opt,name=strength,proto3" json:"strength"` //战力
ServerId int32 `protobuf:"varint,6,opt,name=serverId,proto3" json:"serverId"` //服务编号
ServerId string `protobuf:"bytes,6,opt,name=serverId,proto3" json:"serverId"` //服务编号
OfflineTime int64 `protobuf:"varint,7,opt,name=offlineTime,proto3" json:"offlineTime"` //最近一次下线时间 0在线
IsApplied bool `protobuf:"varint,8,opt,name=isApplied,proto3" json:"isApplied"` //是否已申请加好友
IsZaned bool `protobuf:"varint,9,opt,name=isZaned,proto3" json:"isZaned"` //是否已点赞
IsGetZaned bool `protobuf:"varint,10,opt,name=isGetZaned,proto3" json:"isGetZaned"` //是否已获赞
HeroObjId string `protobuf:"bytes,11,opt,name=heroObjId,proto3" json:"heroObjId"` //助战英雄ID
}
func (x *FriendBase) Reset() {
@ -104,11 +105,11 @@ func (x *FriendBase) GetStrength() int64 {
return 0
}
func (x *FriendBase) GetServerId() int32 {
func (x *FriendBase) GetServerId() string {
if x != nil {
return x.ServerId
}
return 0
return ""
}
func (x *FriendBase) GetOfflineTime() int64 {
@ -139,6 +140,13 @@ func (x *FriendBase) GetIsGetZaned() bool {
return false
}
func (x *FriendBase) GetHeroObjId() string {
if x != nil {
return x.HeroObjId
}
return ""
}
//好友列表
type FriendListReq struct {
state protoimpl.MessageState
@ -183,8 +191,7 @@ type FriendListResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
HeroObjId string `protobuf:"bytes,2,opt,name=heroObjId,proto3" json:"heroObjId"`
List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
}
func (x *FriendListResp) Reset() {
@ -226,13 +233,6 @@ func (x *FriendListResp) GetList() []*FriendBase {
return nil
}
func (x *FriendListResp) GetHeroObjId() string {
if x != nil {
return x.HeroObjId
}
return ""
}
// 随机的在线玩家
type FriendRandlistReq struct {
state protoimpl.MessageState
@ -1662,11 +1662,105 @@ func (x *FriendAssistheroResp) GetHeroObjId() string {
return ""
}
//助战列表
type FriendAssistlistReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *FriendAssistlistReq) Reset() {
*x = FriendAssistlistReq{}
if protoimpl.UnsafeEnabled {
mi := &file_friend_friend_msg_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FriendAssistlistReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FriendAssistlistReq) ProtoMessage() {}
func (x *FriendAssistlistReq) ProtoReflect() protoreflect.Message {
mi := &file_friend_friend_msg_proto_msgTypes[33]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FriendAssistlistReq.ProtoReflect.Descriptor instead.
func (*FriendAssistlistReq) Descriptor() ([]byte, []int) {
return file_friend_friend_msg_proto_rawDescGZIP(), []int{33}
}
type FriendAssistlistResp struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
List []*FriendBase `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
HeroObjId string `protobuf:"bytes,2,opt,name=heroObjId,proto3" json:"heroObjId"`
}
func (x *FriendAssistlistResp) Reset() {
*x = FriendAssistlistResp{}
if protoimpl.UnsafeEnabled {
mi := &file_friend_friend_msg_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FriendAssistlistResp) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FriendAssistlistResp) ProtoMessage() {}
func (x *FriendAssistlistResp) ProtoReflect() protoreflect.Message {
mi := &file_friend_friend_msg_proto_msgTypes[34]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FriendAssistlistResp.ProtoReflect.Descriptor instead.
func (*FriendAssistlistResp) Descriptor() ([]byte, []int) {
return file_friend_friend_msg_proto_rawDescGZIP(), []int{34}
}
func (x *FriendAssistlistResp) GetList() []*FriendBase {
if x != nil {
return x.List
}
return nil
}
func (x *FriendAssistlistResp) GetHeroObjId() string {
if x != nil {
return x.HeroObjId
}
return ""
}
var File_friend_friend_msg_proto protoreflect.FileDescriptor
var file_friend_friend_msg_proto_rawDesc = []byte{
0x0a, 0x17, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x2f, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x5f,
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x02, 0x0a, 0x0a, 0x46, 0x72,
0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x0a, 0x46, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
@ -1676,7 +1770,7 @@ var file_friend_friend_msg_proto_rawDesc = []byte{
0x28, 0x09, 0x52, 0x06, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x74,
0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x74,
0x72, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x49, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
0x49, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x69, 0x6d,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x6f, 0x66, 0x66, 0x6c, 0x69, 0x6e, 0x65,
0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65,
@ -1684,13 +1778,13 @@ var file_friend_friend_msg_proto_rawDesc = []byte{
0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x09, 0x20,
0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a,
0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0a, 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x22, 0x0f, 0x0a, 0x0d,
0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x4f, 0x0a,
0x0e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74,
0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x13,
0x52, 0x0a, 0x69, 0x73, 0x47, 0x65, 0x74, 0x5a, 0x61, 0x6e, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09,
0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x68, 0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x46, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x0e, 0x46,
0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a,
0x04, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72,
0x69, 0x65, 0x6e, 0x64, 0x42, 0x61, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x13,
0x0a, 0x11, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x73, 0x74,
0x52, 0x65, 0x71, 0x22, 0x35, 0x0a, 0x12, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x61, 0x6e,
0x64, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73,
@ -1782,8 +1876,15 @@ var file_friend_friend_msg_proto_rawDesc = []byte{
0x49, 0x64, 0x22, 0x34, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69,
0x73, 0x74, 0x68, 0x65, 0x72, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65,
0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68,
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x72, 0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x46, 0x72, 0x69, 0x65,
0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x6c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22,
0x55, 0x0a, 0x14, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x41, 0x73, 0x73, 0x69, 0x73, 0x74, 0x6c,
0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x42, 0x61,
0x73, 0x65, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x68, 0x65, 0x72, 0x6f,
0x4f, 0x62, 0x6a, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x68, 0x65, 0x72,
0x6f, 0x4f, 0x62, 0x6a, 0x49, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@ -1798,7 +1899,7 @@ func file_friend_friend_msg_proto_rawDescGZIP() []byte {
return file_friend_friend_msg_proto_rawDescData
}
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
var file_friend_friend_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
var file_friend_friend_msg_proto_goTypes = []interface{}{
(*FriendBase)(nil), // 0: FriendBase
(*FriendListReq)(nil), // 1: FriendListReq
@ -1833,6 +1934,8 @@ var file_friend_friend_msg_proto_goTypes = []interface{}{
(*FriendZanreceiveResp)(nil), // 30: FriendZanreceiveResp
(*FriendAssistheroReq)(nil), // 31: FriendAssistheroReq
(*FriendAssistheroResp)(nil), // 32: FriendAssistheroResp
(*FriendAssistlistReq)(nil), // 33: FriendAssistlistReq
(*FriendAssistlistResp)(nil), // 34: FriendAssistlistResp
}
var file_friend_friend_msg_proto_depIdxs = []int32{
0, // 0: FriendListResp.list:type_name -> FriendBase
@ -1841,11 +1944,12 @@ var file_friend_friend_msg_proto_depIdxs = []int32{
0, // 3: FriendSearchResp.friend:type_name -> FriendBase
0, // 4: FriendBlackListResp.friends:type_name -> FriendBase
0, // 5: FriendZanlistResp.list:type_name -> FriendBase
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
0, // 6: FriendAssistlistResp.list:type_name -> FriendBase
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_friend_friend_msg_proto_init() }
@ -2250,6 +2354,30 @@ func file_friend_friend_msg_proto_init() {
return nil
}
}
file_friend_friend_msg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FriendAssistlistReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_friend_friend_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FriendAssistlistResp); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@ -2257,7 +2385,7 @@ func file_friend_friend_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_friend_friend_msg_proto_rawDesc,
NumEnums: 0,
NumMessages: 33,
NumMessages: 35,
NumExtensions: 0,
NumServices: 0,
},

View File

@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <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
const (
GameBuffType_NONE = 0
GameBuffType_ATKUP = 1
GameBuffType_DEFUP = 2
GameBuffType_SPDUP = 3
GameBuffType_CRATEUP = 4
GameBuffType_CRITRESIST = 5
GameBuffType_ATKDOWN = 6
GameBuffType_DEFDOWN = 7
GameBuffType_SPDDOWN = 8
GameBuffType_CRATEDOWN = 9
GameBuffType_SEAR = 10
GameBuffType_MISSRATEUP = 11
GameBuffType_INVINCIBILITY = 12
GameBuffType_STANDOFF = 13
GameBuffType_STUN = 14
GameBuffType_FREEZE = 15
GameBuffType_DISEASED = 16
GameBuffType_PETRIFICATION = 17
GameBuffType_SILENCE = 18
GameBuffType_TAUNT = 19
GameBuffType_IMMUNITY = 20
GameBuffType_SHIELD = 21
)

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

View File

@ -0,0 +1,41 @@
//------------------------------------------------------------------------------
// <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 GameChatExpressionData struct {
Key int32
ExpressionCode string
ExpressionType int32
ExpressionIcon string
}
const TypeId_GameChatExpressionData = 495857494
func (*GameChatExpressionData) GetTypeId() int32 {
return 495857494
}
func (_v *GameChatExpressionData)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; if _v.ExpressionCode, _ok_ = _buf["expression_code"].(string); !_ok_ { err = errors.New("expression_code error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["expression_type"].(float64); !_ok_ { err = errors.New("expression_type error"); return }; _v.ExpressionType = int32(_tempNum_) }
{ var _ok_ bool; if _v.ExpressionIcon, _ok_ = _buf["expression_icon"].(string); !_ok_ { err = errors.New("expression_icon error"); return } }
return
}
func DeserializeGameChatExpressionData(_buf map[string]interface{}) (*GameChatExpressionData, error) {
v := &GameChatExpressionData{}
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 GameRdtask struct {
_dataMap map[int32]*GameRdtaskData
_dataList []*GameRdtaskData
}
func NewGameRdtask(_buf []map[string]interface{}) (*GameRdtask, error) {
_dataList := make([]*GameRdtaskData, 0, len(_buf))
dataMap := make(map[int32]*GameRdtaskData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameRdtaskData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameRdtask{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameRdtask) GetDataMap() map[int32]*GameRdtaskData {
return table._dataMap
}
func (table *GameRdtask) GetDataList() []*GameRdtaskData {
return table._dataList
}
func (table *GameRdtask) Get(key int32) *GameRdtaskData {
return table._dataMap[key]
}

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

View File

@ -10,35 +10,31 @@ package cfg
import "errors"
type GameRdtaskTypeData struct {
Rdtaksnum int32
Typdes int32
Datatime int32
Typtaskid int32
type GameRdtaskCondiData struct {
Id int32
Type int32
Data1 int32
Data2 int32
Data3 int32
}
const TypeId_GameRdtaskTypeData = -28304553
const TypeId_GameRdtaskCondiData = 2060899038
func (*GameRdtaskTypeData) GetTypeId() int32 {
return -28304553
func (*GameRdtaskCondiData) GetTypeId() int32 {
return 2060899038
}
func (_v *GameRdtaskTypeData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rdtaksnum"].(float64); !_ok_ { err = errors.New("rdtaksnum error"); return }; _v.Rdtaksnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["typdes"].(float64); !_ok_ { err = errors.New("typdes error"); return }; _v.Typdes = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["datatime"].(float64); !_ok_ { err = errors.New("datatime error"); return }; _v.Datatime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["typtaskid"].(float64); !_ok_ { err = errors.New("typtaskid error"); return }; _v.Typtaskid = int32(_tempNum_) }
func (_v *GameRdtaskCondiData)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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data1"].(float64); !_ok_ { err = errors.New("data1 error"); return }; _v.Data1 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data2"].(float64); !_ok_ { err = errors.New("data2 error"); return }; _v.Data2 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data3"].(float64); !_ok_ { err = errors.New("data3 error"); return }; _v.Data3 = int32(_tempNum_) }
return
}
func DeserializeGameRdtaskTypeData(_buf map[string]interface{}) (*GameRdtaskTypeData, error) {
v := &GameRdtaskTypeData{}
func DeserializeGameRdtaskCondiData(_buf map[string]interface{}) (*GameRdtaskCondiData, error) {
v := &GameRdtaskCondiData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {

View File

@ -10,82 +10,82 @@ package cfg
import "errors"
type GameRdtaskAllData struct {
type GameRdtaskData struct {
Id int32
Type int32
Lasttask int32
Rdtasknum []int32
Aftertask int32
Taskcd int32
Tag int32
Story int32
Completetask int32
Chooseid []int32
Reword []*Gameatn
PreTid int32
Condition []int32
NextTid int32
CD int32
ObjType int32
StoryBegin int32
StoryEnd int32
ChooseId []int32
Reward []*Gameatn
}
const TypeId_GameRdtaskAllData = -891725512
const TypeId_GameRdtaskData = -358357379
func (*GameRdtaskAllData) GetTypeId() int32 {
return -891725512
func (*GameRdtaskData) GetTypeId() int32 {
return -358357379
}
func (_v *GameRdtaskAllData)Deserialize(_buf map[string]interface{}) (err error) {
func (_v *GameRdtaskData)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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lasttask"].(float64); !_ok_ { err = errors.New("lasttask error"); return }; _v.Lasttask = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTid"].(float64); !_ok_ { err = errors.New("preTid error"); return }; _v.PreTid = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["rdtasknum"].([]interface{}); !_ok_ { err = errors.New("rdtasknum error"); return }
if _arr_, _ok_ = _buf["condition"].([]interface{}); !_ok_ { err = errors.New("condition error"); return }
_v.Rdtasknum = make([]int32, 0, len(_arr_))
_v.Condition = 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.Rdtasknum = append(_v.Rdtasknum, _list_v_)
_v.Condition = append(_v.Condition, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["aftertask"].(float64); !_ok_ { err = errors.New("aftertask error"); return }; _v.Aftertask = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["taskcd"].(float64); !_ok_ { err = errors.New("taskcd error"); return }; _v.Taskcd = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["tag"].(float64); !_ok_ { err = errors.New("tag error"); return }; _v.Tag = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["story"].(float64); !_ok_ { err = errors.New("story error"); return }; _v.Story = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["completetask"].(float64); !_ok_ { err = errors.New("completetask error"); return }; _v.Completetask = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["nextTid"].(float64); !_ok_ { err = errors.New("nextTid error"); return }; _v.NextTid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["CD"].(float64); !_ok_ { err = errors.New("CD error"); return }; _v.CD = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["objType"].(float64); !_ok_ { err = errors.New("objType error"); return }; _v.ObjType = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyBegin"].(float64); !_ok_ { err = errors.New("storyBegin error"); return }; _v.StoryBegin = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["storyEnd"].(float64); !_ok_ { err = errors.New("storyEnd error"); return }; _v.StoryEnd = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["chooseid"].([]interface{}); !_ok_ { err = errors.New("chooseid error"); return }
if _arr_, _ok_ = _buf["chooseId"].([]interface{}); !_ok_ { err = errors.New("chooseId error"); return }
_v.Chooseid = make([]int32, 0, len(_arr_))
_v.ChooseId = 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.Chooseid = append(_v.Chooseid, _list_v_)
_v.ChooseId = append(_v.ChooseId, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["reword"].([]interface{}); !_ok_ { err = errors.New("reword error"); return }
if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
_v.Reword = make([]*Gameatn, 0, len(_arr_))
_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.Reword = append(_v.Reword, _list_v_)
_v.Reward = append(_v.Reward, _list_v_)
}
}
return
}
func DeserializeGameRdtaskAllData(_buf map[string]interface{}) (*GameRdtaskAllData, error) {
v := &GameRdtaskAllData{}
func DeserializeGameRdtaskData(_buf map[string]interface{}) (*GameRdtaskData, error) {
v := &GameRdtaskData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {

View File

@ -38,7 +38,6 @@ type Tables struct {
Shop *GameShop
Shopitem *GameShopitem
ActiveReward *GameActiveReward
Com *GameCom
Skill *GameSkill
Model *GameModel
MainlineChapter *GameMainlineChapter
@ -50,6 +49,7 @@ type Tables struct {
ChatSystem *GameChatSystem
ChatServerGroup *GameChatServerGroup
ChatChannelCom *GameChatChannelCom
ChatExpression *GameChatExpression
TaskRound *GameTaskRound
TaskActiveReward *GameTaskActiveReward
Coin *GameCoin
@ -66,14 +66,16 @@ type Tables struct {
PagodaTaskReward *GamePagodaTaskReward
PagodaSeasonReward *GamePagodaSeasonReward
PagodaseasonLoop *GamePagodaseasonLoop
RdtaskAll *GameRdtaskAll
RdtaskType *GameRdtaskType
Rdtask *GameRdtask
RdtaskCondi *GameRdtaskCondi
RdtaskChoose *GameRdtaskChoose
KungfuUnlock *GameKungfuUnlock
KungfuMasterworker *GameKungfuMasterworker
Gourmet *GameGourmet
GourmetSkill *GameGourmetSkill
Drop *GameDrop
Smithy *GameSmithy
SmithyStove *GameSmithyStove
}
func NewTables(loader JsonLoader) (*Tables, error) {
@ -243,12 +245,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.ActiveReward, err = NewGameActiveReward(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_com") ; err != nil {
return nil, err
}
if tables.Com, err = NewGameCom(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_skill") ; err != nil {
return nil, err
}
@ -315,6 +311,12 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.ChatChannelCom, err = NewGameChatChannelCom(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_chatexpression") ; err != nil {
return nil, err
}
if tables.ChatExpression, err = NewGameChatExpression(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_taskround") ; err != nil {
return nil, err
}
@ -411,16 +413,16 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.PagodaseasonLoop, err = NewGamePagodaseasonLoop(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_rdtaskall") ; err != nil {
if buf, err = loader("game_rdtask") ; err != nil {
return nil, err
}
if tables.RdtaskAll, err = NewGameRdtaskAll(buf) ; err != nil {
if tables.Rdtask, err = NewGameRdtask(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_rdtasktype") ; err != nil {
if buf, err = loader("game_rdtaskcondi") ; err != nil {
return nil, err
}
if tables.RdtaskType, err = NewGameRdtaskType(buf) ; err != nil {
if tables.RdtaskCondi, err = NewGameRdtaskCondi(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_rdtaskchoose") ; err != nil {
@ -459,5 +461,17 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.Drop, err = NewGameDrop(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_smithy") ; err != nil {
return nil, err
}
if tables.Smithy, err = NewGameSmithy(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_smithystove") ; err != nil {
return nil, err
}
if tables.SmithyStove, err = NewGameSmithyStove(buf) ; err != nil {
return nil, err
}
return tables, nil
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameCom struct {
_dataMap map[int32]*GameComData
_dataList []*GameComData
}
func NewGameCom(_buf []map[string]interface{}) (*GameCom, error) {
_dataList := make([]*GameComData, 0, len(_buf))
dataMap := make(map[int32]*GameComData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameComData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.MaxChar] = _v
}
}
return &GameCom{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameCom) GetDataMap() map[int32]*GameComData {
return table._dataMap
}
func (table *GameCom) GetDataList() []*GameComData {
return table._dataList
}
func (table *GameCom) Get(key int32) *GameComData {
return table._dataMap[key]
}

View File

@ -1,235 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameComData struct {
MaxChar int32
TaskReset int32
InitGold int32
InitHero []int32
Cameramin []int32
MaxGetreward []int32
Cameramax []float32
Heroshownum int32
Equipsuitsum []int32
FriendMaxnum int32
FriendMinnum int32
FriendMaxgetnum int32
FriendMaxsendnum int32
FriendDate int32
FriendRecordtime int32
FriendBlack int32
ChannelCdWorld int32
ChannelCdGuild int32
ChannelCdPrivate int32
ChannelCdPublic int32
ChannelLockIcon int32
MaxWord int32
MaxChat int32
MaxObject int32
LoadChat int32
ChannelAllocationMax int32
ChannelSwitchingMax int32
DrawToplimit int32
Draw10Star4Max int32
Draw10Star5Max int32
DrawFloorStar4 int32
DrawFloorStar5 int32
DuplicateRemoval int32
BasePoolCost *Gameatn
Camp1PoolCost *Gameatn
Camp2PoolCost *Gameatn
Camp3PoolCost *Gameatn
Camp4PoolCost *Gameatn
BasePool10cost *Gameatn
Camp1Pool10cost *Gameatn
Camp2Pool10cost *Gameatn
Camp3Pool10cost *Gameatn
Camp4Pool10cost *Gameatn
Camp1Pool1 string
Camp2Pool1 string
Camp3Pool1 string
Camp4Pool1 string
BasePool1 *Gamebasepool
BasePool2 *Gamebasepool
BasePool3 *Gamebasepool
BasePool4 *Gamebasepool
BasePoolStar3 int32
BasePoolStar4 int32
BasePoolStar5 int32
CampPoolStar3 int32
CampPoolStar4 int32
CampPoolStar5 int32
Gourmet int32
SmithyMaxplayer int32
SmithyMaxtime int32
ChatExpressionSmall []string
KungfuTime int32
}
const TypeId_GameComData = 1433629391
func (*GameComData) GetTypeId() int32 {
return 1433629391
}
func (_v *GameComData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max_char"].(float64); !_ok_ { err = errors.New("max_char error"); return }; _v.MaxChar = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task_reset"].(float64); !_ok_ { err = errors.New("task_reset error"); return }; _v.TaskReset = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["init_gold"].(float64); !_ok_ { err = errors.New("init_gold error"); return }; _v.InitGold = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["init_hero"].([]interface{}); !_ok_ { err = errors.New("init_hero error"); return }
_v.InitHero = 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.InitHero = append(_v.InitHero, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["cameramin"].([]interface{}); !_ok_ { err = errors.New("cameramin error"); return }
_v.Cameramin = 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.Cameramin = append(_v.Cameramin, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["max_getreward"].([]interface{}); !_ok_ { err = errors.New("max_getreward error"); return }
_v.MaxGetreward = 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.MaxGetreward = append(_v.MaxGetreward, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["cameramax"].([]interface{}); !_ok_ { err = errors.New("cameramax error"); return }
_v.Cameramax = make([]float32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ float32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = float32(_x_) }
_v.Cameramax = append(_v.Cameramax, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["heroshownum"].(float64); !_ok_ { err = errors.New("heroshownum error"); return }; _v.Heroshownum = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["equipsuitsum"].([]interface{}); !_ok_ { err = errors.New("equipsuitsum error"); return }
_v.Equipsuitsum = 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.Equipsuitsum = append(_v.Equipsuitsum, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_maxnum"].(float64); !_ok_ { err = errors.New("friend_maxnum error"); return }; _v.FriendMaxnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_minnum"].(float64); !_ok_ { err = errors.New("friend_minnum error"); return }; _v.FriendMinnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_maxgetnum"].(float64); !_ok_ { err = errors.New("friend_maxgetnum error"); return }; _v.FriendMaxgetnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_maxsendnum"].(float64); !_ok_ { err = errors.New("friend_maxsendnum error"); return }; _v.FriendMaxsendnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_date"].(float64); !_ok_ { err = errors.New("friend_date error"); return }; _v.FriendDate = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_recordtime"].(float64); !_ok_ { err = errors.New("friend_recordtime error"); return }; _v.FriendRecordtime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["friend_black"].(float64); !_ok_ { err = errors.New("friend_black error"); return }; _v.FriendBlack = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_cd_world"].(float64); !_ok_ { err = errors.New("channel_cd_world error"); return }; _v.ChannelCdWorld = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_cd_guild"].(float64); !_ok_ { err = errors.New("channel_cd_guild error"); return }; _v.ChannelCdGuild = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_cd_private"].(float64); !_ok_ { err = errors.New("channel_cd_private error"); return }; _v.ChannelCdPrivate = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_cd_public"].(float64); !_ok_ { err = errors.New("channel_cd_public error"); return }; _v.ChannelCdPublic = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_lock_icon"].(float64); !_ok_ { err = errors.New("channel_lock_icon error"); return }; _v.ChannelLockIcon = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max_word"].(float64); !_ok_ { err = errors.New("max_word error"); return }; _v.MaxWord = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max_chat"].(float64); !_ok_ { err = errors.New("max_chat error"); return }; _v.MaxChat = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["max_object"].(float64); !_ok_ { err = errors.New("max_object error"); return }; _v.MaxObject = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["load_chat"].(float64); !_ok_ { err = errors.New("load_chat error"); return }; _v.LoadChat = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_allocation_max"].(float64); !_ok_ { err = errors.New("channel_allocation_max error"); return }; _v.ChannelAllocationMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["channel_switching_max"].(float64); !_ok_ { err = errors.New("channel_switching_max error"); return }; _v.ChannelSwitchingMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["draw_toplimit"].(float64); !_ok_ { err = errors.New("draw_toplimit error"); return }; _v.DrawToplimit = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["draw10_star4_max"].(float64); !_ok_ { err = errors.New("draw10_star4_max error"); return }; _v.Draw10Star4Max = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["draw10_star5_max"].(float64); !_ok_ { err = errors.New("draw10_star5_max error"); return }; _v.Draw10Star5Max = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["draw_floor_star4"].(float64); !_ok_ { err = errors.New("draw_floor_star4 error"); return }; _v.DrawFloorStar4 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["draw_floor_star5"].(float64); !_ok_ { err = errors.New("draw_floor_star5 error"); return }; _v.DrawFloorStar5 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["duplicate_removal"].(float64); !_ok_ { err = errors.New("duplicate_removal error"); return }; _v.DuplicateRemoval = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool_cost"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool_cost error"); return }; if _v.BasePoolCost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp1_pool_cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp1_pool_cost error"); return }; if _v.Camp1PoolCost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp2_pool_cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp2_pool_cost error"); return }; if _v.Camp2PoolCost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp3_pool_cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp3_pool_cost error"); return }; if _v.Camp3PoolCost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp4_pool_cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp4_pool_cost error"); return }; if _v.Camp4PoolCost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool_10cost"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool_10cost error"); return }; if _v.BasePool10cost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp1_pool_10cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp1_pool_10cost error"); return }; if _v.Camp1Pool10cost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp2_pool_10cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp2_pool_10cost error"); return }; if _v.Camp2Pool10cost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp3_pool_10cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp3_pool_10cost error"); return }; if _v.Camp3Pool10cost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["camp4_pool_10cost"].(map[string]interface{}); !_ok_ { err = errors.New("camp4_pool_10cost error"); return }; if _v.Camp4Pool10cost, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; if _v.Camp1Pool1, _ok_ = _buf["camp1_pool1"].(string); !_ok_ { err = errors.New("camp1_pool1 error"); return } }
{ var _ok_ bool; if _v.Camp2Pool1, _ok_ = _buf["camp2_pool1"].(string); !_ok_ { err = errors.New("camp2_pool1 error"); return } }
{ var _ok_ bool; if _v.Camp3Pool1, _ok_ = _buf["camp3_pool1"].(string); !_ok_ { err = errors.New("camp3_pool1 error"); return } }
{ var _ok_ bool; if _v.Camp4Pool1, _ok_ = _buf["camp4_pool1"].(string); !_ok_ { err = errors.New("camp4_pool1 error"); return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool1"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool1 error"); return }; if _v.BasePool1, err = DeserializeGamebasepool(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool2"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool2 error"); return }; if _v.BasePool2, err = DeserializeGamebasepool(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool3"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool3 error"); return }; if _v.BasePool3, err = DeserializeGamebasepool(_x_); err != nil { return } }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["base_pool4"].(map[string]interface{}); !_ok_ { err = errors.New("base_pool4 error"); return }; if _v.BasePool4, err = DeserializeGamebasepool(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["base_pool_star3"].(float64); !_ok_ { err = errors.New("base_pool_star3 error"); return }; _v.BasePoolStar3 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["base_pool_star4"].(float64); !_ok_ { err = errors.New("base_pool_star4 error"); return }; _v.BasePoolStar4 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["base_pool_star5"].(float64); !_ok_ { err = errors.New("base_pool_star5 error"); return }; _v.BasePoolStar5 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["camp_pool_star3"].(float64); !_ok_ { err = errors.New("camp_pool_star3 error"); return }; _v.CampPoolStar3 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["camp_pool_star4"].(float64); !_ok_ { err = errors.New("camp_pool_star4 error"); return }; _v.CampPoolStar4 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["camp_pool_star5"].(float64); !_ok_ { err = errors.New("camp_pool_star5 error"); return }; _v.CampPoolStar5 = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["gourmet"].(float64); !_ok_ { err = errors.New("gourmet error"); return }; _v.Gourmet = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["smithy_maxplayer"].(float64); !_ok_ { err = errors.New("smithy_maxplayer error"); return }; _v.SmithyMaxplayer = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["smithy_maxtime"].(float64); !_ok_ { err = errors.New("smithy_maxtime error"); return }; _v.SmithyMaxtime = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["chat_expression_small"].([]interface{}); !_ok_ { err = errors.New("chat_expression_small error"); return }
_v.ChatExpressionSmall = make([]string, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ string
{ if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } }
_v.ChatExpressionSmall = append(_v.ChatExpressionSmall, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["kungfu_time"].(float64); !_ok_ { err = errors.New("kungfu_time error"); return }; _v.KungfuTime = int32(_tempNum_) }
return
}
func DeserializeGameComData(_buf map[string]interface{}) (*GameComData, error) {
v := &GameComData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameRdtaskAll struct {
_dataMap map[int32]*GameRdtaskAllData
_dataList []*GameRdtaskAllData
}
func NewGameRdtaskAll(_buf []map[string]interface{}) (*GameRdtaskAll, error) {
_dataList := make([]*GameRdtaskAllData, 0, len(_buf))
dataMap := make(map[int32]*GameRdtaskAllData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameRdtaskAllData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Id] = _v
}
}
return &GameRdtaskAll{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameRdtaskAll) GetDataMap() map[int32]*GameRdtaskAllData {
return table._dataMap
}
func (table *GameRdtaskAll) GetDataList() []*GameRdtaskAllData {
return table._dataList
}
func (table *GameRdtaskAll) Get(key int32) *GameRdtaskAllData {
return table._dataMap[key]
}

View File

@ -21,7 +21,7 @@ func NewGameRdtaskChoose(_buf []map[string]interface{}) (*GameRdtaskChoose, erro
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Chooseid] = _v
dataMap[_v.Id] = _v
}
}
return &GameRdtaskChoose{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,10 +11,10 @@ package cfg
import "errors"
type GameRdtaskChooseData struct {
Chooseid int32
Id int32
Num int32
Rdtaksnum int32
Need []int32
PreTid int32
NeedItem []int32
}
const TypeId_GameRdtaskChooseData = -1833024780
@ -24,20 +24,20 @@ func (*GameRdtaskChooseData) GetTypeId() int32 {
}
func (_v *GameRdtaskChooseData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["chooseid"].(float64); !_ok_ { err = errors.New("chooseid error"); return }; _v.Chooseid = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["num"].(float64); !_ok_ { err = errors.New("num error"); return }; _v.Num = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["rdtaksnum"].(float64); !_ok_ { err = errors.New("rdtaksnum error"); return }; _v.Rdtaksnum = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["preTid"].(float64); !_ok_ { err = errors.New("preTid error"); return }; _v.PreTid = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["need"].([]interface{}); !_ok_ { err = errors.New("need error"); return }
if _arr_, _ok_ = _buf["needItem"].([]interface{}); !_ok_ { err = errors.New("needItem error"); return }
_v.Need = make([]int32, 0, len(_arr_))
_v.NeedItem = 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.Need = append(_v.Need, _list_v_)
_v.NeedItem = append(_v.NeedItem, _list_v_)
}
}

View File

@ -1,42 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type GameRdtaskType struct {
_dataMap map[int32]*GameRdtaskTypeData
_dataList []*GameRdtaskTypeData
}
func NewGameRdtaskType(_buf []map[string]interface{}) (*GameRdtaskType, error) {
_dataList := make([]*GameRdtaskTypeData, 0, len(_buf))
dataMap := make(map[int32]*GameRdtaskTypeData)
for _, _ele_ := range _buf {
if _v, err2 := DeserializeGameRdtaskTypeData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Rdtaksnum] = _v
}
}
return &GameRdtaskType{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *GameRdtaskType) GetDataMap() map[int32]*GameRdtaskTypeData {
return table._dataMap
}
func (table *GameRdtaskType) GetDataList() []*GameRdtaskTypeData {
return table._dataList
}
func (table *GameRdtaskType) Get(key int32) *GameRdtaskTypeData {
return table._dataMap[key]
}