From da20143ec2aefccaa7d2168012fdb35a58244253 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Wed, 16 Nov 2022 17:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=85=B3=E5=8D=A1=E9=80=9A?= =?UTF-8?q?=E5=85=B3=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_combatlevel.json | 133 ++- bin/json/game_combatmanster.json | 4 +- bin/json/game_worldbattle.json | 16 +- bin/json/game_worldtask.json | 1048 ++++++++++++----- comm/const.go | 3 +- modules/academy/api_challenge.go | 8 +- modules/academy/api_teaching.go | 8 +- modules/battle/modelBattle.go | 98 +- modules/combat/api_challengereceive.go | 34 +- modules/combat/api_drop.go | 42 +- modules/web/api_upload.go | 42 + modules/worldtask/api_battlestart.go | 7 +- pb/battle_db.pb.go | 155 +-- pb/battle_msg.pb.go | 184 +-- services/comp_gateroute.go | 8 + sys/configure/configure.go | 8 + sys/configure/core.go | 10 + sys/configure/structs/Game.WorldBattleData.go | 51 +- sys/configure/structs/Game.WorldTaskData.go | 34 +- 19 files changed, 1269 insertions(+), 624 deletions(-) create mode 100644 modules/web/api_upload.go diff --git a/bin/json/game_combatlevel.json b/bin/json/game_combatlevel.json index 5a15e1bbd..b169bc6b3 100644 --- a/bin/json/game_combatlevel.json +++ b/bin/json/game_combatlevel.json @@ -1,6 +1,7 @@ [ { "id": 10001, + "scene": "LevelDemo", "formatList": [ 110211, 110212 @@ -9,12 +10,8 @@ 1001, 1002 ], - "passformatList": [ - 110211, - 110212 - ], + "passformatList": [], "passdroplist": [ - 1001, 1002 ], "award": [ @@ -27,17 +24,18 @@ }, { "id": 10002, + "scene": "LevelDemo", "formatList": [ 110212, 110213 ], "droplist": [ - 1002 + 1001 ], - "passformatList": [ - 110212 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -48,17 +46,18 @@ }, { "id": 10003, + "scene": "LevelDemo", "formatList": [ 110213, 110214 ], "droplist": [ - 1003 + 1001 ], - "passformatList": [ - 110213 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -69,17 +68,18 @@ }, { "id": 20001, + "scene": "LevelDemo", "formatList": [ 110214, 110215 ], "droplist": [ - 1004 + 1001 ], - "passformatList": [ - 110214 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -90,17 +90,18 @@ }, { "id": 20002, + "scene": "LevelDemo", "formatList": [ 110215, 110216 ], "droplist": [ - 1005 + 1001 ], - "passformatList": [ - 110215 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -111,17 +112,18 @@ }, { "id": 20003, + "scene": "LevelDemo", "formatList": [ 110216, 120031 ], "droplist": [ - 1006 + 1001 ], - "passformatList": [ - 110216 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -132,17 +134,18 @@ }, { "id": 30001, + "scene": "LevelDemo_Fcamer", "formatList": [ 120031, 120032 ], "droplist": [ - 1007 + 1001 ], - "passformatList": [ - 120031 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -153,17 +156,18 @@ }, { "id": 30002, + "scene": "LevelDemo_Fcamer", "formatList": [ 120032, 120033 ], "droplist": [ - 1008 + 1001 ], - "passformatList": [ - 120032 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -174,17 +178,18 @@ }, { "id": 30003, + "scene": "LevelDemo_Fcamer", "formatList": [ 120033, 120034 ], "droplist": [ - 1009 + 1001 ], - "passformatList": [ - 120033 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -195,17 +200,18 @@ }, { "id": 40001, + "scene": "LevelDemo_Fcamer", "formatList": [ 120034, 120035 ], "droplist": [ - 1010 + 1001 ], - "passformatList": [ - 120034 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -216,16 +222,17 @@ }, { "id": 40002, + "scene": "LevelDemo_Fcamer", "formatList": [ 120035 ], "droplist": [ - 1011 + 1001 ], - "passformatList": [ - 120035 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -236,16 +243,17 @@ }, { "id": 40003, + "scene": "LevelDemo_Fcamer", "formatList": [ 120036 ], "droplist": [ - 1012 + 1001 ], - "passformatList": [ - 120036 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -256,16 +264,17 @@ }, { "id": 50001, + "scene": "LevelDemo_Fcamer", "formatList": [ 130011 ], "droplist": [ - 1013 + 1001 ], - "passformatList": [ - 130011 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -276,16 +285,17 @@ }, { "id": 50002, + "scene": "LevelDemo_Fcamer", "formatList": [ 130012 ], "droplist": [ - 1014 + 1001 ], - "passformatList": [ - 130012 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", @@ -296,16 +306,17 @@ }, { "id": 50003, + "scene": "LevelDemo_Fcamer", "formatList": [ 130013 ], "droplist": [ - 1015 + 1001 ], - "passformatList": [ - 130013 + "passformatList": [], + "passdroplist": [ + 1001 ], - "passdroplist": [], "award": [ { "a": "attr", diff --git a/bin/json/game_combatmanster.json b/bin/json/game_combatmanster.json index 58ab438b7..34e5b9cc8 100644 --- a/bin/json/game_combatmanster.json +++ b/bin/json/game_combatmanster.json @@ -2,8 +2,8 @@ { "id": 110211, "formatList": [ - 101072, - 101073 + 101071, + 101072 ], "award": [ { diff --git a/bin/json/game_worldbattle.json b/bin/json/game_worldbattle.json index d11f56962..da4fe61ee 100644 --- a/bin/json/game_worldbattle.json +++ b/bin/json/game_worldbattle.json @@ -4,11 +4,15 @@ "FormatList": [ 700011 ], - "captainId": "250011", - "buff": [], - "battlestory": [], - "teammate": [], - "numberofteam": 0, - "battleteam": [] + "DefaultHero": 700011, + "SelectableHero": [], + "LockSlots": [ + 3, + 4 + ], + "AssistTeam": 710003, + "EventList": [ + 12 + ] } ] \ No newline at end of file diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index f3fb3a6be..36e69a8b6 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -11,15 +11,15 @@ "task_display": "新剧情文本10100", "npc": [ "scenes_ boundary_02", - "阿宝组件名", - "600" + "阿宝起身入场", + "150" ], "getafter_event": [ 2, - 10001 + 100001 ], "completetask": 0, - "auto_accept": 0, + "auto_accept": 1, "overtips": 1, "reword": [ { @@ -33,13 +33,8 @@ "n": 1 } ], - "day": [ - "day|night" - ], - "weather": [ - 2, - 1 - ] + "day": "night", + "weather": 2 }, { "key": 10101, @@ -54,11 +49,11 @@ "npc": [ "scenes_ boundary_02", "邦尼兔组件名", - "601" + "150" ], "getafter_event": [ 2, - 10002 + 100002 ], "completetask": 0, "auto_accept": 1, @@ -70,8 +65,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10102, @@ -86,11 +81,11 @@ "npc": [ "dreamwork_restaurant_01", "波比组件名", - "602" + "140" ], "getafter_event": [ 2, - 10003 + 100003 ], "completetask": 171, "auto_accept": 1, @@ -102,8 +97,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10103, @@ -118,11 +113,11 @@ "npc": [ "dreamwork_restaurant_01", "阿宝组件名", - "603" + "140" ], "getafter_event": [ 2, - 10004 + 100004 ], "completetask": 0, "auto_accept": 1, @@ -134,8 +129,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10104, @@ -150,11 +145,11 @@ "npc": [ "dreamwork_restaurant_01", "波比组件名", - "604" + "140" ], "getafter_event": [ 2, - 10005 + 100005 ], "completetask": 0, "auto_accept": 1, @@ -171,8 +166,8 @@ "n": 10 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10105, @@ -187,11 +182,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "605" + "150" ], "getafter_event": [ 2, - 10006 + 100006 ], "completetask": 118, "auto_accept": 1, @@ -203,8 +198,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10106, @@ -219,11 +214,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "606" + "150" ], "getafter_event": [ 2, - 10007 + 100007 ], "completetask": 174, "auto_accept": 1, @@ -235,8 +230,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 2 }, { "key": 10107, @@ -251,11 +246,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "607" + "150" ], "getafter_event": [ 2, - 10008 + 100008 ], "completetask": 0, "auto_accept": 1, @@ -267,8 +262,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 2 }, { "key": 10108, @@ -283,11 +278,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "608" + "150" ], "getafter_event": [ 2, - 10009 + 100009 ], "completetask": 0, "auto_accept": 1, @@ -299,8 +294,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10109, @@ -315,11 +310,11 @@ "npc": [ "scenes_ boundary_02", "戈伯组件名", - "609" + "153" ], "getafter_event": [ 2, - 10010 + 100010 ], "completetask": 0, "auto_accept": 1, @@ -331,8 +326,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10110, @@ -347,11 +342,11 @@ "npc": [ "SmithyScene", "戈伯铁匠铺组件名", - "610" + "139" ], "getafter_event": [ 2, - 10011 + 100011 ], "completetask": 0, "auto_accept": 1, @@ -363,8 +358,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10111, @@ -379,11 +374,11 @@ "npc": [ "scenes_ boundary_02", "阿宝右屏组件名", - "611" + "153" ], "getafter_event": [ 2, - 10012 + 100012 ], "completetask": 175, "auto_accept": 1, @@ -395,8 +390,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10112, @@ -411,11 +406,11 @@ "npc": [ "scenes_ boundary_02", "瓜哥组件名", - "612" + "153" ], "getafter_event": [ 2, - 10013 + 100013 ], "completetask": 0, "auto_accept": 1, @@ -427,8 +422,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10113, @@ -443,11 +438,11 @@ "npc": [ "test_library", "贫嘴驴组件名", - "613" + "146" ], "getafter_event": [ 2, - 10014 + 100014 ], "completetask": 0, "auto_accept": 1, @@ -459,8 +454,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10114, @@ -475,11 +470,11 @@ "npc": [ "test_library", "贫嘴驴组件名", - "614" + "146" ], "getafter_event": [ 2, - 10015 + 100015 ], "completetask": 0, "auto_accept": 1, @@ -491,8 +486,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10115, @@ -507,11 +502,11 @@ "npc": [ "scenes_boundary_02night", "阿宝组件名", - "615" + "153" ], "getafter_event": [ 2, - 10016 + 100016 ], "completetask": 0, "auto_accept": 1, @@ -523,8 +518,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10116, @@ -539,11 +534,11 @@ "npc": [ "scenes_boundary_02night", "阿宝组件名", - "616" + "150" ], "getafter_event": [ 2, - 10017 + 100017 ], "completetask": 0, "auto_accept": 1, @@ -555,8 +550,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10117, @@ -571,11 +566,11 @@ "npc": [ "scenes_ boundary_02", "瓜哥组件名", - "617" + "150" ], "getafter_event": [ 2, - 10018 + 100018 ], "completetask": 0, "auto_accept": 1, @@ -587,8 +582,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10118, @@ -603,11 +598,11 @@ "npc": [ "scenes_ boundary_02", "瓜哥组件名", - "618" + "150" ], "getafter_event": [ 2, - 10019 + 100019 ], "completetask": 0, "auto_accept": 1, @@ -619,8 +614,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10119, @@ -635,11 +630,11 @@ "npc": [ "scenes_ boundary_02", "阿宝维京区", - "619" + "151" ], "getafter_event": [ 2, - 10020 + 100020 ], "completetask": 0, "auto_accept": 1, @@ -651,8 +646,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10120, @@ -667,11 +662,11 @@ "npc": [ "scenes_ boundary_02", "阿宝维京区", - "620" + "151" ], "getafter_event": [ 2, - 10021 + 100021 ], "completetask": 0, "auto_accept": 1, @@ -683,8 +678,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10121, @@ -699,11 +694,11 @@ "npc": [ "scenes_ boundary_02", "阿宝维京区", - "621" + "151" ], "getafter_event": [ 2, - 10022 + 100022 ], "completetask": 0, "auto_accept": 1, @@ -715,8 +710,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10122, @@ -731,11 +726,11 @@ "npc": [ "scenes_ boundary_02", "阿宝维京区", - "622" + "151" ], "getafter_event": [ 2, - 10023 + 100023 ], "completetask": 0, "auto_accept": 1, @@ -747,8 +742,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "night", + "weather": 0 }, { "key": 10123, @@ -763,11 +758,11 @@ "npc": [ "scenes_ boundary_02", "阿宝维京区", - "623" + "151" ], "getafter_event": [ 2, - 10024 + 100024 ], "completetask": 0, "auto_accept": 1, @@ -779,8 +774,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10124, @@ -799,7 +794,7 @@ ], "getafter_event": [ 2, - 10025 + 100025 ], "completetask": 176, "auto_accept": 1, @@ -811,8 +806,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10125, @@ -831,7 +826,7 @@ ], "getafter_event": [ 2, - 10026 + 100026 ], "completetask": 0, "auto_accept": 1, @@ -843,8 +838,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10126, @@ -863,7 +858,7 @@ ], "getafter_event": [ 2, - 10027 + 100027 ], "completetask": 177, "auto_accept": 1, @@ -875,8 +870,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10127, @@ -895,7 +890,7 @@ ], "getafter_event": [ 2, - 10028 + 100028 ], "completetask": 178, "auto_accept": 1, @@ -907,8 +902,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10128, @@ -927,7 +922,7 @@ ], "getafter_event": [ 2, - 10029 + 100029 ], "completetask": 0, "auto_accept": 1, @@ -939,8 +934,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10129, @@ -959,7 +954,7 @@ ], "getafter_event": [ 2, - 10030 + 100030 ], "completetask": 0, "auto_accept": 1, @@ -971,8 +966,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10130, @@ -991,7 +986,7 @@ ], "getafter_event": [ 2, - 10031 + 100031 ], "completetask": 158, "auto_accept": 1, @@ -1003,8 +998,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10131, @@ -1019,11 +1014,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "631" + "151" ], "getafter_event": [ 2, - 10033 + 100033 ], "completetask": 0, "auto_accept": 1, @@ -1035,8 +1030,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10132, @@ -1051,11 +1046,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "632" + "151" ], "getafter_event": [ 2, - 10034 + 100034 ], "completetask": 0, "auto_accept": 1, @@ -1067,8 +1062,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10133, @@ -1083,11 +1078,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "633" + "151" ], "getafter_event": [ 2, - 10035 + 100035 ], "completetask": 0, "auto_accept": 1, @@ -1099,8 +1094,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10134, @@ -1115,11 +1110,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "634" + "151" ], "getafter_event": [ 2, - 10036 + 100036 ], "completetask": 0, "auto_accept": 1, @@ -1131,8 +1126,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10135, @@ -1147,11 +1142,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "635" + "151" ], "getafter_event": [ 2, - 10037 + 100037 ], "completetask": 0, "auto_accept": 1, @@ -1163,8 +1158,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10136, @@ -1179,11 +1174,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "636" + "152" ], "getafter_event": [ 2, - 10038 + 100038 ], "completetask": 0, "auto_accept": 1, @@ -1195,8 +1190,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10137, @@ -1211,11 +1206,11 @@ "npc": [ "WuGuanScene", "阿宝组件名", - "637" + "137" ], "getafter_event": [ 2, - 10039 + 100039 ], "completetask": 179, "auto_accept": 1, @@ -1227,8 +1222,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10138, @@ -1243,11 +1238,11 @@ "npc": [ "WuGuanScene", "阿宝组件名", - "638" + "137" ], "getafter_event": [ 2, - 10040 + 100040 ], "completetask": 0, "auto_accept": 1, @@ -1259,8 +1254,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10139, @@ -1275,11 +1270,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "639" + "152" ], "getafter_event": [ 2, - 10041 + 100041 ], "completetask": 0, "auto_accept": 1, @@ -1291,8 +1286,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10140, @@ -1307,11 +1302,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "640" + "152" ], "getafter_event": [ 2, - 10042 + 100042 ], "completetask": 0, "auto_accept": 1, @@ -1323,8 +1318,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10141, @@ -1339,11 +1334,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "641" + "152" ], "getafter_event": [ 2, - 10043 + 100043 ], "completetask": 180, "auto_accept": 1, @@ -1355,8 +1350,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10142, @@ -1371,11 +1366,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "642" + "152" ], "getafter_event": [ 2, - 10044 + 100044 ], "completetask": 181, "auto_accept": 1, @@ -1387,8 +1382,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10143, @@ -1403,11 +1398,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "643" + "152" ], "getafter_event": [ 2, - 10045 + 100045 ], "completetask": 182, "auto_accept": 1, @@ -1419,8 +1414,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10144, @@ -1435,11 +1430,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "644" + "152" ], "getafter_event": [ 2, - 10046 + 100046 ], "completetask": 0, "auto_accept": 1, @@ -1451,8 +1446,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10145, @@ -1467,11 +1462,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "645" + "152" ], "getafter_event": [ 2, - 10047 + 100047 ], "completetask": 0, "auto_accept": 1, @@ -1483,8 +1478,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10146, @@ -1499,11 +1494,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "646" + "150" ], "getafter_event": [ 2, - 10048 + 100048 ], "completetask": 0, "auto_accept": 1, @@ -1515,8 +1510,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10147, @@ -1531,11 +1526,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "647" + "150" ], "getafter_event": [ 2, - 10049 + 100049 ], "completetask": 0, "auto_accept": 1, @@ -1547,8 +1542,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10148, @@ -1563,11 +1558,11 @@ "npc": [ "scenes_ boundary_02", "阿宝组件名", - "648" + "150" ], "getafter_event": [ 2, - 10050 + 100050 ], "completetask": 0, "auto_accept": 1, @@ -1579,8 +1574,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10149, @@ -1594,11 +1589,12 @@ "task_display": "新剧情文本10149", "npc": [ "scenes_ boundary_02", - "波比组件名" + "波比组件名", + "150" ], "getafter_event": [ 2, - 10051 + 100051 ], "completetask": 0, "auto_accept": 1, @@ -1610,8 +1606,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10150, @@ -1625,11 +1621,12 @@ "task_display": "新剧情文本10150", "npc": [ "scenes_ boundary_02", - "波比组件名" + "波比组件名", + "150" ], "getafter_event": [ 2, - 10052 + 100052 ], "completetask": 0, "auto_accept": 1, @@ -1641,8 +1638,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10151, @@ -1656,11 +1653,12 @@ "task_display": "新剧情文本10151", "npc": [ "scenes_ boundary_02", - "杰克组件名" + "杰克组件名", + "150" ], "getafter_event": [ 2, - 10053 + 100053 ], "completetask": 0, "auto_accept": 1, @@ -1672,8 +1670,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10152, @@ -1691,7 +1689,7 @@ ], "getafter_event": [ 2, - 10054 + 100054 ], "completetask": 0, "auto_accept": 1, @@ -1703,8 +1701,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10153, @@ -1722,7 +1720,7 @@ ], "getafter_event": [ 2, - 10055 + 100055 ], "completetask": 0, "auto_accept": 1, @@ -1734,8 +1732,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10154, @@ -1753,7 +1751,7 @@ ], "getafter_event": [ 2, - 10056 + 100056 ], "completetask": 0, "auto_accept": 1, @@ -1765,8 +1763,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10155, @@ -1784,7 +1782,7 @@ ], "getafter_event": [ 2, - 10057 + 100057 ], "completetask": 0, "auto_accept": 1, @@ -1796,8 +1794,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10156, @@ -1815,7 +1813,7 @@ ], "getafter_event": [ 2, - 10058 + 100058 ], "completetask": 0, "auto_accept": 1, @@ -1827,8 +1825,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10157, @@ -1846,7 +1844,7 @@ ], "getafter_event": [ 2, - 10059 + 100059 ], "completetask": 0, "auto_accept": 1, @@ -1858,8 +1856,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10158, @@ -1877,7 +1875,7 @@ ], "getafter_event": [ 2, - 10060 + 100060 ], "completetask": 0, "auto_accept": 1, @@ -1889,8 +1887,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10159, @@ -1908,7 +1906,7 @@ ], "getafter_event": [ 2, - 10061 + 100061 ], "completetask": 0, "auto_accept": 1, @@ -1920,8 +1918,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10160, @@ -1939,7 +1937,7 @@ ], "getafter_event": [ 2, - 10062 + 100062 ], "completetask": 0, "auto_accept": 1, @@ -1951,8 +1949,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10161, @@ -1970,7 +1968,7 @@ ], "getafter_event": [ 2, - 10063 + 100063 ], "completetask": 0, "auto_accept": 1, @@ -1982,8 +1980,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10162, @@ -2001,7 +1999,7 @@ ], "getafter_event": [ 2, - 10064 + 100064 ], "completetask": 0, "auto_accept": 1, @@ -2013,8 +2011,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10163, @@ -2032,7 +2030,7 @@ ], "getafter_event": [ 2, - 10065 + 100065 ], "completetask": 0, "auto_accept": 1, @@ -2044,8 +2042,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10164, @@ -2063,7 +2061,7 @@ ], "getafter_event": [ 2, - 10066 + 100066 ], "completetask": 0, "auto_accept": 1, @@ -2075,14 +2073,14 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 10165, "lock": 1, "ontxe": 10164, - "id_after": 10166, + "id_after": 0, "group": 1, "des": 2, "icon": "", @@ -2094,7 +2092,7 @@ ], "getafter_event": [ 2, - 10067 + 100067 ], "completetask": 0, "auto_accept": 1, @@ -2106,8 +2104,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20001, @@ -2126,7 +2124,7 @@ ], "getafter_event": [ 2, - 10001 + 100001 ], "completetask": 0, "auto_accept": 0, @@ -2143,13 +2141,8 @@ "n": 1 } ], - "day": [ - "day|night" - ], - "weather": [ - 2, - 1 - ] + "day": "night", + "weather": 2 }, { "key": 20002, @@ -2168,7 +2161,7 @@ ], "getafter_event": [ 2, - 10002 + 100002 ], "completetask": 0, "auto_accept": 1, @@ -2180,8 +2173,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20003, @@ -2200,7 +2193,7 @@ ], "getafter_event": [ 2, - 10003 + 100003 ], "completetask": 171, "auto_accept": 1, @@ -2212,8 +2205,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20004, @@ -2232,7 +2225,7 @@ ], "getafter_event": [ 2, - 10004 + 100004 ], "completetask": 0, "auto_accept": 1, @@ -2244,8 +2237,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20005, @@ -2264,7 +2257,7 @@ ], "getafter_event": [ 2, - 10005 + 100005 ], "completetask": 0, "auto_accept": 1, @@ -2281,8 +2274,8 @@ "n": 10 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20006, @@ -2301,7 +2294,7 @@ ], "getafter_event": [ 2, - 10006 + 100006 ], "completetask": 118, "auto_accept": 1, @@ -2313,8 +2306,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20007, @@ -2333,7 +2326,7 @@ ], "getafter_event": [ 2, - 10007 + 100007 ], "completetask": 174, "auto_accept": 1, @@ -2345,8 +2338,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20008, @@ -2365,7 +2358,7 @@ ], "getafter_event": [ 2, - 10008 + 100008 ], "completetask": 0, "auto_accept": 1, @@ -2377,8 +2370,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20009, @@ -2397,7 +2390,7 @@ ], "getafter_event": [ 2, - 10009 + 100009 ], "completetask": 0, "auto_accept": 1, @@ -2409,8 +2402,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20010, @@ -2429,7 +2422,7 @@ ], "getafter_event": [ 2, - 10010 + 100010 ], "completetask": 0, "auto_accept": 1, @@ -2441,8 +2434,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20011, @@ -2461,7 +2454,7 @@ ], "getafter_event": [ 2, - 10001 + 100001 ], "completetask": 0, "auto_accept": 0, @@ -2478,13 +2471,8 @@ "n": 1 } ], - "day": [ - "day|night" - ], - "weather": [ - 2, - 1 - ] + "day": "night", + "weather": 2 }, { "key": 20012, @@ -2503,7 +2491,7 @@ ], "getafter_event": [ 2, - 10002 + 100002 ], "completetask": 0, "auto_accept": 1, @@ -2515,8 +2503,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20013, @@ -2535,7 +2523,7 @@ ], "getafter_event": [ 2, - 10003 + 100003 ], "completetask": 171, "auto_accept": 1, @@ -2547,8 +2535,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20014, @@ -2567,7 +2555,7 @@ ], "getafter_event": [ 2, - 10004 + 100004 ], "completetask": 0, "auto_accept": 1, @@ -2579,8 +2567,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20015, @@ -2599,7 +2587,7 @@ ], "getafter_event": [ 2, - 10005 + 100005 ], "completetask": 0, "auto_accept": 1, @@ -2616,8 +2604,8 @@ "n": 10 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20016, @@ -2636,7 +2624,7 @@ ], "getafter_event": [ 2, - 10006 + 100006 ], "completetask": 118, "auto_accept": 1, @@ -2648,8 +2636,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20017, @@ -2668,7 +2656,7 @@ ], "getafter_event": [ 2, - 10007 + 100007 ], "completetask": 174, "auto_accept": 1, @@ -2680,8 +2668,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20018, @@ -2700,7 +2688,7 @@ ], "getafter_event": [ 2, - 10008 + 100008 ], "completetask": 0, "auto_accept": 1, @@ -2712,8 +2700,8 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20019, @@ -2732,7 +2720,7 @@ ], "getafter_event": [ 2, - 10009 + 100009 ], "completetask": 0, "auto_accept": 1, @@ -2744,14 +2732,14 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 }, { "key": 20020, "lock": 1, "ontxe": 20019, - "id_after": 0, + "id_after": 20100, "group": 10002, "des": 2, "icon": "", @@ -2764,7 +2752,7 @@ ], "getafter_event": [ 2, - 10010 + 100010 ], "completetask": 0, "auto_accept": 1, @@ -2776,7 +2764,423 @@ "n": 100 } ], - "day": [], - "weather": [] + "day": "", + "weather": 0 + }, + { + "key": 20100, + "lock": 1, + "ontxe": 0, + "id_after": 20101, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20100", + "task_display": "新剧情文本20100", + "npc": [ + "scenes_ boundary_02", + "阿宝组件名", + "600" + ], + "getafter_event": [ + 2, + 200001 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20101, + "lock": 1, + "ontxe": 20100, + "id_after": 20102, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20101", + "task_display": "新剧情文本20101", + "npc": [ + "scenes_ boundary_02", + "邦尼兔组件名", + "601" + ], + "getafter_event": [ + 2, + 200002 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20102, + "lock": 1, + "ontxe": 20101, + "id_after": 20103, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20102", + "task_display": "新剧情文本20102", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200003 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20103, + "lock": 1, + "ontxe": 20102, + "id_after": 20104, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20103", + "task_display": "新剧情文本20103", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200004 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20104, + "lock": 1, + "ontxe": 20103, + "id_after": 20105, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20104", + "task_display": "新剧情文本20104", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200005 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20105, + "lock": 1, + "ontxe": 20104, + "id_after": 20106, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20105", + "task_display": "新剧情文本20105", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200006 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20106, + "lock": 1, + "ontxe": 20105, + "id_after": 20107, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20106", + "task_display": "新剧情文本20106", + "npc": [ + "scenes_ boundary_02", + "邦尼兔组件名", + "601" + ], + "getafter_event": [ + 2, + 200007 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20107, + "lock": 1, + "ontxe": 20106, + "id_after": 20108, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20107", + "task_display": "新剧情文本20107", + "npc": [ + "scenes_ boundary_02", + "阿宝维京区", + "619" + ], + "getafter_event": [ + 2, + 200008 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20108, + "lock": 1, + "ontxe": 20107, + "id_after": 20109, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20108", + "task_display": "新剧情文本20108", + "npc": [ + "scenes_ boundary_02", + "阿宝维京区", + "619" + ], + "getafter_event": [ + 2, + 200009 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20109, + "lock": 1, + "ontxe": 20108, + "id_after": 20110, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20109", + "task_display": "新剧情文本20109", + "npc": [ + "scenes_ boundary_02", + "邦尼兔组件名", + "601" + ], + "getafter_event": [ + 2, + 200010 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20110, + "lock": 1, + "ontxe": 20109, + "id_after": 20111, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20110", + "task_display": "新剧情文本20110", + "npc": [ + "scenes_ boundary_02", + "阿宝组件名", + "600" + ], + "getafter_event": [ + 2, + 200011 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20111, + "lock": 1, + "ontxe": 20110, + "id_after": 20112, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20111", + "task_display": "新剧情文本20111", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200012 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 + }, + { + "key": 20112, + "lock": 1, + "ontxe": 20111, + "id_after": 0, + "group": 1, + "des": 2, + "icon": "", + "task_name": "新剧情20112", + "task_display": "新剧情文本20112", + "npc": [ + "scenes_ boundary_02", + "阿宝右屏组件名", + "611" + ], + "getafter_event": [ + 2, + 200013 + ], + "completetask": 0, + "auto_accept": 1, + "overtips": 1, + "reword": [ + { + "a": "attr", + "t": "diamond", + "n": 100 + } + ], + "day": "", + "weather": 0 } ] \ No newline at end of file diff --git a/comm/const.go b/comm/const.go index b6b990ec2..df71ec82d 100644 --- a/comm/const.go +++ b/comm/const.go @@ -232,7 +232,8 @@ const ( //Rpc // 充值发货 Rpc_ModulePayDelivery core.Rpc_Key = "Rpc_ModulePayDelivery" //充值发货 - + // 配置更新 + Rpc_ConfigureUpDate core.Rpc_Key = "Rpc_ConfigureUpDate" //配置更新 // 羁绊信息 Rpc_ModuleFetter core.Rpc_Key = "Rpc_ModuleFetter" diff --git a/modules/academy/api_challenge.go b/modules/academy/api_challenge.go index 43d347905..e7e48cea8 100644 --- a/modules/academy/api_challenge.go +++ b/modules/academy/api_challenge.go @@ -48,9 +48,11 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.AcademyChallen return } cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{ - Ptype: pb.PlayType_academy, - Redformat: level.UsFormatList, - Buleformat: level.FormatList, + Ptype: pb.PlayType_academy, + Format: nil, + Sysformat: level.UsFormatList, + Backupformat: nil, + Buleformat: level.FormatList, }) return } diff --git a/modules/academy/api_teaching.go b/modules/academy/api_teaching.go index 66b953b18..d2f3f89ad 100644 --- a/modules/academy/api_teaching.go +++ b/modules/academy/api_teaching.go @@ -48,9 +48,11 @@ func (this *apiComp) Teaching(session comm.IUserSession, req *pb.AcademyTeaching return } cd, record = this.module.battle.CreateEveBattle(session, &pb.BattleEVEReq{ - Ptype: pb.PlayType_heroteaching, - Redformat: level.UsFormatList, - Buleformat: level.FormatList, + Ptype: pb.PlayType_heroteaching, + Format: nil, + Sysformat: level.UsFormatList, + Backupformat: nil, + Buleformat: level.FormatList, }) return } diff --git a/modules/battle/modelBattle.go b/modules/battle/modelBattle.go index d8ad98115..9010f5409 100644 --- a/modules/battle/modelBattle.go +++ b/modules/battle/modelBattle.go @@ -52,7 +52,6 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon Ptype: req.Ptype, State: pb.BBattleState_in, RedCompId: session.GetUserId(), - Redflist: make([]*pb.DBBattleFormt, len(req.Redformat)), BlueCompId: "", Buleflist: make([]*pb.DBBattleFormt, len(req.Buleformat)), } @@ -60,15 +59,99 @@ func (this *modelBattleComp) createeve(session comm.IUserSession, conn *db.DBCon captain int32 masters []*pb.BattleRole ) - for i, v := range req.Redformat { - if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { - return + + if req.Format != nil { + model := db.NewDBModel(comm.TableHero, time.Hour, conn) + record.Redflist = make([]*pb.DBBattleFormt, 1) + //自己的英雄阵营 + for i, v := range req.Format.Format { + if v != "" { + hero := &pb.DBHero{} + if err := model.GetListObj(session.GetUserId(), v, hero); err != nil { + code = pb.ErrorCode_HeroNoExist + return + } + tid := 100 + i + if record.Redflist[0].Team[i], code = this.createBattleRole(hero, tid, i); code != pb.ErrorCode_Success { + return + } + } else { + record.Redflist[0].Team[i] = nil + } } - record.Redflist[i] = &pb.DBBattleFormt{ - Leadpos: captain, - Team: masters, + //好友的英雄阵营 + for i, v := range req.Format.Friendformat { + if v != "" { + var ( + hero *pb.DBHero + err error + ) + // 获取好友英雄信息 + if this.module.IsCross() { + if hero, err = this.module.friend.UseAssistHero(session.GetUserId(), v); err != nil { + this.module.Errorln(err) + code = pb.ErrorCode_HeroNoExist + return + } + } else { //获取跨服数据 + hero = &pb.DBHero{} + if err = this.module.service.AcrossClusterRpcCall( + context.Background(), + this.module.GetCrossTag(), + comm.Service_Worker, + string(comm.Rpc_ModuleFriendUseAssitHero), + pb.RPCGeneralReqA2{Param1: session.GetUserId(), Param2: v}, + hero); err != nil { + this.module.Errorln(err) + } + } + tid := 100 + i + if record.Redflist[0].Team[i], code = this.createBattleRole(hero, tid, i); code != pb.ErrorCode_Success { + return + } + record.Redflist[0].Team[i].Ishelp = true + } + } + if req.Sysformat != nil && len(req.Sysformat) > 0 { + for i, v := range req.Sysformat { + if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { + return + } + record.Redflist[i].Systeam = masters + if record.Redflist[i].Leadpos == -1 && captain != -1 { + record.Redflist[i].Leadpos = captain + } + } + } + if req.Backupformat != nil && len(req.Backupformat) > 0 { + for i, v := range req.Backupformat { + if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { + return + } + record.Redflist[i].Backupteam = masters + } + } + } else { + record.Redflist = make([]*pb.DBBattleFormt, len(req.Sysformat)) + for i, v := range req.Sysformat { + if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { + return + } + record.Redflist[i] = &pb.DBBattleFormt{ + Leadpos: captain, + Systeam: masters, + } + } + if req.Backupformat != nil && len(req.Backupformat) > 0 { + for i, v := range req.Backupformat { + if captain, masters, code = this.createMasterRoles(100, i, v); code != pb.ErrorCode_Success { + return + } + record.Redflist[i].Backupteam = masters + } } } + for i, v := range req.Buleformat { if captain, masters, code = this.createMasterRoles(200, i, v); code != pb.ErrorCode_Success { return @@ -270,6 +353,7 @@ func (this *modelBattleComp) createMasterRoles(comp, wheel int, fid int32) (capt code = pb.ErrorCode_ConfigNoFound return } + captain = -1 roles = make([]*pb.BattleRole, len(result)) for i, v := range result { if v != nil { diff --git a/modules/combat/api_challengereceive.go b/modules/combat/api_challengereceive.go index 2969b19a3..74e33db30 100644 --- a/modules/combat/api_challengereceive.go +++ b/modules/combat/api_challengereceive.go @@ -19,8 +19,9 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC var ( iswin bool info *pb.DBCombatUser + level *cfg.GameCombatLevelData manster *cfg.GameCombatMansterData - + pass bool // group []*cfg.GameTeachingData err error ) @@ -35,6 +36,10 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC code = pb.ErrorCode_DBError return } + if level, err = this.module.configure.getCombatLevel(info.Currlevel); err != nil { + code = pb.ErrorCode_DBError + return + } if manster, err = this.module.configure.getGameCombatManster(req.Manster); err != nil { code = pb.ErrorCode_ConfigNoFound return @@ -52,8 +57,33 @@ func (this *apiComp) ChallengeReceive(session comm.IUserSession, req *pb.CombatC return } + for _, v := range level.Passdroplist { + ispass := false + for _, v1 := range info.Passdrop { + if v == v1 { + ispass = true + } + } + if !ispass { + pass = false + break + } + } + for _, v := range level.PassformatList { + ispass := false + for _, v1 := range info.Passmanster { + if v == v1 { + ispass = true + } + } + if !ispass { + pass = false + break + } + } this.module.DispenseRes(session, manster.Award, true) } - session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true}) + + session.SendMsg(string(this.module.GetType()), "challengereceive", &pb.CombatChallengeReceiveResp{Issucc: true, Pass: pass}) return } diff --git a/modules/combat/api_drop.go b/modules/combat/api_drop.go index 17fb124c6..fb23cf43f 100644 --- a/modules/combat/api_drop.go +++ b/modules/combat/api_drop.go @@ -3,6 +3,7 @@ package combat import ( "go_dreamfactory/comm" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "google.golang.org/protobuf/proto" ) @@ -16,9 +17,10 @@ func (this *apiComp) DropCheck(session comm.IUserSession, req *pb.CombatDropReq) ///奖励领取 func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (code pb.ErrorCode, data proto.Message) { var ( - info *pb.DBCombatUser - atns []*pb.UserAssets - err error + info *pb.DBCombatUser + level *cfg.GameCombatLevelData + atns []*pb.UserAssets + err error ) if code = this.DropCheck(session, req); code != pb.ErrorCode_Success { return @@ -28,7 +30,10 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod code = pb.ErrorCode_DBError return } - + if level, err = this.module.configure.getCombatLevel(info.Currlevel); err != nil { + code = pb.ErrorCode_DBError + return + } for _, v := range info.Passdrop { if v == req.Drop { code = pb.ErrorCode_ReqParameterError @@ -51,6 +56,33 @@ func (this *apiComp) Drop(session comm.IUserSession, req *pb.CombatDropReq) (cod N: v.N, } } - session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns}) + + pass := true + for _, v := range level.Passdroplist { + ispass := false + for _, v1 := range info.Passdrop { + if v == v1 { + ispass = true + } + } + if !ispass { + pass = false + break + } + } + for _, v := range level.PassformatList { + ispass := false + for _, v1 := range info.Passmanster { + if v == v1 { + ispass = true + } + } + if !ispass { + pass = false + break + } + } + + session.SendMsg(string(this.module.GetType()), "drop", &pb.CombatDropResp{Code: code, Atns: atns, Pass: pass}) return } diff --git a/modules/web/api_upload.go b/modules/web/api_upload.go new file mode 100644 index 000000000..4d6618fba --- /dev/null +++ b/modules/web/api_upload.go @@ -0,0 +1,42 @@ +package web + +import ( + "context" + "fmt" + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/gin/engine" + "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" + "strconv" +) + +//上传配置文件 +func (this *Api_Comp) Upload(c *engine.Context) { + filenum := c.PostForm("filenum") + if filenum != "" { + if n, err := strconv.Atoi(filenum); err != nil { + this.module.Errorln(err) + return + } else { + for i := 0; i < n; i++ { + if fn, err := c.FormFile(fmt.Sprintf("file_%d", i)); err != nil { + this.module.Errorln(err) + return + } else { + if err = c.SaveUploadedFile(fn, fmt.Sprintf("%s/%s", configure.ConfigurePath(), fn.Filename)); err != nil { + this.module.Errorln(err) + return + } + } + } + } + if err := this.module.service.RpcBroadcast( + context.Background(), + comm.Service_Worker, + string(comm.Rpc_ConfigureUpDate), + &pb.EmptyReq{}, + &pb.EmptyResp{}); err != nil { + this.module.Errorln(err) + } + } +} diff --git a/modules/worldtask/api_battlestart.go b/modules/worldtask/api_battlestart.go index c12ef8c20..adec4114c 100644 --- a/modules/worldtask/api_battlestart.go +++ b/modules/worldtask/api_battlestart.go @@ -36,13 +36,15 @@ func (this *apiComp) Battlestart(session comm.IUserSession, req *pb.WorldtaskBat record *pb.DBBattleRecord resp *pb.WorldtaskBattleStartResp ) - code, record = b.CreatePveBattle(session, &pb.BattlePVEReq{ + code, record = b.CreateEveBattle(session, &pb.BattleEVEReq{ Ptype: pb.PlayType_rtask, Format: &pb.BattleFormation{ Leadpos: req.Leadpos, Format: req.Teamids, }, - Mformat: battleConf.FormatList, + Sysformat: []int32{battleConf.DefaultHero}, + Backupformat: []int32{battleConf.AssistTeam}, + Buleformat: battleConf.FormatList, }) if code != pb.ErrorCode_Success { @@ -59,6 +61,7 @@ func (this *apiComp) Battlestart(session comm.IUserSession, req *pb.WorldtaskBat Redflist: record.Redflist, BlueCompId: record.BlueCompId, Buleflist: record.Buleflist, + Tasks: battleConf.EventList, }, } } diff --git a/pb/battle_db.pb.go b/pb/battle_db.pb.go index 1780f35b4..71ae306ca 100644 --- a/pb/battle_db.pb.go +++ b/pb/battle_db.pb.go @@ -395,8 +395,10 @@ type DBBattleFormt struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置 - Team []*BattleRole `protobuf:"bytes,2,rep,name=team,proto3" json:"team"` + Leadpos int32 `protobuf:"varint,1,opt,name=leadpos,proto3" json:"leadpos"` //队长位置 + Team []*BattleRole `protobuf:"bytes,2,rep,name=team,proto3" json:"team"` //自己的战队 + Systeam []*BattleRole `protobuf:"bytes,3,rep,name=systeam,proto3" json:"systeam"` //系统辅助战队 + Backupteam []*BattleRole `protobuf:"bytes,4,rep,name=backupteam,proto3" json:"backupteam"` //后援战队 } func (x *DBBattleFormt) Reset() { @@ -445,6 +447,20 @@ func (x *DBBattleFormt) GetTeam() []*BattleRole { return nil } +func (x *DBBattleFormt) GetSysteam() []*BattleRole { + if x != nil { + return x.Systeam + } + return nil +} + +func (x *DBBattleFormt) GetBackupteam() []*BattleRole { + if x != nil { + return x.Backupteam + } + return nil +} + //战斗记录 type DBBattleRecord struct { state protoimpl.MessageState @@ -615,58 +631,63 @@ var file_battle_battle_db_proto_rawDesc = []byte{ 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4a, 0x0a, 0x0d, 0x44, 0x42, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, - 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, - 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, - 0x04, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xa7, 0x03, 0x0a, 0x0e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, - 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, - 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x23, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x42, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, - 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, - 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, - 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, - 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, - 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, - 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, - 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, - 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x0b, 0x72, 0x6f, 0x75, - 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2a, - 0x39, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, - 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x65, 0x10, 0x01, 0x12, - 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x62, 0x10, - 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, 0x99, 0x01, 0x0a, 0x08, 0x50, - 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x6e, 0x75, 0x6c, 0x6c, 0x10, - 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x12, - 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x72, - 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, 0x75, 0x6e, 0x74, 0x69, 0x6e, - 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, 0x6e, 0x67, 0x10, 0x05, 0x12, - 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, 0x61, 0x73, 0x79, 0x10, 0x06, - 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x61, - 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, 0x0c, 0x68, 0x65, 0x72, 0x6f, - 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, 0x0a, 0x0a, 0x06, 0x63, 0x6f, - 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, 0x6e, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, 0x44, 0x42, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, 0x64, 0x72, 0x61, 0x77, 0x10, - 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x62, 0x75, - 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0d, 0x44, 0x42, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, + 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, + 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, + 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x25, 0x0a, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, + 0x6d, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x07, 0x73, 0x79, 0x73, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x2b, 0x0a, + 0x0a, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0a, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x74, 0x65, 0x61, 0x6d, 0x22, 0xa7, 0x03, 0x0a, 0x0e, 0x44, + 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, + 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, + 0x23, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, + 0x2e, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, + 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, + 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, + 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, + 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x0b, + 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x0e, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, + 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x25, 0x0a, + 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, + 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x52, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x2a, 0x39, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x6e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x70, + 0x76, 0x65, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x70, 0x76, 0x70, 0x10, 0x02, 0x12, 0x07, 0x0a, + 0x03, 0x70, 0x76, 0x62, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x76, 0x65, 0x10, 0x04, 0x2a, + 0x99, 0x01, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, + 0x6e, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, + 0x6e, 0x65, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x70, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x10, 0x02, + 0x12, 0x09, 0x0a, 0x05, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x68, + 0x75, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x76, 0x69, 0x6b, 0x69, + 0x6e, 0x67, 0x10, 0x05, 0x12, 0x0f, 0x0a, 0x0b, 0x6d, 0x6f, 0x6f, 0x6e, 0x66, 0x61, 0x6e, 0x74, + 0x61, 0x73, 0x79, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x10, 0x07, + 0x12, 0x0b, 0x0a, 0x07, 0x61, 0x63, 0x61, 0x64, 0x65, 0x6d, 0x79, 0x10, 0x08, 0x12, 0x10, 0x0a, + 0x0c, 0x68, 0x65, 0x72, 0x6f, 0x74, 0x65, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x10, 0x09, 0x12, + 0x0a, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x62, 0x61, 0x74, 0x10, 0x0a, 0x2a, 0x1f, 0x0a, 0x0c, 0x42, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x06, 0x0a, 0x02, 0x69, + 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x10, 0x02, 0x2a, 0x2b, 0x0a, 0x0c, + 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x12, 0x08, 0x0a, 0x04, + 0x64, 0x72, 0x61, 0x77, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x10, 0x01, 0x12, + 0x08, 0x0a, 0x04, 0x62, 0x75, 0x6c, 0x65, 0x10, 0x02, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -699,18 +720,20 @@ var file_battle_battle_db_proto_depIdxs = []int32{ 8, // 1: BattleRole.equipSkill:type_name -> SkillData 7, // 2: BattleRole.property:type_name -> BattleRole.PropertyEntry 4, // 3: DBBattleFormt.team:type_name -> BattleRole - 0, // 4: DBBattleRecord.btype:type_name -> BattleType - 1, // 5: DBBattleRecord.ptype:type_name -> PlayType - 2, // 6: DBBattleRecord.state:type_name -> BBattleState - 5, // 7: DBBattleRecord.redflist:type_name -> DBBattleFormt - 5, // 8: DBBattleRecord.buleflist:type_name -> DBBattleFormt - 3, // 9: DBBattleRecord.roundresult:type_name -> DBBattleComp - 3, // 10: DBBattleRecord.result:type_name -> DBBattleComp - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 4, // 4: DBBattleFormt.systeam:type_name -> BattleRole + 4, // 5: DBBattleFormt.backupteam:type_name -> BattleRole + 0, // 6: DBBattleRecord.btype:type_name -> BattleType + 1, // 7: DBBattleRecord.ptype:type_name -> PlayType + 2, // 8: DBBattleRecord.state:type_name -> BBattleState + 5, // 9: DBBattleRecord.redflist:type_name -> DBBattleFormt + 5, // 10: DBBattleRecord.buleflist:type_name -> DBBattleFormt + 3, // 11: DBBattleRecord.roundresult:type_name -> DBBattleComp + 3, // 12: DBBattleRecord.result:type_name -> DBBattleComp + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_battle_battle_db_proto_init() } diff --git a/pb/battle_msg.pb.go b/pb/battle_msg.pb.go index 8c6d531a3..ae86bb767 100644 --- a/pb/battle_msg.pb.go +++ b/pb/battle_msg.pb.go @@ -153,10 +153,12 @@ type BattleEVEReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型 - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题 - Redformat []int32 `protobuf:"varint,3,rep,packed,name=redformat,proto3" json:"redformat"` //红方 - Buleformat []int32 `protobuf:"varint,4,rep,packed,name=buleformat,proto3" json:"buleformat"` //蓝方 + Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型 + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题 + Format *BattleFormation `protobuf:"bytes,3,opt,name=format,proto3" json:"format"` //布阵信息 + Sysformat []int32 `protobuf:"varint,4,rep,packed,name=sysformat,proto3" json:"sysformat"` //系统辅助 + Backupformat []int32 `protobuf:"varint,5,rep,packed,name=backupformat,proto3" json:"backupformat"` //后援辅助 + Buleformat []int32 `protobuf:"varint,6,rep,packed,name=buleformat,proto3" json:"buleformat"` //蓝方 } func (x *BattleEVEReq) Reset() { @@ -205,9 +207,23 @@ func (x *BattleEVEReq) GetTitle() string { return "" } -func (x *BattleEVEReq) GetRedformat() []int32 { +func (x *BattleEVEReq) GetFormat() *BattleFormation { if x != nil { - return x.Redformat + return x.Format + } + return nil +} + +func (x *BattleEVEReq) GetSysformat() []int32 { + if x != nil { + return x.Sysformat + } + return nil +} + +func (x *BattleEVEReq) GetBackupformat() []int32 { + if x != nil { + return x.Backupformat } return nil } @@ -628,69 +644,74 @@ var file_battle_battle_msg_proto_rawDesc = []byte{ 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x83, + 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xd1, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x45, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, - 0x56, 0x45, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x22, 0x5b, 0x0a, 0x0c, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, - 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01, - 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f, - 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, - 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, - 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, - 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, - 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, - 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, - 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, - 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, - 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, - 0x05, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, - 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, - 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x74, 0x61, 0x73, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x79, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x05, 0x52, 0x09, 0x73, 0x79, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, + 0x0a, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, + 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5b, + 0x0a, 0x0c, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, + 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, + 0x65, 0x72, 0x6f, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x0c, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, + 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, + 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x2d, 0x0a, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, + 0xa4, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, + 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, + 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, + 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, + 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, + 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x05, 0x52, + 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x12, 0x22, + 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, 0x73, 0x6b, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x74, 0x61, + 0x73, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -722,22 +743,23 @@ var file_battle_battle_msg_proto_goTypes = []interface{}{ } var file_battle_battle_msg_proto_depIdxs = []int32{ 8, // 0: BattleEVEReq.ptype:type_name -> PlayType - 8, // 1: BattlePVEReq.ptype:type_name -> PlayType - 1, // 2: BattlePVEReq.format:type_name -> BattleFormation - 9, // 3: PVPFormation.format:type_name -> DBHero - 8, // 4: BattlePVPReq.ptype:type_name -> PlayType - 4, // 5: BattlePVPReq.redformat:type_name -> PVPFormation - 4, // 6: BattlePVPReq.buleformat:type_name -> PVPFormation - 10, // 7: BattleInfo.btype:type_name -> BattleType - 8, // 8: BattleInfo.ptype:type_name -> PlayType - 11, // 9: BattleInfo.redflist:type_name -> DBBattleFormt - 11, // 10: BattleInfo.buleflist:type_name -> DBBattleFormt - 6, // 11: BattleReport.info:type_name -> BattleInfo - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 1, // 1: BattleEVEReq.format:type_name -> BattleFormation + 8, // 2: BattlePVEReq.ptype:type_name -> PlayType + 1, // 3: BattlePVEReq.format:type_name -> BattleFormation + 9, // 4: PVPFormation.format:type_name -> DBHero + 8, // 5: BattlePVPReq.ptype:type_name -> PlayType + 4, // 6: BattlePVPReq.redformat:type_name -> PVPFormation + 4, // 7: BattlePVPReq.buleformat:type_name -> PVPFormation + 10, // 8: BattleInfo.btype:type_name -> BattleType + 8, // 9: BattleInfo.ptype:type_name -> PlayType + 11, // 10: BattleInfo.redflist:type_name -> DBBattleFormt + 11, // 11: BattleInfo.buleflist:type_name -> DBBattleFormt + 6, // 12: BattleReport.info:type_name -> BattleInfo + 13, // [13:13] is the sub-list for method output_type + 13, // [13:13] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_battle_battle_msg_proto_init() } diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index ec682eaca..76655e81d 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -5,6 +5,7 @@ import ( "fmt" "go_dreamfactory/comm" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" "go_dreamfactory/sys/db" "reflect" "sync" @@ -87,6 +88,7 @@ func (this *SCompGateRoute) Start() (err error) { this.service.RegisterFunctionName(string(comm.Rpc_GatewayRoute), this.ReceiveMsg) //注册网关路由接收接口 this.service.RegisterFunctionName(string(comm.Rpc_GatewayNoticeUserLogin), this.NoticeUserLogin) //注册用户登录通知 this.service.RegisterFunctionName(string(comm.Rpc_GatewayNoticeUserClose), this.NoticeUserClose) //注册用户离线通知 + this.service.RegisterFunctionName(string(comm.Rpc_ConfigureUpDate), this.ConfigureUpDate) //注册配置更新 err = this.ServiceCompBase.Start() return } @@ -206,6 +208,12 @@ func (this *SCompGateRoute) NoticeUserClose(ctx context.Context, args *pb.Notice return nil } +//RPC_ConfigureUpDate 接收配置更新消息 +func (this *SCompGateRoute) ConfigureUpDate(ctx context.Context, args *pb.EmptyReq, reply *pb.EmptyResp) error { + configure.Update() + return nil +} + //获取用户的会话对象 func (this *SCompGateRoute) GetUserSession(udata *pb.CacheUser) (session comm.IUserSession) { session = this.pools.Get().(comm.IUserSession) diff --git a/sys/configure/configure.go b/sys/configure/configure.go index 5f0511431..1b448cfa2 100644 --- a/sys/configure/configure.go +++ b/sys/configure/configure.go @@ -47,6 +47,10 @@ type Configure struct { offsettime time.Duration //偏移时间 } +func (this *Configure) ConfigurePath() string { + return this.options.ConfigurePath +} + func (this *Configure) Start() (err error) { timer := time.NewTicker(time.Second * time.Duration(this.options.CheckInterval)) go func() { @@ -69,6 +73,10 @@ func (this *Configure) Stop() (err error) { return } +func (this *Configure) Update() { + this.checkConfigure() +} + //服务当前时间 func (this *Configure) Now() time.Time { return time.Now().Add(this.offsettime) diff --git a/sys/configure/core.go b/sys/configure/core.go index be42f4c11..923ad88ce 100644 --- a/sys/configure/core.go +++ b/sys/configure/core.go @@ -15,8 +15,10 @@ type ( ModTime time.Time // 文件修改时间 } ISys interface { + ConfigurePath() string Start() (err error) Stop() (err error) + Update() RegisterConfigure(name string, fn interface{}, callback func()) (err error) //注册配置 GetConfigure(name string) (v interface{}, err error) //获取配置 Now() time.Time //服务器当前时间 @@ -42,12 +44,20 @@ func NewSys(option ...Option) (sys ISys, err error) { defsys, err = newSys(options) return } +func ConfigurePath() string { + return defsys.ConfigurePath() +} + func Start() (err error) { return defsys.Start() } func Stop() (err error) { return defsys.Stop() } +func Update() { + defsys.Update() +} + func RegisterConfigure(name string, fn interface{}, callback func()) (err error) { return defsys.RegisterConfigure(name, fn, callback) } diff --git a/sys/configure/structs/Game.WorldBattleData.go b/sys/configure/structs/Game.WorldBattleData.go index a5b4ab575..3b5c89f30 100644 --- a/sys/configure/structs/Game.WorldBattleData.go +++ b/sys/configure/structs/Game.WorldBattleData.go @@ -13,12 +13,11 @@ import "errors" type GameWorldBattleData struct { Id int32 FormatList []int32 - CaptainId string - Buff []int32 - Battlestory []int32 - Teammate []int32 - Numberofteam int32 - Battleteam []int32 + DefaultHero int32 + SelectableHero []string + LockSlots []int32 + AssistTeam int32 + EventList []int32 } const TypeId_GameWorldBattleData = 1096332216 @@ -43,61 +42,47 @@ func (_v *GameWorldBattleData)Deserialize(_buf map[string]interface{}) (err erro } } - { var _ok_ bool; if _v.CaptainId, _ok_ = _buf["captainId"].(string); !_ok_ { err = errors.New("captainId error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["DefaultHero"].(float64); !_ok_ { err = errors.New("DefaultHero error"); return }; _v.DefaultHero = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool - if _arr_, _ok_ = _buf["buff"].([]interface{}); !_ok_ { err = errors.New("buff error"); return } + if _arr_, _ok_ = _buf["SelectableHero"].([]interface{}); !_ok_ { err = errors.New("SelectableHero error"); return } - _v.Buff = make([]int32, 0, len(_arr_)) + _v.SelectableHero = make([]string, 0, len(_arr_)) for _, _e_ := range _arr_ { - var _list_v_ int32 - { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Buff = append(_v.Buff, _list_v_) + var _list_v_ string + { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } + _v.SelectableHero = append(_v.SelectableHero, _list_v_) } } { var _arr_ []interface{} var _ok_ bool - if _arr_, _ok_ = _buf["battlestory"].([]interface{}); !_ok_ { err = errors.New("battlestory error"); return } + if _arr_, _ok_ = _buf["LockSlots"].([]interface{}); !_ok_ { err = errors.New("LockSlots error"); return } - _v.Battlestory = make([]int32, 0, len(_arr_)) + _v.LockSlots = make([]int32, 0, len(_arr_)) for _, _e_ := range _arr_ { var _list_v_ int32 { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Battlestory = append(_v.Battlestory, _list_v_) + _v.LockSlots = append(_v.LockSlots, _list_v_) } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["AssistTeam"].(float64); !_ok_ { err = errors.New("AssistTeam error"); return }; _v.AssistTeam = int32(_tempNum_) } { var _arr_ []interface{} var _ok_ bool - if _arr_, _ok_ = _buf["teammate"].([]interface{}); !_ok_ { err = errors.New("teammate error"); return } + if _arr_, _ok_ = _buf["EventList"].([]interface{}); !_ok_ { err = errors.New("EventList error"); return } - _v.Teammate = make([]int32, 0, len(_arr_)) + _v.EventList = make([]int32, 0, len(_arr_)) for _, _e_ := range _arr_ { var _list_v_ int32 { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Teammate = append(_v.Teammate, _list_v_) - } - } - - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["numberofteam"].(float64); !_ok_ { err = errors.New("numberofteam error"); return }; _v.Numberofteam = int32(_tempNum_) } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["battleteam"].([]interface{}); !_ok_ { err = errors.New("battleteam error"); return } - - _v.Battleteam = make([]int32, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ int32 - { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Battleteam = append(_v.Battleteam, _list_v_) + _v.EventList = append(_v.EventList, _list_v_) } } diff --git a/sys/configure/structs/Game.WorldTaskData.go b/sys/configure/structs/Game.WorldTaskData.go index de79b13f6..30ab22698 100644 --- a/sys/configure/structs/Game.WorldTaskData.go +++ b/sys/configure/structs/Game.WorldTaskData.go @@ -26,8 +26,8 @@ type GameWorldTaskData struct { AutoAccept int32 Overtips int32 Reword []*Gameatn - Day []string - Weather []int32 + Day string + Weather int32 } const TypeId_GameWorldTaskData = -1059668091 @@ -91,34 +91,8 @@ func (_v *GameWorldTaskData)Deserialize(_buf map[string]interface{}) (err error) } } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["day"].([]interface{}); !_ok_ { err = errors.New("day error"); return } - - _v.Day = make([]string, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ string - { if _list_v_, _ok_ = _e_.(string); !_ok_ { err = errors.New("_list_v_ error"); return } } - _v.Day = append(_v.Day, _list_v_) - } - } - - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["weather"].([]interface{}); !_ok_ { err = errors.New("weather error"); return } - - _v.Weather = make([]int32, 0, len(_arr_)) - - for _, _e_ := range _arr_ { - var _list_v_ int32 - { var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) } - _v.Weather = append(_v.Weather, _list_v_) - } - } - + { var _ok_ bool; if _v.Day, _ok_ = _buf["day"].(string); !_ok_ { err = errors.New("day error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weather"].(float64); !_ok_ { err = errors.New("weather error"); return }; _v.Weather = int32(_tempNum_) } return }