From e172a7cd5da04e9b143b70b0b5fa2fcaba2e847a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Sat, 4 Nov 2023 15:23:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A1=A5=E7=BE=8A=E5=92=8C?= =?UTF-8?q?=E5=85=94=E5=AD=90=E6=B8=B8=E6=88=8F=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...abbitreward.json => game_catchrabbit.json} | 0 bin/json/game_mainachievement.json | 2 +- bin/json/game_mainshopitem.json | 72 ++-- bin/json/game_puggsypasscheck.json | 212 ----------- bin/json/game_skillafteratk.json | 258 ++++++++++++++ bin/json/game_skillatk.json | 328 +++++++++++++++++- modules/caninerabbit/api_award.go | 48 ++- modules/caninerabbit/configure.go | 29 +- pb/caninerabbit_msg.pb.go | 210 ++++++----- sys/configure/structs/Game.Catchrabbit.go | 42 +++ ...trewardData.go => Game.CatchrabbitData.go} | 14 +- .../structs/Game.Catchrabbitreward.go | 42 --- sys/configure/structs/Game.PuggsyPasscheck.go | 42 --- .../structs/Game.PuggsyPasscheckData.go | 58 ---- sys/configure/structs/Tables.go | 7 + 15 files changed, 832 insertions(+), 532 deletions(-) rename bin/json/{game_catchrabbitreward.json => game_catchrabbit.json} (100%) delete mode 100644 bin/json/game_puggsypasscheck.json create mode 100644 sys/configure/structs/Game.Catchrabbit.go rename sys/configure/structs/{Game.CatchrabbitrewardData.go => Game.CatchrabbitData.go} (81%) delete mode 100644 sys/configure/structs/Game.Catchrabbitreward.go delete mode 100644 sys/configure/structs/Game.PuggsyPasscheck.go delete mode 100644 sys/configure/structs/Game.PuggsyPasscheckData.go diff --git a/bin/json/game_catchrabbitreward.json b/bin/json/game_catchrabbit.json similarity index 100% rename from bin/json/game_catchrabbitreward.json rename to bin/json/game_catchrabbit.json diff --git a/bin/json/game_mainachievement.json b/bin/json/game_mainachievement.json index 380c43de4..ed8cb9a0a 100644 --- a/bin/json/game_mainachievement.json +++ b/bin/json/game_mainachievement.json @@ -460,7 +460,7 @@ }, { "key": 110028, - "id": 11003, + "id": 11004, "title": { "key": "mainchapter_main_achievement_title_28", "text": "碎片28" diff --git a/bin/json/game_mainshopitem.json b/bin/json/game_mainshopitem.json index a73fe94e1..f66a1cc10 100644 --- a/bin/json/game_mainshopitem.json +++ b/bin/json/game_mainshopitem.json @@ -192,7 +192,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 25 } ], @@ -212,7 +212,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 25 } ], @@ -232,7 +232,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 25 } ], @@ -252,7 +252,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 25 } ], @@ -272,7 +272,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 15 } ], @@ -292,7 +292,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 50 } ], @@ -312,7 +312,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 50 } ], @@ -332,7 +332,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 100 } ], @@ -352,7 +352,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 40 } ], @@ -372,7 +372,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 40 } ], @@ -392,7 +392,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 40 } ], @@ -412,7 +412,7 @@ "need": [ { "a": "item", - "t": "24012001", + "t": "24021001", "n": 40 } ], @@ -432,7 +432,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 25 } ], @@ -452,7 +452,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 25 } ], @@ -472,7 +472,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 25 } ], @@ -492,7 +492,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 25 } ], @@ -512,7 +512,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 15 } ], @@ -532,7 +532,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 50 } ], @@ -552,7 +552,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 50 } ], @@ -572,7 +572,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 100 } ], @@ -592,7 +592,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 70 } ], @@ -612,7 +612,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 70 } ], @@ -632,7 +632,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 70 } ], @@ -652,7 +652,7 @@ "need": [ { "a": "item", - "t": "24013001", + "t": "24031001", "n": 70 } ], @@ -672,7 +672,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 25 } ], @@ -692,7 +692,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 25 } ], @@ -712,7 +712,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 25 } ], @@ -732,7 +732,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 25 } ], @@ -752,7 +752,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 15 } ], @@ -772,7 +772,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 50 } ], @@ -792,7 +792,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 50 } ], @@ -812,7 +812,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 100 } ], @@ -832,7 +832,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 90 } ], @@ -852,7 +852,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 90 } ], @@ -872,7 +872,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 90 } ], @@ -892,7 +892,7 @@ "need": [ { "a": "item", - "t": "24014001", + "t": "24041001", "n": 90 } ], diff --git a/bin/json/game_puggsypasscheck.json b/bin/json/game_puggsypasscheck.json deleted file mode 100644 index fcd36683c..000000000 --- a/bin/json/game_puggsypasscheck.json +++ /dev/null @@ -1,212 +0,0 @@ -[ - { - "id": 10001, - "pay_id": "passcheck_1", - "parameter": 5, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10001", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10002, - "pay_id": "passcheck_1", - "parameter": 10, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10002", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10003, - "pay_id": "passcheck_1", - "parameter": 15, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10003", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10004, - "pay_id": "passcheck_1", - "parameter": 20, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10004", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10005, - "pay_id": "passcheck_1", - "parameter": 25, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10005", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10006, - "pay_id": "passcheck_1", - "parameter": 30, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10006", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10007, - "pay_id": "passcheck_1", - "parameter": 35, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10007", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10008, - "pay_id": "passcheck_1", - "parameter": 40, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10008", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10009, - "pay_id": "passcheck_1", - "parameter": 45, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10009", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - }, - { - "id": 10010, - "pay_id": "passcheck_1", - "parameter": 50, - "unlock_text": { - "key": "passcheck_passcheck_unlock_text_10010", - "text": "{0}个地格" - }, - "free_reward": { - "a": "attr", - "t": "diamond", - "n": 30 - }, - "pay_reward": [ - { - "a": "attr", - "t": "diamond", - "n": 300 - } - ] - } -] \ No newline at end of file diff --git a/bin/json/game_skillafteratk.json b/bin/json/game_skillafteratk.json index c96392901..1265fb699 100644 --- a/bin/json/game_skillafteratk.json +++ b/bin/json/game_skillafteratk.json @@ -33145,6 +33145,106 @@ "RevisiCondition": "", "RevisiParams": [] }, + { + "Id": 243004122, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 2300 + ], + "FollowSK": [ + 243004113 + ], + "SucFollowSK": [], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004132, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 2400 + ], + "FollowSK": [ + 243004113 + ], + "SucFollowSK": [], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004142, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 2500 + ], + "FollowSK": [ + 243004113 + ], + "SucFollowSK": [], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004152, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 2600 + ], + "FollowSK": [ + 243004113 + ], + "SucFollowSK": [], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, { "Id": 243004211, "EmitPR": 1000, @@ -33196,6 +33296,114 @@ "RevisiCondition": "", "RevisiParams": [] }, + { + "Id": 243004221, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 2, + "Type": 1, + "Argu": [ + 1, + 4, + 1850 + ], + "FollowSK": [ + 243004212 + ], + "SucFollowSK": [ + 243004213 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004231, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 2, + "Type": 1, + "Argu": [ + 1, + 4, + 1950 + ], + "FollowSK": [ + 243004212 + ], + "SucFollowSK": [ + 243004213 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004241, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 2, + "Type": 1, + "Argu": [ + 1, + 4, + 2050 + ], + "FollowSK": [ + 243004212 + ], + "SucFollowSK": [ + 243004213 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004251, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 2, + "Type": 1, + "Argu": [ + 1, + 4, + 2150 + ], + "FollowSK": [ + 243004212 + ], + "SucFollowSK": [ + 243004213 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, { "Id": 243004213, "EmitPR": 1000, @@ -33292,6 +33500,56 @@ "RevisiCondition": "", "RevisiParams": [] }, + { + "Id": 243004322, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 5300 + ], + "FollowSK": [], + "SucFollowSK": [ + 243004314 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, + { + "Id": 243004332, + "EmitPR": 1000, + "From": 4, + "Where": [], + "Order": "", + "Limit": 1, + "ExecuteCnt": 1, + "Type": 1, + "Argu": [ + 1, + 4, + 5400 + ], + "FollowSK": [], + "SucFollowSK": [ + 243004314 + ], + "FailFollowSK": [], + "MustHit": false, + "DpsRevisiType": 0, + "DpsCondition": "", + "RevisiCondition": "", + "RevisiParams": [] + }, { "Id": 243004313, "EmitPR": 1000, diff --git a/bin/json/game_skillatk.json b/bin/json/game_skillatk.json index eb61c82a2..831bcaddf 100644 --- a/bin/json/game_skillatk.json +++ b/bin/json/game_skillatk.json @@ -17899,7 +17899,7 @@ "Type": 1, "CD": 3, "Where": [], - "Target": 1, + "Target": 0, "ChildSkill": { "Id": [ 233001211 @@ -17931,7 +17931,7 @@ "Type": 1, "CD": 2, "Where": [], - "Target": 1, + "Target": 0, "ChildSkill": { "Id": [ 233001221 @@ -25095,7 +25095,7 @@ { "id": 143004111, "level": 1, - "MaxLV": 1, + "MaxLV": 5, "UnavailablePlayTypes": [], "Name": { "key": "skill_skill_atk_Name_143004111", @@ -25111,7 +25111,7 @@ "Target": 2, "ChildSkill": { "Id": [ - 243004111 + 243004112 ] }, "passSkill": [], @@ -25122,10 +25122,130 @@ "buffid": [], "map": "" }, + { + "id": 143004111, + "level": 2, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004111", + "text": "姜饼怒击" + }, + "ico": "jn_43004_1", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_1", + "Type": 1, + "CD": 0, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004122 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004111_2", + "text": "伤害提升至230%。" + }, + "buffid": [], + "map": "" + }, + { + "id": 143004111, + "level": 3, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004111", + "text": "姜饼怒击" + }, + "ico": "jn_43004_1", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_1", + "Type": 1, + "CD": 0, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004132 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004111_3", + "text": "伤害提升至240%。" + }, + "buffid": [], + "map": "" + }, + { + "id": 143004111, + "level": 4, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004111", + "text": "姜饼怒击" + }, + "ico": "jn_43004_1", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_1", + "Type": 1, + "CD": 0, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004142 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004111_4", + "text": "伤害提升至250%。" + }, + "buffid": [], + "map": "" + }, + { + "id": 143004111, + "level": 5, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004111", + "text": "姜饼怒击" + }, + "ico": "jn_43004_1", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_1", + "Type": 1, + "CD": 0, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004152 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004111_5", + "text": "伤害提升至260%。" + }, + "buffid": [], + "map": "" + }, { "id": 143004211, "level": 1, - "MaxLV": 1, + "MaxLV": 5, "UnavailablePlayTypes": [], "Name": { "key": "skill_skill_atk_Name_143004211", @@ -25154,10 +25274,138 @@ ], "map": "" }, + { + "id": 143004211, + "level": 2, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004211", + "text": "缤纷棒棒糖" + }, + "ico": "jn_43004_2", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_2", + "Type": 1, + "CD": 3, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004221 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004211_2", + "text": "伤害提升至185%" + }, + "buffid": [ + 390001107 + ], + "map": "" + }, + { + "id": 143004211, + "level": 3, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004211", + "text": "缤纷棒棒糖" + }, + "ico": "jn_43004_2", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_2", + "Type": 1, + "CD": 3, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004231 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004211_3", + "text": "伤害提升至195%" + }, + "buffid": [ + 390001107 + ], + "map": "" + }, + { + "id": 143004211, + "level": 4, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004211", + "text": "缤纷棒棒糖" + }, + "ico": "jn_43004_2", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_2", + "Type": 1, + "CD": 3, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004241 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004211_4", + "text": "伤害提升至205%" + }, + "buffid": [ + 390001107 + ], + "map": "" + }, + { + "id": 143004211, + "level": 5, + "MaxLV": 5, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004211", + "text": "缤纷棒棒糖" + }, + "ico": "jn_43004_2", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_2", + "Type": 1, + "CD": 3, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004251 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004211_5", + "text": "伤害提升至215%" + }, + "buffid": [ + 390001107 + ], + "map": "" + }, { "id": 143004311, "level": 1, - "MaxLV": 1, + "MaxLV": 3, "UnavailablePlayTypes": [], "Name": { "key": "skill_skill_atk_Name_143004311", @@ -25188,6 +25436,74 @@ ], "map": "" }, + { + "id": 143004311, + "level": 2, + "MaxLV": 3, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004311", + "text": "姜饼人诅咒" + }, + "ico": "jn_43004_3", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_3", + "Type": 1, + "CD": 4, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004311, + 243004322, + 243004313 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004311_2", + "text": "伤害提升至530%。" + }, + "buffid": [ + 390001115 + ], + "map": "" + }, + { + "id": 143004311, + "level": 3, + "MaxLV": 3, + "UnavailablePlayTypes": [], + "Name": { + "key": "skill_skill_atk_Name_143004311", + "text": "姜饼人诅咒" + }, + "ico": "jn_43004_3", + "CorrectPos": 0, + "IsMelee": 1, + "act": "Skill_3", + "Type": 1, + "CD": 4, + "Where": [], + "Target": 2, + "ChildSkill": { + "Id": [ + 243004311, + 243004332, + 243004313 + ] + }, + "passSkill": [], + "Desc": { + "key": "skill_skill_atk_Desc_143004311_3", + "text": "伤害提升至540%。" + }, + "buffid": [ + 390001115 + ], + "map": "" + }, { "id": 123003111, "level": 1, diff --git a/modules/caninerabbit/api_award.go b/modules/caninerabbit/api_award.go index d9ce6aa2b..a5fffc3da 100644 --- a/modules/caninerabbit/api_award.go +++ b/modules/caninerabbit/api_award.go @@ -12,16 +12,17 @@ func (this *apiComp) AwardCheck(session comm.IUserSession, req *pb.CanineRabbitA func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardReq) (errdata *pb.ErrorData) { var ( - conf *cfg.GameCatchrabbitrewardData - info *pb.DBCanineRabbit - atno []*pb.UserAtno - ok bool - err error + confs []*cfg.GameCatchrabbitData + info *pb.DBCanineRabbit + res []*cfg.Gameatn + atno []*pb.UserAtno + ok bool + err error ) if errdata = this.AwardCheck(session, req); errdata != nil { return } - if conf, err = this.module.configure.getGameGColorRewardData(req.Id); err != nil { + if confs, err = this.module.configure.getGameGColorRewardDatas(req.Type + 1); err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_ConfigNoFound, Message: err.Error(), @@ -36,34 +37,29 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.CanineRabbitAwardR } return } - if _, ok = info.Award[req.Id]; ok { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Message: "Allaward Claimed!", - } - } - if conf.Type == 1 { - if info.Rabbitintegral < conf.Condition { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ActivityCantReward, - Message: "Rabbitintegral no enough", + + if req.Type == 0 { //兔子 + for _, v := range confs { + if _, ok = info.Award[v.Key]; !ok && info.Rabbitintegral >= v.Condition { + res = append(res, v.Reward...) + info.Award[v.Key] = true } - return } } else { - if info.Houndintegral < conf.Condition { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ActivityCantReward, - Message: "Houndintegral no enough", + for _, v := range confs { + if _, ok = info.Award[v.Key]; !ok && info.Houndintegral >= v.Condition { + res = append(res, v.Reward...) + info.Award[v.Key] = true } - return } } - if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil { + if errdata, atno = this.module.DispenseAtno(session, res, true); errdata != nil { return } - - session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Id: req.Id, Award: atno}) + this.module.model.Change(session.GetUserId(), map[string]interface{}{ + "award": info.Award, + }) + session.SendMsg(string(this.module.GetType()), "award", &pb.CanineRabbitAwardResp{Type: req.Type, Awardmap: info.Award, Award: atno}) return } diff --git a/modules/caninerabbit/configure.go b/modules/caninerabbit/configure.go index 772e4838d..7cac97a3d 100644 --- a/modules/caninerabbit/configure.go +++ b/modules/caninerabbit/configure.go @@ -8,7 +8,7 @@ import ( ) const ( - game_catchrabbitreward = "game_catchrabbitreward.json" + game_catchrabbit = "game_catchrabbit.json" ) type configureComp struct { @@ -20,24 +20,41 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp err = this.MCompConfigure.Init(service, module, comp, options) this.module = module.(*CanineRabbit) err = this.LoadMultiConfigure(map[string]interface{}{ - game_catchrabbitreward: cfg.NewGameCatchrabbitreward, + game_catchrabbit: cfg.NewGameCatchrabbit, }) return } // 获取奖励列表 -func (this *configureComp) getGameGColorRewardData(id int32) (conf *cfg.GameCatchrabbitrewardData, err error) { +func (this *configureComp) getGameGColorRewardData(id int32) (conf *cfg.GameCatchrabbitData, err error) { var ( v interface{} ok bool ) - if v, err = this.GetConfigure(game_catchrabbitreward); err != nil { + if v, err = this.GetConfigure(game_catchrabbit); err != nil { return } - if conf, ok = v.(*cfg.GameCatchrabbitreward).GetDataMap()[id]; !ok { - err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_catchrabbitreward, id) + if conf, ok = v.(*cfg.GameCatchrabbit).GetDataMap()[id]; !ok { + err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_catchrabbit, id) this.module.Errorln(err) return } return } + +// 获取奖励列表 +func (this *configureComp) getGameGColorRewardDatas(ctype int32) (confs []*cfg.GameCatchrabbitData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_catchrabbit); err != nil { + return + } + confs = make([]*cfg.GameCatchrabbitData, 0) + for _, v := range v.(*cfg.GameCatchrabbit).GetDataList() { + if v.Type == ctype { + confs = append(confs, v) + } + } + return +} diff --git a/pb/caninerabbit_msg.pb.go b/pb/caninerabbit_msg.pb.go index 5e96cd26f..f118dca8f 100644 --- a/pb/caninerabbit_msg.pb.go +++ b/pb/caninerabbit_msg.pb.go @@ -112,7 +112,7 @@ type CanineRabbitAwardReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` + Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type"` //0兔子 1 猎犬 } func (x *CanineRabbitAwardReq) Reset() { @@ -147,9 +147,9 @@ func (*CanineRabbitAwardReq) Descriptor() ([]byte, []int) { return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{2} } -func (x *CanineRabbitAwardReq) GetId() int32 { +func (x *CanineRabbitAwardReq) GetType() int32 { if x != nil { - return x.Id + return x.Type } return 0 } @@ -159,8 +159,9 @@ type CanineRabbitAwardResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` - Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //获取资源 + Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type"` //0兔子 1 猎犬 + Awardmap map[int32]bool `protobuf:"bytes,2,rep,name=awardmap,proto3" json:"awardmap" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` + Award []*UserAtno `protobuf:"bytes,3,rep,name=award,proto3" json:"award"` //获取资源 } func (x *CanineRabbitAwardResp) Reset() { @@ -195,13 +196,20 @@ func (*CanineRabbitAwardResp) Descriptor() ([]byte, []int) { return file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP(), []int{3} } -func (x *CanineRabbitAwardResp) GetId() int32 { +func (x *CanineRabbitAwardResp) GetType() int32 { if x != nil { - return x.Id + return x.Type } return 0 } +func (x *CanineRabbitAwardResp) GetAwardmap() map[int32]bool { + if x != nil { + return x.Awardmap + } + return nil +} + func (x *CanineRabbitAwardResp) GetAward() []*UserAtno { if x != nil { return x.Award @@ -874,79 +882,87 @@ var file_caninerabbit_caninerabbit_msg_proto_rawDesc = []byte{ 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, - 0x62, 0x69, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x26, 0x0a, 0x14, 0x43, 0x61, 0x6e, + 0x62, 0x69, 0x74, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x2a, 0x0a, 0x14, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, - 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x48, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, - 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, - 0x61, 0x72, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, - 0x41, 0x74, 0x6e, 0x6f, 0x52, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x22, 0x31, 0x0a, 0x19, 0x43, - 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, - 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6a, - 0x0a, 0x1a, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x53, 0x69, - 0x6e, 0x67, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e, - 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x74, 0x65, - 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, - 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x6f, 0x75, - 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x84, 0x01, 0x0a, 0x19, 0x43, - 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, - 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x6f, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, - 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, - 0x6f, 0x6f, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, - 0x6e, 0x22, 0x35, 0x0a, 0x1b, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, - 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x69, - 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, + 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x40, 0x0a, 0x08, 0x61, 0x77, 0x61, 0x72, 0x64, 0x6d, 0x61, 0x70, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, + 0x62, 0x62, 0x69, 0x74, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x41, 0x77, + 0x61, 0x72, 0x64, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x77, 0x61, + 0x72, 0x64, 0x6d, 0x61, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x74, 0x6e, 0x6f, 0x52, + 0x05, 0x61, 0x77, 0x61, 0x72, 0x64, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x6d, + 0x61, 0x70, 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, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x31, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, + 0x62, 0x69, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x73, 0x74, 0x79, 0x70, 0x65, 0x22, 0x6a, 0x0a, 0x1a, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, + 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4f, 0x76, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x0e, 0x72, 0x61, 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, + 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x72, 0x61, + 0x62, 0x62, 0x69, 0x74, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x24, 0x0a, 0x0d, + 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x0d, 0x68, 0x6f, 0x75, 0x6e, 0x64, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, + 0x61, 0x6c, 0x22, 0x84, 0x01, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, + 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x61, 0x64, 0x79, 0x50, 0x75, 0x73, 0x68, + 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, + 0x74, 0x68, 0x12, 0x27, 0x0a, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, + 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x22, 0x35, 0x0a, 0x1b, 0x43, 0x61, 0x6e, + 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, + 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x53, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x69, - 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, - 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x75, 0x72, 0x72, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x5b, 0x0a, - 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x2a, - 0x0a, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, - 0x65, 0x73, 0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x61, - 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x22, 0x72, 0x0a, 0x1a, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, - 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x75, - 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, - 0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, - 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73, - 0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x22, 0x42, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x69, - 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x57, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x22, 0x4e, 0x0a, 0x1c, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, + 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x63, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, + 0x22, 0x53, 0x0a, 0x19, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, + 0x47, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, + 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, + 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x70, 0x6c, 0x61, + 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x72, 0x72, 0x70, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x15, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, + 0x61, 0x62, 0x62, 0x69, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x22, 0x15, 0x0a, 0x13, - 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x57, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x22, 0xb0, 0x01, 0x0a, 0x18, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, - 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, - 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x77, 0x69, 0x6e, 0x75, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, - 0x74, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, - 0x64, 0x6d, 0x69, 0x74, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x65, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, - 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, - 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, 0x2d, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, - 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, + 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73, 0x73, 0x52, 0x05, 0x63, 0x68, 0x65, + 0x73, 0x73, 0x22, 0x18, 0x0a, 0x16, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, + 0x69, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x72, 0x0a, 0x1a, + 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, + 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, + 0x6f, 0x6d, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, + 0x62, 0x62, 0x69, 0x74, 0x43, 0x68, 0x65, 0x73, 0x73, 0x52, 0x05, 0x63, 0x68, 0x65, 0x73, 0x73, + 0x22, 0x42, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, + 0x57, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x69, 0x64, 0x12, 0x14, + 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, + 0x73, 0x77, 0x69, 0x6e, 0x22, 0x15, 0x0a, 0x13, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, + 0x62, 0x62, 0x69, 0x74, 0x57, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0xb0, 0x01, 0x0a, 0x18, + 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x47, 0x61, 0x6d, 0x65, + 0x4f, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x77, 0x69, 0x6e, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x77, 0x69, 0x6e, 0x75, 0x69, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x74, 0x64, 0x65, 0x66, 0x65, + 0x61, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x72, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, + 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x03, 0x72, 0x65, 0x64, 0x12, + 0x2d, 0x0a, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x44, 0x42, 0x43, 0x61, 0x6e, 0x69, 0x6e, 0x65, 0x52, 0x61, 0x62, 0x62, 0x69, 0x74, 0x52, 0x6f, + 0x6f, 0x6d, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x04, 0x62, 0x6c, 0x75, 0x65, 0x42, 0x06, + 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -961,7 +977,7 @@ func file_caninerabbit_caninerabbit_msg_proto_rawDescGZIP() []byte { return file_caninerabbit_caninerabbit_msg_proto_rawDescData } -var file_caninerabbit_caninerabbit_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_caninerabbit_caninerabbit_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_caninerabbit_caninerabbit_msg_proto_goTypes = []interface{}{ (*CanineRabbitInfoReq)(nil), // 0: CanineRabbitInfoReq (*CanineRabbitInfoResp)(nil), // 1: CanineRabbitInfoResp @@ -979,25 +995,27 @@ var file_caninerabbit_caninerabbit_msg_proto_goTypes = []interface{}{ (*CanineRabbitWinReq)(nil), // 13: CanineRabbitWinReq (*CanineRabbitWinResp)(nil), // 14: CanineRabbitWinResp (*CanineRabbitGameOverPush)(nil), // 15: CanineRabbitGameOverPush - (*DBCanineRabbit)(nil), // 16: DBCanineRabbit - (*UserAtno)(nil), // 17: UserAtno - (*DBCanineRabbitRoom)(nil), // 18: DBCanineRabbitRoom - (*DBCanineRabbitChess)(nil), // 19: DBCanineRabbitChess - (*DBCanineRabbitRoomPlayer)(nil), // 20: DBCanineRabbitRoomPlayer + nil, // 16: CanineRabbitAwardResp.AwardmapEntry + (*DBCanineRabbit)(nil), // 17: DBCanineRabbit + (*UserAtno)(nil), // 18: UserAtno + (*DBCanineRabbitRoom)(nil), // 19: DBCanineRabbitRoom + (*DBCanineRabbitChess)(nil), // 20: DBCanineRabbitChess + (*DBCanineRabbitRoomPlayer)(nil), // 21: DBCanineRabbitRoomPlayer } var file_caninerabbit_caninerabbit_msg_proto_depIdxs = []int32{ - 16, // 0: CanineRabbitInfoResp.info:type_name -> DBCanineRabbit - 17, // 1: CanineRabbitAwardResp.award:type_name -> UserAtno - 18, // 2: CanineRabbitGameReadyPush.room:type_name -> DBCanineRabbitRoom - 19, // 3: CanineRabbitHandleReq.chess:type_name -> DBCanineRabbitChess - 19, // 4: CanineRabbitGameHandlePush.chess:type_name -> DBCanineRabbitChess - 20, // 5: CanineRabbitGameOverPush.red:type_name -> DBCanineRabbitRoomPlayer - 20, // 6: CanineRabbitGameOverPush.blue:type_name -> DBCanineRabbitRoomPlayer - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 17, // 0: CanineRabbitInfoResp.info:type_name -> DBCanineRabbit + 16, // 1: CanineRabbitAwardResp.awardmap:type_name -> CanineRabbitAwardResp.AwardmapEntry + 18, // 2: CanineRabbitAwardResp.award:type_name -> UserAtno + 19, // 3: CanineRabbitGameReadyPush.room:type_name -> DBCanineRabbitRoom + 20, // 4: CanineRabbitHandleReq.chess:type_name -> DBCanineRabbitChess + 20, // 5: CanineRabbitGameHandlePush.chess:type_name -> DBCanineRabbitChess + 21, // 6: CanineRabbitGameOverPush.red:type_name -> DBCanineRabbitRoomPlayer + 21, // 7: CanineRabbitGameOverPush.blue:type_name -> DBCanineRabbitRoomPlayer + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_caninerabbit_caninerabbit_msg_proto_init() } @@ -1207,7 +1225,7 @@ func file_caninerabbit_caninerabbit_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_caninerabbit_caninerabbit_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/Game.Catchrabbit.go b/sys/configure/structs/Game.Catchrabbit.go new file mode 100644 index 000000000..5cf78463d --- /dev/null +++ b/sys/configure/structs/Game.Catchrabbit.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameCatchrabbit struct { + _dataMap map[int32]*GameCatchrabbitData + _dataList []*GameCatchrabbitData +} + +func NewGameCatchrabbit(_buf []map[string]interface{}) (*GameCatchrabbit, error) { + _dataList := make([]*GameCatchrabbitData, 0, len(_buf)) + dataMap := make(map[int32]*GameCatchrabbitData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameCatchrabbitData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Key] = _v + } + } + return &GameCatchrabbit{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameCatchrabbit) GetDataMap() map[int32]*GameCatchrabbitData { + return table._dataMap +} + +func (table *GameCatchrabbit) GetDataList() []*GameCatchrabbitData { + return table._dataList +} + +func (table *GameCatchrabbit) Get(key int32) *GameCatchrabbitData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.CatchrabbitrewardData.go b/sys/configure/structs/Game.CatchrabbitData.go similarity index 81% rename from sys/configure/structs/Game.CatchrabbitrewardData.go rename to sys/configure/structs/Game.CatchrabbitData.go index ac97ad8f4..3bdbf3da3 100644 --- a/sys/configure/structs/Game.CatchrabbitrewardData.go +++ b/sys/configure/structs/Game.CatchrabbitData.go @@ -10,20 +10,20 @@ package cfg import "errors" -type GameCatchrabbitrewardData struct { +type GameCatchrabbitData struct { Key int32 Type int32 Condition int32 Reward []*Gameatn } -const TypeId_GameCatchrabbitrewardData = -1422030126 +const TypeId_GameCatchrabbitData = -1864228381 -func (*GameCatchrabbitrewardData) GetTypeId() int32 { - return -1422030126 +func (*GameCatchrabbitData) GetTypeId() int32 { + return -1864228381 } -func (_v *GameCatchrabbitrewardData)Deserialize(_buf map[string]interface{}) (err error) { +func (_v *GameCatchrabbitData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["condition"].(float64); !_ok_ { err = errors.New("condition error"); return }; _v.Condition = int32(_tempNum_) } @@ -44,8 +44,8 @@ func (_v *GameCatchrabbitrewardData)Deserialize(_buf map[string]interface{}) (er return } -func DeserializeGameCatchrabbitrewardData(_buf map[string]interface{}) (*GameCatchrabbitrewardData, error) { - v := &GameCatchrabbitrewardData{} +func DeserializeGameCatchrabbitData(_buf map[string]interface{}) (*GameCatchrabbitData, error) { + v := &GameCatchrabbitData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { diff --git a/sys/configure/structs/Game.Catchrabbitreward.go b/sys/configure/structs/Game.Catchrabbitreward.go deleted file mode 100644 index 599bc3850..000000000 --- a/sys/configure/structs/Game.Catchrabbitreward.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -package cfg - -type GameCatchrabbitreward struct { - _dataMap map[int32]*GameCatchrabbitrewardData - _dataList []*GameCatchrabbitrewardData -} - -func NewGameCatchrabbitreward(_buf []map[string]interface{}) (*GameCatchrabbitreward, error) { - _dataList := make([]*GameCatchrabbitrewardData, 0, len(_buf)) - dataMap := make(map[int32]*GameCatchrabbitrewardData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGameCatchrabbitrewardData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.Key] = _v - } - } - return &GameCatchrabbitreward{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GameCatchrabbitreward) GetDataMap() map[int32]*GameCatchrabbitrewardData { - return table._dataMap -} - -func (table *GameCatchrabbitreward) GetDataList() []*GameCatchrabbitrewardData { - return table._dataList -} - -func (table *GameCatchrabbitreward) Get(key int32) *GameCatchrabbitrewardData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.PuggsyPasscheck.go b/sys/configure/structs/Game.PuggsyPasscheck.go deleted file mode 100644 index b657b1448..000000000 --- a/sys/configure/structs/Game.PuggsyPasscheck.go +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -package cfg - -type GamePuggsyPasscheck struct { - _dataMap map[int32]*GamePuggsyPasscheckData - _dataList []*GamePuggsyPasscheckData -} - -func NewGamePuggsyPasscheck(_buf []map[string]interface{}) (*GamePuggsyPasscheck, error) { - _dataList := make([]*GamePuggsyPasscheckData, 0, len(_buf)) - dataMap := make(map[int32]*GamePuggsyPasscheckData) - for _, _ele_ := range _buf { - if _v, err2 := DeserializeGamePuggsyPasscheckData(_ele_); err2 != nil { - return nil, err2 - } else { - _dataList = append(_dataList, _v) - dataMap[_v.Id] = _v - } - } - return &GamePuggsyPasscheck{_dataList:_dataList, _dataMap:dataMap}, nil -} - -func (table *GamePuggsyPasscheck) GetDataMap() map[int32]*GamePuggsyPasscheckData { - return table._dataMap -} - -func (table *GamePuggsyPasscheck) GetDataList() []*GamePuggsyPasscheckData { - return table._dataList -} - -func (table *GamePuggsyPasscheck) Get(key int32) *GamePuggsyPasscheckData { - return table._dataMap[key] -} - - diff --git a/sys/configure/structs/Game.PuggsyPasscheckData.go b/sys/configure/structs/Game.PuggsyPasscheckData.go deleted file mode 100644 index 9f98f1965..000000000 --- a/sys/configure/structs/Game.PuggsyPasscheckData.go +++ /dev/null @@ -1,58 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -package cfg - -import "errors" - -type GamePuggsyPasscheckData struct { - Id int32 - PayId string - Parameter int32 - UnlockText string - FreeReward *Gameatn - PayReward []*Gameatn -} - -const TypeId_GamePuggsyPasscheckData = 2074500826 - -func (*GamePuggsyPasscheckData) GetTypeId() int32 { - return 2074500826 -} - -func (_v *GamePuggsyPasscheckData)Deserialize(_buf map[string]interface{}) (err error) { - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } - { var _ok_ bool; if _v.PayId, _ok_ = _buf["pay_id"].(string); !_ok_ { err = errors.New("pay_id error"); return } } - { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["parameter"].(float64); !_ok_ { err = errors.New("parameter error"); return }; _v.Parameter = int32(_tempNum_) } - {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["unlock_text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.UnlockText error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.UnlockText, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } - { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["free_reward"].(map[string]interface{}); !_ok_ { err = errors.New("free_reward error"); return }; if _v.FreeReward, err = DeserializeGameatn(_x_); err != nil { return } } - { - var _arr_ []interface{} - var _ok_ bool - if _arr_, _ok_ = _buf["pay_reward"].([]interface{}); !_ok_ { err = errors.New("pay_reward error"); return } - - _v.PayReward = 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.PayReward = append(_v.PayReward, _list_v_) - } - } - - return -} - -func DeserializeGamePuggsyPasscheckData(_buf map[string]interface{}) (*GamePuggsyPasscheckData, error) { - v := &GamePuggsyPasscheckData{} - if err := v.Deserialize(_buf); err == nil { - return v, nil - } else { - return nil, err - } -} diff --git a/sys/configure/structs/Tables.go b/sys/configure/structs/Tables.go index 1d31461f1..8efb8c5b7 100644 --- a/sys/configure/structs/Tables.go +++ b/sys/configure/structs/Tables.go @@ -290,6 +290,7 @@ type Tables struct { PuggsyFight *GamePuggsyFight PuggsyScore *GamePuggsyScore PuggsySkill *GamePuggsySkill + Catchrabbit *GameCatchrabbit } func NewTables(loader JsonLoader) (*Tables, error) { @@ -1971,5 +1972,11 @@ func NewTables(loader JsonLoader) (*Tables, error) { if tables.PuggsySkill, err = NewGamePuggsySkill(buf) ; err != nil { return nil, err } + if buf, err = loader("game_catchrabbit") ; err != nil { + return nil, err + } + if tables.Catchrabbit, err = NewGameCatchrabbit(buf) ; err != nil { + return nil, err + } return tables, nil }