From 857f58feba94a01d15b95b6758161dc7c153ad3a Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Tue, 25 Jul 2023 19:25:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_buriedcondi.json | 306 +++++++++++++++++ bin/json/game_eventlottery.json | 60 ++-- bin/json/game_rdtasknpc.json | 548 +++++++++++++++++++++++++++++- bin/json/game_stronebuff.json | 30 +- bin/json/game_stroneevent.json | 104 +++++- bin/json/game_stroneroom.json | 16 + bin/json/game_trendchose.json | 153 +++++---- bin/json/game_worldtask.json | 160 ++++----- modules/mainline/api_levelpass.go | 164 +++++++++ 9 files changed, 1358 insertions(+), 183 deletions(-) create mode 100644 modules/mainline/api_levelpass.go diff --git a/bin/json/game_buriedcondi.json b/bin/json/game_buriedcondi.json index a749ad331..be20ffe53 100644 --- a/bin/json/game_buriedcondi.json +++ b/bin/json/game_buriedcondi.json @@ -24934,5 +24934,311 @@ "value": 3, "filter": [], "filter2": [] + }, + { + "id": 50000011, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_879", + "text": "完成一次考试1" + }, + "type": 204, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60011, + "value": 1, + "filter": [], + "filter2": [] + }, + { + "id": 50000012, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_880", + "text": "做一份烤乳猪1" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60021, + "value": 1, + "filter": [ + 14020009 + ], + "filter2": [] + }, + { + "id": 50000013, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_881", + "text": "(委托)拿到萝卜1" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60031, + "value": 2, + "filter": [ + 14010006 + ], + "filter2": [] + }, + { + "id": 50000014, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_882", + "text": "清理魔药区怪物1" + }, + "type": 70, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60041, + "value": 1, + "filter": [ + 501 + ], + "filter2": [] + }, + { + "id": 50000015, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_883", + "text": "清理公会怪物1" + }, + "type": 70, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60051, + "value": 1, + "filter": [ + 502 + ], + "filter2": [] + }, + { + "id": 50000016, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_884", + "text": "完成一次考试2" + }, + "type": 204, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60061, + "value": 1, + "filter": [], + "filter2": [] + }, + { + "id": 50000017, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_885", + "text": "做一份烤乳猪2" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60071, + "value": 1, + "filter": [ + 14020009 + ], + "filter2": [] + }, + { + "id": 50000018, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_886", + "text": "(委托)拿到萝卜2" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60081, + "value": 2, + "filter": [ + 14010006 + ], + "filter2": [] + }, + { + "id": 50000019, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_887", + "text": "清理魔药区怪物2" + }, + "type": 70, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60091, + "value": 1, + "filter": [ + 503 + ], + "filter2": [] + }, + { + "id": 50000020, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_888", + "text": "清理公会怪物2" + }, + "type": 70, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60101, + "value": 1, + "filter": [ + 504 + ], + "filter2": [] + }, + { + "id": 50000021, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_889", + "text": "完成一次考试3" + }, + "type": 204, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60111, + "value": 1, + "filter": [], + "filter2": [] + }, + { + "id": 50000022, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_890", + "text": "做一份烤乳猪3" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60121, + "value": 1, + "filter": [ + 14020009 + ], + "filter2": [] + }, + { + "id": 50000023, + "rtype": 2, + "ctype": 3, + "notify": [], + "type_sp": 1, + "tasktxt": { + "key": "buried_buried_condi_tasktxt_891", + "text": "(委托)拿到萝卜3" + }, + "type": 187, + "valid": 0, + "head": { + "a": "attr", + "t": "gold", + "n": 1 + }, + "NPC": 60131, + "value": 2, + "filter": [ + 14010006 + ], + "filter2": [] } ] \ No newline at end of file diff --git a/bin/json/game_eventlottery.json b/bin/json/game_eventlottery.json index 1b1c2d8d0..a3d749368 100644 --- a/bin/json/game_eventlottery.json +++ b/bin/json/game_eventlottery.json @@ -1,46 +1,68 @@ [ { "Id": 1, - "GroupId": 1001001, + "GroupId": 16010101, "GroupType": 2, "SubGroupWt": 1000, "SubGroupId": 1001, "SubGroupType": 1, - "EventID": 10000001, + "EventID": 16010101, "SubGroupNum": 1, "EventWt": 50 }, { "Id": 2, - "GroupId": 1001001, + "GroupId": 14110100, "GroupType": 0, - "SubGroupWt": 1000, - "SubGroupId": 1001, + "SubGroupWt": 0, + "SubGroupId": 0, "SubGroupType": 0, - "EventID": 10000002, + "EventID": 14110101, "SubGroupNum": 0, - "EventWt": 100 + "EventWt": 0 }, { "Id": 3, - "GroupId": 1001001, + "GroupId": 14110100, "GroupType": 0, - "SubGroupWt": 1000, - "SubGroupId": 1002, - "SubGroupType": 2, - "EventID": 10000003, - "SubGroupNum": 2, - "EventWt": 500 + "SubGroupWt": 0, + "SubGroupId": 0, + "SubGroupType": 0, + "EventID": 14110102, + "SubGroupNum": 0, + "EventWt": 0 }, { "Id": 4, - "GroupId": 1001001, + "GroupId": 14110100, "GroupType": 0, - "SubGroupWt": 1000, - "SubGroupId": 1002, + "SubGroupWt": 0, + "SubGroupId": 0, "SubGroupType": 0, - "EventID": 10000004, + "EventID": 14110103, "SubGroupNum": 0, - "EventWt": 500 + "EventWt": 0 + }, + { + "Id": 5, + "GroupId": 14110100, + "GroupType": 0, + "SubGroupWt": 0, + "SubGroupId": 0, + "SubGroupType": 0, + "EventID": 14110104, + "SubGroupNum": 0, + "EventWt": 0 + }, + { + "Id": 6, + "GroupId": 14110100, + "GroupType": 0, + "SubGroupWt": 0, + "SubGroupId": 0, + "SubGroupType": 0, + "EventID": 14110105, + "SubGroupNum": 0, + "EventWt": 0 } ] \ No newline at end of file diff --git a/bin/json/game_rdtasknpc.json b/bin/json/game_rdtasknpc.json index 9de568279..5fbf851af 100644 --- a/bin/json/game_rdtasknpc.json +++ b/bin/json/game_rdtasknpc.json @@ -60,7 +60,7 @@ "heroid": 14003, "datas": [ "GameMain", - "功能入口-捕羊大赛", + "功能入口-招募", "901" ], "event": [ @@ -5838,5 +5838,551 @@ 50010100 ], "goto": 0 + }, + { + "id": 60010, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60011, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60018, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60020, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60021, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60028, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60030, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60031, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60038, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60040, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60041, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60048, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60050, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60051, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60058, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60060, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60061, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60068, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60070, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60071, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60078, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60080, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60081, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60088, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60090, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60091, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60098, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-邮件", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60100, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60101, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60108, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-浇水拼图", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60110, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60111, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60118, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-维京远征", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60120, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60121, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60128, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-招募", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 + }, + { + "id": 60130, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12890 + ], + "goto": 0 + }, + { + "id": 60131, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 12960 + ], + "goto": 0 + }, + { + "id": 60138, + "heroid": 25001, + "datas": [ + "GameMain", + "功能入口-狩猎", + "901" + ], + "event": [ + 2, + 13010 + ], + "goto": 0 } ] \ No newline at end of file diff --git a/bin/json/game_stronebuff.json b/bin/json/game_stronebuff.json index 181242e33..2e65ed28b 100644 --- a/bin/json/game_stronebuff.json +++ b/bin/json/game_stronebuff.json @@ -1,8 +1,9 @@ [ { - "BuffId": 143006311, + "BuffId": 143006310, "BuffGroupId": 1001, "Type": 1, + "SkillId": 143006311, "BuffLevel": 1, "Quality": 1, "BuffIcon": "", @@ -22,9 +23,10 @@ } }, { - "BuffId": 125004311, + "BuffId": 125004310, "BuffGroupId": 1001, "Type": 1, + "SkillId": 125004311, "BuffLevel": 2, "Quality": 1, "BuffIcon": "", @@ -44,9 +46,10 @@ } }, { - "BuffId": 135006211, + "BuffId": 135006210, "BuffGroupId": 1002, "Type": 2, + "SkillId": 135006211, "BuffLevel": 1, "Quality": 2, "BuffIcon": "", @@ -66,9 +69,10 @@ } }, { - "BuffId": 135006311, + "BuffId": 135006310, "BuffGroupId": 1002, "Type": 2, + "SkillId": 135006311, "BuffLevel": 2, "Quality": 2, "BuffIcon": "", @@ -88,9 +92,10 @@ } }, { - "BuffId": 144004311, + "BuffId": 144004310, "BuffGroupId": 1003, "Type": 3, + "SkillId": 144004311, "BuffLevel": 1, "Quality": 1, "BuffIcon": "", @@ -110,9 +115,10 @@ } }, { - "BuffId": 124006311, + "BuffId": 124006310, "BuffGroupId": 1003, "Type": 3, + "SkillId": 124006311, "BuffLevel": 2, "Quality": 1, "BuffIcon": "", @@ -132,9 +138,10 @@ } }, { - "BuffId": 144002311, + "BuffId": 144002310, "BuffGroupId": 1004, "Type": 4, + "SkillId": 144002311, "BuffLevel": 1, "Quality": 2, "BuffIcon": "", @@ -154,9 +161,10 @@ } }, { - "BuffId": 151513211, + "BuffId": 151513210, "BuffGroupId": 1004, "Type": 4, + "SkillId": 151513211, "BuffLevel": 2, "Quality": 2, "BuffIcon": "", @@ -176,9 +184,10 @@ } }, { - "BuffId": 143002311, + "BuffId": 143002310, "BuffGroupId": 1005, "Type": 4, + "SkillId": 143002311, "BuffLevel": 1, "Quality": 3, "BuffIcon": "", @@ -198,9 +207,10 @@ } }, { - "BuffId": 115005311, + "BuffId": 115005310, "BuffGroupId": 1005, "Type": 4, + "SkillId": 115005311, "BuffLevel": 2, "Quality": 3, "BuffIcon": "", diff --git a/bin/json/game_stroneevent.json b/bin/json/game_stroneevent.json index 6bc243b47..28408b4a9 100644 --- a/bin/json/game_stroneevent.json +++ b/bin/json/game_stroneevent.json @@ -1,13 +1,109 @@ [ { - "EventId": 160101, + "EventId": 16010101, "EventTitle": { - "key": "", - "text": "" + "key": "stonehenge_eventconfig_EventTitle_1", + "text": "捡垃圾" }, "EventType": 16, + "EventResource": "Treasure", + "Value1": 21160001, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 14110101, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_2", + "text": "战斗" + }, + "EventType": 14, + "EventResource": "51004", + "Value1": 110101, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 14110102, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_3", + "text": "战斗" + }, + "EventType": 14, + "EventResource": "51002", + "Value1": 110102, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 14110103, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_4", + "text": "战斗" + }, + "EventType": 14, + "EventResource": "51003", + "Value1": 110103, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 14110104, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_5", + "text": "战斗" + }, + "EventType": 14, + "EventResource": "51005", + "Value1": 110104, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 14110105, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_6", + "text": "战斗" + }, + "EventType": 14, + "EventResource": "51001", + "Value1": 110105, + "Value2": 0, + "Value3": 0, + "Value4": 0, + "CostItem": [], + "PostEvent": 0, + "probability": 0 + }, + { + "EventId": 25, + "EventTitle": { + "key": "stonehenge_eventconfig_EventTitle_7", + "text": "随机符文" + }, + "EventType": 0, "EventResource": "", - "Value1": 10001, + "Value1": 25, "Value2": 0, "Value3": 0, "Value4": 0, diff --git a/bin/json/game_stroneroom.json b/bin/json/game_stroneroom.json index 973e525f7..72daf0b79 100644 --- a/bin/json/game_stroneroom.json +++ b/bin/json/game_stroneroom.json @@ -94,5 +94,21 @@ "EventStoreGroup": 0, "BossEvent": 0, "Condition": 0 + }, + { + "RoomId": 99999, + "RoomName": { + "key": "stonehenge_roomconfig_RoomName_7", + "text": "结算" + }, + "SceneName": "", + "PortalName": "", + "EventrewardGroup": 0, + "EventBattleGroup": 0, + "EventStoryNpcGroup": 0, + "EventTreasureGroup": 0, + "EventStoreGroup": 0, + "BossEvent": 0, + "Condition": 0 } ] \ No newline at end of file diff --git a/bin/json/game_trendchose.json b/bin/json/game_trendchose.json index b55a9fd0a..dd54854f0 100644 --- a/bin/json/game_trendchose.json +++ b/bin/json/game_trendchose.json @@ -1,12 +1,12 @@ [ { "key": 1, + "taskstarID": 100010, "lv": 1, - "taskstarID": 20010, "taskendID": 20090, "npc": [ "GameMain", - "功能入口-商人" + "功能入口-维京远征" ], "chosetxt": { "key": "chosetxt_01", @@ -16,16 +16,17 @@ "chosenum": 1001, "get": [], "lose": [], - "jump": 0 + "jump": 0, + "num": 0 }, { "key": 2, + "taskstarID": 100060, "lv": 1, - "taskstarID": 20020, "taskendID": 20090, "npc": [ "GameMain", - "功能入口-公告" + "功能入口-维京远征" ], "chosetxt": { "key": "chosetxt_02", @@ -35,16 +36,17 @@ "chosenum": 1002, "get": [], "lose": [], - "jump": 0 + "jump": 0, + "num": 0 }, { "key": 3, + "taskstarID": 100110, "lv": 1, - "taskstarID": 20030, "taskendID": 20090, "npc": [ "GameMain", - "功能入口-邮件" + "功能入口-维京远征" ], "chosetxt": { "key": "chosetxt_03", @@ -54,94 +56,103 @@ "chosenum": 1003, "get": [], "lose": [], - "jump": 0 + "jump": 0, + "num": 0 }, { "key": 4, + "taskstarID": 100020, "lv": 1, - "taskstarID": 20040, "taskendID": 20090, "npc": [ "GameMain", - "功能入口-维京远征" + "功能入口-招募" ], "chosetxt": { "key": "chosetxt_04", "text": "考试选项4" }, - "chosetype": 1, - "chosenum": 1004, - "get": [], - "lose": [], - "jump": 0 - }, - { - "key": 5, - "lv": 1, - "taskstarID": 20050, - "taskendID": 20090, - "npc": [ - "GameMain", - "功能入口-捕羊大赛" - ], - "chosetxt": { - "key": "chosetxt_05", - "text": "考试选项5" - }, - "chosetype": 1, - "chosenum": 1005, - "get": [], - "lose": [], - "jump": 0 - }, - { - "key": 6, - "lv": 1, - "taskstarID": 20060, - "taskendID": 20090, - "npc": [ - "GameMain", - "功能入口-狩猎" - ], - "chosetxt": { - "key": "chosetxt_06", - "text": "考试选项6" - }, - "chosetype": 1, - "chosenum": 1006, - "get": [], - "lose": [], - "jump": 0 - }, - { - "key": 7, - "lv": 1, - "taskstarID": 20070, - "taskendID": 20090, - "npc": [ - "GameMain", - "功能入口-烹饪" - ], - "chosetxt": { - "key": "chosetxt_07", - "text": "我想花点钱" - }, "chosetype": 2, "chosenum": 0, "get": [ { "a": "attr", "t": "gold", - "n": 5000 + "n": 100000 } ], "lose": [ { "a": "item", - "t": "14020003", + "t": "14020009", "n": 1 } ], - "jump": 0 + "jump": 0, + "num": 1 + }, + { + "key": 5, + "taskstarID": 100070, + "lv": 1, + "taskendID": 20090, + "npc": [ + "GameMain", + "功能入口-招募" + ], + "chosetxt": { + "key": "chosetxt_05", + "text": "考试选项5" + }, + "chosetype": 2, + "chosenum": 0, + "get": [ + { + "a": "attr", + "t": "gold", + "n": 100000 + } + ], + "lose": [ + { + "a": "item", + "t": "14020009", + "n": 2 + } + ], + "jump": 0, + "num": 1 + }, + { + "key": 6, + "taskstarID": 100120, + "lv": 1, + "taskendID": 20090, + "npc": [ + "GameMain", + "功能入口-招募" + ], + "chosetxt": { + "key": "chosetxt_06", + "text": "考试选项6" + }, + "chosetype": 2, + "chosenum": 0, + "get": [ + { + "a": "attr", + "t": "gold", + "n": 100000 + } + ], + "lose": [ + { + "a": "item", + "t": "14020009", + "n": 3 + } + ], + "jump": 0, + "num": 1 } ] \ No newline at end of file diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index 94f62a07d..6749e6bbf 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -5637,21 +5637,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_137", - "text": "打怪任务" + "text": "完成一次考试1" }, "task_details": { "key": "worldtask_world_task_task_details_137", - "text": "打怪任务" + "text": "完成一次考试1" }, "npctxt": { "key": "worldtask_world_task_npctxt_137", - "text": "打怪任务" + "text": "完成一次考试1" }, - "npc": 10010, + "npc": 60010, "completetask": [ - 12070010 + 50000011 ], - "deliver_npc": 0, + "deliver_npc": 60018, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5677,19 +5677,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_138", - "text": "问答任务" + "text": "做一份烤乳猪1" }, "task_details": { "key": "worldtask_world_task_task_details_138", - "text": "问答任务" + "text": "做一份烤乳猪1" }, "npctxt": { "key": "worldtask_world_task_npctxt_138", - "text": "问答任务" + "text": "做一份烤乳猪1" }, - "npc": 10018, - "completetask": [], - "deliver_npc": 0, + "npc": 60020, + "completetask": [ + 50000012 + ], + "deliver_npc": 60028, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5715,19 +5717,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_139", - "text": "复合调查" + "text": "(委托)拿到萝卜1" }, "task_details": { "key": "worldtask_world_task_task_details_139", - "text": "复合调查" + "text": "(委托)拿到萝卜1" }, "npctxt": { "key": "worldtask_world_task_npctxt_139", - "text": "复合调查" + "text": "(委托)拿到萝卜1" }, - "npc": 100101, - "completetask": [], - "deliver_npc": 0, + "npc": 60030, + "completetask": [ + 50000013 + ], + "deliver_npc": 60038, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5753,21 +5757,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_140", - "text": "委托烹饪" + "text": "清理魔药区怪物1" }, "task_details": { "key": "worldtask_world_task_task_details_140", - "text": "委托烹饪" + "text": "清理魔药区怪物1" }, "npctxt": { "key": "worldtask_world_task_npctxt_140", - "text": "委托烹饪" + "text": "清理魔药区怪物1" }, - "npc": 10020, + "npc": 60040, "completetask": [ - 12070020 + 50000014 ], - "deliver_npc": 10028, + "deliver_npc": 60048, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5793,21 +5797,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_141", - "text": "A连环交接1" + "text": "清理公会怪物1" }, "task_details": { "key": "worldtask_world_task_task_details_141", - "text": "A连环交接1" + "text": "清理公会怪物1" }, "npctxt": { "key": "worldtask_world_task_npctxt_141", - "text": "A连环交接1" + "text": "清理公会怪物1" }, - "npc": 10030, + "npc": 60050, "completetask": [ - 12070030 + 50000015 ], - "deliver_npc": 0, + "deliver_npc": 60058, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5833,21 +5837,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_142", - "text": "A连环交接2" + "text": "完成一次考试2" }, "task_details": { "key": "worldtask_world_task_task_details_142", - "text": "A连环交接2" + "text": "完成一次考试2" }, "npctxt": { "key": "worldtask_world_task_npctxt_142", - "text": "A连环交接2" + "text": "完成一次考试2" }, - "npc": 10040, + "npc": 60060, "completetask": [ - 12070040 + 50000016 ], - "deliver_npc": 0, + "deliver_npc": 60068, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5873,21 +5877,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_143", - "text": "打怪任务" + "text": "做一份烤乳猪2" }, "task_details": { "key": "worldtask_world_task_task_details_143", - "text": "打怪任务" + "text": "做一份烤乳猪2" }, "npctxt": { "key": "worldtask_world_task_npctxt_143", - "text": "打怪任务" + "text": "做一份烤乳猪2" }, - "npc": 10050, + "npc": 60070, "completetask": [ - 12070050 + 50000017 ], - "deliver_npc": 10058, + "deliver_npc": 60078, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5913,21 +5917,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_144", - "text": "问答任务" + "text": "(委托)拿到萝卜2" }, "task_details": { "key": "worldtask_world_task_task_details_144", - "text": "问答任务" + "text": "(委托)拿到萝卜2" }, "npctxt": { "key": "worldtask_world_task_npctxt_144", - "text": "问答任务" + "text": "(委托)拿到萝卜2" }, - "npc": 10040, + "npc": 60080, "completetask": [ - 12070040 + 50000018 ], - "deliver_npc": 0, + "deliver_npc": 60088, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5953,21 +5957,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_145", - "text": "复合调查" + "text": "清理魔药区怪物2" }, "task_details": { "key": "worldtask_world_task_task_details_145", - "text": "复合调查" + "text": "清理魔药区怪物2" }, "npctxt": { "key": "worldtask_world_task_npctxt_145", - "text": "复合调查" + "text": "清理魔药区怪物2" }, - "npc": 10050, + "npc": 60090, "completetask": [ - 12070050 + 50000019 ], - "deliver_npc": 10058, + "deliver_npc": 60098, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -5993,21 +5997,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_146", - "text": "委托烹饪" + "text": "清理公会怪物2" }, "task_details": { "key": "worldtask_world_task_task_details_146", - "text": "委托烹饪" + "text": "清理公会怪物2" }, "npctxt": { "key": "worldtask_world_task_npctxt_146", - "text": "委托烹饪" + "text": "清理公会怪物2" }, - "npc": 10050, + "npc": 60100, "completetask": [ - 12070050 + 50000020 ], - "deliver_npc": 10058, + "deliver_npc": 60108, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -6033,21 +6037,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_147", - "text": "打怪任务" + "text": "完成一次考试3" }, "task_details": { "key": "worldtask_world_task_task_details_147", - "text": "打怪任务" + "text": "完成一次考试3" }, "npctxt": { "key": "worldtask_world_task_npctxt_147", - "text": "打怪任务" + "text": "完成一次考试3" }, - "npc": 10060, + "npc": 60110, "completetask": [ - 12070060 + 50000021 ], - "deliver_npc": 10068, + "deliver_npc": 60118, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -6073,21 +6077,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_148", - "text": "B连环交接1" + "text": "做一份烤乳猪3" }, "task_details": { "key": "worldtask_world_task_task_details_148", - "text": "B连环交接1" + "text": "做一份烤乳猪3" }, "npctxt": { "key": "worldtask_world_task_npctxt_148", - "text": "B连环交接1" + "text": "做一份烤乳猪3" }, - "npc": 10070, + "npc": 60120, "completetask": [ - 12070070 + 50000022 ], - "deliver_npc": 0, + "deliver_npc": 60128, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, @@ -6113,21 +6117,21 @@ "icon": "25001", "task_name": { "key": "worldtask_world_task_task_name_149", - "text": "B连环交接2" + "text": "(委托)拿到萝卜3" }, "task_details": { "key": "worldtask_world_task_task_details_149", - "text": "B连环交接2" + "text": "(委托)拿到萝卜3" }, "npctxt": { "key": "worldtask_world_task_npctxt_149", - "text": "B连环交接2" + "text": "(委托)拿到萝卜3" }, - "npc": 10070, + "npc": 60130, "completetask": [ - 12070070 + 50000023 ], - "deliver_npc": 0, + "deliver_npc": 60138, "taskend_removeitem": [], "auto_accept": 0, "lock_add": 0, diff --git a/modules/mainline/api_levelpass.go b/modules/mainline/api_levelpass.go new file mode 100644 index 000000000..ba08cf2aa --- /dev/null +++ b/modules/mainline/api_levelpass.go @@ -0,0 +1,164 @@ +package mainline + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + + cfg "go_dreamfactory/sys/configure/structs" +) + +// 参数校验 +func (this *apiComp) LevelPassCheck(session comm.IUserSession, req *pb.MainlineLevelPassReq) (errdata *pb.ErrorData) { + if req.Level == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + return + } + return +} + +// /挑战主线关卡 +func (this *apiComp) LevelPass(session comm.IUserSession, req *pb.MainlineLevelPassReq) (errdata *pb.ErrorData) { + var ( + conf *cfg.GameMainStageData + info *pb.DBMainline + aeward []*pb.UserAssets = make([]*pb.UserAssets, 0) + isWin bool + first bool // 判断是否是首通 + star int32 // 评星 + tasks []*pb.BuriedParam = make([]*pb.BuriedParam, 0) + err error + consumPs int32 + userExp int32 + ) + if errdata = this.LevelPassCheck(session, req); errdata != nil { + return // 参数校验失败直接返回 + } + if conf, err = this.module.configure.GetMainStageConf(req.Level); err != nil { // 配置文件校验 + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_MainlineNotFindChapter, + Title: pb.ErrorCode_MainlineNotFindChapter.ToString(), + Message: err.Error(), + } + return + } + + if info, err = this.module.modelMline.getMainlineData(session.GetUserId()); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + } + + // 校验通过 + errdata, isWin = this.module.battle.CheckBattleReport(session, req.Report) + if errdata != nil { + return + } + if !isWin { // 战斗失败返还扣除的体力 + if errdata = this.module.DispenseRes(session, conf.PsConsume, true); errdata != nil { // 返还预扣体力 + return + } + session.SendMsg(string(this.module.GetType()), MlineChallengeOverResp, &pb.MainlineChallengeOverResp{ + Level: req.Level, + }) // 数据推送 + return + } + // 评星规则 + if len(conf.Star) != len(conf.StarType) || len(conf.Star) != len(conf.StarValue) || len(conf.StarValue) != len(conf.StarType) { + this.module.Errorf("配置错误, 参数数量不一致,StageId: %d", req.Level) + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + } + return + } + + var szStar []int32 + szStar = append(szStar, 1<<0) + szStar = append(szStar, 1<<1) + szStar = append(szStar, 1<<2) + for i, v := range conf.StarType { + if v == comm.MainStarType1 { + star ^= szStar[i] + } else if v == comm.MainStarType2 { + if req.Report.Death <= conf.StarValue[i] { + star ^= szStar[i] + } + } else if v == comm.MainStarType3 { + if req.Report.Round <= conf.StarValue[i] { + star ^= szStar[i] + } + } + } + + // 判断是不是首通 + if _, ok := info.Level[req.Level]; !ok { + first = true + info.Level[req.Level] = star + } + + info.Lastlevel = req.Level + if first { // 发奖 + if errdata = this.module.DispenseRes(session, conf.Firstaward, true); errdata != nil { + this.module.Debugf("Mline first DispenseRes err:+%v", conf.Firstaward) + } + for _, v := range conf.Firstaward { + aeward = append(aeward, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } else { + if errdata = this.module.DispenseRes(session, conf.Commonaward, true); errdata != nil { + this.module.Debugf("Mline Commonaward DispenseRes err:+%v", conf.Commonaward) + } + for _, v := range conf.Commonaward { + aeward = append(aeward, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } + user := this.module.ModuleUser.GetUser(session.GetUserId()) + if lotteryward := this.module.ModuleTools.GetGroupDataByLottery(conf.Lotteryward, user.Vip, user.Lv); len(lotteryward) > 0 { + if errdata = this.module.DispenseRes(session, lotteryward, true); errdata != nil { + this.module.Debugf("Mline lotteryward DispenseRes err:+%v", lotteryward) + } + for _, v := range lotteryward { + aeward = append(aeward, &pb.UserAssets{ + A: v.A, + T: v.T, + N: v.N, + }) + } + } + + // 加英雄经验 + if conf.HeroExp > 0 { + if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { + for _, v := range req.Report.Info.Redflist[0].Team { + if !v.Ishelp { // 助战英雄不加经验 + this.module.ModuleHero.AddHeroExp(session, v.Oid, conf.HeroExp) + } + } + } + } + userExp, _ = this.module.ModuleUser.ConsumePsAddExp(session, consumPs) + session.SendMsg(string(this.module.GetType()), MlineChallengeOverResp, &pb.MainlineChallengeOverResp{ + Level: req.Level, + Star: star, + HeroExp: conf.HeroExp, + UserExp: userExp, + }) // 数据推送 + + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype60, 1)) + tasks = append(tasks, comm.GetBuriedParam(comm.Rtype61, 1, int32(req.Level))) + go this.module.ModuleBuried.TriggerBuried(session.Clone(), tasks...) + return +}