diff --git a/bin/json/game_achievetask.json b/bin/json/game_achievetask.json
index 4465a2998..315440b7a 100644
--- a/bin/json/game_achievetask.json
+++ b/bin/json/game_achievetask.json
@@ -6,6 +6,10 @@
"key": "achieve_achieve_task_task_name_01",
"text": "成就任务测试名字1"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000001,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -25,6 +29,10 @@
"key": "achieve_achieve_task_task_name_02",
"text": "成就任务测试名字2"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000002,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -44,6 +52,10 @@
"key": "achieve_achieve_task_task_name_03",
"text": "成就任务测试名字3"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000003,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -63,6 +75,10 @@
"key": "achieve_achieve_task_task_name_04",
"text": "成就任务测试名字4"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000004,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -82,6 +98,10 @@
"key": "achieve_achieve_task_task_name_05",
"text": "成就任务测试名字5"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000005,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -101,6 +121,10 @@
"key": "achieve_achieve_task_task_name_06",
"text": "成就任务测试名字6"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000006,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -120,6 +144,10 @@
"key": "achieve_achieve_task_task_name_07",
"text": "成就任务测试名字7"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000007,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -139,6 +167,10 @@
"key": "achieve_achieve_task_task_name_08",
"text": "成就任务测试名字8"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000008,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -158,6 +190,10 @@
"key": "achieve_achieve_task_task_name_09",
"text": "成就任务测试名字9"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000009,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -177,6 +213,10 @@
"key": "achieve_achieve_task_task_name_10",
"text": "成就任务测试名字10"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000010,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -196,6 +236,10 @@
"key": "achieve_achieve_task_task_name_11",
"text": "成就任务测试名字11"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000011,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -215,6 +259,10 @@
"key": "achieve_achieve_task_task_name_12",
"text": "成就任务测试名字12"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000012,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -234,6 +282,10 @@
"key": "achieve_achieve_task_task_name_13",
"text": "成就任务测试名字13"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000013,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -253,6 +305,10 @@
"key": "achieve_achieve_task_task_name_14",
"text": "成就任务测试名字14"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000014,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -272,6 +328,10 @@
"key": "achieve_achieve_task_task_name_15",
"text": "成就任务测试名字15"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000015,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -291,6 +351,10 @@
"key": "achieve_achieve_task_task_name_16",
"text": "成就任务测试名字16"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000016,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -310,6 +374,10 @@
"key": "achieve_achieve_task_task_name_17",
"text": "成就任务测试名字17"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000017,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -329,6 +397,10 @@
"key": "achieve_achieve_task_task_name_18",
"text": "成就任务测试名字18"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000018,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -348,6 +420,10 @@
"key": "achieve_achieve_task_task_name_19",
"text": "成就任务测试名字19"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000019,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -367,6 +443,10 @@
"key": "achieve_achieve_task_task_name_20",
"text": "成就任务测试名字20"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000020,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -386,6 +466,10 @@
"key": "achieve_achieve_task_task_name_21",
"text": "成就任务测试名字21"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000021,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -405,6 +489,10 @@
"key": "achieve_achieve_task_task_name_22",
"text": "成就任务测试名字22"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000022,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -424,6 +512,10 @@
"key": "achieve_achieve_task_task_name_23",
"text": "成就任务测试名字23"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000023,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -443,6 +535,10 @@
"key": "achieve_achieve_task_task_name_24",
"text": "成就任务测试名字24"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000024,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -462,6 +558,10 @@
"key": "achieve_achieve_task_task_name_25",
"text": "成就任务测试名字25"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000025,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -481,6 +581,10 @@
"key": "achieve_achieve_task_task_name_26",
"text": "成就任务测试名字26"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000026,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -500,6 +604,10 @@
"key": "achieve_achieve_task_task_name_27",
"text": "成就任务测试名字27"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000027,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -519,6 +627,10 @@
"key": "achieve_achieve_task_task_name_28",
"text": "成就任务测试名字28"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000028,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -538,6 +650,10 @@
"key": "achieve_achieve_task_task_name_29",
"text": "成就任务测试名字29"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000029,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -557,6 +673,10 @@
"key": "achieve_achieve_task_task_name_30",
"text": "成就任务测试名字30"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000030,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -576,6 +696,10 @@
"key": "achieve_achieve_task_task_name_31",
"text": "成就任务测试名字31"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000031,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -595,6 +719,10 @@
"key": "achieve_achieve_task_task_name_32",
"text": "成就任务测试名字32"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000032,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -614,6 +742,10 @@
"key": "achieve_achieve_task_task_name_33",
"text": "成就任务测试名字33"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000033,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
@@ -633,6 +765,10 @@
"key": "achieve_achieve_task_task_name_34",
"text": "成就任务测试名字34"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000034,
"task_icon": "cj_icon_lb_ty03",
"task_quality": 1,
@@ -652,6 +788,10 @@
"key": "achieve_achieve_task_task_name_35",
"text": "成就任务测试名字35"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000035,
"task_icon": "cj_icon_lb_ty02",
"task_quality": 2,
@@ -671,6 +811,10 @@
"key": "achieve_achieve_task_task_name_36",
"text": "成就任务测试名字36"
},
+ "task_desc": {
+ "key": "",
+ "text": ""
+ },
"task_buried": 16000036,
"task_icon": "cj_icon_lb_ty01",
"task_quality": 3,
diff --git a/bin/json/game_gamefast.json b/bin/json/game_gamefast.json
new file mode 100644
index 000000000..a83e448f8
--- /dev/null
+++ b/bin/json/game_gamefast.json
@@ -0,0 +1,274 @@
+[
+ {
+ "key": 1,
+ "type": 1,
+ "condition": 2,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100000
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 1
+ }
+ ]
+ },
+ {
+ "key": 2,
+ "type": 1,
+ "condition": 3,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100001
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 2
+ }
+ ]
+ },
+ {
+ "key": 3,
+ "type": 1,
+ "condition": 4,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100002
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 3
+ }
+ ]
+ },
+ {
+ "key": 4,
+ "type": 1,
+ "condition": 5,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100003
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 4
+ }
+ ]
+ },
+ {
+ "key": 5,
+ "type": 1,
+ "condition": 6,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100004
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 5
+ }
+ ]
+ },
+ {
+ "key": 6,
+ "type": 1,
+ "condition": 7,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100005
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 6
+ }
+ ]
+ },
+ {
+ "key": 7,
+ "type": 1,
+ "condition": 8,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100006
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 7
+ }
+ ]
+ },
+ {
+ "key": 8,
+ "type": 1,
+ "condition": 9,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100007
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 8
+ }
+ ]
+ },
+ {
+ "key": 9,
+ "type": 2,
+ "condition": 3,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100008
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 9
+ }
+ ]
+ },
+ {
+ "key": 10,
+ "type": 2,
+ "condition": 6,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100009
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 10
+ }
+ ]
+ },
+ {
+ "key": 11,
+ "type": 2,
+ "condition": 9,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100010
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 11
+ }
+ ]
+ },
+ {
+ "key": 12,
+ "type": 2,
+ "condition": 12,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100011
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 12
+ }
+ ]
+ },
+ {
+ "key": 13,
+ "type": 2,
+ "condition": 15,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100012
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 13
+ }
+ ]
+ },
+ {
+ "key": 14,
+ "type": 2,
+ "condition": 18,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100013
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 14
+ }
+ ]
+ },
+ {
+ "key": 15,
+ "type": 2,
+ "condition": 66,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100014
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 15
+ }
+ ]
+ },
+ {
+ "key": 16,
+ "type": 2,
+ "condition": 99,
+ "reward": [
+ {
+ "a": "attr",
+ "t": "gold",
+ "n": 100015
+ },
+ {
+ "a": "item",
+ "t": "10000001",
+ "n": 16
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/bin/json/game_gameklotski.json b/bin/json/game_gameklotski.json
index e2272b3f1..d65f53622 100644
--- a/bin/json/game_gameklotski.json
+++ b/bin/json/game_gameklotski.json
@@ -55,7 +55,7 @@
"v": 1
},
{
- "k": 3,
+ "k": 13,
"v": 2
},
{
@@ -146,7 +146,7 @@
},
{
"k": 10,
- "v": 2
+ "v": 1
},
{
"k": 13,
@@ -405,14 +405,10 @@
},
{
"k": 13,
- "v": 2
- },
- {
- "k": 16,
"v": 1
},
{
- "k": 17,
+ "k": 16,
"v": 1
},
{
diff --git a/bin/json/game_global.json b/bin/json/game_global.json
index aa72d46e9..424bb3e15 100644
--- a/bin/json/game_global.json
+++ b/bin/json/game_global.json
@@ -857,6 +857,7 @@
"dragon_funtime": 700,
"challenge_npc_story": [
9999991
- ]
+ ],
+ "quickcard_aispeed": 400
}
]
\ No newline at end of file
diff --git a/bin/json/game_guide.json b/bin/json/game_guide.json
index 0e2499dcc..b9b7b94f8 100644
--- a/bin/json/game_guide.json
+++ b/bin/json/game_guide.json
@@ -32,7 +32,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 500,
+ "skiptime": 1000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -71,7 +71,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -110,7 +110,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -149,7 +149,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -187,7 +187,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -222,7 +222,7 @@
"mask": 1,
"lock": 1,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -261,7 +261,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -300,7 +300,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -338,7 +338,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -377,7 +377,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -416,7 +416,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -456,7 +456,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -495,7 +495,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -534,7 +534,7 @@
"mask": 1,
"lock": 1,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
@@ -573,7 +573,7 @@
"mask": 0,
"lock": 0,
"uishow": 0,
- "skiptime": 0,
+ "skiptime": 5000,
"skip": 0,
"skipgroup": 0,
"reward": []
diff --git a/bin/json/game_rdtasknpc.json b/bin/json/game_rdtasknpc.json
index 8dc1b11df..44abb2ce4 100644
--- a/bin/json/game_rdtasknpc.json
+++ b/bin/json/game_rdtasknpc.json
@@ -2084,9 +2084,9 @@
"heroid": 25001,
"Levelid": 0,
"datas": [
- "GameMain",
- "熊猫_圣桃树_常驻",
- "901"
+ "CommandScene",
+ "功能入口_主线",
+ "905"
],
"event": [
2,
@@ -2104,8 +2104,8 @@
"905"
],
"event": [
- 2,
- 10230
+ 10,
+ 166
],
"goto": 0
},
diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json
index 22a8a6e9a..8059b8757 100644
--- a/bin/json/game_worldtask.json
+++ b/bin/json/game_worldtask.json
@@ -429,7 +429,7 @@
],
"deliver_npc": 0,
"taskend_removeitem": [],
- "auto_accept": 1,
+ "auto_accept": 0,
"tasktips": 0,
"lock_add": 0,
"reword": [],
diff --git a/modules/jielong/api_lvlist.go b/modules/jielong/api_lvlist.go
index 7f9a86f54..8730ff4f1 100644
--- a/modules/jielong/api_lvlist.go
+++ b/modules/jielong/api_lvlist.go
@@ -3,6 +3,8 @@ package jielong
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
+ "go_dreamfactory/sys/configure"
+ "go_dreamfactory/utils"
)
// 参数校验
@@ -30,6 +32,16 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.JielongGetListRe
}
return
}
+ if list.Lasttime < configure.Now().Unix() {
+ update := make(map[string]interface{}, 0)
+ list.Lasttime = utils.WeekIntervalTime()
+ list.Wincount = 0
+ list.Reward = map[int32]int32{}
+ update["lasttime"] = list.Lasttime
+ update["wincount"] = list.Wincount
+ update["reward"] = list.Reward
+ this.module.modelJielong.changeJielongData(session.GetUserId(), update)
+ }
session.SendMsg(string(this.module.GetType()), "getlist", &pb.JielongGetListResp{
Data: list,
})
diff --git a/modules/jielong/api_result.go b/modules/jielong/api_result.go
index 56d017e3c..705500bbf 100644
--- a/modules/jielong/api_result.go
+++ b/modules/jielong/api_result.go
@@ -34,6 +34,10 @@ func (this *apiComp) Result(session comm.IUserSession, req *pb.JielongResultReq)
if req.Bwin {
list.Wincount += 1 // 连胜+1
+ if list.Wincount > list.Hisotry {
+ list.Hisotry = list.Wincount
+ update["hisotry"] = list.Hisotry
+ }
} else {
list.Wincount = 0 // 连胜清零
}
diff --git a/modules/jielong/api_reward.go b/modules/jielong/api_reward.go
index 470f605ec..f902c813b 100644
--- a/modules/jielong/api_reward.go
+++ b/modules/jielong/api_reward.go
@@ -44,6 +44,21 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.JielongRewardReq)
}
return
}
+ if c, e := this.module.configure.getGameFastDataByType(1); e != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ }
+ return
+ } else {
+ if _, ok := c[req.Rewardkey]; !ok {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ }
+ return
+ }
+ }
list.Reward[req.Rewardkey] = 1
update["reward"] = list.Reward
} else {
@@ -54,6 +69,21 @@ func (this *apiComp) Reward(session comm.IUserSession, req *pb.JielongRewardReq)
}
return
}
+ if c, e := this.module.configure.getGameFastDataByType(2); e != nil {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ }
+ return
+ } else {
+ if _, ok := c[req.Rewardkey]; !ok {
+ errdata = &pb.ErrorData{
+ Code: pb.ErrorCode_ConfigNoFound,
+ Title: pb.ErrorCode_ConfigNoFound.ToString(),
+ }
+ return
+ }
+ }
list.Gotarr[req.Rewardkey] = 1
update["gotarr"] = list.Gotarr
}
diff --git a/modules/jielong/configure.go b/modules/jielong/configure.go
index 9d3859366..1c93bc9bf 100644
--- a/modules/jielong/configure.go
+++ b/modules/jielong/configure.go
@@ -1,31 +1,69 @@
package jielong
import (
+ "fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
cfg "go_dreamfactory/sys/configure/structs"
+ "sync"
)
const (
- game_venturegiflogin = "game_venturegiftslogin.json"
- game_venturegiftslvaward = "game_venturegiftslvaward.json"
+ game_fast = "game_gamefast.json"
)
type configureComp struct {
modules.MCompConfigure
module *Jielong
+ hlock sync.RWMutex
+ tyep1 map[int32]*cfg.GameGameFastData
+ tyep2 map[int32]*cfg.GameGameFastData
}
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.(*Jielong)
- err = this.LoadMultiConfigure(map[string]interface{}{
- game_venturegiflogin: cfg.NewGameVenturegiftsLogin,
- game_venturegiftslvaward: cfg.NewGameVenturegiftsLvaward,
+ // err = this.LoadMultiConfigure(map[string]interface{}{
+ // game_fast: cfg.NewGameGameFast,
+ // })
+ configure.RegisterConfigure(game_fast, cfg.NewGameGameFast, func() {
+ if v, err := this.GetConfigure(game_fast); err == nil {
+ this.hlock.Lock()
+ defer this.hlock.Unlock()
+ this.tyep1 = make(map[int32]*cfg.GameGameFastData)
+ this.tyep2 = make(map[int32]*cfg.GameGameFastData)
+ if _configure, ok := v.(*cfg.GameGameFast); ok {
+ for _, v := range _configure.GetDataList() {
+ if v.Type == 1 {
+ this.tyep1[v.Condition] = v
+ } else if v.Type == 2 {
+ this.tyep2[v.Condition] = v
+ }
+ }
+ return
+ }
+ } else {
+ err = fmt.Errorf("%T no is *cfg.GameGameFastData", v)
+ }
})
- this.getGameVenturegiftsLogin(1)
+
+ return
+}
+
+func (this *configureComp) getGameFastDataByType(itype int32) (conf map[int32]*cfg.GameGameFastData, err error) {
+ this.hlock.RLock()
+ defer this.hlock.RUnlock()
+ if itype == 1 {
+ conf = this.tyep1
+ } else if itype == 1 {
+ conf = this.tyep2
+ }
+ if conf == nil {
+ err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_fast, itype)
+ return
+ }
return
}
@@ -33,32 +71,16 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name)
}
-func (this *configureComp) getGameVenturegiftsLogin(id int32) (conf *cfg.GameVenturegiftsLoginData, err error) {
+func (this *configureComp) getGameFastData(id int32) (conf *cfg.GameGameFastData, err error) {
var (
v interface{}
ok bool
)
- if v, err = this.GetConfigure(game_venturegiflogin); err != nil {
+ if v, err = this.GetConfigure(game_fast); err != nil {
return
}
- if conf, ok = v.(*cfg.GameVenturegiftsLogin).GetDataMap()[id]; !ok {
- err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiflogin, id)
- this.module.Errorln(err)
- return
- }
- return
-}
-
-func (this *configureComp) getGameVenturegiftsLvReward(id int32) (conf *cfg.GameVenturegiftsLvawardData, err error) {
- var (
- v interface{}
- ok bool
- )
- if v, err = this.GetConfigure(game_venturegiftslvaward); err != nil {
- return
- }
- if conf, ok = v.(*cfg.GameVenturegiftsLvaward).GetDataMap()[id]; !ok {
- err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_venturegiftslvaward, id)
+ if conf, ok = v.(*cfg.GameGameFast).GetDataMap()[id]; !ok {
+ err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_fast, id)
this.module.Errorln(err)
return
}
diff --git a/modules/jielong/mode_jielong.go b/modules/jielong/mode_jielong.go
index 188dc6341..69a6eca15 100644
--- a/modules/jielong/mode_jielong.go
+++ b/modules/jielong/mode_jielong.go
@@ -6,7 +6,7 @@ import (
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/modules"
"go_dreamfactory/pb"
- "go_dreamfactory/sys/configure"
+ "go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
@@ -42,7 +42,7 @@ func (this *ModelJielong) getUserJielongData(uid string) (results *pb.DBJielongD
Reward: map[int32]int32{},
Hisotry: 0,
Gotarr: map[int32]int32{},
- Lasttime: configure.Now().Unix(),
+ Lasttime: utils.WeekIntervalTime(),
}
err = this.Add(uid, results)
}
diff --git a/modules/venture/configure.go b/modules/venture/configure.go
index 589cf5c77..cd830c19a 100644
--- a/modules/venture/configure.go
+++ b/modules/venture/configure.go
@@ -25,7 +25,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
game_venturegiflogin: cfg.NewGameVenturegiftsLogin,
game_venturegiftslvaward: cfg.NewGameVenturegiftsLvaward,
})
- this.getGameVenturegiftsLogin(1)
return
}
diff --git a/services/worker/main.go b/services/worker/main.go
index 06cbf379e..903d60182 100644
--- a/services/worker/main.go
+++ b/services/worker/main.go
@@ -33,6 +33,7 @@ import (
"go_dreamfactory/modules/horoscope"
"go_dreamfactory/modules/hunting"
"go_dreamfactory/modules/items"
+ "go_dreamfactory/modules/jielong"
"go_dreamfactory/modules/kftask"
"go_dreamfactory/modules/library"
"go_dreamfactory/modules/linestory"
@@ -163,6 +164,7 @@ func main() {
turntable.NewModule(),
venture.NewModule(),
achieve.NewModule(),
+ jielong.NewModule(),
)
}
diff --git a/sys/configure/structs/Game.AchieveTaskData.go b/sys/configure/structs/Game.AchieveTaskData.go
index 7e7d00879..60504bf96 100644
--- a/sys/configure/structs/Game.AchieveTaskData.go
+++ b/sys/configure/structs/Game.AchieveTaskData.go
@@ -14,6 +14,7 @@ type GameAchieveTaskData struct {
Key int32
TaskGroupFrom int32
TaskName string
+ TaskDesc string
TaskBuried int32
TaskIcon string
TaskQuality int32
@@ -31,6 +32,7 @@ func (_v *GameAchieveTaskData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task_group_from"].(float64); !_ok_ { err = errors.New("task_group_from error"); return }; _v.TaskGroupFrom = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskName error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskName, _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_desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDesc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDesc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task_buried"].(float64); !_ok_ { err = errors.New("task_buried error"); return }; _v.TaskBuried = int32(_tempNum_) }
{ var _ok_ bool; if _v.TaskIcon, _ok_ = _buf["task_icon"].(string); !_ok_ { err = errors.New("task_icon error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["task_quality"].(float64); !_ok_ { err = errors.New("task_quality error"); return }; _v.TaskQuality = int32(_tempNum_) }
diff --git a/sys/configure/structs/Game.GameFast.go b/sys/configure/structs/Game.GameFast.go
new file mode 100644
index 000000000..5ce42bec7
--- /dev/null
+++ b/sys/configure/structs/Game.GameFast.go
@@ -0,0 +1,42 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+type GameGameFast struct {
+ _dataMap map[int32]*GameGameFastData
+ _dataList []*GameGameFastData
+}
+
+func NewGameGameFast(_buf []map[string]interface{}) (*GameGameFast, error) {
+ _dataList := make([]*GameGameFastData, 0, len(_buf))
+ dataMap := make(map[int32]*GameGameFastData)
+ for _, _ele_ := range _buf {
+ if _v, err2 := DeserializeGameGameFastData(_ele_); err2 != nil {
+ return nil, err2
+ } else {
+ _dataList = append(_dataList, _v)
+ dataMap[_v.Key] = _v
+ }
+ }
+ return &GameGameFast{_dataList:_dataList, _dataMap:dataMap}, nil
+}
+
+func (table *GameGameFast) GetDataMap() map[int32]*GameGameFastData {
+ return table._dataMap
+}
+
+func (table *GameGameFast) GetDataList() []*GameGameFastData {
+ return table._dataList
+}
+
+func (table *GameGameFast) Get(key int32) *GameGameFastData {
+ return table._dataMap[key]
+}
+
+
diff --git a/sys/configure/structs/Game.GameFastData.go b/sys/configure/structs/Game.GameFastData.go
new file mode 100644
index 000000000..4791af827
--- /dev/null
+++ b/sys/configure/structs/Game.GameFastData.go
@@ -0,0 +1,54 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+package cfg
+
+import "errors"
+
+type GameGameFastData struct {
+ Key int32
+ Type int32
+ Condition int32
+ Reward []*Gameatn
+}
+
+const TypeId_GameGameFastData = 1587165364
+
+func (*GameGameFastData) GetTypeId() int32 {
+ return 1587165364
+}
+
+func (_v *GameGameFastData)Deserialize(_buf map[string]interface{}) (err error) {
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) }
+ {
+ var _arr_ []interface{}
+ var _ok_ bool
+ if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return }
+
+ _v.Reward = make([]*Gameatn, 0, len(_arr_))
+
+ for _, _e_ := range _arr_ {
+ var _list_v_ *Gameatn
+ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } }
+ _v.Reward = append(_v.Reward, _list_v_)
+ }
+ }
+
+ return
+}
+
+func DeserializeGameGameFastData(_buf map[string]interface{}) (*GameGameFastData, error) {
+ v := &GameGameFastData{}
+ if err := v.Deserialize(_buf); err == nil {
+ return v, nil
+ } else {
+ return nil, err
+ }
+}
diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go
index 3bd4daa3d..cef173627 100644
--- a/sys/configure/structs/Tables.go
+++ b/sys/configure/structs/Tables.go
@@ -265,6 +265,7 @@ type Tables struct {
Title *GameTitle
AchieveGroup *GameAchieveGroup
AchieveTask *GameAchieveTask
+ GameFast *GameGameFast
}
func NewTables(loader JsonLoader) (*Tables, error) {
@@ -1796,5 +1797,11 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.AchieveTask, err = NewGameAchieveTask(buf) ; err != nil {
return nil, err
}
+ if buf, err = loader("game_gamefast") ; err != nil {
+ return nil, err
+ }
+ if tables.GameFast, err = NewGameGameFast(buf) ; err != nil {
+ return nil, err
+ }
return tables, nil
}
diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go
index 487424e7b..e99a1b286 100644
--- a/sys/configure/structs/game.globalData.go
+++ b/sys/configure/structs/game.globalData.go
@@ -293,6 +293,7 @@ type GameGlobalData struct {
SignAccount int32
DragonFuntime int32
ChallengeNpcStory []int32
+ QuickcardAispeed float32
}
const TypeId_GameGlobalData = 477542761
@@ -1156,6 +1157,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
}
}
+ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["quickcard_aispeed"].(float64); !_ok_ { err = errors.New("quickcard_aispeed error"); return }; _v.QuickcardAispeed = float32(_tempNum_) }
return
}