合并日常和随机任务条件
This commit is contained in:
parent
fa0c02991d
commit
45fea5cf76
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100100,
|
"id": 100100,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -15,6 +16,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100101,
|
"id": 100101,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100100,
|
"preTid": 100100,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -27,6 +29,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100102,
|
"id": 100102,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100100,
|
"preTid": 100100,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -40,6 +43,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100103,
|
"id": 100103,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100101,
|
"preTid": 100101,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -52,6 +56,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100104,
|
"id": 100104,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100103,
|
"preTid": 100103,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -64,6 +69,7 @@
|
|||||||
{
|
{
|
||||||
"id": 100105,
|
"id": 100105,
|
||||||
"group": 1,
|
"group": 1,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100104,
|
"preTid": 100104,
|
||||||
"condition": [
|
"condition": [
|
||||||
@ -76,10 +82,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100201,
|
"id": 100201,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 0,
|
"preTid": 0,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2001
|
2001
|
||||||
@ -88,10 +95,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100202,
|
"id": 100202,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 100201,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100201,
|
"preTid": 100201,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
170
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2033,
|
2033,
|
||||||
@ -101,11 +109,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100203,
|
"id": 100203,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 100201,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100201,
|
"preTid": 100201,
|
||||||
"condition": [
|
"condition": [
|
||||||
101,
|
101
|
||||||
107
|
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2002,
|
2002,
|
||||||
@ -115,10 +123,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100204,
|
"id": 100204,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100201,
|
"preTid": 100201,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2005
|
2005
|
||||||
@ -127,10 +136,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100205,
|
"id": 100205,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100204,
|
"preTid": 100204,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2006
|
2006
|
||||||
@ -139,36 +149,38 @@
|
|||||||
{
|
{
|
||||||
"id": 100206,
|
"id": 100206,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100205,
|
"preTid": 100205,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
|
],
|
||||||
|
"sidequest": [
|
||||||
|
2034
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 100207,
|
||||||
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
|
"type": 2,
|
||||||
|
"preTid": 100206,
|
||||||
|
"condition": [
|
||||||
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2007,
|
2007,
|
||||||
2008
|
2008
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": 100207,
|
|
||||||
"group": 2,
|
|
||||||
"type": 2,
|
|
||||||
"preTid": 100206,
|
|
||||||
"condition": [
|
|
||||||
101
|
|
||||||
],
|
|
||||||
"sidequest": [
|
|
||||||
2009,
|
|
||||||
2010
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 100208,
|
"id": 100208,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100207,
|
"preTid": 100207,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2011,
|
2011,
|
||||||
@ -178,10 +190,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100209,
|
"id": 100209,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100208,
|
"preTid": 100208,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2013,
|
2013,
|
||||||
@ -192,10 +205,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100210,
|
"id": 100210,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100209,
|
"preTid": 100209,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2016,
|
2016,
|
||||||
@ -206,10 +220,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100211,
|
"id": 100211,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100210,
|
"preTid": 100210,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2019
|
2019
|
||||||
@ -218,10 +233,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100212,
|
"id": 100212,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100211,
|
"preTid": 100211,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2020
|
2020
|
||||||
@ -230,10 +246,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100213,
|
"id": 100213,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100212,
|
"preTid": 100212,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2021,
|
2021,
|
||||||
@ -244,10 +261,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100214,
|
"id": 100214,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100213,
|
"preTid": 100213,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2024,
|
2024,
|
||||||
@ -258,10 +276,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100215,
|
"id": 100215,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100214,
|
"preTid": 100214,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2027,
|
2027,
|
||||||
@ -272,10 +291,11 @@
|
|||||||
{
|
{
|
||||||
"id": 100216,
|
"id": 100216,
|
||||||
"group": 2,
|
"group": 2,
|
||||||
|
"subgroup": 0,
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"preTid": 100215,
|
"preTid": 100215,
|
||||||
"condition": [
|
"condition": [
|
||||||
101
|
0
|
||||||
],
|
],
|
||||||
"sidequest": [
|
"sidequest": [
|
||||||
2030,
|
2030,
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"nextTid": 100207
|
"nextTid": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 20006,
|
"id": 20006,
|
||||||
@ -197,7 +197,7 @@
|
|||||||
"needItem": [
|
"needItem": [
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
"nextTid": 100207
|
"nextTid": 100208
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 20009,
|
"id": 20009,
|
||||||
|
@ -817,7 +817,7 @@
|
|||||||
"datatype": 2,
|
"datatype": 2,
|
||||||
"type": 1,
|
"type": 1,
|
||||||
"inited": [],
|
"inited": [],
|
||||||
"data1": 25004,
|
"data1": 44006,
|
||||||
"data2": 0,
|
"data2": 0,
|
||||||
"data3": 0,
|
"data3": 0,
|
||||||
"data4": 0,
|
"data4": 0,
|
||||||
@ -828,7 +828,7 @@
|
|||||||
"datatype": 2,
|
"datatype": 2,
|
||||||
"type": 70,
|
"type": 70,
|
||||||
"inited": [],
|
"inited": [],
|
||||||
"data1": 102,
|
"data1": 101,
|
||||||
"data2": 0,
|
"data2": 0,
|
||||||
"data3": 0,
|
"data3": 0,
|
||||||
"data4": 0,
|
"data4": 0,
|
||||||
|
@ -471,7 +471,7 @@
|
|||||||
20004
|
20004
|
||||||
],
|
],
|
||||||
"endTid": [
|
"endTid": [
|
||||||
-1
|
171
|
||||||
],
|
],
|
||||||
"storyEnd": 0,
|
"storyEnd": 0,
|
||||||
"reward": [
|
"reward": [
|
||||||
@ -559,11 +559,17 @@
|
|||||||
"location": "middle",
|
"location": "middle",
|
||||||
"point": "model_02",
|
"point": "model_02",
|
||||||
"storyBegin": 308,
|
"storyBegin": 308,
|
||||||
"Entity": [],
|
"Entity": [
|
||||||
"EntityChange": [],
|
"MainLine"
|
||||||
|
],
|
||||||
|
"EntityChange": [
|
||||||
|
"default"
|
||||||
|
],
|
||||||
"EntityStateChange": [],
|
"EntityStateChange": [],
|
||||||
"EntityInteractive": [],
|
"EntityInteractive": [
|
||||||
"modelaction": "Enter",
|
false
|
||||||
|
],
|
||||||
|
"modelaction": "",
|
||||||
"rotation": {
|
"rotation": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
"y": -90,
|
"y": -90,
|
||||||
@ -582,7 +588,7 @@
|
|||||||
"endTid": [
|
"endTid": [
|
||||||
-1
|
-1
|
||||||
],
|
],
|
||||||
"storyEnd": 0,
|
"storyEnd": 311,
|
||||||
"reward": [
|
"reward": [
|
||||||
{
|
{
|
||||||
"ChooseId": 20008,
|
"ChooseId": 20008,
|
||||||
@ -595,7 +601,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"nextTid": 100207,
|
"nextTid": 100208,
|
||||||
"CD": 0
|
"CD": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -604,16 +610,10 @@
|
|||||||
"location": "middle",
|
"location": "middle",
|
||||||
"point": "model_02",
|
"point": "model_02",
|
||||||
"storyBegin": 311,
|
"storyBegin": 311,
|
||||||
"Entity": [
|
"Entity": [],
|
||||||
"Earth"
|
"EntityChange": [],
|
||||||
],
|
|
||||||
"EntityChange": [
|
|
||||||
"default"
|
|
||||||
],
|
|
||||||
"EntityStateChange": [],
|
"EntityStateChange": [],
|
||||||
"EntityInteractive": [
|
"EntityInteractive": [],
|
||||||
false
|
|
||||||
],
|
|
||||||
"modelaction": "",
|
"modelaction": "",
|
||||||
"rotation": {
|
"rotation": {
|
||||||
"x": 0,
|
"x": 0,
|
||||||
@ -936,7 +936,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2019,
|
"id": 2019,
|
||||||
"objType": 1,
|
"objType": 2,
|
||||||
"location": "left",
|
"location": "left",
|
||||||
"point": "icon_01",
|
"point": "icon_01",
|
||||||
"storyBegin": 321,
|
"storyBegin": 321,
|
||||||
@ -969,7 +969,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2020,
|
"id": 2020,
|
||||||
"objType": 1,
|
"objType": 2,
|
||||||
"location": "left",
|
"location": "left",
|
||||||
"point": "icon_01",
|
"point": "icon_01",
|
||||||
"storyBegin": 323,
|
"storyBegin": 323,
|
||||||
@ -997,7 +997,7 @@
|
|||||||
],
|
],
|
||||||
"storyEnd": 322,
|
"storyEnd": 322,
|
||||||
"reward": [],
|
"reward": [],
|
||||||
"nextTid": 100212,
|
"nextTid": 100213,
|
||||||
"CD": 0
|
"CD": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1007,7 +1007,7 @@
|
|||||||
"point": "model_02",
|
"point": "model_02",
|
||||||
"storyBegin": 324,
|
"storyBegin": 324,
|
||||||
"Entity": [
|
"Entity": [
|
||||||
"Earth"
|
"MainLine"
|
||||||
],
|
],
|
||||||
"EntityChange": [
|
"EntityChange": [
|
||||||
"globe"
|
"globe"
|
||||||
@ -1427,5 +1427,36 @@
|
|||||||
"reward": [],
|
"reward": [],
|
||||||
"nextTid": 100204,
|
"nextTid": 100204,
|
||||||
"CD": 0
|
"CD": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2034,
|
||||||
|
"objType": 1,
|
||||||
|
"location": "middle",
|
||||||
|
"point": "model_02",
|
||||||
|
"storyBegin": 337,
|
||||||
|
"Entity": [],
|
||||||
|
"EntityChange": [],
|
||||||
|
"EntityStateChange": [],
|
||||||
|
"EntityInteractive": [],
|
||||||
|
"modelaction": "Enter",
|
||||||
|
"rotation": {
|
||||||
|
"x": 0,
|
||||||
|
"y": -90,
|
||||||
|
"z": 0
|
||||||
|
},
|
||||||
|
"modelstate": 0,
|
||||||
|
"popup": "",
|
||||||
|
"special": "",
|
||||||
|
"enableAi": false,
|
||||||
|
"boxreplace": "",
|
||||||
|
"timeline": "",
|
||||||
|
"chooseId": [],
|
||||||
|
"endTid": [
|
||||||
|
-1
|
||||||
|
],
|
||||||
|
"storyEnd": 0,
|
||||||
|
"reward": [],
|
||||||
|
"nextTid": 100207,
|
||||||
|
"CD": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -209,7 +209,8 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
|||||||
this.goList.cachedList.Items[i].Checked = false
|
this.goList.cachedList.Items[i].Checked = false
|
||||||
this.goList.itemList.UpdateItem(i, widget.NewCheck(v.Text, nil))
|
this.goList.itemList.UpdateItem(i, widget.NewCheck(v.Text, nil))
|
||||||
}
|
}
|
||||||
this.goList.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(this.goList.selItemIds), this.goList.fileTotal))
|
this.goList.changeFileCount()
|
||||||
|
// this.goList.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(this.goList.selItemIds), this.goList.fileTotal))
|
||||||
this.goList.itemList.Refresh()
|
this.goList.itemList.Refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,6 +245,7 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
|||||||
json_overrideBtn.Disable()
|
json_overrideBtn.Disable()
|
||||||
defer func() {
|
defer func() {
|
||||||
json_overrideBtn.Enable()
|
json_overrideBtn.Enable()
|
||||||
|
this.jsonList.itemList.Refresh()
|
||||||
}()
|
}()
|
||||||
for _, v := range this.jsonList.selItemIds {
|
for _, v := range this.jsonList.selItemIds {
|
||||||
// logrus.WithField("path1", filepath.Join(tmpDir.Text, "json", v)).Debug("copy json")
|
// logrus.WithField("path1", filepath.Join(tmpDir.Text, "json", v)).Debug("copy json")
|
||||||
@ -271,7 +273,8 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
|||||||
list.cachedList.Items[i].Checked = false
|
list.cachedList.Items[i].Checked = false
|
||||||
list.itemList.UpdateItem(i, widget.NewCheck(v.Text, nil))
|
list.itemList.UpdateItem(i, widget.NewCheck(v.Text, nil))
|
||||||
}
|
}
|
||||||
list.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(list.selItemIds), list.fileTotal))
|
this.jsonList.changeFileCount()
|
||||||
|
// list.titleLabel.SetText(fmt.Sprintf("(%d/%d)", len(list.selItemIds), list.fileTotal))
|
||||||
list.itemList.Refresh()
|
list.itemList.Refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +167,7 @@ const (
|
|||||||
EventUserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
|
EventUserOffline core.Event_Key = "Event_UserOffline" //用户离线事件
|
||||||
|
|
||||||
EventUserChanged core.Event_Key = "event_user_changed" //用户数据变化
|
EventUserChanged core.Event_Key = "event_user_changed" //用户数据变化
|
||||||
|
EventTaskChanged core.Event_Key = "event_task_changed" //任务数据变化
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -127,6 +127,8 @@ type (
|
|||||||
SendToRtask(session IUserSession, rtaskType TaskType, params ...int32) (code pb.ErrorCode)
|
SendToRtask(session IUserSession, rtaskType TaskType, params ...int32) (code pb.ErrorCode)
|
||||||
// 初始化条件数据
|
// 初始化条件数据
|
||||||
InitCondiData(uid string) error
|
InitCondiData(uid string) error
|
||||||
|
// 获取任务条件记录
|
||||||
|
GetCondiData(uid string) *pb.DBRtaskRecord
|
||||||
}
|
}
|
||||||
|
|
||||||
//好友
|
//好友
|
||||||
|
@ -112,7 +112,7 @@ func (this *MCompModel) GetListFields(uid string, id string, data interface{}, f
|
|||||||
|
|
||||||
//读取列表数据中单个数据
|
//读取列表数据中单个数据
|
||||||
func (this *MCompModel) GetListObj(uid string, id string, data interface{}) (err error) {
|
func (this *MCompModel) GetListObj(uid string, id string, data interface{}) (err error) {
|
||||||
return this.DBModel.GetListObj(uid, id, data)
|
return this.DBModel.GetListObj(uid, id, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
//批量读取列表中多个数据
|
//批量读取列表中多个数据
|
||||||
|
@ -7,6 +7,7 @@ import (
|
|||||||
"go_dreamfactory/lego/base"
|
"go_dreamfactory/lego/base"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/core/cbase"
|
"go_dreamfactory/lego/core/cbase"
|
||||||
|
|
||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
@ -20,10 +21,10 @@ import (
|
|||||||
*/
|
*/
|
||||||
type ModuleBase struct {
|
type ModuleBase struct {
|
||||||
cbase.ModuleBase
|
cbase.ModuleBase
|
||||||
module core.IModule
|
module core.IModule
|
||||||
service base.IRPCXService
|
service base.IRPCXService
|
||||||
options IOptions
|
options IOptions
|
||||||
scomp comm.ISC_GateRouteComp //网关服务组件
|
scomp comm.ISC_GateRouteComp //网关服务组件
|
||||||
//常用的一些通用模块 在底层注册好
|
//常用的一些通用模块 在底层注册好
|
||||||
ModuleSys comm.ISys //系统
|
ModuleSys comm.ISys //系统
|
||||||
ModuleUser comm.IUser //用户模块
|
ModuleUser comm.IUser //用户模块
|
||||||
|
@ -93,6 +93,9 @@ func (this *ModelRtaskRecord) initCondiData(uid string) error {
|
|||||||
if len(v.Inited) != 5 {
|
if len(v.Inited) != 5 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if _, ok := dr.Vals[v.Id]; ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
vals := []int32{}
|
vals := []int32{}
|
||||||
for i, p := range v.Inited {
|
for i, p := range v.Inited {
|
||||||
if p == 1 {
|
if p == 1 {
|
||||||
|
@ -252,3 +252,8 @@ func (this *ModuleRtask) CheckCondi(uid string, condiId int32) (code pb.ErrorCod
|
|||||||
func (this *ModuleRtask) InitCondiData(uid string) error {
|
func (this *ModuleRtask) InitCondiData(uid string) error {
|
||||||
return this.modelRtaskRecord.initCondiData(uid)
|
return this.modelRtaskRecord.initCondiData(uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取玩家任务条件记录
|
||||||
|
func (this *ModuleRtask) GetCondiData(uid string) *pb.DBRtaskRecord {
|
||||||
|
return this.modelRtaskRecord.getRecord(uid)
|
||||||
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
package rtask
|
package rtask
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"go_dreamfactory/comm"
|
||||||
|
"go_dreamfactory/modules/task"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
cfg "go_dreamfactory/sys/configure/structs"
|
||||||
"time"
|
"time"
|
||||||
@ -65,7 +67,6 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond
|
|||||||
err = this.Change(uid, update)
|
err = this.Change(uid, update)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,7 +107,6 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData
|
|||||||
"vals": record.Vals,
|
"vals": record.Vals,
|
||||||
}
|
}
|
||||||
err = this.Change(uid, update)
|
err = this.Change(uid, update)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
record.Vals[cfg.Id] = &pb.RtaskData{
|
record.Vals[cfg.Id] = &pb.RtaskData{
|
||||||
Data: toMap(vals...),
|
Data: toMap(vals...),
|
||||||
@ -119,5 +119,18 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData
|
|||||||
err = this.Change(uid, update)
|
err = this.Change(uid, update)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//日/周/成就任务监听触发
|
||||||
|
tl := new(task.TaskListen)
|
||||||
|
tl.Uid = uid
|
||||||
|
tl.TaskType = comm.TaskType(cfg.Id)
|
||||||
|
if im, err := this.service.GetModule(comm.ModuleTask); err == nil {
|
||||||
|
if mt, ok := im.(*task.ModuleTask); ok {
|
||||||
|
mt.GetEventApp().Dispatch(comm.EventTaskChanged, tl)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
this.moduleRtask.Printf("get ModuleTask err: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ package task
|
|||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/log"
|
event_v2 "go_dreamfactory/lego/sys/event/v2"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"sort"
|
"sort"
|
||||||
@ -14,12 +14,15 @@ import (
|
|||||||
type ModelTask struct {
|
type ModelTask struct {
|
||||||
modules.MCompModel
|
modules.MCompModel
|
||||||
moduleTask *ModuleTask
|
moduleTask *ModuleTask
|
||||||
|
EventApp *event_v2.App
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *ModelTask) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
this.TableName = comm.TableTask
|
this.TableName = comm.TableTask
|
||||||
err = this.MCompModel.Init(service, module, comp, options)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.moduleTask = module.(*ModuleTask)
|
this.moduleTask = module.(*ModuleTask)
|
||||||
|
this.EventApp = event_v2.NewApp()
|
||||||
|
this.EventApp.Listen(comm.EventTaskChanged, this.doTaskHandle)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,10 +39,21 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) (newli
|
|||||||
return list[i].Sort < list[j].Sort
|
return list[i].Sort < list[j].Sort
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//
|
||||||
|
dr := this.moduleTask.ModuleRtask.GetCondiData(uid)
|
||||||
|
if dr == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 筛选出指定tag的任务
|
// 筛选出指定tag的任务
|
||||||
var taskList []*pb.DBTask
|
var taskList []*pb.DBTask
|
||||||
for _, v := range list {
|
for _, v := range list {
|
||||||
if v.Tag == int32(taskTag) {
|
if v.Tag == int32(taskTag) {
|
||||||
|
if p, ok := dr.Vals[v.TypeId]; ok {
|
||||||
|
if len(p.Data) > 0 {
|
||||||
|
v.Progress = p.Data[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
taskList = append(taskList, v)
|
taskList = append(taskList, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -120,14 +134,13 @@ func (this *ModelTask) initTask(uid string, taskTag comm.TaskTag) error {
|
|||||||
for _, cnf := range data {
|
for _, cnf := range data {
|
||||||
objId := primitive.NewObjectID().Hex()
|
objId := primitive.NewObjectID().Hex()
|
||||||
task := &pb.DBTask{
|
task := &pb.DBTask{
|
||||||
Id: objId,
|
Id: objId,
|
||||||
Tag: cnf.IdTag,
|
Tag: cnf.IdTag,
|
||||||
Uid: uid,
|
Uid: uid,
|
||||||
TypeId: cnf.TypeId,
|
TypeId: cnf.TypeId,
|
||||||
TaskId: cnf.Key,
|
TaskId: cnf.Key,
|
||||||
Active: cnf.Active,
|
Active: cnf.Active,
|
||||||
Progress: cnf.ConditionSecond,
|
Sort: cnf.IdList,
|
||||||
Sort: cnf.IdList,
|
|
||||||
}
|
}
|
||||||
if err := this.AddList(uid, task.Id, task); err != nil {
|
if err := this.AddList(uid, task.Id, task); err != nil {
|
||||||
this.moduleTask.Errorf("initTask addlists err %v", err)
|
this.moduleTask.Errorf("initTask addlists err %v", err)
|
||||||
@ -206,6 +219,7 @@ func (this *ModelTask) clearTask(uid string, taskTag ...comm.TaskTag) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//进入卡牌攻略
|
//进入卡牌攻略
|
||||||
|
// Deprecated
|
||||||
func (this *ModelTask) inStrategy(uid string, heroCfgId int32) (taskIds []int32, err error) {
|
func (this *ModelTask) inStrategy(uid string, heroCfgId int32) (taskIds []int32, err error) {
|
||||||
//检查此英雄攻略是否完成
|
//检查此英雄攻略是否完成
|
||||||
taskList := this.getTaskListByTag(uid, comm.TASK_STRATEGY)
|
taskList := this.getTaskListByTag(uid, comm.TASK_STRATEGY)
|
||||||
@ -213,10 +227,10 @@ func (this *ModelTask) inStrategy(uid string, heroCfgId int32) (taskIds []int32,
|
|||||||
for _, v := range taskList {
|
for _, v := range taskList {
|
||||||
conf := this.moduleTask.configure.getTaskById(v.TaskId)
|
conf := this.moduleTask.configure.getTaskById(v.TaskId)
|
||||||
if conf != nil {
|
if conf != nil {
|
||||||
if conf.RestrictiveCondition == heroCfgId && v.Status != 1 {
|
// if conf.RestrictiveCondition == heroCfgId && v.Status != 1 {
|
||||||
allFinished = false
|
// allFinished = false
|
||||||
break
|
// break
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,68 +253,58 @@ func (this *ModelTask) inStrategy(uid string, heroCfgId int32) (taskIds []int32,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务类型-装备升级
|
|
||||||
func (this *ModelTask) UpEquip(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 任务类型-英雄星级升级
|
|
||||||
func (this *ModelTask) UpHeroStar(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 任务类型-英雄等级升级
|
|
||||||
func (this *ModelTask) UpHeroLevel(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask {
|
|
||||||
if task, ok := this.checkTask(uid, taskId); ok {
|
|
||||||
var progress int32
|
|
||||||
// 任务完成
|
|
||||||
if tp.Second >= task.Progress {
|
|
||||||
progress = 0
|
|
||||||
update := map[string]interface{}{
|
|
||||||
"progress": progress,
|
|
||||||
"status": 1,
|
|
||||||
}
|
|
||||||
if err := this.modifyUserTask(task.Uid, task.Id, update); err != nil {
|
|
||||||
log.Errorf("err %v", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
task.Progress = progress
|
|
||||||
task.Status = 1
|
|
||||||
return task
|
|
||||||
} else {
|
|
||||||
// 任务未完成
|
|
||||||
progress = task.Progress - tp.Second
|
|
||||||
if progress <= 0 {
|
|
||||||
progress = 0
|
|
||||||
}
|
|
||||||
update := map[string]interface{}{
|
|
||||||
"progress": progress,
|
|
||||||
}
|
|
||||||
if err := this.modifyUserTask(task.Uid, task.Id, update); err != nil {
|
|
||||||
this.moduleTask.Errorf("err %v", err)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
task.Progress = progress
|
|
||||||
return task
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// 任务处理
|
// 任务处理
|
||||||
func (this *ModelTask) doTaskHandle(uid string, taskType comm.TaskType, taskParam *pb.TaskParam) (tasks []*pb.DBTask, err error) {
|
func (this *ModelTask) doTaskHandle(event interface{}, next func(event interface{})) {
|
||||||
data, err := this.moduleTask.configure.getTasks(int32(taskType))
|
tl := event.(*TaskListen)
|
||||||
|
|
||||||
|
data, err := this.moduleTask.configure.getTasks(int32(tl.TaskType))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.moduleTask.Errorf("taskHandle err %v", err)
|
this.moduleTask.Errorf("taskHandle err %v", err)
|
||||||
return nil, err
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
dr := this.moduleTask.ModuleRtask.GetCondiData(tl.Uid)
|
||||||
|
if dr == nil {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, conf := range data {
|
for _, conf := range data {
|
||||||
if handle, ok := this.moduleTask.taskHandleMap[conf.TypeId]; ok {
|
ret, ok := dr.Vals[conf.TypeId]
|
||||||
if task := handle(uid, conf.Key, taskParam); task != nil {
|
if !ok {
|
||||||
tasks = append(tasks, task)
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if task, ok := this.checkTask(tl.Uid, conf.Key); ok {
|
||||||
|
update := make(map[string]interface{})
|
||||||
|
var progress int32
|
||||||
|
if code := this.moduleTask.ModuleRtask.CheckCondi(tl.Uid, conf.TypeId); code == pb.ErrorCode_Success {
|
||||||
|
// update data
|
||||||
|
if ret != nil && len(ret.Data) > 0 {
|
||||||
|
progress = ret.Data[0]
|
||||||
|
}
|
||||||
|
update = map[string]interface{}{
|
||||||
|
"progress": progress,
|
||||||
|
"status": 1,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ret != nil && len(ret.Data) > 0 {
|
||||||
|
progress = ret.Data[0]
|
||||||
|
}
|
||||||
|
update = map[string]interface{}{
|
||||||
|
"progress": progress,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if err = this.modifyUserTask(tl.Uid, task.Id, update); err != nil {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TaskListen struct {
|
||||||
|
event_v2.Event
|
||||||
|
Uid string
|
||||||
|
TaskType comm.TaskType
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/core"
|
"go_dreamfactory/lego/core"
|
||||||
"go_dreamfactory/lego/sys/event"
|
"go_dreamfactory/lego/sys/event"
|
||||||
|
event_v2 "go_dreamfactory/lego/sys/event/v2"
|
||||||
"go_dreamfactory/lego/sys/log"
|
"go_dreamfactory/lego/sys/log"
|
||||||
"go_dreamfactory/modules"
|
"go_dreamfactory/modules"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
@ -19,12 +20,12 @@ type ModuleTask struct {
|
|||||||
api *apiComp
|
api *apiComp
|
||||||
configure *configureComp
|
configure *configureComp
|
||||||
|
|
||||||
taskHandleMap map[int32]taskHandle //任务处理器
|
// taskHandleMap map[int32]taskHandle //任务处理器
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewModule() core.IModule {
|
func NewModule() core.IModule {
|
||||||
return &ModuleTask{
|
return &ModuleTask{
|
||||||
taskHandleMap: make(map[int32]taskHandle),
|
// taskHandleMap: make(map[int32]taskHandle),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,9 +33,13 @@ func (this *ModuleTask) GetType() core.M_Modules {
|
|||||||
return comm.ModuleTask
|
return comm.ModuleTask
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (this *ModuleTask) GetEventApp() *event_v2.App {
|
||||||
|
return this.modelTask.EventApp
|
||||||
|
}
|
||||||
|
|
||||||
func (this *ModuleTask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
func (this *ModuleTask) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||||
err = this.ModuleBase.Init(service, module, options)
|
err = this.ModuleBase.Init(service, module, options)
|
||||||
this.initTaskHandle()
|
// this.initTaskHandle()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,19 +124,19 @@ func (this *ModuleTask) ResetTask(uid string, taskTag comm.TaskTag) {
|
|||||||
|
|
||||||
//任务处理
|
//任务处理
|
||||||
func (this *ModuleTask) SendToTask(session comm.IUserSession, taskType comm.TaskType, taskPram *pb.TaskParam) (code pb.ErrorCode) {
|
func (this *ModuleTask) SendToTask(session comm.IUserSession, taskType comm.TaskType, taskPram *pb.TaskParam) (code pb.ErrorCode) {
|
||||||
if tasks, err := this.modelTask.doTaskHandle(session.GetUserId(), taskType, taskPram); err != nil {
|
// if tasks, err := this.modelTask.doTaskHandle(session.GetUserId(), taskType, taskPram); err != nil {
|
||||||
code = pb.ErrorCode_TaskHandle
|
// code = pb.ErrorCode_TaskHandle
|
||||||
} else {
|
// } else {
|
||||||
for _, t := range tasks {
|
// for _, t := range tasks {
|
||||||
if err := session.SendMsg(string(comm.ModuleTask), TaskSubTypeFinishedPush, &pb.TaskFinishedPush{TaskId: t.TaskId}); err != nil {
|
// if err := session.SendMsg(string(comm.ModuleTask), TaskSubTypeFinishedPush, &pb.TaskFinishedPush{TaskId: t.TaskId}); err != nil {
|
||||||
this.modelTask.moduleTask.Errorf("SendToTask sendmsg err:%v", err)
|
// this.modelTask.moduleTask.Errorf("SendToTask sendmsg err:%v", err)
|
||||||
}
|
// }
|
||||||
// 每日任务
|
// // 每日任务
|
||||||
if t.Tag == int32(comm.TASK_DAILY) {
|
// if t.Tag == int32(comm.TASK_DAILY) {
|
||||||
this.ModuleRtask.SendToRtask(session, comm.Rtype3, t.TaskId)
|
// this.ModuleRtask.SendToRtask(session, comm.Rtype3, t.TaskId)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,29 +159,29 @@ func (this *ModuleTask) CleanData(uid string) {
|
|||||||
//任务处理器注册
|
//任务处理器注册
|
||||||
type taskHandle func(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask
|
type taskHandle func(uid string, taskId int32, tp *pb.TaskParam) *pb.DBTask
|
||||||
|
|
||||||
func (this *ModuleTask) register(taskType comm.TaskType, fn taskHandle) {
|
// func (this *ModuleTask) register(taskType comm.TaskType, fn taskHandle) {
|
||||||
if _, ok := this.taskHandleMap[int32(taskType)]; !ok {
|
// if _, ok := this.taskHandleMap[int32(taskType)]; !ok {
|
||||||
this.taskHandleMap[int32(taskType)] = fn
|
// this.taskHandleMap[int32(taskType)] = fn
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 初始任务事件处理类
|
// 初始任务事件处理类
|
||||||
func (this *ModuleTask) initTaskHandle() {
|
// func (this *ModuleTask) initTaskHandle() {
|
||||||
if data, err := this.configure.getTaskList(); err == nil {
|
// if data, err := this.configure.getTaskList(); err == nil {
|
||||||
for _, v := range data {
|
// for _, v := range data {
|
||||||
switch v.TypeId {
|
// switch v.TypeId {
|
||||||
case int32(comm.TaskTypeUpEquip):
|
// case int32(comm.TaskTypeUpEquip):
|
||||||
this.register(comm.TaskTypeUpEquip, this.modelTask.UpEquip)
|
// this.register(comm.TaskTypeUpEquip, this.modelTask.UpEquip)
|
||||||
case int32(comm.TaskTypeUpHeroStar):
|
// case int32(comm.TaskTypeUpHeroStar):
|
||||||
this.register(comm.TaskTypeUpHeroStar, this.modelTask.UpHeroStar)
|
// this.register(comm.TaskTypeUpHeroStar, this.modelTask.UpHeroStar)
|
||||||
case int32(comm.TaskTypeUpHeroLevel):
|
// case int32(comm.TaskTypeUpHeroLevel):
|
||||||
this.register(comm.TaskTypeUpHeroLevel, this.modelTask.UpHeroLevel)
|
// this.register(comm.TaskTypeUpHeroLevel, this.modelTask.UpHeroLevel)
|
||||||
default:
|
// default:
|
||||||
log.Warnf("%v task type not supported", v.TypeId)
|
// log.Warnf("%v task type not supported", v.TypeId)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
func (this *ModuleTask) GetTaskFinished(uid string, taskTage comm.TaskTag) []*pb.DBTask {
|
func (this *ModuleTask) GetTaskFinished(uid string, taskTage comm.TaskTag) []*pb.DBTask {
|
||||||
return this.modelTask.getFinishTasks(uid, taskTage)
|
return this.modelTask.getFinishTasks(uid, taskTage)
|
||||||
|
@ -20,16 +20,16 @@ import (
|
|||||||
type ModelUser struct {
|
type ModelUser struct {
|
||||||
modules.MCompModel
|
modules.MCompModel
|
||||||
module *User
|
module *User
|
||||||
eventApp *event_v2.App
|
EventApp *event_v2.App
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelUser) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
func (this *ModelUser) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||||
this.TableName = comm.TableUser
|
this.TableName = comm.TableUser
|
||||||
err = this.MCompModel.Init(service, module, comp, options)
|
err = this.MCompModel.Init(service, module, comp, options)
|
||||||
this.module = module.(*User)
|
this.module = module.(*User)
|
||||||
this.eventApp = event_v2.NewApp()
|
this.EventApp = event_v2.NewApp()
|
||||||
this.eventApp.Listen(comm.EventUserChanged, this.ChangeExp)
|
this.EventApp.Listen(comm.EventUserChanged, this.ChangeExp)
|
||||||
this.eventApp.Listen(comm.EventUserChanged, this.ChangeLevel)
|
this.EventApp.Listen(comm.EventUserChanged, this.ChangeLevel)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ func (this *User) EventUserChanged(session comm.IUserSession) {
|
|||||||
ul.exp = user.Exp
|
ul.exp = user.Exp
|
||||||
ul.lv = user.Lv
|
ul.lv = user.Lv
|
||||||
}
|
}
|
||||||
this.modelUser.eventApp.Dispatch(comm.EventUserChanged, ul)
|
this.modelUser.EventApp.Dispatch(comm.EventUserChanged, ul)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *User) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
func (this *User) GetUserExpand(uid string) (result *pb.DBUserExpand, err error) {
|
||||||
|
@ -16,8 +16,6 @@ type GameTaskRoundData struct {
|
|||||||
IdTag int32
|
IdTag int32
|
||||||
TaskDisplay string
|
TaskDisplay string
|
||||||
TypeId int32
|
TypeId int32
|
||||||
ConditionSecond int32
|
|
||||||
RestrictiveCondition int32
|
|
||||||
Active int32
|
Active int32
|
||||||
IdAfter int32
|
IdAfter int32
|
||||||
JumpInterface int32
|
JumpInterface int32
|
||||||
@ -37,8 +35,6 @@ func (_v *GameTaskRoundData)Deserialize(_buf map[string]interface{}) (err error)
|
|||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_tag"].(float64); !_ok_ { err = errors.New("id_tag error"); return }; _v.IdTag = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_tag"].(float64); !_ok_ { err = errors.New("id_tag error"); return }; _v.IdTag = int32(_tempNum_) }
|
||||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _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["task_display"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDisplay error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDisplay, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_id"].(float64); !_ok_ { err = errors.New("type_id error"); return }; _v.TypeId = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type_id"].(float64); !_ok_ { err = errors.New("type_id error"); return }; _v.TypeId = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition_second"].(float64); !_ok_ { err = errors.New("condition_second error"); return }; _v.ConditionSecond = int32(_tempNum_) }
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["restrictive_condition"].(float64); !_ok_ { err = errors.New("restrictive_condition error"); return }; _v.RestrictiveCondition = int32(_tempNum_) }
|
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["active"].(float64); !_ok_ { err = errors.New("active error"); return }; _v.Active = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_after"].(float64); !_ok_ { err = errors.New("id_after error"); return }; _v.IdAfter = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id_after"].(float64); !_ok_ { err = errors.New("id_after error"); return }; _v.IdAfter = int32(_tempNum_) }
|
||||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["jump_interface"].(float64); !_ok_ { err = errors.New("jump_interface error"); return }; _v.JumpInterface = int32(_tempNum_) }
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["jump_interface"].(float64); !_ok_ { err = errors.New("jump_interface error"); return }; _v.JumpInterface = int32(_tempNum_) }
|
||||||
|
Loading…
Reference in New Issue
Block a user