Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
56851feaee
@ -208,5 +208,135 @@
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "187",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120001",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "188",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120002",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "189",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120003",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "190",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120004",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "191",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120005",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "192",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120006",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "193",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120007",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "194",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120008",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "195",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120009",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "196",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120101",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "197",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120102",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "198",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120103",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"index": "199",
|
||||
"var": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "120104",
|
||||
"n": 300
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -1,577 +0,0 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"name": {
|
||||
"key": "mainline_name_10001",
|
||||
"text": "Chapter 1"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj01",
|
||||
"title": {
|
||||
"key": "mainline_title_10001",
|
||||
"text": "第1章:功夫世界"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10001",
|
||||
"text": "故事发生在很久以前的古代中国,而且要从一只喜欢滚来滚去、滚来滚去的大熊猫身上说起。话说熊猫阿宝是一家面条店的学徒,虽然笨手笨脚,也勉强算是谋到了一份职业。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10001",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
101,
|
||||
102,
|
||||
103,
|
||||
104,
|
||||
105,
|
||||
106,
|
||||
107,
|
||||
108,
|
||||
109
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10110",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10111",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10112",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10113",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": {
|
||||
"key": "mainline_name_10002",
|
||||
"text": "Chapter 2"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj02",
|
||||
"title": {
|
||||
"key": "mainline_title_10002",
|
||||
"text": "第2章:练功房"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10002",
|
||||
"text": "别看阿宝所在的“和平谷”一派欣欣向荣的安详景象,其实是一个卧虎藏龙的风水宝地,先不说五大功夫高手皆坐镇于此,更有一大师级别的宗师在这里隐居。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10002",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
201,
|
||||
202,
|
||||
203,
|
||||
204,
|
||||
205,
|
||||
206,
|
||||
207,
|
||||
208,
|
||||
209
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "hero",
|
||||
"t": "25004",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "hero",
|
||||
"t": "43901",
|
||||
"n": 20
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": {
|
||||
"key": "mainline_name_10003",
|
||||
"text": "Chapter 3"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj03",
|
||||
"title": {
|
||||
"key": "mainline_title_10003",
|
||||
"text": "第3章:太狼来袭"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10003",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10003",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
301,
|
||||
302,
|
||||
303,
|
||||
304,
|
||||
305,
|
||||
306,
|
||||
307,
|
||||
308,
|
||||
309
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10110",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10111",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10112",
|
||||
"n": 1
|
||||
},
|
||||
{
|
||||
"a": "equi",
|
||||
"t": "10113",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": {
|
||||
"key": "mainline_name_10004",
|
||||
"text": "Chapter 4"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj04",
|
||||
"title": {
|
||||
"key": "mainline_title_10004",
|
||||
"text": "第4章:乌龟大师"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10004",
|
||||
"text": "自负的毒蛇大师虽然给人的感觉稍显轻浮,但对这件事的态度就有如她善变的性格,不太明朗;螳螂大师算是几位高手中最聪明的一个,对阿宝的现状很是无奈,总是暗中帮忙。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10004",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
401,
|
||||
402,
|
||||
403,
|
||||
404,
|
||||
405,
|
||||
406,
|
||||
407,
|
||||
408,
|
||||
409
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": {
|
||||
"key": "mainline_name_10005",
|
||||
"text": "Chapter 5"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj01",
|
||||
"title": {
|
||||
"key": "mainline_title_10005",
|
||||
"text": "第5章:激烈战斗"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10005",
|
||||
"text": "最后要将阿宝调教成“功夫高手”的一代宗师“师父”华丽丽地出场了,然而有着一身好功夫并不意味着就是完美的,“师父”因为过去犯下的一个错误,一直纠结着没办法释然。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10005",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
501,
|
||||
502,
|
||||
503,
|
||||
504,
|
||||
505,
|
||||
506,
|
||||
507,
|
||||
508,
|
||||
509
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": {
|
||||
"key": "mainline_name_10006",
|
||||
"text": "Chapter 6"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj02",
|
||||
"title": {
|
||||
"key": "mainline_title_10006",
|
||||
"text": "第6章:下山"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10006",
|
||||
"text": "至于那个让人人都如临大敌的太郎,则是一只非常自恋的雪豹,他等待复仇的这一天,已经整整等了20年了,可是他做梦也没想到,自己等来的竟然是一只大熊猫。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10006",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
601,
|
||||
602,
|
||||
603,
|
||||
604,
|
||||
605,
|
||||
606,
|
||||
607,
|
||||
608,
|
||||
609
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": {
|
||||
"key": "mainline_name_10007",
|
||||
"text": "Chapter 7"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj03",
|
||||
"title": {
|
||||
"key": "mainline_title_10007",
|
||||
"text": "第7章:事件余波"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10007",
|
||||
"text": "激烈的战斗后,阿宝以自己对武功的悟性和师父传授的武术,战胜了太郎,拯救了山谷,为山谷带来了和平。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10007",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
701,
|
||||
702,
|
||||
703,
|
||||
704,
|
||||
705,
|
||||
706,
|
||||
707,
|
||||
708,
|
||||
709
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": {
|
||||
"key": "mainline_name_10008",
|
||||
"text": "Chapter 8"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj04",
|
||||
"title": {
|
||||
"key": "mainline_title_10008",
|
||||
"text": "第8章:乌龟大师"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10008",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10008",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
801,
|
||||
802,
|
||||
803,
|
||||
804,
|
||||
805,
|
||||
806,
|
||||
807,
|
||||
808,
|
||||
809
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": {
|
||||
"key": "mainline_name_10009",
|
||||
"text": "Chapter 9"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj01",
|
||||
"title": {
|
||||
"key": "mainline_title_10009",
|
||||
"text": "第9章:太狼来袭"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10009",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10009",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
901,
|
||||
902,
|
||||
903,
|
||||
904,
|
||||
905,
|
||||
906,
|
||||
907,
|
||||
908,
|
||||
909
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": {
|
||||
"key": "mainline_name_10010",
|
||||
"text": "Chapter 10"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj02",
|
||||
"title": {
|
||||
"key": "mainline_title_10010",
|
||||
"text": "第10章:乌龟大师"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10010",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10010",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
1001,
|
||||
1002,
|
||||
1003,
|
||||
1004,
|
||||
1005,
|
||||
1006,
|
||||
1007,
|
||||
1008,
|
||||
1009
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": {
|
||||
"key": "mainline_name_10011",
|
||||
"text": "Chapter 11"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj01",
|
||||
"title": {
|
||||
"key": "mainline_title_10011",
|
||||
"text": "第11章:太狼来袭"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10011",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10009",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
1101,
|
||||
1102,
|
||||
1103,
|
||||
1104,
|
||||
1105,
|
||||
1106,
|
||||
1107,
|
||||
1108,
|
||||
1109
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": {
|
||||
"key": "mainline_name_10012",
|
||||
"text": "Chapter 12"
|
||||
},
|
||||
"intensity": 1,
|
||||
"map": "zx_ddt_zj02",
|
||||
"title": {
|
||||
"key": "mainline_title_10012",
|
||||
"text": "第12章:乌龟大师"
|
||||
},
|
||||
"desc": {
|
||||
"key": "mainline_desc_10012",
|
||||
"text": "可是在一场特殊的比武大会上胜出的人要代表“和平谷”将邪恶的大龙永久地驱除出去,啥都不会的阿宝却在经历了一系列阴差阳错之后屏雀中选,让所有人都大跌眼镜。"
|
||||
},
|
||||
"icon": "wp_icon_0002",
|
||||
"text": {
|
||||
"key": "mainline_text_10010",
|
||||
"text": "金币40000"
|
||||
},
|
||||
"Episode": [
|
||||
1201,
|
||||
1202,
|
||||
1203,
|
||||
1204,
|
||||
1205,
|
||||
1206,
|
||||
1207,
|
||||
1208,
|
||||
1209
|
||||
],
|
||||
"award": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "30001",
|
||||
"n": 10
|
||||
},
|
||||
{
|
||||
"a": "attr",
|
||||
"t": "gold",
|
||||
"n": 40000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
@ -74,7 +74,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -96,7 +96,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -118,7 +118,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -162,7 +162,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -250,7 +250,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -294,7 +294,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -316,7 +316,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -338,7 +338,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -360,7 +360,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -382,7 +382,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -404,7 +404,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -426,7 +426,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -448,7 +448,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -470,7 +470,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -492,7 +492,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -514,7 +514,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -536,7 +536,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -558,7 +558,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -646,7 +646,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -822,7 +822,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -844,7 +844,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 100
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -888,7 +888,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -910,7 +910,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -954,7 +954,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -998,7 +998,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1020,7 +1020,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1218,7 +1218,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1240,7 +1240,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1262,7 +1262,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1284,7 +1284,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1306,7 +1306,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
@ -1328,7 +1328,7 @@
|
||||
"main": [
|
||||
{
|
||||
"key": 1,
|
||||
"param": 30
|
||||
"param": 1
|
||||
}
|
||||
],
|
||||
"optional": "",
|
||||
|
@ -3,7 +3,7 @@ package robot
|
||||
import (
|
||||
"fmt"
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/modules/mainline"
|
||||
"go_dreamfactory/modules/mline"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
@ -13,8 +13,8 @@ var (
|
||||
storyBuilders = []*TestCase{
|
||||
{
|
||||
desc: "主线数据",
|
||||
mainType: string(comm.ModuleMainline),
|
||||
subType: mainline.MainlineGetListResp,
|
||||
mainType: string(comm.ModuleMline),
|
||||
subType: mline.MlineGetListResp,
|
||||
req: &pb.MainlineGetListReq{},
|
||||
rsp: &pb.MainlineGetListResp{},
|
||||
print: func(rsp proto.Message) {
|
||||
@ -26,8 +26,8 @@ var (
|
||||
//enabled: true,
|
||||
}, {
|
||||
desc: "主线详情",
|
||||
mainType: string(comm.ModuleMainline),
|
||||
subType: mainline.MainlineChallengeResp,
|
||||
mainType: string(comm.ModuleMline),
|
||||
subType: mline.MlineChallengeResp,
|
||||
req: &pb.MainlineChallengeReq{
|
||||
|
||||
MainlineId: 1,
|
||||
|
@ -123,6 +123,11 @@ func (c *ConnServiceImpl) ListenerPush() {
|
||||
|
||||
// SendMsg ....
|
||||
func (c *ConnServiceImpl) SendMsg(msg *pb.UserMessage, rsp proto.Message) (err error) {
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
logrus.Errorf("sendMsg %v", err)
|
||||
}
|
||||
}()
|
||||
// msg.Sec = r.BuildSecStr()
|
||||
if comm.ProtoMarshal(rsp, msg) {
|
||||
if data, err := proto.Marshal(msg); err != nil {
|
||||
|
@ -14,7 +14,7 @@ import (
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/library"
|
||||
"go_dreamfactory/modules/linestory"
|
||||
"go_dreamfactory/modules/mainline"
|
||||
"go_dreamfactory/modules/mline"
|
||||
"go_dreamfactory/modules/sociaty"
|
||||
"go_dreamfactory/modules/sys"
|
||||
"go_dreamfactory/modules/task"
|
||||
@ -95,9 +95,9 @@ var (
|
||||
ff(comm.ModuleShop, "getlist"): &formview.ShopListView{},
|
||||
ff(comm.ModuleShop, "buy"): &formview.ShopBuyView{},
|
||||
// mailine
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetListResp): &formview.MainlineListView{},
|
||||
ff(comm.ModuleMainline, mainline.MainlineChallengeResp): &formview.MainlineChallengeView{},
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp): &formview.MainlineRewardView{},
|
||||
ff(comm.ModuleMline, mline.MlineGetListResp): &formview.MainlineListView{},
|
||||
ff(comm.ModuleMline, mline.MlineChallengeResp): &formview.MainlineChallengeView{},
|
||||
ff(comm.ModuleMline, mline.MlineGetRewardResp): &formview.MainlineRewardView{},
|
||||
// pagoda
|
||||
ff(comm.ModulePagoda, "getlist"): &formview.PagodaListView{},
|
||||
// rtask
|
||||
@ -141,7 +141,7 @@ var (
|
||||
string(comm.ModuleItems),
|
||||
string(comm.ModuleEquipment),
|
||||
string(comm.ModuleShop),
|
||||
string(comm.ModuleMainline),
|
||||
string(comm.ModuleMline),
|
||||
string(comm.ModulePagoda),
|
||||
string(comm.ModuleRtask),
|
||||
string(comm.ModuleLinestory),
|
||||
@ -217,9 +217,9 @@ var (
|
||||
ff(comm.ModuleShop, "buy"),
|
||||
},
|
||||
"mainline": {
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetListResp),
|
||||
ff(comm.ModuleMainline, mainline.MainlineChallengeResp),
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp),
|
||||
ff(comm.ModuleMline, mline.MlineGetListResp),
|
||||
ff(comm.ModuleMline, mline.MlineChallengeResp),
|
||||
ff(comm.ModuleMline, mline.MlineGetRewardResp),
|
||||
},
|
||||
"pagoda": {
|
||||
ff(comm.ModulePagoda, "getlist"),
|
||||
@ -714,30 +714,30 @@ var (
|
||||
Enabled: true,
|
||||
},
|
||||
// mainline
|
||||
string(comm.ModuleMainline): {
|
||||
string(comm.ModuleMline): {
|
||||
NavLabel: "主线关卡",
|
||||
MainType: string(comm.ModuleShop),
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetListResp): {
|
||||
ff(comm.ModuleMline, mline.MlineGetListResp): {
|
||||
NavLabel: "主线关卡",
|
||||
Desc: "主线关卡",
|
||||
MainType: string(comm.ModuleMainline),
|
||||
SubType: mainline.MainlineGetListResp,
|
||||
MainType: string(comm.ModuleMline),
|
||||
SubType: mline.MlineGetListResp,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleMainline, mainline.MainlineChallengeResp): {
|
||||
ff(comm.ModuleMline, mline.MlineChallengeResp): {
|
||||
NavLabel: "关卡挑战",
|
||||
Desc: "关卡挑战",
|
||||
MainType: string(comm.ModuleMainline),
|
||||
SubType: mainline.MainlineChallengeResp,
|
||||
MainType: string(comm.ModuleMline),
|
||||
SubType: mline.MlineChallengeResp,
|
||||
Enabled: true,
|
||||
},
|
||||
ff(comm.ModuleMainline, mainline.MainlineGetRewardResp): {
|
||||
ff(comm.ModuleMline, mline.MlineGetRewardResp): {
|
||||
NavLabel: "关卡奖励",
|
||||
Desc: "获取关卡奖励",
|
||||
MainType: string(comm.ModuleMainline),
|
||||
SubType: mainline.MainlineGetRewardResp,
|
||||
MainType: string(comm.ModuleMline),
|
||||
SubType: mline.MlineGetRewardResp,
|
||||
Enabled: true,
|
||||
},
|
||||
//pagoda
|
||||
|
@ -137,8 +137,10 @@ func (d *DispatchView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
weekReceiveBtn := widget.NewButton("周奖励", func() {
|
||||
if err := service.GetPttService().SendToClient(
|
||||
t.MainType,
|
||||
"weekreceive",
|
||||
&pb.DispatchWeekReciveReq{},
|
||||
"weekrecive",
|
||||
&pb.DispatchWeekReciveReq{
|
||||
Idx: 1,
|
||||
},
|
||||
); err != nil {
|
||||
logrus.Error(err)
|
||||
return
|
||||
@ -172,6 +174,10 @@ func (a *DispatchView) noticeList() {
|
||||
return
|
||||
}
|
||||
|
||||
if rsp.Dispatch == nil {
|
||||
return
|
||||
}
|
||||
|
||||
a.noticeLabl.SetText(fmt.Sprintf("公告等级:%v 免费次数:%v 刷新次数:%v 任务数:%v 周任务数:%v 周奖励领取:%v",
|
||||
rsp.Dispatch.Lv,
|
||||
rsp.Dispatch.FreeCount,
|
||||
|
@ -149,7 +149,7 @@ func (this *HeroZhaomuView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
||||
|
||||
for i := 0; i < cast.ToInt(loopCount.Text); i++ {
|
||||
choukaBtnFunc()
|
||||
time.Sleep(time.Millisecond * 100)
|
||||
time.Sleep(time.Millisecond * 20)
|
||||
}
|
||||
}
|
||||
|
||||
@ -201,10 +201,11 @@ func (this *HeroZhaomuView) resListener() {
|
||||
return
|
||||
}
|
||||
|
||||
write := bufio.NewWriter(this.f)
|
||||
write := bufio.NewWriterSize(this.f, 1024)
|
||||
for _, v := range rsp.Data {
|
||||
for _, o := range v.Atno {
|
||||
if o.A == "hero" && o.O != "" && o.T != "" {
|
||||
if o.A == "hero" && o.T != "" {
|
||||
logrus.Debug(o.T)
|
||||
write.WriteString(o.T + "\r\n")
|
||||
}
|
||||
}
|
||||
|
@ -34,21 +34,21 @@ const (
|
||||
|
||||
// 模块名定义处
|
||||
const (
|
||||
ModuleSys core.M_Modules = "sys" //系统
|
||||
ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块
|
||||
ModuleWeb core.M_Modules = "web" //后台模块
|
||||
ModuleUser core.M_Modules = "user" //用户模块
|
||||
ModulePack core.M_Modules = "pack" //背包模块
|
||||
ModuleMail core.M_Modules = "mail" //邮件模块
|
||||
ModuleFriend core.M_Modules = "friend" //好友模块
|
||||
ModuleMgoLog core.M_Modules = "mgolog" //日志模块
|
||||
ModuleEquipment core.M_Modules = "equipment" //装备模块
|
||||
ModuleHero core.M_Modules = "hero" //英雄模块
|
||||
ModuleForum core.M_Modules = "forum" //论坛模块
|
||||
ModuleItems core.M_Modules = "items" //道具模块
|
||||
ModuleShop core.M_Modules = "shop" //商店模块
|
||||
ModuleTask core.M_Modules = "task" //任务模块
|
||||
ModuleMainline core.M_Modules = "mainline" //主线模块
|
||||
ModuleSys core.M_Modules = "sys" //系统
|
||||
ModuleGate core.M_Modules = "gateway" //gate模块 网关服务模块
|
||||
ModuleWeb core.M_Modules = "web" //后台模块
|
||||
ModuleUser core.M_Modules = "user" //用户模块
|
||||
ModulePack core.M_Modules = "pack" //背包模块
|
||||
ModuleMail core.M_Modules = "mail" //邮件模块
|
||||
ModuleFriend core.M_Modules = "friend" //好友模块
|
||||
ModuleMgoLog core.M_Modules = "mgolog" //日志模块
|
||||
ModuleEquipment core.M_Modules = "equipment" //装备模块
|
||||
ModuleHero core.M_Modules = "hero" //英雄模块
|
||||
ModuleForum core.M_Modules = "forum" //论坛模块
|
||||
ModuleItems core.M_Modules = "items" //道具模块
|
||||
ModuleShop core.M_Modules = "shop" //商店模块
|
||||
ModuleTask core.M_Modules = "task" //任务模块
|
||||
|
||||
ModuleNotify core.M_Modules = "notify" //公告模块
|
||||
ModuleChat core.M_Modules = "chat" //聊天模块
|
||||
ModuleGM core.M_Modules = "gm" //gm模块
|
||||
@ -108,8 +108,7 @@ const (
|
||||
TableShopitems = "shopitems"
|
||||
///公告信息表
|
||||
TableNotify = "notify"
|
||||
///主线数据表
|
||||
TableMainline = "mainline"
|
||||
|
||||
///邮件表
|
||||
TableMail = "mail"
|
||||
///道具背包表
|
||||
|
@ -169,13 +169,7 @@ type (
|
||||
*/
|
||||
GetForgeEquip(session IUserSession, suiteId int32, pos int32, lv int32, dyweight []int32) (eruip *pb.DB_Equipment, code pb.ErrorCode)
|
||||
}
|
||||
IMainline interface {
|
||||
ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode)
|
||||
/// 查询章节ID
|
||||
GetUsermainLineData(uid string) (mainlineId int32)
|
||||
///红点
|
||||
IReddot
|
||||
}
|
||||
|
||||
IMline interface {
|
||||
ModifyMlineDataByNanduID(session IUserSession, id int32) (code pb.ErrorCode)
|
||||
/// 查询章节ID
|
||||
|
@ -13,15 +13,26 @@ func (a *apiComp) AutoreceiveCheck(session comm.IUserSession, req *pb.DispatchAu
|
||||
}
|
||||
|
||||
func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoReceiveReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
rsp := &pb.DispatchAutoReceiveResp{}
|
||||
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
if d == nil {
|
||||
code = pb.ErrorCode_DataNotFound
|
||||
return
|
||||
}
|
||||
var flag bool
|
||||
for _, v := range d.Nb.Tasks {
|
||||
if v.Status == 2 {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
tasks := a.module.modelDispatch.replaceFinishedTask(session.GetUserId(), d)
|
||||
if !flag {
|
||||
code = pb.ErrorCode_DispatchNoFinished
|
||||
return
|
||||
}
|
||||
|
||||
tasks, oldTasks := a.module.modelDispatch.replaceFinishedTask(session.GetUserId(), d)
|
||||
|
||||
//更新公告任务
|
||||
if err := a.module.modelDispatch.updateTasks(session.GetUserId(), d.Nb, tasks); err != nil {
|
||||
@ -29,6 +40,27 @@ func (a *apiComp) Autoreceive(session comm.IUserSession, req *pb.DispatchAutoRec
|
||||
return
|
||||
}
|
||||
|
||||
var rss []*pb.DispatchTaskRsp
|
||||
|
||||
//奖励
|
||||
for _, t := range oldTasks {
|
||||
gd, err := a.module.configure.getDispatchTaskConf(t.TaskId)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
a.module.DispenseRes(session, gd.Reward, true)
|
||||
|
||||
rs := &pb.DispatchTaskRsp{
|
||||
TaskId: t.TaskId,
|
||||
}
|
||||
if t.Exaward {
|
||||
rs.Exaward = t.Exaward
|
||||
a.module.DispenseRes(session, gd.Rewardex, true)
|
||||
}
|
||||
rss = append(rss, rs)
|
||||
}
|
||||
|
||||
rsp.Task = rss
|
||||
session.SendMsg(string(a.module.GetType()), "autoreceive", rsp)
|
||||
return
|
||||
}
|
||||
|
@ -3,6 +3,8 @@ package dispatch
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -15,16 +17,55 @@ func (a *apiComp) NoticeCheck(session comm.IUserSession, req *pb.DispatchNoticeR
|
||||
|
||||
func (a *apiComp) Notice(session comm.IUserSession, req *pb.DispatchNoticeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
|
||||
if d == nil {
|
||||
code = pb.ErrorCode_DataNotFound
|
||||
return
|
||||
}
|
||||
uid := session.GetUserId()
|
||||
rsp := &pb.DispatchNoticeResp{}
|
||||
|
||||
if len(d.Nb.Tasks) == 0 {
|
||||
rsp.Dispatch = a.module.modelDispatch.initDispatch(session.GetUserId(), d)
|
||||
tasks, err := a.module.modelDispatch.taskRandom(uid, d)
|
||||
if err != nil {
|
||||
|
||||
return
|
||||
}
|
||||
if len(tasks) == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
freeCount := a.module.configure.GetGlobalConf().DispatchFreecheck
|
||||
ticketCount := a.module.configure.GetGlobalConf().DispatchNumoftimes
|
||||
|
||||
nb := &pb.Noticeboard{
|
||||
Lv: 1, //公告初始升级
|
||||
FreeCount: freeCount,
|
||||
Tasks: tasks,
|
||||
CreateTime: configure.Now().Unix(),
|
||||
}
|
||||
|
||||
update := map[string]interface{}{
|
||||
"nb": nb,
|
||||
"ticket": ticketCount,
|
||||
}
|
||||
if err := a.module.modelDispatch.Change(uid, update); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
d.Nb = nb
|
||||
} else {
|
||||
a.module.modelDispatch.updateNotice(session.GetUserId(),d)
|
||||
rsp.Dispatch = d.Nb
|
||||
//周任务重置
|
||||
n := utils.DiffDays(d.Nb.CreateTime, configure.Now().Unix())
|
||||
day := a.module.configure.GetGlobalConf().DispatchWeektaskcheck
|
||||
if int32(n) >= day {
|
||||
d.Nb.WeekCount = 0
|
||||
d.Nb.WeekReceived = []int32{}
|
||||
}
|
||||
|
||||
a.module.modelDispatch.updateNotice(session.GetUserId(), d)
|
||||
}
|
||||
|
||||
rsp.Dispatch = d.Nb
|
||||
session.SendMsg(string(a.module.GetType()), "notice", rsp)
|
||||
return
|
||||
}
|
||||
|
@ -23,11 +23,26 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
|
||||
}
|
||||
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
if d == nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
code = pb.ErrorCode_DataNotFound
|
||||
return
|
||||
}
|
||||
|
||||
tasks := a.module.modelDispatch.replaceTask(session.GetUserId(), req.TaskId, d)
|
||||
var flag bool
|
||||
for _, v := range d.Nb.Tasks {
|
||||
if v.TaskId == req.TaskId {
|
||||
if v.Status == 2 {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !flag {
|
||||
code = pb.ErrorCode_DispatchNoFinished
|
||||
return
|
||||
}
|
||||
|
||||
tasks, oldTask := a.module.modelDispatch.replaceTask(session.GetUserId(), req.TaskId, d)
|
||||
|
||||
//更新公告任务
|
||||
if err := a.module.modelDispatch.updateTasks(session.GetUserId(), d.Nb, tasks); err != nil {
|
||||
@ -36,23 +51,24 @@ func (a *apiComp) Receive(session comm.IUserSession, req *pb.DispatchReceiveReq)
|
||||
}
|
||||
|
||||
//奖励
|
||||
for _, t := range d.Nb.Tasks {
|
||||
if t.TaskId == req.TaskId {
|
||||
gd, err := a.module.configure.getDispatchTaskConf(t.TaskId)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
a.module.DispenseRes(session, gd.Reward, true)
|
||||
|
||||
if t.Exaward {
|
||||
a.module.DispenseRes(session, gd.Rewardex, true)
|
||||
}
|
||||
break
|
||||
if oldTask != nil && oldTask.TaskId == req.TaskId {
|
||||
gd, err := a.module.configure.getDispatchTaskConf(oldTask.TaskId)
|
||||
if err != nil {
|
||||
|
||||
}
|
||||
a.module.DispenseRes(session, gd.Reward, true)
|
||||
|
||||
if oldTask.Exaward {
|
||||
a.module.DispenseRes(session, gd.Rewardex, true)
|
||||
}
|
||||
}
|
||||
|
||||
rsp := &pb.DispatchReceiveResp{
|
||||
TaskId: req.TaskId,
|
||||
Rsp: &pb.DispatchTaskRsp{
|
||||
TaskId: req.TaskId,
|
||||
Exaward: oldTask.Exaward,
|
||||
},
|
||||
}
|
||||
|
||||
session.SendMsg(string(a.module.GetType()), "receive", rsp)
|
||||
|
@ -23,8 +23,8 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
return
|
||||
}
|
||||
|
||||
if d.GetNb() != nil {
|
||||
if d.GetNb().FreeCount > 0 {
|
||||
if d.Nb != nil {
|
||||
if d.Nb.FreeCount > 0 {
|
||||
//更新刷新次数
|
||||
if err := a.module.modelDispatch.updateFreeCount(session.GetUserId(), d.Nb); err != nil {
|
||||
var customer = new(comm.CustomError)
|
||||
@ -36,12 +36,18 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
refreshCount := a.module.configure.GetGlobalConf().DispatchRefreshtimes
|
||||
if d.Nb.RefreshCount >= refreshCount {
|
||||
code = pb.ErrorCode_DispatchRefreshMax
|
||||
return
|
||||
}
|
||||
//消耗金币
|
||||
money := a.module.configure.GetGlobalConf().DispatchCheckmoney
|
||||
if code = a.module.CheckRes(session, []*cfg.Gameatn{money}); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
if code = a.module.DispenseRes(session, []*cfg.Gameatn{money}, true); code != pb.ErrorCode_Success {
|
||||
|
||||
if code = a.module.ConsumeRes(session, []*cfg.Gameatn{money}, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
if err := a.module.modelDispatch.updateRefreshCount(session.GetUserId(), d.Nb); err != nil {
|
||||
@ -57,15 +63,16 @@ func (a *apiComp) Refresh(session comm.IUserSession, req *pb.DispatchRefreshReq)
|
||||
return
|
||||
}
|
||||
|
||||
a.module.Debug("刷新", log.Field{Key: "taskIds", Value: taskIds})
|
||||
//更新公告任务
|
||||
if err := a.module.modelDispatch.updateTasks(session.GetUserId(), d.Nb, taskIds); err != nil {
|
||||
a.module.Debug("更新公告失败", log.Field{Key: ""})
|
||||
a.module.Debug("更新公告失败", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||
return
|
||||
}
|
||||
|
||||
rsp := &pb.DispatchRefreshResp{
|
||||
FreeCount: d.Nb.FreeCount,
|
||||
RefreshCount: d.Nb.FreeCount,
|
||||
RefreshCount: d.Nb.RefreshCount,
|
||||
}
|
||||
|
||||
session.SendMsg(string(a.module.GetType()), "refresh", rsp)
|
||||
|
@ -7,14 +7,42 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
func (a *apiComp) WeekreceiveCheck(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode) {
|
||||
func (a *apiComp) WeekreciveCheck(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode) {
|
||||
if req.Idx == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (a *apiComp) Weekreceive(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
func (a *apiComp) Weekrecive(session comm.IUserSession, req *pb.DispatchWeekReciveReq) (code pb.ErrorCode, data proto.Message) {
|
||||
if code = a.WeekreciveCheck(session, req); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
rsp := &pb.DispatchWeekReciveResp{}
|
||||
|
||||
session.SendMsg(string(a.module.GetType()), "weekreceive", rsp)
|
||||
d := a.module.modelDispatch.getDBDispatch(session.GetUserId())
|
||||
if d == nil {
|
||||
code = pb.ErrorCode_DataNotFound
|
||||
return
|
||||
}
|
||||
|
||||
//派发奖励
|
||||
wr := a.module.configure.GetGlobalConf().DispatchWeektaskreward
|
||||
for i, v := range wr {
|
||||
if req.Idx == int32(i+1) {
|
||||
if d.Nb.WeekCount >= v.N {
|
||||
//更新周任务状态
|
||||
if err := a.module.modelDispatch.updateWeekstatus(session.GetUserId(), req.Idx, d.Nb); err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
a.module.DispenseRes(session, v.G, true)
|
||||
rsp.Idx = req.Idx
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
session.SendMsg(string(a.module.GetType()), "weekrecive", rsp)
|
||||
return
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package dispatch
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/sys/configure"
|
||||
@ -31,6 +32,7 @@ func (this *modelDispatch) Init(service core.IService, module core.IModule, comp
|
||||
}
|
||||
|
||||
// 初始玩家公告
|
||||
// Deprecated
|
||||
func (this *modelDispatch) initDispatch(uid string, dispatch *pb.DBDispatch) *pb.Noticeboard {
|
||||
tasks, err := this.taskRandom(uid, dispatch)
|
||||
if err != nil {
|
||||
@ -46,9 +48,10 @@ func (this *modelDispatch) initDispatch(uid string, dispatch *pb.DBDispatch) *pb
|
||||
Uid: uid,
|
||||
Ticket: ticketCount,
|
||||
Nb: &pb.Noticeboard{
|
||||
Lv: 1, //公告初始升级
|
||||
FreeCount: freeCount,
|
||||
Tasks: tasks,
|
||||
Lv: 1, //公告初始升级
|
||||
FreeCount: freeCount,
|
||||
Tasks: tasks,
|
||||
CreateTime: configure.Now().Unix(),
|
||||
},
|
||||
}
|
||||
|
||||
@ -89,11 +92,12 @@ func (this *modelDispatch) getTasksWeight(uid string, noticeLv int32) []int32 {
|
||||
}
|
||||
|
||||
conf, err := this.module.configure.getDispatchLvConf(noticeLv)
|
||||
if err != nil {
|
||||
if err != nil || conf == nil {
|
||||
this.module.Error("配置不存在", log.Field{Key: "error", Value: err})
|
||||
return []int32{}
|
||||
}
|
||||
|
||||
var items []*comm.WeightItem
|
||||
items := make([]*comm.WeightItem, 0)
|
||||
for i, v := range conf.Probability {
|
||||
items = append(items, &comm.WeightItem{Id: (i + 1), Weight: int(v)})
|
||||
}
|
||||
@ -118,20 +122,12 @@ func (this *modelDispatch) getTasksWeight(uid string, noticeLv int32) []int32 {
|
||||
|
||||
// 随机任务
|
||||
func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask, err error) {
|
||||
// dispatch := this.getDBDispatch(uid)
|
||||
// if dispatch == nil {
|
||||
// return nil, errors.New("no data")
|
||||
// }
|
||||
|
||||
// if dispatch.Nb == nil {
|
||||
// return nil, errors.New("notice is nil")
|
||||
// }
|
||||
if dispatch.Nb.Lv == 0 {
|
||||
dispatch.Nb.Lv = 1
|
||||
}
|
||||
|
||||
conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv)
|
||||
if err != nil {
|
||||
if err != nil || conf == nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -176,33 +172,24 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task
|
||||
}
|
||||
} else {
|
||||
tasks = dispatch.Nb.Tasks
|
||||
for i, v := range tasks {
|
||||
var randCount int
|
||||
for i := 0; i < len(tasks); i++ {
|
||||
//只随机未接取的任务
|
||||
if v.Status == 0 {
|
||||
if tasks[i].Status == 0 {
|
||||
//删除
|
||||
tasks = append(tasks[:i], tasks[i+1:]...)
|
||||
|
||||
//追加一条随机任务
|
||||
ids := utils.RandomNumbers(1, len(tIds), 1)
|
||||
if len(ids) <= 0 {
|
||||
continue
|
||||
}
|
||||
taskId := ids[0]
|
||||
taskConf, err := this.module.configure.getDispatchTaskConf(v.TaskId)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
//公告持续截至时间
|
||||
duration := configure.Now().Unix() + int64(taskConf.Taskcd)
|
||||
tasks = append(tasks, &pb.DispatchTask{
|
||||
TaskId: int32(taskId),
|
||||
Duration: duration,
|
||||
})
|
||||
i--
|
||||
randCount++
|
||||
} else {
|
||||
tasks = append(tasks, v)
|
||||
tasks = append(tasks, tasks[i])
|
||||
}
|
||||
}
|
||||
//追加随机
|
||||
for i := 0; i < randCount; i++ {
|
||||
task := this.addRandomTask(uid, dispatch)
|
||||
if task != nil {
|
||||
tasks = append(tasks, task)
|
||||
}
|
||||
i--
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,6 +198,9 @@ func (this *modelDispatch) taskRandom(uid string, dispatch *pb.DBDispatch) (task
|
||||
|
||||
func (this *modelDispatch) addRandomTask(uid string, dispatch *pb.DBDispatch) *pb.DispatchTask {
|
||||
randomTaskIds := this.getTasksWeight(uid, dispatch.Nb.Lv)
|
||||
if len(randomTaskIds) == 0 {
|
||||
return nil
|
||||
}
|
||||
//追加一条随机任务
|
||||
ids := utils.RandomNumbers(1, len(randomTaskIds), 1)
|
||||
if len(ids) <= 0 {
|
||||
@ -224,74 +214,61 @@ func (this *modelDispatch) addRandomTask(uid string, dispatch *pb.DBDispatch) *p
|
||||
|
||||
//公告持续截至时间
|
||||
duration := configure.Now().Unix() + int64(taskConf.Taskcd)
|
||||
// 任务截至时间
|
||||
leftTime := configure.Now().Unix() + int64(taskConf.Tasktime)
|
||||
|
||||
return &pb.DispatchTask{
|
||||
TaskId: int32(taskId),
|
||||
Duration: duration,
|
||||
LeftTime: leftTime,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 替换指定的已完成任务
|
||||
func (this *modelDispatch) replaceTask(uid string, taskId int32, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask) {
|
||||
func (this *modelDispatch) replaceTask(uid string, taskId int32, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask, oldTask *pb.DispatchTask) {
|
||||
tasks = dispatch.Nb.Tasks
|
||||
for i, v := range tasks {
|
||||
var randCount int
|
||||
for i := 0; i < len(tasks); i++ {
|
||||
//替换状态是完成的任务
|
||||
if v.Status == 2 {
|
||||
if taskId != v.TaskId {
|
||||
if tasks[i].Status == 2 {
|
||||
if taskId != tasks[i].TaskId {
|
||||
continue
|
||||
}
|
||||
oldTask = tasks[i]
|
||||
//删除
|
||||
tasks = append(tasks[:i], tasks[i+1:]...)
|
||||
i--
|
||||
|
||||
tasks = append(tasks, this.addRandomTask(uid, dispatch))
|
||||
} else {
|
||||
tasks = append(tasks, v)
|
||||
randCount++
|
||||
break
|
||||
}
|
||||
}
|
||||
if randCount > 0 {
|
||||
task := this.addRandomTask(uid, dispatch)
|
||||
if task != nil {
|
||||
tasks = append(tasks, task)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// 替换所有完成的任务
|
||||
func (this *modelDispatch) replaceFinishedTask(uid string, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask) {
|
||||
|
||||
randomTaskIds := this.getTasksWeight(uid, dispatch.Nb.Lv)
|
||||
|
||||
for i, v := range dispatch.Nb.Tasks {
|
||||
func (this *modelDispatch) replaceFinishedTask(uid string, dispatch *pb.DBDispatch) (tasks []*pb.DispatchTask, oldtasks []*pb.DispatchTask) {
|
||||
var randCount int
|
||||
tmp := dispatch.Nb.Tasks
|
||||
for i := 0; i < len(tmp); i++ {
|
||||
//替换状态是完成的任务
|
||||
if v.Status == 2 {
|
||||
if tmp[i].Status == 2 {
|
||||
//删除
|
||||
oldtasks = append(oldtasks, tmp[i])
|
||||
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks[:i], dispatch.Nb.Tasks[i+1:]...)
|
||||
i--
|
||||
|
||||
//追加一条随机任务
|
||||
ids := utils.RandomNumbers(1, len(randomTaskIds), 1)
|
||||
if len(ids) <= 0 {
|
||||
continue
|
||||
}
|
||||
taskId := ids[0]
|
||||
taskConf, err := this.module.configure.getDispatchTaskConf(v.TaskId)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
//公告持续截至时间
|
||||
duration := configure.Now().Unix() + int64(taskConf.Taskcd)
|
||||
// 任务截至时间
|
||||
leftTime := configure.Now().Unix() + int64(taskConf.Tasktime)
|
||||
|
||||
tasks = append(tasks, &pb.DispatchTask{
|
||||
TaskId: int32(taskId),
|
||||
Duration: duration,
|
||||
LeftTime: leftTime,
|
||||
})
|
||||
randCount++
|
||||
} else {
|
||||
tasks = append(tasks, v)
|
||||
tasks = append(tasks, tmp[i])
|
||||
}
|
||||
}
|
||||
|
||||
for i := 0; i < randCount; i++ {
|
||||
task := this.addRandomTask(uid, dispatch)
|
||||
if task != nil {
|
||||
tasks = append(tasks, task)
|
||||
}
|
||||
}
|
||||
return
|
||||
@ -369,8 +346,12 @@ func (this *modelDispatch) dispatch(uid string, taskId int32, heroIds []string,
|
||||
v.Status = 2 //任务结束
|
||||
v.Exaward = flag
|
||||
} else {
|
||||
taskConf, err := this.module.configure.getDispatchTaskConf(v.TaskId)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
v.Status = 1 //任务进行中
|
||||
leftTime := configure.Now().Unix()
|
||||
leftTime := configure.Now().Unix() + int64(taskConf.Tasktime)
|
||||
v.LeftTime = leftTime
|
||||
}
|
||||
}
|
||||
@ -378,9 +359,6 @@ func (this *modelDispatch) dispatch(uid string, taskId int32, heroIds []string,
|
||||
}
|
||||
}
|
||||
|
||||
//周任务数累加
|
||||
disp.Nb.WeekCount++
|
||||
|
||||
update := map[string]interface{}{
|
||||
"nb": disp.Nb,
|
||||
"ticket": disp.Ticket - 1,
|
||||
@ -396,8 +374,9 @@ func (this *modelDispatch) updateFreeCount(uid string, noticeboard *pb.Noticeboa
|
||||
if noticeboard.FreeCount <= 0 {
|
||||
return comm.NewCustomError(pb.ErrorCode_DispatchNoFree)
|
||||
}
|
||||
noticeboard.FreeCount--
|
||||
update := map[string]interface{}{
|
||||
"freeCount": noticeboard.FreeCount - 1,
|
||||
"nb": noticeboard,
|
||||
}
|
||||
return this.Change(uid, update)
|
||||
}
|
||||
@ -406,7 +385,7 @@ func (this *modelDispatch) updateFreeCount(uid string, noticeboard *pb.Noticeboa
|
||||
func (this *modelDispatch) updateRefreshCount(uid string, noticeboard *pb.Noticeboard) error {
|
||||
noticeboard.RefreshCount++
|
||||
update := map[string]interface{}{
|
||||
"refreshCount": noticeboard.RefreshCount,
|
||||
"nb": noticeboard,
|
||||
}
|
||||
return this.Change(uid, update)
|
||||
}
|
||||
@ -422,35 +401,68 @@ func (this *modelDispatch) updateTasks(uid string, noticeboard *pb.Noticeboard,
|
||||
|
||||
// 更新公告栏任务
|
||||
func (this *modelDispatch) updateNotice(uid string, dispatch *pb.DBDispatch) error {
|
||||
for i, v := range dispatch.Nb.Tasks {
|
||||
if v.Status == 0 {
|
||||
//判断到期时间
|
||||
if v.Duration <= configure.Now().Unix() {
|
||||
//替换到期任务
|
||||
// dispatch.Nb.Tasks = this.replaceTask(uid, v.TaskId, dispatch)
|
||||
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks[:i], dispatch.Nb.Tasks[i+1:]...)
|
||||
i--
|
||||
//补一条
|
||||
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks, this.addRandomTask(uid, dispatch))
|
||||
var randCount int
|
||||
for i := 0; i < len(dispatch.Nb.Tasks); i++ {
|
||||
if dispatch.Nb.Tasks[i].Status == 1 {
|
||||
if dispatch.Nb.Tasks[i].LeftTime != 0 &&
|
||||
dispatch.Nb.Tasks[i].LeftTime <= configure.Now().Unix() {
|
||||
//更改次任务状态为
|
||||
dispatch.Nb.Tasks[i].Status = 2 //任务结束
|
||||
dispatch.Nb.Tasks[i].LeftTime = 0
|
||||
//升级
|
||||
conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv)
|
||||
if err != nil || conf == nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if dispatch.Nb.TaskCount >= conf.Upgrade {
|
||||
//判断是否有下一等级
|
||||
nextConf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv + 1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if nextConf != nil {
|
||||
dispatch.Nb.Lv++
|
||||
}
|
||||
}
|
||||
//累计任务数
|
||||
dispatch.Nb.TaskCount++
|
||||
dispatch.Nb.WeekCount++
|
||||
}
|
||||
}
|
||||
|
||||
if v.Status == 1 {
|
||||
if v.LeftTime <= configure.Now().Unix() {
|
||||
//更改次任务状态为
|
||||
v.Status = 2 //任务结束
|
||||
v.LeftTime = 0
|
||||
//升级
|
||||
conf, err := this.module.configure.getDispatchLvConf(dispatch.Nb.Lv)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if dispatch.Nb.WeekCount >= conf.Upgrade {
|
||||
dispatch.Nb.Lv++
|
||||
}
|
||||
if dispatch.Nb.Tasks[i].Status == 0 {
|
||||
//判断到期时间
|
||||
if dispatch.Nb.Tasks[i].Duration != 0 &&
|
||||
dispatch.Nb.Tasks[i].Duration <= configure.Now().Unix() {
|
||||
//替换到期任务
|
||||
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks[:i], dispatch.Nb.Tasks[i+1:]...)
|
||||
i--
|
||||
randCount++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.module.Debug("随机数量:", log.Field{Key: "count", Value: randCount})
|
||||
count := len(dispatch.Nb.Tasks)
|
||||
if count < 6 {
|
||||
randCount = 6 - count
|
||||
}
|
||||
for i := 0; i < randCount; i++ {
|
||||
task := this.addRandomTask(uid, dispatch)
|
||||
if task != nil {
|
||||
dispatch.Nb.Tasks = append(dispatch.Nb.Tasks, task)
|
||||
}
|
||||
}
|
||||
|
||||
return this.updateTasks(uid, dispatch.Nb, dispatch.Nb.Tasks)
|
||||
}
|
||||
|
||||
// 更新周任务状态
|
||||
func (this *modelDispatch) updateWeekstatus(uid string, idx int32, noticeboard *pb.Noticeboard) error {
|
||||
noticeboard.WeekReceived = append(noticeboard.WeekReceived, idx)
|
||||
update := map[string]interface{}{
|
||||
"nb": noticeboard,
|
||||
}
|
||||
return this.Change(uid, update)
|
||||
}
|
||||
|
@ -1,34 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
const (
|
||||
MainlineGetListResp = "getlist"
|
||||
MainlineChallengeResp = "challenge"
|
||||
MainlineChallengeOverResp = "challengeover"
|
||||
MainlineGetRewardResp = "getreward"
|
||||
MainlineNewChapterPush = "newchapter"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *Mainline
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
|
||||
return
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode) {
|
||||
if req.MainlineId == 0 || req.ChapterObj == "" || req.Leadpos >= 5 || len(req.Teamids) != 5 || req.Leadpos < 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChallengeReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
curChapter *pb.DBMainline // 当前章节信息
|
||||
ps int32
|
||||
psAnt *cfg.Gameatn
|
||||
)
|
||||
|
||||
code = this.ChallengeCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 校验关卡存不存在
|
||||
curChapter = this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if curChapter == nil {
|
||||
code = pb.ErrorCode_MainlineNotFound
|
||||
return
|
||||
}
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), curChapter.Intensity)
|
||||
if node == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
|
||||
for _, v := range curChapter.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
if v == int32(req.MainlineId) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if curChapter.Ps != 0 {
|
||||
if code = this.module.ConsumeRes(session, node.PsMg, true); code != pb.ErrorCode_Success { // 扣1点
|
||||
return
|
||||
}
|
||||
} else {
|
||||
for _, v := range node.PsConsume {
|
||||
if v.A == "attr" && v.T == "ps" {
|
||||
ps += v.N
|
||||
}
|
||||
}
|
||||
for _, v := range node.PsMg {
|
||||
if v.A == "attr" && v.T == "ps" {
|
||||
ps += v.N
|
||||
}
|
||||
}
|
||||
psAnt = &cfg.Gameatn{
|
||||
A: "attr",
|
||||
T: "ps",
|
||||
N: ps,
|
||||
}
|
||||
if code = this.module.ConsumeRes(session, []*cfg.Gameatn{psAnt}, true); code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
curChapter.Ps = ps
|
||||
update := map[string]interface{}{
|
||||
"ps": ps,
|
||||
}
|
||||
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), curChapter.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{
|
||||
Ptype: pb.PlayType_mainline,
|
||||
Title: "",
|
||||
Format: &pb.BattleFormation{
|
||||
Leadpos: req.Leadpos,
|
||||
Format: req.Teamids,
|
||||
},
|
||||
Mformat: node.FormatList,
|
||||
})
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeResp, &pb.MainlineChallengeResp{
|
||||
Info: &pb.BattleInfo{Id: record.Id, Title: record.Title, Btype: record.Btype, Ptype: record.Ptype, RedCompId: record.RedCompId, Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist},
|
||||
ChapterObj: req.ChapterObj,
|
||||
MainlineId: req.GetMainlineId(),
|
||||
})
|
||||
return
|
||||
}
|
@ -1,153 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) ChallengeOverCheck(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode) {
|
||||
if req.MainlineId == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///挑战主线关卡
|
||||
func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineChallengeOverReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
mainline *pb.DBMainline // 当前章节信息
|
||||
res []*cfg.Gameatn // 小章节奖励
|
||||
isWin bool
|
||||
user *pb.DBUser
|
||||
hero []string //新的英雄
|
||||
newhero []string //新的英雄
|
||||
)
|
||||
res = make([]*cfg.Gameatn, 0)
|
||||
hero = make([]string, 0)
|
||||
newhero = make([]string, 0)
|
||||
code = this.ChallengeOverCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 校验关卡存不存在
|
||||
mainline = this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if mainline == nil {
|
||||
code = pb.ErrorCode_MainlineNotFound
|
||||
return
|
||||
}
|
||||
|
||||
node := this.module.configure.GetMainlineConfigData(int32(req.MainlineId), mainline.Intensity)
|
||||
if node == nil { // 配置文件校验
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
for _, v := range mainline.BranchID {
|
||||
if v == int32(req.MainlineId) { // 重复挑战
|
||||
code = pb.ErrorCode_MainlineNotFindChapter
|
||||
return
|
||||
}
|
||||
}
|
||||
// 校验通过
|
||||
|
||||
code, isWin = this.module.battle.CheckBattleReport(session, req.Report)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
|
||||
if !isWin { // 战斗失败直接返回
|
||||
// 返还
|
||||
mainline.Ps = 0
|
||||
this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, map[string]interface{}{
|
||||
"ps": 0,
|
||||
})
|
||||
|
||||
if code = this.module.DispenseRes(session, node.PsConsume, true); code != pb.ErrorCode_Success { // 返还预扣体力
|
||||
return
|
||||
}
|
||||
code = pb.ErrorCode_BattleNoWin
|
||||
return
|
||||
}
|
||||
|
||||
res = append(res, node.Award...)
|
||||
for _, v := range node.Award {
|
||||
if v.A == comm.HeroType {
|
||||
hero = append(hero, v.T)
|
||||
}
|
||||
}
|
||||
if len(hero) > 0 {
|
||||
ishave := this.module.ModuleUser.CheckTujianHero(session, hero)
|
||||
for i, v := range ishave {
|
||||
if !v {
|
||||
newhero = append(newhero, hero[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
user = this.module.ModuleUser.GetUser(session.GetUserId())
|
||||
mainline.MainlineId = int32(req.MainlineId)
|
||||
mainline.BranchID = append(mainline.BranchID, int32(req.MainlineId))
|
||||
mainline.Ps = 0 // 重置预扣体力
|
||||
update := map[string]interface{}{
|
||||
"mainlineId": req.MainlineId,
|
||||
"chapterId": mainline.ChapterId,
|
||||
"branchID": mainline.BranchID,
|
||||
"ps": 0,
|
||||
}
|
||||
if node.Episodetype == comm.MainLineBoss { // 打完boss 设置领奖状态
|
||||
update["awaredID"] = pb.AwaredType_TypeAvailable
|
||||
mainline.AwaredID = pb.AwaredType_TypeAvailable
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), mainline.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
if node.Episodetype == comm.MainLineBoss { // 挑战完成 boss关
|
||||
_data := &pb.DBMainline{}
|
||||
conf := this.module.configure.GetMainlineChapter(mainline.ChapterId + 1)
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = mainline.ChapterId + 1
|
||||
_data.Intensity = mainline.Intensity
|
||||
if conf == nil { // 这里就是切换下一个难度了
|
||||
if mainline.Intensity < comm.MaxMainlineIntensity {
|
||||
_data.Intensity = mainline.Intensity + 1 // 难度+1
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
}
|
||||
}
|
||||
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
session.SendMsg(string(this.module.GetType()), MainlineNewChapterPush, &pb.MainlineNewChapterPush{Data: _data}) // 推送新的章节
|
||||
|
||||
}
|
||||
// 发奖
|
||||
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
|
||||
this.module.Debugf("DispenseRes err:+%v", res)
|
||||
}
|
||||
// 加经验
|
||||
if node.Episodetype != 5 && node.Episodetype != 7 {
|
||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||
if node.Exp > 0 && !v.Ishelp { // 助战英雄不加经验
|
||||
this.module.ModuleHero.AddHeroExp(session, v.Oid, node.Exp)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline, Newheros: newhero, Olv: user.Lv})
|
||||
// 主线任务统计 Rtype60
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype60, 1)
|
||||
this.module.ModuleRtask.SendToRtask(session, comm.Rtype61, int32(req.MainlineId))
|
||||
return
|
||||
}
|
@ -1,65 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode) {
|
||||
if req.ChapterObj == "" {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.MainlineGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
rsp := &pb.MainlineGetRewardResp{}
|
||||
|
||||
code = this.GetRewardCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
_obj := this.module.modelMainline.getOneChapterInfo(session.GetUserId(), req.ChapterObj)
|
||||
if _obj == nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if _obj.AwaredID == pb.AwaredType_TypeReceived {
|
||||
code = pb.ErrorCode_MainlineRepeatReward // 重复领奖
|
||||
return
|
||||
}
|
||||
if _obj.AwaredID != pb.AwaredType_TypeAvailable {
|
||||
code = pb.ErrorCode_MainlineCompleteReward // 通关才能领奖
|
||||
return
|
||||
}
|
||||
// 校验是不是通关了
|
||||
chaptConfig := this.module.configure.GetMainlineChapter(int32(_obj.ChapterId)) // 根据配置文件找
|
||||
if chaptConfig == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
|
||||
_obj.AwaredID = pb.AwaredType_TypeReceived // 设置领奖标记
|
||||
update := map[string]interface{}{
|
||||
"awaredID": _obj.AwaredID,
|
||||
}
|
||||
// 发奖
|
||||
code = this.module.DispenseRes(session, chaptConfig.Award, true)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
err := this.module.modelMainline.modifyMainlineData(session.GetUserId(), _obj.Id, update)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
rsp.Data = _obj
|
||||
session.SendMsg(string(this.module.GetType()), MainlineGetRewardResp, rsp)
|
||||
return
|
||||
}
|
@ -1,47 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.MainlineGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
rsp := &pb.MainlineGetListResp{}
|
||||
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
list, err := this.module.modelMainline.getMainlineList(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
if len(list) == 0 { // 如果数量为0 则默认创建一条数据
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = 1 // 默认第一章节
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_data.Intensity = 1 // 难度1
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.module.modelMainline.addNewChapter(session.GetUserId(), _mData)
|
||||
list = append(list, _data)
|
||||
}
|
||||
rsp.Data = list
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), MainlineGetListResp, &pb.MainlineGetListResp{Data: rsp.Data})
|
||||
return
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const (
|
||||
game_mainlinechapter = "game_mainlinechapter.json"
|
||||
game_mainline = "game_mainline.json"
|
||||
)
|
||||
|
||||
///配置管理基础组件
|
||||
type configureComp struct {
|
||||
modules.MCompConfigure
|
||||
module *Mainline
|
||||
hlock sync.RWMutex
|
||||
_mapMainline map[int64]*cfg.GameMainlineData
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompConfigure.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
err = this.LoadMultiConfigure(map[string]interface{}{
|
||||
game_mainlinechapter: cfg.NewGameMainlineChapter,
|
||||
})
|
||||
this._mapMainline = make(map[int64]*cfg.GameMainlineData, 0)
|
||||
configure.RegisterConfigure(game_mainline, cfg.NewGameMainline, this.GetMainline)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *configureComp) GetMainline() {
|
||||
if v, err := this.GetConfigure(game_mainline); err == nil {
|
||||
if configure, ok := v.(*cfg.GameMainline); ok {
|
||||
this.hlock.Lock()
|
||||
defer this.hlock.Unlock()
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._mapMainline[int64(value.Id<<16)+int64(value.Intensity)] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
} else {
|
||||
log.Errorf("get game_mainline conf err:%v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// id + intensity
|
||||
func (this *configureComp) GetMainlineConfigData(id, intensity int32) *cfg.GameMainlineData {
|
||||
return this._mapMainline[int64(id<<16)+int64(intensity)]
|
||||
}
|
||||
|
||||
//读取配置数据
|
||||
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||
return configure.GetConfigure(name)
|
||||
|
||||
}
|
||||
|
||||
func (this *configureComp) GetMainlineChapter(id int32) (data *cfg.GameMainlineChapterData) {
|
||||
if v, err := this.GetConfigure(game_mainlinechapter); err != nil {
|
||||
this.module.Errorf("get global conf err:%v", err)
|
||||
return
|
||||
} else {
|
||||
var (
|
||||
configure *cfg.GameMainlineChapter
|
||||
ok bool
|
||||
)
|
||||
if configure, ok = v.(*cfg.GameMainlineChapter); !ok {
|
||||
this.module.Errorf("%T no is *cfg.Game_MainlineChapterData", v)
|
||||
return
|
||||
}
|
||||
|
||||
data = configure.Get(int(id - 1))
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 获取章节数量
|
||||
func (this *configureComp) GetMaxMainlineChapter() int32 {
|
||||
if v, err := this.GetConfigure(game_mainlinechapter); err == nil {
|
||||
if configure, ok := v.(*cfg.GameMainlineChapter); ok {
|
||||
return int32(len(configure.GetDataList()))
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
type ModelMainline struct {
|
||||
modules.MCompModel
|
||||
module *Mainline
|
||||
}
|
||||
|
||||
func (this *ModelMainline) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = comm.TableMainline
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.module = module.(*Mainline)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取章节信息
|
||||
func (this *ModelMainline) getMainlineList(uid string) (storys []*pb.DBMainline, err error) {
|
||||
storys = make([]*pb.DBMainline, 0)
|
||||
err = this.GetList(uid, &storys)
|
||||
return
|
||||
}
|
||||
|
||||
// 修改章节信息
|
||||
func (this *ModelMainline) modifyMainlineData(uid string, objid string, data map[string]interface{}) error {
|
||||
return this.module.modelMainline.ChangeList(uid, objid, data)
|
||||
}
|
||||
|
||||
// 增加新的章节数据
|
||||
func (this *ModelMainline) addNewChapter(uId string, data map[string]interface{}) (err error) {
|
||||
|
||||
if err = this.AddLists(uId, data); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 获取指定章节数据
|
||||
func (this *ModelMainline) getOneChapterInfo(uid, obj string) *pb.DBMainline {
|
||||
data := &pb.DBMainline{}
|
||||
err := this.module.modelMainline.GetListObj(uid, obj, data)
|
||||
if err != nil {
|
||||
this.module.Errorf("%v", err)
|
||||
return nil
|
||||
}
|
||||
return data
|
||||
}
|
||||
|
||||
// 增加新的章节数据
|
||||
func (this *ModelMainline) cleanChapter(uId string) (err error) {
|
||||
|
||||
if err = this.DelByUId(uId); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
return nil
|
||||
}
|
@ -1,165 +0,0 @@
|
||||
package mainline
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
"sort"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
)
|
||||
|
||||
type Mainline struct {
|
||||
modules.ModuleBase
|
||||
modelMainline *ModelMainline
|
||||
service core.IService
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
battle comm.IBattle
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
return &Mainline{}
|
||||
}
|
||||
|
||||
func (this *Mainline) GetType() core.M_Modules {
|
||||
return comm.ModuleMainline
|
||||
}
|
||||
|
||||
func (this *Mainline) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelMainline = this.RegisterComp(new(ModelMainline)).(*ModelMainline)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
||||
|
||||
func (this *Mainline) GetUsermainLineData(uid string) (mainlineId int32) {
|
||||
|
||||
_szData, err := this.modelMainline.getMainlineList(uid)
|
||||
if err == nil {
|
||||
sort.SliceStable(_szData, func(i, j int) bool { // 排序
|
||||
return _szData[i].ChapterId > _szData[j].ChapterId
|
||||
})
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Mainline) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleBattle); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
this.battle = module.(comm.IBattle)
|
||||
return
|
||||
}
|
||||
|
||||
//红点查询
|
||||
func (this *Mainline) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (reddot map[comm.ReddotType]bool) {
|
||||
reddot = make(map[comm.ReddotType]bool)
|
||||
for _, v := range rid {
|
||||
if v == comm.Reddot5 {
|
||||
reddot[comm.Reddot5] = this.CheckPoint(session.GetUserId())
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 红点检测
|
||||
func (this *Mainline) CheckPoint(uid string) bool {
|
||||
list, err := this.modelMainline.getMainlineList(uid)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
for _, v := range list {
|
||||
conf := this.configure.GetMainlineChapter(v.ChapterId)
|
||||
if conf == nil {
|
||||
continue
|
||||
}
|
||||
if len(conf.Episode) != len(v.BranchID) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 参数 难度 + 关卡id
|
||||
func (this *Mainline) ModifyMainlineDataByNanduID(uid string, nandu, id int32) (code pb.ErrorCode) {
|
||||
|
||||
conf := this.configure.GetMainlineConfigData(id, nandu)
|
||||
if conf == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound // 找不到配置
|
||||
return
|
||||
}
|
||||
// 已现在设置的为准 删除之前的所有数据
|
||||
this.modelMainline.cleanChapter(uid)
|
||||
// 获取当前的章节数据
|
||||
jumpCap := conf.Chapter
|
||||
// 先加所有难度小于1 的章节
|
||||
for ndIndex := 1; ndIndex <= int(nandu)-1; ndIndex++ {
|
||||
max := this.configure.GetMaxMainlineChapter()
|
||||
for i := 1; i <= int(max); i++ {
|
||||
confCap := this.configure.GetMainlineChapter(int32(i))
|
||||
//_conf := this.configure.GetMainlineConfigData(int32(i), int32(ndIndex))
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = int32(i)
|
||||
_data.MainlineId = confCap.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(ndIndex) // 难度1
|
||||
|
||||
for _, v := range confCap.Episode {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
|
||||
_mData[_data.Id] = _data
|
||||
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
}
|
||||
}
|
||||
// 加当前难度 的章节数据
|
||||
for i := 1; i <= int(jumpCap-1); i++ {
|
||||
confCap := this.configure.GetMainlineChapter(int32(i))
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = int32(i)
|
||||
_data.MainlineId = confCap.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(nandu) // 难度1
|
||||
for _, v := range confCap.Episode {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
_mData[_data.Id] = _data
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
}
|
||||
// 加当前难度 当前章节的前置关卡数据
|
||||
_data := &pb.DBMainline{}
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
_data.ChapterId = conf.Chapter
|
||||
_data.MainlineId = conf.Id
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = uid
|
||||
_data.Intensity = int32(nandu) // 难度1
|
||||
confCap := this.configure.GetMainlineChapter(int32(conf.Chapter))
|
||||
for _, v := range confCap.Episode {
|
||||
if v <= id {
|
||||
_data.BranchID = append(_data.BranchID, v)
|
||||
}
|
||||
}
|
||||
_mData[_data.Id] = _data
|
||||
this.modelMainline.addNewChapter(uid, _mData)
|
||||
|
||||
return
|
||||
}
|
@ -25,7 +25,7 @@ func (this *apiComp) GetAll(session comm.IUserSession, req *pb.ReddotGetAllReq)
|
||||
comm.Reddot28) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.mainline.Reddot(session, comm.Reddot5) {
|
||||
for k, v := range this.module.mline.Reddot(session, comm.Reddot5) {
|
||||
reddot[int32(k)] = v
|
||||
}
|
||||
for k, v := range this.module.pagoda.Reddot(session, comm.Reddot6) {
|
||||
|
@ -19,8 +19,8 @@ func NewModule() core.IModule {
|
||||
|
||||
type Reddot struct {
|
||||
modules.ModuleBase
|
||||
service base.IRPCXService
|
||||
mainline comm.IMainline
|
||||
service base.IRPCXService
|
||||
|
||||
pagoda comm.IPagoda
|
||||
martialhall comm.IMartialhall
|
||||
horoscope comm.IHoroscope
|
||||
@ -31,6 +31,7 @@ type Reddot struct {
|
||||
viking comm.IViking
|
||||
hunting comm.IHunting
|
||||
api_comp *apiComp
|
||||
mline comm.IMline
|
||||
}
|
||||
|
||||
//模块名
|
||||
@ -47,10 +48,10 @@ func (this *Reddot) Init(service core.IService, module core.IModule, options cor
|
||||
func (this *Reddot) Start() (err error) {
|
||||
err = this.ModuleBase.Start()
|
||||
var module core.IModule
|
||||
if module, err = this.service.GetModule(comm.ModuleMainline); err != nil {
|
||||
if module, err = this.service.GetModule(comm.ModuleMline); err != nil {
|
||||
return
|
||||
}
|
||||
this.mainline = module.(comm.IMainline)
|
||||
this.mline = module.(comm.IMline)
|
||||
if module, err = this.service.GetModule(comm.ModulePagoda); err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ func (this *ModelRtask) verfiyRtype1(uid string, cfg *cfg.GameRdtaskCondiData) (
|
||||
|
||||
// 剧情
|
||||
func (this *ModelRtask) verifyRtype2(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||
m, err := this.service.GetModule(comm.ModuleMainline)
|
||||
m, err := this.service.GetModule(comm.ModuleMline)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -98,6 +98,7 @@ type Noticeboard struct {
|
||||
WeekCount int32 `protobuf:"varint,6,opt,name=weekCount,proto3" json:"weekCount" bson:"weekCount"` //周任务数
|
||||
TaskCount int32 `protobuf:"varint,7,opt,name=taskCount,proto3" json:"taskCount" bson:"taskCount"` //任务数
|
||||
WeekReceived []int32 `protobuf:"varint,8,rep,packed,name=weekReceived,proto3" json:"weekReceived" bson:"weekReceived"` ////已领取的周任务索引ID
|
||||
CreateTime int64 `protobuf:"varint,9,opt,name=createTime,proto3" json:"createTime" bson:"createTime"` //创建时间
|
||||
}
|
||||
|
||||
func (x *Noticeboard) Reset() {
|
||||
@ -188,6 +189,13 @@ func (x *Noticeboard) GetWeekReceived() []int32 {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Noticeboard) GetCreateTime() int64 {
|
||||
if x != nil {
|
||||
return x.CreateTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// 派遣任务
|
||||
type DispatchTask struct {
|
||||
state protoimpl.MessageState
|
||||
@ -286,7 +294,7 @@ var file_dispatch_dispatch_db_proto_rawDesc = []byte{
|
||||
0x6e, 0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x63,
|
||||
0x65, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x52, 0x02, 0x6e, 0x62, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69,
|
||||
0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b,
|
||||
0x65, 0x74, 0x22, 0x84, 0x02, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x62, 0x6f, 0x61,
|
||||
0x65, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
|
||||
0x6c, 0x76, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||
@ -302,7 +310,9 @@ var file_dispatch_dispatch_db_proto_rawDesc = []byte{
|
||||
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x65, 0x6b, 0x52, 0x65, 0x63,
|
||||
0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x77, 0x65, 0x65,
|
||||
0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x44, 0x69,
|
||||
0x6b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x44, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
|
||||
0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||
|
@ -200,6 +200,61 @@ func (x *DispatchRefreshResp) GetRefreshCount() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
type DispatchTaskRsp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
|
||||
Exaward bool `protobuf:"varint,2,opt,name=exaward,proto3" json:"exaward"`
|
||||
}
|
||||
|
||||
func (x *DispatchTaskRsp) Reset() {
|
||||
*x = DispatchTaskRsp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DispatchTaskRsp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DispatchTaskRsp) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchTaskRsp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
|
||||
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 DispatchTaskRsp.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchTaskRsp) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *DispatchTaskRsp) GetTaskId() int32 {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DispatchTaskRsp) GetExaward() bool {
|
||||
if x != nil {
|
||||
return x.Exaward
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// 领取任务奖励
|
||||
type DispatchReceiveReq struct {
|
||||
state protoimpl.MessageState
|
||||
@ -212,7 +267,7 @@ type DispatchReceiveReq struct {
|
||||
func (x *DispatchReceiveReq) Reset() {
|
||||
*x = DispatchReceiveReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -225,7 +280,7 @@ func (x *DispatchReceiveReq) String() string {
|
||||
func (*DispatchReceiveReq) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchReceiveReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[4]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -238,7 +293,7 @@ func (x *DispatchReceiveReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchReceiveReq.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchReceiveReq) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{4}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *DispatchReceiveReq) GetTaskId() int32 {
|
||||
@ -253,13 +308,13 @@ type DispatchReceiveResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TaskId int32 `protobuf:"varint,1,opt,name=taskId,proto3" json:"taskId"`
|
||||
Rsp *DispatchTaskRsp `protobuf:"bytes,1,opt,name=rsp,proto3" json:"rsp"`
|
||||
}
|
||||
|
||||
func (x *DispatchReceiveResp) Reset() {
|
||||
*x = DispatchReceiveResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -272,7 +327,7 @@ func (x *DispatchReceiveResp) String() string {
|
||||
func (*DispatchReceiveResp) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchReceiveResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[5]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -285,14 +340,14 @@ func (x *DispatchReceiveResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchReceiveResp.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchReceiveResp) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{5}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *DispatchReceiveResp) GetTaskId() int32 {
|
||||
func (x *DispatchReceiveResp) GetRsp() *DispatchTaskRsp {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
return x.Rsp
|
||||
}
|
||||
return 0
|
||||
return nil
|
||||
}
|
||||
|
||||
//一键领取任务奖励
|
||||
@ -305,7 +360,7 @@ type DispatchAutoReceiveReq struct {
|
||||
func (x *DispatchAutoReceiveReq) Reset() {
|
||||
*x = DispatchAutoReceiveReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -318,7 +373,7 @@ func (x *DispatchAutoReceiveReq) String() string {
|
||||
func (*DispatchAutoReceiveReq) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchAutoReceiveReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[6]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -331,7 +386,7 @@ func (x *DispatchAutoReceiveReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchAutoReceiveReq.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchAutoReceiveReq) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{6}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
type DispatchAutoReceiveResp struct {
|
||||
@ -339,13 +394,13 @@ type DispatchAutoReceiveResp struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TaskId []int32 `protobuf:"varint,1,rep,packed,name=taskId,proto3" json:"taskId"` //领取奖励的任务ID
|
||||
Task []*DispatchTaskRsp `protobuf:"bytes,1,rep,name=task,proto3" json:"task"` //领取奖励的任务ID
|
||||
}
|
||||
|
||||
func (x *DispatchAutoReceiveResp) Reset() {
|
||||
*x = DispatchAutoReceiveResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -358,7 +413,7 @@ func (x *DispatchAutoReceiveResp) String() string {
|
||||
func (*DispatchAutoReceiveResp) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchAutoReceiveResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[7]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -371,12 +426,12 @@ func (x *DispatchAutoReceiveResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchAutoReceiveResp.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchAutoReceiveResp) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{7}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *DispatchAutoReceiveResp) GetTaskId() []int32 {
|
||||
func (x *DispatchAutoReceiveResp) GetTask() []*DispatchTaskRsp {
|
||||
if x != nil {
|
||||
return x.TaskId
|
||||
return x.Task
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -394,7 +449,7 @@ type DispatchDoReq struct {
|
||||
func (x *DispatchDoReq) Reset() {
|
||||
*x = DispatchDoReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -407,7 +462,7 @@ func (x *DispatchDoReq) String() string {
|
||||
func (*DispatchDoReq) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchDoReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[8]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -420,7 +475,7 @@ func (x *DispatchDoReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchDoReq.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchDoReq) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{8}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
func (x *DispatchDoReq) GetTaskId() int32 {
|
||||
@ -448,7 +503,7 @@ type DispatchDoResp struct {
|
||||
func (x *DispatchDoResp) Reset() {
|
||||
*x = DispatchDoResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -461,7 +516,7 @@ func (x *DispatchDoResp) String() string {
|
||||
func (*DispatchDoResp) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchDoResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[9]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -474,7 +529,7 @@ func (x *DispatchDoResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchDoResp.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchDoResp) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{9}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
func (x *DispatchDoResp) GetIsSucc() bool {
|
||||
@ -496,7 +551,7 @@ type DispatchWeekReciveReq struct {
|
||||
func (x *DispatchWeekReciveReq) Reset() {
|
||||
*x = DispatchWeekReciveReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -509,7 +564,7 @@ func (x *DispatchWeekReciveReq) String() string {
|
||||
func (*DispatchWeekReciveReq) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchWeekReciveReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[10]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -522,7 +577,7 @@ func (x *DispatchWeekReciveReq) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchWeekReciveReq.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchWeekReciveReq) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{10}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *DispatchWeekReciveReq) GetIdx() int32 {
|
||||
@ -543,7 +598,7 @@ type DispatchWeekReciveResp struct {
|
||||
func (x *DispatchWeekReciveResp) Reset() {
|
||||
*x = DispatchWeekReciveResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -556,7 +611,7 @@ func (x *DispatchWeekReciveResp) String() string {
|
||||
func (*DispatchWeekReciveResp) ProtoMessage() {}
|
||||
|
||||
func (x *DispatchWeekReciveResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[11]
|
||||
mi := &file_dispatch_dispatch_msg_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -569,7 +624,7 @@ func (x *DispatchWeekReciveResp) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use DispatchWeekReciveResp.ProtoReflect.Descriptor instead.
|
||||
func (*DispatchWeekReciveResp) Descriptor() ([]byte, []int) {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{11}
|
||||
return file_dispatch_dispatch_msg_proto_rawDescGZIP(), []int{12}
|
||||
}
|
||||
|
||||
func (x *DispatchWeekReciveResp) GetIdx() int32 {
|
||||
@ -597,31 +652,37 @@ var file_dispatch_dispatch_msg_proto_rawDesc = []byte{
|
||||
0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
|
||||
0x66, 0x72, 0x65, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x72, 0x65, 0x66,
|
||||
0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2c, 0x0a,
|
||||
0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65,
|
||||
0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x13, 0x44,
|
||||
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
|
||||
0x65, 0x52, 0x65, 0x71, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
|
||||
0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52,
|
||||
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61,
|
||||
0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x0c, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x43, 0x0a,
|
||||
0x0f, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x73, 0x70,
|
||||
0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x61, 0x77,
|
||||
0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x61, 0x77, 0x61,
|
||||
0x72, 0x64, 0x22, 0x2c, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65,
|
||||
0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b,
|
||||
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x69,
|
||||
0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x69, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73,
|
||||
0x53, 0x75, 0x63, 0x63, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68,
|
||||
0x57, 0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x69, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x22,
|
||||
0x2a, 0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57, 0x65, 0x65, 0x6b, 0x52,
|
||||
0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x42, 0x06, 0x5a, 0x04, 0x2e,
|
||||
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x22, 0x39, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x63, 0x65,
|
||||
0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x22, 0x0a, 0x03, 0x72, 0x73, 0x70, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54,
|
||||
0x61, 0x73, 0x6b, 0x52, 0x73, 0x70, 0x52, 0x03, 0x72, 0x73, 0x70, 0x22, 0x18, 0x0a, 0x16, 0x44,
|
||||
0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69,
|
||||
0x76, 0x65, 0x52, 0x65, 0x71, 0x22, 0x3f, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63,
|
||||
0x68, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x24, 0x0a, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10,
|
||||
0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x73, 0x70,
|
||||
0x52, 0x04, 0x74, 0x61, 0x73, 0x6b, 0x22, 0x41, 0x0a, 0x0d, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74,
|
||||
0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09,
|
||||
0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x73, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x69, 0x73,
|
||||
0x70, 0x61, 0x74, 0x63, 0x68, 0x44, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69,
|
||||
0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53,
|
||||
0x75, 0x63, 0x63, 0x22, 0x29, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57,
|
||||
0x65, 0x65, 0x6b, 0x52, 0x65, 0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x69, 0x64, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x22, 0x2a,
|
||||
0x0a, 0x16, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x57, 0x65, 0x65, 0x6b, 0x52, 0x65,
|
||||
0x63, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x78, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x64, 0x78, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b,
|
||||
0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -636,29 +697,32 @@ func file_dispatch_dispatch_msg_proto_rawDescGZIP() []byte {
|
||||
return file_dispatch_dispatch_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_dispatch_dispatch_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_dispatch_dispatch_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_dispatch_dispatch_msg_proto_goTypes = []interface{}{
|
||||
(*DispatchNoticeReq)(nil), // 0: DispatchNoticeReq
|
||||
(*DispatchNoticeResp)(nil), // 1: DispatchNoticeResp
|
||||
(*DispatchRefreshReq)(nil), // 2: DispatchRefreshReq
|
||||
(*DispatchRefreshResp)(nil), // 3: DispatchRefreshResp
|
||||
(*DispatchReceiveReq)(nil), // 4: DispatchReceiveReq
|
||||
(*DispatchReceiveResp)(nil), // 5: DispatchReceiveResp
|
||||
(*DispatchAutoReceiveReq)(nil), // 6: DispatchAutoReceiveReq
|
||||
(*DispatchAutoReceiveResp)(nil), // 7: DispatchAutoReceiveResp
|
||||
(*DispatchDoReq)(nil), // 8: DispatchDoReq
|
||||
(*DispatchDoResp)(nil), // 9: DispatchDoResp
|
||||
(*DispatchWeekReciveReq)(nil), // 10: DispatchWeekReciveReq
|
||||
(*DispatchWeekReciveResp)(nil), // 11: DispatchWeekReciveResp
|
||||
(*Noticeboard)(nil), // 12: Noticeboard
|
||||
(*DispatchTaskRsp)(nil), // 4: DispatchTaskRsp
|
||||
(*DispatchReceiveReq)(nil), // 5: DispatchReceiveReq
|
||||
(*DispatchReceiveResp)(nil), // 6: DispatchReceiveResp
|
||||
(*DispatchAutoReceiveReq)(nil), // 7: DispatchAutoReceiveReq
|
||||
(*DispatchAutoReceiveResp)(nil), // 8: DispatchAutoReceiveResp
|
||||
(*DispatchDoReq)(nil), // 9: DispatchDoReq
|
||||
(*DispatchDoResp)(nil), // 10: DispatchDoResp
|
||||
(*DispatchWeekReciveReq)(nil), // 11: DispatchWeekReciveReq
|
||||
(*DispatchWeekReciveResp)(nil), // 12: DispatchWeekReciveResp
|
||||
(*Noticeboard)(nil), // 13: Noticeboard
|
||||
}
|
||||
var file_dispatch_dispatch_msg_proto_depIdxs = []int32{
|
||||
12, // 0: DispatchNoticeResp.dispatch:type_name -> Noticeboard
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
13, // 0: DispatchNoticeResp.dispatch:type_name -> Noticeboard
|
||||
4, // 1: DispatchReceiveResp.rsp:type_name -> DispatchTaskRsp
|
||||
4, // 2: DispatchAutoReceiveResp.task:type_name -> DispatchTaskRsp
|
||||
3, // [3:3] is the sub-list for method output_type
|
||||
3, // [3:3] is the sub-list for method input_type
|
||||
3, // [3:3] is the sub-list for extension type_name
|
||||
3, // [3:3] is the sub-list for extension extendee
|
||||
0, // [0:3] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_dispatch_dispatch_msg_proto_init() }
|
||||
@ -717,7 +781,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchReceiveReq); i {
|
||||
switch v := v.(*DispatchTaskRsp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -729,7 +793,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchReceiveResp); i {
|
||||
switch v := v.(*DispatchReceiveReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -741,7 +805,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchAutoReceiveReq); i {
|
||||
switch v := v.(*DispatchReceiveResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -753,7 +817,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchAutoReceiveResp); i {
|
||||
switch v := v.(*DispatchAutoReceiveReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -765,7 +829,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchDoReq); i {
|
||||
switch v := v.(*DispatchAutoReceiveResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -777,7 +841,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchDoResp); i {
|
||||
switch v := v.(*DispatchDoReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -789,7 +853,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchWeekReciveReq); i {
|
||||
switch v := v.(*DispatchDoResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
@ -801,6 +865,18 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchWeekReciveReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_dispatch_dispatch_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DispatchWeekReciveResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@ -819,7 +895,7 @@ func file_dispatch_dispatch_msg_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_dispatch_dispatch_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumMessages: 13,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
@ -24,7 +24,6 @@ import (
|
||||
"go_dreamfactory/modules/library"
|
||||
"go_dreamfactory/modules/linestory"
|
||||
"go_dreamfactory/modules/mail"
|
||||
"go_dreamfactory/modules/mainline"
|
||||
"go_dreamfactory/modules/martialhall"
|
||||
"go_dreamfactory/modules/mline"
|
||||
"go_dreamfactory/modules/moonfantasy"
|
||||
@ -84,7 +83,6 @@ func main() {
|
||||
hero.NewModule(),
|
||||
equipment.NewModule(),
|
||||
task.NewModule(),
|
||||
mainline.NewModule(),
|
||||
shop.NewModule(),
|
||||
notify.NewModule(),
|
||||
chat.NewModule(),
|
||||
|
@ -1,34 +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 GameMainline struct {
|
||||
_dataList []*GameMainlineData
|
||||
}
|
||||
|
||||
func NewGameMainline(_buf []map[string]interface{}) (*GameMainline, error) {
|
||||
_dataList := make([]*GameMainlineData, 0, len(_buf))
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameMainlineData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
}
|
||||
}
|
||||
return &GameMainline{_dataList:_dataList}, nil
|
||||
}
|
||||
|
||||
func (table *GameMainline) GetDataList() []*GameMainlineData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameMainline) Get(index int) *GameMainlineData {
|
||||
return table._dataList[index]
|
||||
}
|
||||
|
@ -1,160 +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"
|
||||
import "bright/serialization"
|
||||
|
||||
type GameMainlineData struct {
|
||||
Id int32
|
||||
Intensity int32
|
||||
EndFlag int32
|
||||
Previoustage int32
|
||||
Order int32
|
||||
Chapter int32
|
||||
Episodetype int32
|
||||
MainlineName string
|
||||
Episodelocation serialization.Vector2
|
||||
FormatList []int32
|
||||
CaptainId string
|
||||
BattleReadyID int32
|
||||
Battlescene string
|
||||
Award []*Gameatn
|
||||
Exp int32
|
||||
Title string
|
||||
Desc string
|
||||
Stroyid []int32
|
||||
Condition []int32
|
||||
PsConsume []*Gameatn
|
||||
PsMg []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameMainlineData = -79093005
|
||||
|
||||
func (*GameMainlineData) GetTypeId() int32 {
|
||||
return -79093005
|
||||
}
|
||||
|
||||
func (_v *GameMainlineData)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["intensity"].(float64); !_ok_ { err = errors.New("intensity error"); return }; _v.Intensity = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endFlag"].(float64); !_ok_ { err = errors.New("endFlag error"); return }; _v.EndFlag = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["previoustage"].(float64); !_ok_ { err = errors.New("previoustage error"); return }; _v.Previoustage = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["order"].(float64); !_ok_ { err = errors.New("order error"); return }; _v.Order = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["chapter"].(float64); !_ok_ { err = errors.New("chapter error"); return }; _v.Chapter = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Episodetype"].(float64); !_ok_ { err = errors.New("Episodetype error"); return }; _v.Episodetype = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["mainlineName"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.MainlineName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.MainlineName, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _v_ map[string]interface{}; if _v_, _ok_ = _buf["Episodelocation"].(map[string]interface{}); !_ok_ { err = errors.New("Episodelocation error"); return }
|
||||
var _x_, _y_ float32;
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["x"].(float64); !_ok_ { err = errors.New("x error"); return }; _x_ = float32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _v_["y"].(float64); !_ok_ { err = errors.New("y error"); return }; _y_ = float32(_tempNum_) }
|
||||
_v.Episodelocation = serialization.NewVector2(_x_, _y_)
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["FormatList"].([]interface{}); !_ok_ { err = errors.New("FormatList error"); return }
|
||||
|
||||
_v.FormatList = make([]int32, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ int32
|
||||
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
|
||||
_v.FormatList = append(_v.FormatList, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; if _v.CaptainId, _ok_ = _buf["captainId"].(string); !_ok_ { err = errors.New("captainId error"); return } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["BattleReadyID"].(float64); !_ok_ { err = errors.New("BattleReadyID error"); return }; _v.BattleReadyID = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Battlescene, _ok_ = _buf["battlescene"].(string); !_ok_ { err = errors.New("battlescene error"); return } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["award"].([]interface{}); !_ok_ { err = errors.New("award error"); return }
|
||||
|
||||
_v.Award = 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.Award = append(_v.Award, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exp"].(float64); !_ok_ { err = errors.New("exp error"); return }; _v.Exp = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["stroyid"].([]interface{}); !_ok_ { err = errors.New("stroyid error"); return }
|
||||
|
||||
_v.Stroyid = 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.Stroyid = append(_v.Stroyid, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["condition"].([]interface{}); !_ok_ { err = errors.New("condition error"); return }
|
||||
|
||||
_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.Condition = append(_v.Condition, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["ps_consume"].([]interface{}); !_ok_ { err = errors.New("ps_consume error"); return }
|
||||
|
||||
_v.PsConsume = 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.PsConsume = append(_v.PsConsume, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["ps_mg"].([]interface{}); !_ok_ { err = errors.New("ps_mg error"); return }
|
||||
|
||||
_v.PsMg = 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.PsMg = append(_v.PsMg, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameMainlineData(_buf map[string]interface{}) (*GameMainlineData, error) {
|
||||
v := &GameMainlineData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -41,8 +41,6 @@ type Tables struct {
|
||||
Shopitem *GameShopitem
|
||||
ActiveReward *GameActiveReward
|
||||
Model *GameModel
|
||||
MainlineChapter *GameMainlineChapter
|
||||
Mainline *GameMainline
|
||||
DrawCard *GameDrawCard
|
||||
ChatChannel *GameChatChannel
|
||||
ChatSystem *GameChatSystem
|
||||
@ -368,18 +366,6 @@ func NewTables(loader JsonLoader) (*Tables, error) {
|
||||
if tables.Model, err = NewGameModel(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_mainlinechapter") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.MainlineChapter, err = NewGameMainlineChapter(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_mainline") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tables.Mainline, err = NewGameMainline(buf) ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if buf, err = loader("game_drawcard") ; err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -1,34 +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 GameMainlineChapter struct {
|
||||
_dataList []*GameMainlineChapterData
|
||||
}
|
||||
|
||||
func NewGameMainlineChapter(_buf []map[string]interface{}) (*GameMainlineChapter, error) {
|
||||
_dataList := make([]*GameMainlineChapterData, 0, len(_buf))
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameMainlineChapterData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
}
|
||||
}
|
||||
return &GameMainlineChapter{_dataList:_dataList}, nil
|
||||
}
|
||||
|
||||
func (table *GameMainlineChapter) GetDataList() []*GameMainlineChapterData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameMainlineChapter) Get(index int) *GameMainlineChapterData {
|
||||
return table._dataList[index]
|
||||
}
|
||||
|
@ -1,79 +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 GameMainlineChapterData struct {
|
||||
Id int32
|
||||
Name string
|
||||
Intensity int32
|
||||
Map string
|
||||
Title string
|
||||
Desc string
|
||||
Icon string
|
||||
Text string
|
||||
Episode []int32
|
||||
Award []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameMainlineChapterData = -862442962
|
||||
|
||||
func (*GameMainlineChapterData) GetTypeId() int32 {
|
||||
return -862442962
|
||||
}
|
||||
|
||||
func (_v *GameMainlineChapterData)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 __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["intensity"].(float64); !_ok_ { err = errors.New("intensity error"); return }; _v.Intensity = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Map, _ok_ = _buf["map"].(string); !_ok_ { err = errors.New("map error"); return } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["title"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Title error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Title, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Text error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Text, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["Episode"].([]interface{}); !_ok_ { err = errors.New("Episode error"); return }
|
||||
|
||||
_v.Episode = 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.Episode = append(_v.Episode, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["award"].([]interface{}); !_ok_ { err = errors.New("award error"); return }
|
||||
|
||||
_v.Award = 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.Award = append(_v.Award, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameMainlineChapterData(_buf map[string]interface{}) (*GameMainlineChapterData, error) {
|
||||
v := &GameMainlineChapterData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user