diff --git a/bin/json/game_dragonplay.json b/bin/json/game_dragonplay.json index aa42ba459..ff281e978 100644 --- a/bin/json/game_dragonplay.json +++ b/bin/json/game_dragonplay.json @@ -6,11 +6,14 @@ "type": 1, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 1 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 1 + } + ], "group": 0 }, { @@ -20,11 +23,14 @@ "type": 3, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 2 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 2 + } + ], "group": 10001 }, { @@ -34,11 +40,14 @@ "type": 4, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 3 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 3 + } + ], "group": 0 }, { @@ -48,11 +57,14 @@ "type": 1, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 4 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 4 + } + ], "group": 0 }, { @@ -62,11 +74,14 @@ "type": 2, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 5 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 5 + } + ], "group": 0 }, { @@ -76,11 +91,14 @@ "type": 3, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 6 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 6 + } + ], "group": 10002 }, { @@ -90,11 +108,14 @@ "type": 4, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 7 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 7 + } + ], "group": 0 }, { @@ -104,11 +125,14 @@ "type": 1, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 8 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 8 + } + ], "group": 0 }, { @@ -118,11 +142,14 @@ "type": 2, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 9 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 9 + } + ], "group": 0 }, { @@ -132,11 +159,14 @@ "type": 4, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 10 - }, + "cd": 0, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 10 + } + ], "group": 0 }, { @@ -146,11 +176,14 @@ "type": 5, "exp": 10, "time": 2, - "deplete": { - "a": "attr", - "t": "gold", - "n": 11 - }, + "cd": 7200, + "deplete": [ + { + "a": "attr", + "t": "gold", + "n": 11 + } + ], "group": 0 } ] \ No newline at end of file diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 0bb7748db..a2b0e3853 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -842,6 +842,7 @@ "a": "attr", "t": "diamond", "n": 200 - } + }, + "dragon_interaction": 15 } ] \ No newline at end of file diff --git a/bin/json/game_item.json b/bin/json/game_item.json index cd8fb3660..6c271c773 100644 --- a/bin/json/game_item.json +++ b/bin/json/game_item.json @@ -15771,7 +15771,7 @@ "id": "17060009", "name": { "key": "item_item_name_320", - "text": "5星守护者自选箱碎片" + "text": "5星3系守护者自选箱碎片" }, "usetype": 4, "color": 4, @@ -15782,7 +15782,7 @@ "reddottype": 0, "effects": "", "modelName": "", - "box_id": 0, + "box_id": 22000007, "synthetize_num": 0, "synthetize_deplete": [], "synthetize_get": [], @@ -19627,7 +19627,7 @@ "upper_limit": 0, "img": "", "intr": { - "key": "", + "key": "item_item_intr_404", "text": "" }, "describe": { @@ -19673,7 +19673,7 @@ "upper_limit": 0, "img": "", "intr": { - "key": "", + "key": "item_item_intr_405", "text": "" }, "describe": { @@ -19719,7 +19719,7 @@ "upper_limit": 0, "img": "", "intr": { - "key": "", + "key": "item_item_intr_406", "text": "" }, "describe": { @@ -19765,7 +19765,7 @@ "upper_limit": 0, "img": "", "intr": { - "key": "", + "key": "item_item_intr_407", "text": "" }, "describe": { @@ -19784,5 +19784,235 @@ } ], "gm": 1 + }, + { + "id": "24012001", + "name": { + "key": "item_item_name_406", + "text": "幼龙吃的小鱼" + }, + "usetype": 1, + "color": 2, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "", + "intr": { + "key": "item_item_intr_408", + "text": "" + }, + "describe": { + "key": "item_item_describe_408", + "text": "" + }, + "dialogue": { + "key": "item_item_dialogue_406", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 1 + }, + { + "id": "24012002", + "name": { + "key": "item_item_name_407", + "text": "成龙吃的大鱼" + }, + "usetype": 1, + "color": 2, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "", + "intr": { + "key": "item_item_intr_409", + "text": "" + }, + "describe": { + "key": "item_item_describe_409", + "text": "" + }, + "dialogue": { + "key": "item_item_dialogue_407", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 1 + }, + { + "id": "24012003", + "name": { + "key": "item_item_name_408", + "text": "驯龙交互次数总上限" + }, + "usetype": 1, + "color": 2, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "", + "intr": { + "key": "item_item_intr_410", + "text": "" + }, + "describe": { + "key": "item_item_describe_410", + "text": "" + }, + "dialogue": { + "key": "item_item_dialogue_408", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 1 + }, + { + "id": "24012004", + "name": { + "key": "item_item_name_409", + "text": "成龙特殊提升道具1" + }, + "usetype": 1, + "color": 2, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "", + "intr": { + "key": "item_item_intr_411", + "text": "" + }, + "describe": { + "key": "item_item_describe_411", + "text": "" + }, + "dialogue": { + "key": "item_item_dialogue_409", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 1 + }, + { + "id": "24012005", + "name": { + "key": "item_item_name_410", + "text": "成龙特殊提升道具2" + }, + "usetype": 1, + "color": 2, + "bagtype": 0, + "index": 1, + "special_type": 0, + "time": 0, + "reddottype": 0, + "effects": "", + "modelName": "", + "box_id": 0, + "synthetize_num": 0, + "synthetize_deplete": [], + "synthetize_get": [], + "decompose_deplete": [], + "decompose_get": [], + "access": [], + "use_skip": 0, + "upper_limit": 0, + "img": "", + "intr": { + "key": "item_item_intr_412", + "text": "" + }, + "describe": { + "key": "item_item_describe_412", + "text": "" + }, + "dialogue": { + "key": "item_item_dialogue_410", + "text": "" + }, + "sale": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "gm": 1 } ] \ No newline at end of file diff --git a/bin/json/game_lottery.json b/bin/json/game_lottery.json index a633b1af5..2e6c4092b 100644 --- a/bin/json/game_lottery.json +++ b/bin/json/game_lottery.json @@ -46438,5 +46438,245 @@ "playerlvmin": 0, "playerlvmax": 0, "notice": 0 + }, + { + "id": 1936, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11015002", + "n": 1 + }, + "itemdes": "15002", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1937, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11015003", + "n": 1 + }, + "itemdes": "15003", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1938, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11015004", + "n": 1 + }, + "itemdes": "15004", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1939, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11025001", + "n": 1 + }, + "itemdes": "25001", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1940, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11025004", + "n": 1 + }, + "itemdes": "25004", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1941, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11035001", + "n": 1 + }, + "itemdes": "35001", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1942, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11035002", + "n": 1 + }, + "itemdes": "35002", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1943, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11035004", + "n": 1 + }, + "itemdes": "35004", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1944, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11035005", + "n": 1 + }, + "itemdes": "35005", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 + }, + { + "id": 1945, + "lotteryid": 22000007, + "description": "5星3系守护者自选箱碎片", + "type": 3, + "groupwt": 1, + "groupid": 1, + "subtype": 1, + "groupnum": 1, + "itemid": { + "a": "item", + "t": "11035006", + "n": 1 + }, + "itemdes": "35006", + "itemwt": 1000, + "min": 1, + "max": 1, + "VIPmin": 0, + "VIPmax": 15, + "playerlvmin": 0, + "playerlvmax": 0, + "notice": 0 } ] \ No newline at end of file diff --git a/bin/json/game_shop.json b/bin/json/game_shop.json index 91ce27a57..d51c01832 100644 --- a/bin/json/game_shop.json +++ b/bin/json/game_shop.json @@ -103,7 +103,8 @@ 13004, 13005, 13006, - 13007 + 13007, + 13008 ] }, { @@ -127,7 +128,9 @@ 14003, 14004, 14005, - 14006 + 14006, + 14007, + 14008 ] }, { diff --git a/bin/json/game_shopitem.json b/bin/json/game_shopitem.json index 8e10aaf7e..16e883327 100644 --- a/bin/json/game_shopitem.json +++ b/bin/json/game_shopitem.json @@ -24306,7 +24306,7 @@ { "a": "item", "t": "17060009", - "n": 5 + "n": 4 } ], "preview": false, @@ -24377,8 +24377,8 @@ "iteminfo": [ { "a": "item", - "t": "10000001", - "n": 5 + "t": "10000034", + "n": 3 } ], "preview": false, @@ -24413,7 +24413,7 @@ "iteminfo": [ { "a": "item", - "t": "10000001", + "t": "10000021", "n": 1 } ], @@ -24449,7 +24449,79 @@ "iteminfo": [ { "a": "item", - "t": "10000013", + "t": "10000022", + "n": 1 + } + ], + "preview": false, + "probability": 1000, + "need": [ + { + "a": "attr", + "t": "guildcoin", + "n": 250 + } + ], + "sale": 1000, + "salelist": [ + 1000, + 1000, + 1000, + 1000, + 1000, + 1000 + ], + "buyminnum": 5, + "buymaxnum": 5, + "vip": 0, + "lvmin": 1, + "lvmax": 60, + "mapidmin": 101, + "mapidmax": 9999 + }, + { + "key": 697, + "id": 14006, + "iteminfo": [ + { + "a": "item", + "t": "10000023", + "n": 1 + } + ], + "preview": false, + "probability": 1000, + "need": [ + { + "a": "attr", + "t": "guildcoin", + "n": 250 + } + ], + "sale": 1000, + "salelist": [ + 1000, + 1000, + 1000, + 1000, + 1000, + 1000 + ], + "buyminnum": 5, + "buymaxnum": 5, + "vip": 0, + "lvmin": 1, + "lvmax": 60, + "mapidmin": 101, + "mapidmax": 9999 + }, + { + "key": 698, + "id": 14007, + "iteminfo": [ + { + "a": "item", + "t": "10000011", "n": 1 } ], @@ -24480,8 +24552,8 @@ "mapidmax": 9999 }, { - "key": 697, - "id": 14006, + "key": 699, + "id": 14008, "iteminfo": [ { "a": "item", @@ -24516,7 +24588,7 @@ "mapidmax": 9999 }, { - "key": 698, + "key": 700, "id": 15001, "iteminfo": [ { @@ -24552,7 +24624,7 @@ "mapidmax": 9999 }, { - "key": 699, + "key": 701, "id": 15001, "iteminfo": [ { @@ -24588,7 +24660,7 @@ "mapidmax": 9999 }, { - "key": 700, + "key": 702, "id": 15001, "iteminfo": [ { @@ -24624,7 +24696,7 @@ "mapidmax": 9999 }, { - "key": 701, + "key": 703, "id": 15002, "iteminfo": [ { @@ -24660,84 +24732,12 @@ "mapidmax": 9999 }, { - "key": 702, + "key": 704, "id": 15003, "iteminfo": [ { "a": "item", - "t": "10000001", - "n": 1 - } - ], - "preview": false, - "probability": 1000, - "need": [ - { - "a": "attr", - "t": "moongold", - "n": 250 - } - ], - "sale": 800, - "salelist": [ - 800, - 800, - 800, - 800, - 800, - 800 - ], - "buyminnum": 3, - "buymaxnum": 3, - "vip": 0, - "lvmin": 1, - "lvmax": 60, - "mapidmin": 101, - "mapidmax": 9999 - }, - { - "key": 703, - "id": 15004, - "iteminfo": [ - { - "a": "item", - "t": "10000001", - "n": 1 - } - ], - "preview": false, - "probability": 1000, - "need": [ - { - "a": "attr", - "t": "moongold", - "n": 250 - } - ], - "sale": 800, - "salelist": [ - 800, - 800, - 800, - 800, - 800, - 800 - ], - "buyminnum": 3, - "buymaxnum": 3, - "vip": 0, - "lvmin": 1, - "lvmax": 60, - "mapidmin": 101, - "mapidmax": 9999 - }, - { - "key": 704, - "id": 15005, - "iteminfo": [ - { - "a": "item", - "t": "10000001", + "t": "10000021", "n": 1 } ], @@ -24769,6 +24769,78 @@ }, { "key": 705, + "id": 15004, + "iteminfo": [ + { + "a": "item", + "t": "10000022", + "n": 1 + } + ], + "preview": false, + "probability": 1000, + "need": [ + { + "a": "attr", + "t": "moongold", + "n": 250 + } + ], + "sale": 800, + "salelist": [ + 800, + 800, + 800, + 800, + 800, + 800 + ], + "buyminnum": 3, + "buymaxnum": 3, + "vip": 0, + "lvmin": 1, + "lvmax": 60, + "mapidmin": 101, + "mapidmax": 9999 + }, + { + "key": 706, + "id": 15005, + "iteminfo": [ + { + "a": "item", + "t": "10000023", + "n": 1 + } + ], + "preview": false, + "probability": 1000, + "need": [ + { + "a": "attr", + "t": "moongold", + "n": 250 + } + ], + "sale": 800, + "salelist": [ + 800, + 800, + 800, + 800, + 800, + 800 + ], + "buyminnum": 3, + "buymaxnum": 3, + "vip": 0, + "lvmin": 1, + "lvmax": 60, + "mapidmin": 101, + "mapidmax": 9999 + }, + { + "key": 707, "id": 15006, "iteminfo": [ { @@ -24804,7 +24876,7 @@ "mapidmax": 9999 }, { - "key": 706, + "key": 708, "id": 15007, "iteminfo": [ { @@ -24840,7 +24912,7 @@ "mapidmax": 9999 }, { - "key": 707, + "key": 709, "id": 15008, "iteminfo": [ { @@ -24876,12 +24948,12 @@ "mapidmax": 9999 }, { - "key": 708, + "key": 710, "id": 15009, "iteminfo": [ { "a": "item", - "t": "10000013", + "t": "10000011", "n": 1 } ], @@ -24912,7 +24984,7 @@ "mapidmax": 9999 }, { - "key": 709, + "key": 711, "id": 13001, "iteminfo": [ { @@ -24948,7 +25020,7 @@ "mapidmax": 9999 }, { - "key": 710, + "key": 712, "id": 13002, "iteminfo": [ { @@ -24984,7 +25056,7 @@ "mapidmax": 9999 }, { - "key": 711, + "key": 713, "id": 13003, "iteminfo": [ { @@ -25020,7 +25092,7 @@ "mapidmax": 9999 }, { - "key": 712, + "key": 714, "id": 13004, "iteminfo": [ { @@ -25056,7 +25128,7 @@ "mapidmax": 9999 }, { - "key": 713, + "key": 715, "id": 13005, "iteminfo": [ { @@ -25092,7 +25164,7 @@ "mapidmax": 9999 }, { - "key": 714, + "key": 716, "id": 13006, "iteminfo": [ { @@ -25128,7 +25200,7 @@ "mapidmax": 9999 }, { - "key": 715, + "key": 717, "id": 13007, "iteminfo": [ { @@ -25164,7 +25236,7 @@ "mapidmax": 9999 }, { - "key": 716, + "key": 718, "id": 13008, "iteminfo": [ { diff --git a/comm/imodule.go b/comm/imodule.go index 5ad237f4b..decb699ae 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -652,5 +652,7 @@ type ( GetDragonList(uid string) (dragon []*pb.DBDragon, err error) // 创建坐骑 CreateDragon(session IUserSession, dragons map[string]int32, bPush bool) (errdata *pb.ErrorData) + // 机器人 坐骑 + CreateRobotDragon(dragonid string, lv int32) (dragon *pb.DBDragon, err error) } ) diff --git a/modules/dragon/api_list.go b/modules/dragon/api_list.go index c34711a7b..e2568bded 100644 --- a/modules/dragon/api_list.go +++ b/modules/dragon/api_list.go @@ -13,6 +13,8 @@ func (this *apiComp) ListCheck(session comm.IUserSession, req *pb.DragonGetListR func (this *apiComp) List(session comm.IUserSession, req *pb.DragonGetListReq) (errdata *pb.ErrorData) { rsp := &pb.DragonGetListResp{} + rsp.Dragons, _ = this.module.modelDragon.GetDragonList(session.GetUserId()) + session.SendMsg(string(this.module.GetType()), "", rsp) return } diff --git a/modules/dragon/api_train.go b/modules/dragon/api_train.go new file mode 100644 index 000000000..704b4ac46 --- /dev/null +++ b/modules/dragon/api_train.go @@ -0,0 +1,83 @@ +package dragon + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" +) + +//参数校验 +func (this *apiComp) TrainCheck(session comm.IUserSession, req *pb.DragonTrainReq) (errdata *pb.ErrorData) { + if len(req.Oid) == 0 || req.Ttype == 0 { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + } + } + return +} + +func (this *apiComp) Train(session comm.IUserSession, req *pb.DragonTrainReq) (errdata *pb.ErrorData) { + var ( + err error + dragon *pb.DBDragon + //addExp int32 // 获得的训练值 + playConf *cfg.GameDragonPlayData + update map[string]interface{} + ) + update = make(map[string]interface{}) + rsp := &pb.DragonTrainResp{} + if errdata = this.TrainCheck(session, req); errdata != nil { + return + } + + if dragon, err = this.module.modelDragon.GetDragonByOid(session.GetUserId(), req.Oid); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ReqParameterError, + Title: pb.ErrorCode_ReqParameterError.ToString(), + Message: err.Error(), + } + } + if conf, err := this.module.configure.GetDragonConfById(dragon.Dragonid, dragon.Lv); err == nil { + if playConf, err = this.module.configure.GetDragonPlayConfById(dragon.Dragonid, conf.Type, req.Ttype); err == nil { + //addExp = playConf.Exp + // 校验消耗 + if errdata = this.module.CheckRes(session, playConf.Deplete); errdata != nil { + return + } + } else { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_ConfigNoFound, + Title: pb.ErrorCode_ConfigNoFound.ToString(), + Message: err.Error(), + } + return + } + + dragon.Exp += playConf.Exp // 加经验 + + for { + if dragon.Exp >= conf.Exp { + dragon.Lv += 1 + dragon.Exp -= conf.Exp + if conf, err = this.module.configure.GetDragonConfById(dragon.Dragonid, dragon.Lv); err != nil { + dragon.Lv -= 1 + dragon.Exp += conf.Exp + break + } + } else { + break + } + } + } + + // 校验训练次数 + if dragon.Play[req.Ttype] >= playConf.Time { + return + } + dragon.Play[req.Ttype] += 1 // 次数+1 + update["play"] = dragon.Play + this.module.modelDragon.UpdateDragonData(session.GetUserId(), dragon.Id, update) + session.SendMsg(string(this.module.GetType()), "", rsp) + return +} diff --git a/modules/dragon/configure_comp.go b/modules/dragon/configure_comp.go index 0e629a2cd..35e97c5c5 100644 --- a/modules/dragon/configure_comp.go +++ b/modules/dragon/configure_comp.go @@ -16,6 +16,7 @@ import ( const moduleName = "dragon" const ( dragon_trainlv = "game_trainlv.json" + dragon_play = "game_dragonplay.json" ) // /配置管理组件 @@ -24,6 +25,7 @@ type configureComp struct { module *Dragon hlock sync.RWMutex dragon map[string]*cfg.GameTrainlvData + play map[string]*cfg.GameDragonPlayData } // 组件初始化接口 @@ -35,7 +37,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp //dragon_trainlv: cfg.NewGameTrainlv, }) configure.RegisterConfigure(dragon_trainlv, cfg.NewGameTrainlv, this.LoadDragon) - + configure.RegisterConfigure(dragon_play, cfg.NewGameDragonPlay, this.LoadDragonPlay) return } @@ -54,6 +56,21 @@ func (this *configureComp) LoadDragon() { err = fmt.Errorf("%T no is *cfg.GameTrainlv", v) } } +func (this *configureComp) LoadDragonPlay() { + if v, err := this.GetConfigure(dragon_play); err == nil { + this.hlock.Lock() + defer this.hlock.Unlock() + this.play = make(map[string]*cfg.GameDragonPlayData) + if _configure, ok := v.(*cfg.GameDragonPlay); ok { + for _, v := range _configure.GetDataList() { + this.play[v.Id+"-"+strconv.Itoa(int(v.Grow))+"-"+strconv.Itoa(int(v.Type))] = v + } + return + } + } else { + err = fmt.Errorf("%T no is *cfg.GameDragonPlay", v) + } +} //加载多个配置文件 func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) { @@ -96,3 +113,15 @@ func (this *configureComp) GetDragonConfById(id string, lv int32) (conf *cfg.Gam err = comm.NewNotFoundConfErr(moduleName, dragon_trainlv, fmt.Sprintf("id:%s,lv:%d", id, lv)) return } + +func (this *configureComp) GetDragonPlayConfById(id string, grow int32, itype int32) (conf *cfg.GameDragonPlayData, err error) { + key := id + "-" + strconv.Itoa(int(grow)) + "-" + strconv.Itoa(int(itype)) + this.hlock.RLock() + defer this.hlock.RUnlock() + ok := false + if conf, ok = this.play[key]; ok { + return + } + err = comm.NewNotFoundConfErr(moduleName, dragon_trainlv, fmt.Sprintf("id:%s,grow:%d,itype:%d", id, grow, itype)) + return +} diff --git a/modules/dragon/model_dragon.go b/modules/dragon/model_dragon.go index f52239a7c..4b0ebc2ad 100644 --- a/modules/dragon/model_dragon.go +++ b/modules/dragon/model_dragon.go @@ -105,6 +105,8 @@ func (this *ModelDragon) CreateDragon(session comm.IUserSession, dragons map[str Lv: lv, Exp: 0, Property: map[int32]int32{}, + Play: map[int32]int32{}, + Rtime: 0, } if dbModel != nil { if dbModel, err1 := this.module.GetDBModelByUid(uid, this.TableName); err1 == nil { @@ -157,3 +159,16 @@ func (this *ModelDragon) UpdateDragonData(uid string, oid string, data map[strin } return } + +func (this *ModelDragon) GetDragonByOid(uid string, oid string) (dragon *pb.DBDragon, err error) { + dragon = &pb.DBDragon{} + if err = this.GetListObj(uid, oid, dragon); err != nil { + this.module.Errorf("err:%v", err) + } + return +} + +func (this *ModelDragon) CreateAiDragon(dragonid string, lv int32) (dragon *pb.DBDragon, err error) { + + return +} diff --git a/modules/dragon/module.go b/modules/dragon/module.go index 3f799db51..d7f24e593 100644 --- a/modules/dragon/module.go +++ b/modules/dragon/module.go @@ -54,3 +54,7 @@ func (this *Dragon) GetDragonList(uid string) (list []*pb.DBDragon, err error) { func (this *Dragon) CreateDragon(session comm.IUserSession, dragons map[string]int32, bPush bool) (errdata *pb.ErrorData) { return this.modelDragon.CreateDragon(session, dragons) } + +func (this *Dragon) CreateRobotDragon(dragonid string, lv int32) (dragon *pb.DBDragon, err error) { + return this.modelDragon.CreateAiDragon(dragonid, lv) +} diff --git a/pb/dragon_db.pb.go b/pb/dragon_db.pb.go index 264caaff3..5c76deeea 100644 --- a/pb/dragon_db.pb.go +++ b/pb/dragon_db.pb.go @@ -32,6 +32,7 @@ type DBDragon struct { Exp int32 `protobuf:"varint,5,opt,name=exp,proto3" json:"exp"` // 经验 Property map[int32]int32 `protobuf:"bytes,6,rep,name=property,proto3" json:"property" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 坐骑属性 Play map[int32]int32 `protobuf:"bytes,7,rep,name=play,proto3" json:"play" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 坐骑训练次数 + Rtime int64 `protobuf:"varint,8,opt,name=rtime,proto3" json:"rtime"` } func (x *DBDragon) Reset() { @@ -115,11 +116,18 @@ func (x *DBDragon) GetPlay() map[int32]int32 { return nil } +func (x *DBDragon) GetRtime() int64 { + if x != nil { + return x.Rtime + } + return 0 +} + var File_dragon_dragon_db_proto protoreflect.FileDescriptor var file_dragon_dragon_db_proto_rawDesc = []byte{ 0x0a, 0x16, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2f, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x5f, - 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x44, + 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd4, 0x02, 0x0a, 0x08, 0x44, 0x42, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x72, 0x61, 0x67, 0x6f, @@ -132,15 +140,16 @@ var file_dragon_dragon_db_proto_rawDesc = []byte{ 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x04, 0x70, 0x6c, 0x61, 0x79, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x70, - 0x6c, 0x61, 0x79, 0x1a, 0x3b, 0x0a, 0x0d, 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, - 0x05, 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, - 0x1a, 0x37, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x61, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 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, 0x05, 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, 0x1a, 0x37, 0x0a, 0x09, 0x50, 0x6c, 0x61, 0x79, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, + 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, 0x42, + 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pb/dragon_msg.pb.go b/pb/dragon_msg.pb.go index b982c2b33..1b2a2616a 100644 --- a/pb/dragon_msg.pb.go +++ b/pb/dragon_msg.pb.go @@ -168,7 +168,8 @@ type DragonTrainResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Dragons *DBDragon `protobuf:"bytes,1,opt,name=dragons,proto3" json:"dragons"` + Dragons *DBDragon `protobuf:"bytes,1,opt,name=dragons,proto3" json:"dragons"` + Reward []*UserAtno `protobuf:"bytes,2,rep,name=reward,proto3" json:"reward"` // 升级奖励 } func (x *DragonTrainResp) Reset() { @@ -210,26 +211,35 @@ func (x *DragonTrainResp) GetDragons() *DBDragon { return nil } +func (x *DragonTrainResp) GetReward() []*UserAtno { + if x != nil { + return x.Reward + } + return nil +} + var File_dragon_dragon_msg_proto protoreflect.FileDescriptor var file_dragon_dragon_msg_proto_rawDesc = []byte{ 0x0a, 0x17, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2f, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x2f, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x12, 0x0a, 0x10, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x38, 0x0a, 0x11, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x07, 0x64, 0x72, - 0x61, 0x67, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, - 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x52, 0x07, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x73, 0x22, - 0x38, 0x0a, 0x0e, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, - 0x71, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6f, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x05, 0x74, 0x74, 0x79, 0x70, 0x65, 0x22, 0x36, 0x0a, 0x0f, 0x44, 0x72, 0x61, - 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x07, - 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x44, 0x42, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x52, 0x07, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, - 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x12, 0x0a, + 0x10, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x22, 0x38, 0x0a, 0x11, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x07, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x44, 0x72, 0x61, 0x67, + 0x6f, 0x6e, 0x52, 0x07, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x44, + 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, + 0x03, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x74, 0x74, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a, 0x0f, 0x44, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x54, + 0x72, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x07, 0x64, 0x72, 0x61, 0x67, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x44, 0x42, 0x44, 0x72, + 0x61, 0x67, 0x6f, 0x6e, 0x52, 0x07, 0x64, 0x72, 0x61, 0x67, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, + 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -251,15 +261,17 @@ var file_dragon_dragon_msg_proto_goTypes = []interface{}{ (*DragonTrainReq)(nil), // 2: DragonTrainReq (*DragonTrainResp)(nil), // 3: DragonTrainResp (*DBDragon)(nil), // 4: DBDragon + (*UserAtno)(nil), // 5: UserAtno } var file_dragon_dragon_msg_proto_depIdxs = []int32{ 4, // 0: DragonGetListResp.dragons:type_name -> DBDragon 4, // 1: DragonTrainResp.dragons:type_name -> DBDragon - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 5, // 2: DragonTrainResp.reward:type_name -> UserAtno + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_dragon_dragon_msg_proto_init() } @@ -268,6 +280,7 @@ func file_dragon_dragon_msg_proto_init() { return } file_dragon_dragon_db_proto_init() + file_comm_proto_init() if !protoimpl.UnsafeEnabled { file_dragon_dragon_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DragonGetListReq); i { diff --git a/sys/configure/structs/Game.DragonPlayData.go b/sys/configure/structs/Game.DragonPlayData.go index e2625a02d..5571abcae 100644 --- a/sys/configure/structs/Game.DragonPlayData.go +++ b/sys/configure/structs/Game.DragonPlayData.go @@ -17,7 +17,8 @@ type GameDragonPlayData struct { Type int32 Exp int32 Time int32 - Deplete *Gameatn + Cd int32 + Deplete []*Gameatn Group int32 } @@ -34,7 +35,21 @@ func (_v *GameDragonPlayData)Deserialize(_buf map[string]interface{}) (err error { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["exp"].(float64); !_ok_ { err = errors.New("exp error"); return }; _v.Exp = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) } - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["deplete"].(map[string]interface{}); !_ok_ { err = errors.New("deplete error"); return }; if _v.Deplete, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cd"].(float64); !_ok_ { err = errors.New("cd error"); return }; _v.Cd = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["deplete"].([]interface{}); !_ok_ { err = errors.New("deplete error"); return } + + _v.Deplete = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.Deplete = append(_v.Deplete, _list_v_) + } + } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) } return } diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index c58d4697a..e71779fe7 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -280,6 +280,7 @@ type GameGlobalData struct { StonehengeKeyItemId string PsBuyGroup int32 ChangeName *Gameatn + DragonInteraction int32 } const TypeId_GameGlobalData = 477542761 @@ -1117,6 +1118,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; if _v.StonehengeKeyItemId, _ok_ = _buf["stonehenge_KeyItemId"].(string); !_ok_ { err = errors.New("stonehenge_KeyItemId error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ps_buyGroup"].(float64); !_ok_ { err = errors.New("ps_buyGroup error"); return }; _v.PsBuyGroup = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["change_name"].(map[string]interface{}); !_ok_ { err = errors.New("change_name error"); return }; if _v.ChangeName, err = DeserializeGameatn(_x_); err != nil { return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["dragon_interaction"].(float64); !_ok_ { err = errors.New("dragon_interaction error"); return }; _v.DragonInteraction = int32(_tempNum_) } return }