From 6e33313f6950656e1ac6f4525a3eccf83f17051f Mon Sep 17 00:00:00 2001 From: chenxi Date: Wed, 17 May 2023 14:40:54 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E6=88=98=E4=BB=A4=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/local_data.lua | 9 + lua/app/config/buff.lua | 1 - lua/app/config/chapter.lua | 275 +--------- lua/app/config/chapter_board.lua | 637 +++++++++++++++++++++-- lua/app/config/mail.lua | 109 ++++ lua/app/config/mail.lua.meta | 10 + lua/app/config/recharge.lua | 6 +- lua/app/config/strings/cn/mail.lua | 24 + lua/app/config/strings/cn/mail.lua.meta | 10 + lua/app/config/strings/de/mail.lua | 21 + lua/app/config/strings/de/mail.lua.meta | 10 + lua/app/config/strings/en/mail.lua | 24 + lua/app/config/strings/en/mail.lua.meta | 10 + lua/app/config/strings/fr/mail.lua | 24 + lua/app/config/strings/fr/mail.lua.meta | 10 + lua/app/config/strings/ja/mail.lua | 21 + lua/app/config/strings/ja/mail.lua.meta | 10 + lua/app/config/strings/ko/mail.lua | 24 + lua/app/config/strings/ko/mail.lua.meta | 10 + lua/app/config/strings/zh/mail.lua | 24 + lua/app/config/strings/zh/mail.lua.meta | 10 + lua/app/module/bounty/bounty_manager.lua | 1 + lua/app/ui/bounty/bounty_buy_ui.lua | 69 ++- lua/app/ui/bounty/bounty_main_ui.lua | 5 + lua/app/userdata/bounty/bounty_data.lua | 60 +++ 25 files changed, 1109 insertions(+), 305 deletions(-) create mode 100644 lua/app/config/mail.lua create mode 100644 lua/app/config/mail.lua.meta create mode 100644 lua/app/config/strings/cn/mail.lua create mode 100644 lua/app/config/strings/cn/mail.lua.meta create mode 100644 lua/app/config/strings/de/mail.lua create mode 100644 lua/app/config/strings/de/mail.lua.meta create mode 100644 lua/app/config/strings/en/mail.lua create mode 100644 lua/app/config/strings/en/mail.lua.meta create mode 100644 lua/app/config/strings/fr/mail.lua create mode 100644 lua/app/config/strings/fr/mail.lua.meta create mode 100644 lua/app/config/strings/ja/mail.lua create mode 100644 lua/app/config/strings/ja/mail.lua.meta create mode 100644 lua/app/config/strings/ko/mail.lua create mode 100644 lua/app/config/strings/ko/mail.lua.meta create mode 100644 lua/app/config/strings/zh/mail.lua create mode 100644 lua/app/config/strings/zh/mail.lua.meta diff --git a/lua/app/common/local_data.lua b/lua/app/common/local_data.lua index 66b245f3..616238b6 100644 --- a/lua/app/common/local_data.lua +++ b/lua/app/common/local_data.lua @@ -26,6 +26,7 @@ local LOCAL_DATA_KEY = { DISTINCT_ID = "DISTINCT_ID", LAST_LOGIN_TIME = "LAST_LOGIN_TIME", GATE = "GATE", + BOUNTY_POP_TIME = "BOUNTY_POP_TIME", } LocalData.KEYS = LOCAL_DATA_KEY @@ -336,4 +337,12 @@ function LocalData:setLastLoginTime() end +function LocalData:setBountyPopTime(time) + self:setInt(LOCAL_DATA_KEY.BOUNTY_POP_TIME, time) +end + +function LocalData:getBountyPopTime() + return self:getInt(LOCAL_DATA_KEY.BOUNTY_POP_TIME, 0) +end + return LocalData \ No newline at end of file diff --git a/lua/app/config/buff.lua b/lua/app/config/buff.lua index d34024ef..727201f8 100644 --- a/lua/app/config/buff.lua +++ b/lua/app/config/buff.lua @@ -265,7 +265,6 @@ local buff = { [36]={ ["name"]="normal_attack_dec", ["buff_type"]=1, - ["stack"]=2, ["decr"]=2, ["icon"]="normal_attack_dec", ["fx_continued"]={ diff --git a/lua/app/config/chapter.lua b/lua/app/config/chapter.lua index 6710e77c..7b46331d 100644 --- a/lua/app/config/chapter.lua +++ b/lua/app/config/chapter.lua @@ -40,24 +40,6 @@ local chapter = { 401, 501 }, - ["mystery_box"]={ - { - 1, - 5 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -179,26 +161,9 @@ local chapter = { 1501 }, ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } + 1 }, ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, { { ["type"]=1, @@ -369,22 +334,16 @@ local chapter = { 3001 }, ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } + 1, + 3 }, ["mystery_box_reward"]={ { { ["type"]=1, ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", + ["id"]=4, + ["id_for_nothing"]="Ug==", ["num"]=10, ["num_for_nothing"]="Vwg=" } @@ -580,38 +539,6 @@ local chapter = { 4901, 5001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -819,38 +746,6 @@ local chapter = { 6901, 7001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -1058,38 +953,6 @@ local chapter = { 8901, 9001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -1297,38 +1160,6 @@ local chapter = { 10901, 11001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -1552,38 +1383,6 @@ local chapter = { 12901, 13001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -1807,38 +1606,6 @@ local chapter = { 14901, 15001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, @@ -2061,38 +1828,6 @@ local chapter = { 16901, 17001 }, - ["mystery_box"]={ - { - 1, - 5 - }, - { - 6, - 10 - } - }, - ["mystery_box_reward"]={ - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - }, - { - { - ["type"]=1, - ["type_for_nothing"]="Vw==", - ["id"]=2, - ["id_for_nothing"]="VA==", - ["num"]=10, - ["num_for_nothing"]="Vwg=" - } - } - }, ["wave_reward"]={ { ["type"]=1, diff --git a/lua/app/config/chapter_board.lua b/lua/app/config/chapter_board.lua index 9c657bc0..a8f26bbc 100644 --- a/lua/app/config/chapter_board.lua +++ b/lua/app/config/chapter_board.lua @@ -198,21 +198,6 @@ local chapter_board = { 0 } }, - ["control_element"]={ - 3, - 3, - 2, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3, - 3 - }, ["control_element"]={ 3, 3, @@ -292,7 +277,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -308,7 +293,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -427,6 +412,204 @@ local chapter_board = { 1, 0 } + }, + ["mystery_box_board"]={ + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 0, + 2 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 3 + }, + { + 0, + 1 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 14, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 15, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } } }, [3]={ @@ -552,7 +735,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -560,7 +743,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -716,7 +899,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -728,7 +911,7 @@ local chapter_board = { 0 }, { - 3, + 0, 0 }, { @@ -740,7 +923,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -764,7 +947,7 @@ local chapter_board = { 0 }, { - 3, + 2, 0 }, { @@ -827,6 +1010,204 @@ local chapter_board = { 1, 0 } + }, + ["mystery_box_board"]={ + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 0, + 2 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 2 + }, + { + 0, + 1 + }, + { + 0, + 4 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 0, + 2 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 0, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 15, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } } }, [5]={ @@ -888,7 +1269,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -912,7 +1293,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -928,7 +1309,7 @@ local chapter_board = { 0 }, { - 2, + 14, 0 }, { @@ -1139,6 +1520,188 @@ local chapter_board = { 3, 0 }, + { + 2, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } + }, + ["mystery_box_board"]={ + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 0, + 2 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 2 + }, + { + 0, + 3 + }, + { + 0, + 2 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, { 3, 0 @@ -1156,7 +1719,11 @@ local chapter_board = { 0 }, { - 3, + 2, + 0 + }, + { + 14, 0 }, { @@ -1171,6 +1738,18 @@ local chapter_board = { 3, 0 }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, { 1, 0 @@ -1184,7 +1763,7 @@ local chapter_board = { 0 }, { - 3, + 15, 0 }, { @@ -1212,7 +1791,7 @@ local chapter_board = { 0 }, { - 3, + 14, 0 }, { diff --git a/lua/app/config/mail.lua b/lua/app/config/mail.lua new file mode 100644 index 00000000..d23b0bbb --- /dev/null +++ b/lua/app/config/mail.lua @@ -0,0 +1,109 @@ +local mail = { + [1]={ + ["type"]=1, + ["time_type"]=1, + ["time_send"]={ + 0, + 0, + 0 + }, + ["time"]=24, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [2]={ + ["type"]=2, + ["time_type"]=1, + ["time_send"]={ + 0, + 0, + 0 + }, + ["time"]=24, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + [3]={ + ["type"]=3, + ["time_type"]=2, + ["time_send"]={ + 5, + 12, + 0, + 0 + }, + ["time"]=24, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [4]={ + ["type"]=3, + ["time_type"]=2, + ["time_send"]={ + 6, + 12, + 0, + 0 + }, + ["time"]=24, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [5]={ + ["type"]=3, + ["time_type"]=2, + ["time_send"]={ + 7, + 12, + 0, + 0 + }, + ["time"]=24, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=70, + ["num_for_nothing"]="UQg=" + } + } + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/mail.lua.meta b/lua/app/config/mail.lua.meta new file mode 100644 index 00000000..9ae2271c --- /dev/null +++ b/lua/app/config/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 26403a4c77be4584982691a5a64cc90f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/recharge.lua b/lua/app/config/recharge.lua index ff8a911b..174915e4 100644 --- a/lua/app/config/recharge.lua +++ b/lua/app/config/recharge.lua @@ -76,7 +76,7 @@ local recharge = { ["price"]=9.99, ["price_cn"]=68, ["same_price"]=10, - ["price_str"]="9.99", + ["price_str"]="$9.99", ["score"]=10 }, [11]={ @@ -84,7 +84,7 @@ local recharge = { ["price"]=11.99, ["price_cn"]=78, ["same_price"]=12, - ["price_str"]="11.99", + ["price_str"]="$11.99", ["score"]=12 }, [12]={ @@ -148,7 +148,7 @@ local recharge = { ["price"]=199.99, ["price_cn"]=1298, ["same_price"]=200, - ["price_str"]="199.99", + ["price_str"]="$199.99", ["score"]=200 } } diff --git a/lua/app/config/strings/cn/mail.lua b/lua/app/config/strings/cn/mail.lua new file mode 100644 index 00000000..f76e0a67 --- /dev/null +++ b/lua/app/config/strings/cn/mail.lua @@ -0,0 +1,24 @@ +local mail = { + [1]={ + ["name"]="路边老爷爷的馈赠" + }, + [2]={ + ["name"]="国王的日常补给" + }, + [3]={ + ["name"]="哼哼哈嘿", + ["desc"]="乐观的人总在不经意间获得意外之喜" + }, + [4]={ + ["name"]="仁者无敌", + ["desc"]="心地善良的人,会善有善报的" + }, + [5]={ + ["name"]="风生水起", + ["desc"]="精力充沛,运势良好,财运连连" + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/cn/mail.lua.meta b/lua/app/config/strings/cn/mail.lua.meta new file mode 100644 index 00000000..543d6cd6 --- /dev/null +++ b/lua/app/config/strings/cn/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 07c0eb9d579311240a0b9b3b1348bb43 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/de/mail.lua b/lua/app/config/strings/de/mail.lua new file mode 100644 index 00000000..a4d974e0 --- /dev/null +++ b/lua/app/config/strings/de/mail.lua @@ -0,0 +1,21 @@ +local mail = { + [1]={ + + }, + [2]={ + + }, + [3]={ + + }, + [4]={ + + }, + [5]={ + + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/de/mail.lua.meta b/lua/app/config/strings/de/mail.lua.meta new file mode 100644 index 00000000..9549b5d5 --- /dev/null +++ b/lua/app/config/strings/de/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e26e5e7d841ab3a4c8c21aa4d8ab3a61 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/en/mail.lua b/lua/app/config/strings/en/mail.lua new file mode 100644 index 00000000..01f03ccf --- /dev/null +++ b/lua/app/config/strings/en/mail.lua @@ -0,0 +1,24 @@ +local mail = { + [1]={ + ["name"]="Bestowal of the Elder" + }, + [2]={ + ["name"]="Daily Allowance of the King" + }, + [3]={ + ["name"]="Hey! See what's inside!", + ["desc"]="An optimistic person is always surprised by the unexpected" + }, + [4]={ + ["name"]="To my beloved...", + ["desc"]="A good heart will be rewarded with good deeds" + }, + [5]={ + ["name"]="Thrive!", + ["desc"]="Good energy, good luck and good fortune" + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/en/mail.lua.meta b/lua/app/config/strings/en/mail.lua.meta new file mode 100644 index 00000000..e8b4e948 --- /dev/null +++ b/lua/app/config/strings/en/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 08a7b69c149fe5943a502b8a91b933df +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/fr/mail.lua b/lua/app/config/strings/fr/mail.lua new file mode 100644 index 00000000..543ac975 --- /dev/null +++ b/lua/app/config/strings/fr/mail.lua @@ -0,0 +1,24 @@ +local mail = { + [1]={ + ["name"]="Cadeau d'un grand-père au bord de la route" + }, + [2]={ + ["name"]="Approvisionnement quotidien du roi" + }, + [3]={ + ["name"]="Hoho hahé", + ["desc"]="Une personne optimiste est toujours surprise par l'inattendu" + }, + [4]={ + ["name"]="Le bienveillant invincible", + ["desc"]="Une personne au bon cœur sera récompensée par de bonnes actions" + }, + [5]={ + ["name"]="En plein forme", + ["desc"]="Bonne énergie, bonne chance et bonne fortune" + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/fr/mail.lua.meta b/lua/app/config/strings/fr/mail.lua.meta new file mode 100644 index 00000000..f9c1b37f --- /dev/null +++ b/lua/app/config/strings/fr/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 71bf6f3e5fdd2b9419cfcbb212c0c5e1 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/ja/mail.lua b/lua/app/config/strings/ja/mail.lua new file mode 100644 index 00000000..a4d974e0 --- /dev/null +++ b/lua/app/config/strings/ja/mail.lua @@ -0,0 +1,21 @@ +local mail = { + [1]={ + + }, + [2]={ + + }, + [3]={ + + }, + [4]={ + + }, + [5]={ + + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/ja/mail.lua.meta b/lua/app/config/strings/ja/mail.lua.meta new file mode 100644 index 00000000..cd48cb0f --- /dev/null +++ b/lua/app/config/strings/ja/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 77a44aaa25d3c4c49a24dd0ce83e84ef +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/ko/mail.lua b/lua/app/config/strings/ko/mail.lua new file mode 100644 index 00000000..748c9c2d --- /dev/null +++ b/lua/app/config/strings/ko/mail.lua @@ -0,0 +1,24 @@ +local mail = { + [1]={ + ["name"]="길 가던 할아버지가 던져 준 선물" + }, + [2]={ + ["name"]="왕의 일상 보급품" + }, + [3]={ + ["name"]="으랏차차!", + ["desc"]="낙관적 인 사람은 항상 예상치 못한 것에 놀란다." + }, + [4]={ + ["name"]="자비로운 자는 무적입니다.", + ["desc"]="마음이 착한 사람은 선행으로 보상을받을 것입니다." + }, + [5]={ + ["name"]="막힘없이 뻗어나가요!", + ["desc"]="좋은 에너지, 행운과 행운" + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/ko/mail.lua.meta b/lua/app/config/strings/ko/mail.lua.meta new file mode 100644 index 00000000..0d52397b --- /dev/null +++ b/lua/app/config/strings/ko/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: e4b1b6fe02323924683bfd93258bf4f0 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/strings/zh/mail.lua b/lua/app/config/strings/zh/mail.lua new file mode 100644 index 00000000..1619da6f --- /dev/null +++ b/lua/app/config/strings/zh/mail.lua @@ -0,0 +1,24 @@ +local mail = { + [1]={ + ["name"]="路邊老爺爺的饋贈" + }, + [2]={ + ["name"]="國王的日常補給" + }, + [3]={ + ["name"]="哼哼哈嘿", + ["desc"]="樂觀的人總在不經意間獲得意外之喜" + }, + [4]={ + ["name"]="仁者無敵", + ["desc"]="心地善良的人,會善有善報的" + }, + [5]={ + ["name"]="風生水起", + ["desc"]="精力充沛,運勢良好,財運連連" + } +} +local config = { +data=mail,count=5 +} +return config \ No newline at end of file diff --git a/lua/app/config/strings/zh/mail.lua.meta b/lua/app/config/strings/zh/mail.lua.meta new file mode 100644 index 00000000..2b549a16 --- /dev/null +++ b/lua/app/config/strings/zh/mail.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f0c9c665019032543baa38c9226146f2 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/bounty/bounty_manager.lua b/lua/app/module/bounty/bounty_manager.lua index 6b89b083..f3183072 100644 --- a/lua/app/module/bounty/bounty_manager.lua +++ b/lua/app/module/bounty/bounty_manager.lua @@ -5,6 +5,7 @@ function BountyManager:showBountyMainUI() end function BountyManager:showBountyBuyUI() + DataManager.BountyData:markPopBought() UIManager:showUI("app/ui/bounty/bounty_buy_ui") end diff --git a/lua/app/ui/bounty/bounty_buy_ui.lua b/lua/app/ui/bounty/bounty_buy_ui.lua index 3022d4de..978eb92b 100644 --- a/lua/app/ui/bounty/bounty_buy_ui.lua +++ b/lua/app/ui/bounty/bounty_buy_ui.lua @@ -1,5 +1,9 @@ local BountyBuyUI = class("BountyBuyUI", BaseUI) +function BountyBuyUI:ctor() + self.endTime = DataManager.BountyData:getEndTime() +end + function BountyBuyUI:isFullScreen() return false end @@ -16,17 +20,78 @@ function BountyBuyUI:onLoadRootComplete() self:closeUI() end) - local buyBtn = uiMap["bounty_buy_ui.bg.buy_btn"] + self:initTitle() + self:initTime() + self:initRewards() + self:initBtns() + + self:scheduleGlobal(function() + self:updateTime() + end, 1) + self:updateTime() +end + +function BountyBuyUI:initTitle() + self.uiMap["bounty_buy_ui.bg.title_tx"]:setText("临时文本:黄金通行证") +end + +function BountyBuyUI:initTime() + self.timeTx = self.uiMap["bounty_buy_ui.bg.time_tx"] +end + +function BountyBuyUI:initRewards() + self.uiMap["bounty_buy_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) + local preferredWidth = self.uiMap["bounty_buy_ui.bg.desc_tx"]:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + self.uiMap["bounty_buy_ui.bg.left_arrow"]:setAnchoredPositionX(-30 - preferredWidth/2) + self.uiMap["bounty_buy_ui.bg.right_arrow"]:setAnchoredPositionX(30 + preferredWidth/2) + + local list = DataManager.BountyData:getAllProRewards() + for i = 1, 10 do + local cell = self.uiMap["bounty_buy_ui.bg.reward_cell_" .. i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + if list[i] then + cell:setVisible(true, 0.7) + cell:refreshByConfig(list[i]) + else + cell:setVisible(false) + end + end +end + +function BountyBuyUI:initBtns() + self.uiMap["bounty_buy_ui.bg.name_1"]:setText("临时文本:黄金通行证") + self.uiMap["bounty_buy_ui.bg.name_2"]:setText("临时文本:黄金通行证") + self.uiMap["bounty_buy_ui.bg.desc_tx_1"]:setText("临时文本:解锁奖励和奖励任务") + self.uiMap["bounty_buy_ui.bg.desc_tx_2"]:setText("临时文本:获得高级通行证,+10级,立即获得更多奖励!") + + local rechargeId = DataManager.BountyData:getRechargeId(false) + self.uiMap["bounty_buy_ui.bg.buy_btn.tx"]:setText(GFunc.getFormatPrice(rechargeId)) + local proRechargeId = DataManager.BountyData:getRechargeId(true) + self.uiMap["bounty_buy_ui.bg.buy_btn_advanced.tx"]:setText(GFunc.getFormatPrice(proRechargeId)) + + local buyBtn = self.uiMap["bounty_buy_ui.bg.buy_btn"] buyBtn:addClickListener(function() self:closeUI() ModuleManager.BountyManager:buyBounty(false) end) - local buyBtnAdvanced = uiMap["bounty_buy_ui.bg.buy_btn_advanced"] + local buyBtnAdvanced = self.uiMap["bounty_buy_ui.bg.buy_btn_advanced"] buyBtnAdvanced:addClickListener(function() self:closeUI() ModuleManager.BountyManager:buyBounty(true) end) end +function BountyBuyUI:onRefresh() + +end + +function BountyBuyUI:updateTime() + local remainTime = self.endTime - Time:getServerTime() + if remainTime < 0 then + UIManager:closeUnderUI(self) + return self:closeUI() + end + self.timeTx:setText(GFunc.getTimeStr(remainTime)) +end + return BountyBuyUI \ No newline at end of file diff --git a/lua/app/ui/bounty/bounty_main_ui.lua b/lua/app/ui/bounty/bounty_main_ui.lua index e3e8f5c1..9f4169da 100644 --- a/lua/app/ui/bounty/bounty_main_ui.lua +++ b/lua/app/ui/bounty/bounty_main_ui.lua @@ -49,6 +49,11 @@ function BountyMainUI:onLoadRootComplete() self:initRewards() self:bindData() + + -- 没有购买通行证的话,每日首次打开战令界面主动弹通行证购买弹窗 + if DataManager.BountyData:getIsPopBought() then + ModuleManager.BountyManager:showBountyBuyUI() + end self:scheduleGlobal(function() self:updateTime() end, 1) diff --git a/lua/app/userdata/bounty/bounty_data.lua b/lua/app/userdata/bounty/bounty_data.lua index b7db7ce6..d7b00128 100644 --- a/lua/app/userdata/bounty/bounty_data.lua +++ b/lua/app/userdata/bounty/bounty_data.lua @@ -17,6 +17,7 @@ function BountyData:init(data) self.level = data.level or 1 self.exp = data.exp or 0 self.bought = data.bought + self.popBoughtTime = LocalData:getBountyPopTime() self.claimed = data.claimed or {} self.claimedCount = 0 for k, v in pairs(self.claimed) do @@ -57,6 +58,11 @@ function BountyData:initBountyLevelCfg() table.remove(self.bountyLevelCfg) end end + if self.proRewards then + for i = 1, #self.proRewards do + table.remove(self.proRewards) + end + end local cfg = ConfigManager:getConfig("bounty_level") for k, v in pairs(cfg) do if v.season == self.season then @@ -162,6 +168,33 @@ function BountyData:getMaxLevel() return #self.bountyLevelCfg end +function BountyData:getBountyLevelCfg() + return self.bountyLevelCfg +end + +function BountyData:getAllProRewards() + if self.proRewards and #self.proRewards > 0 then + return self.proRewards + end + local rewards = {} + for i = 1, #self.bountyLevelCfg do + local cfg = self.bountyLevelCfg[i] + if cfg.reward_pro then + table.insert(rewards, cfg.reward_pro) + end + end + self.proRewards = GFunc.mergeRewards(rewards) + local cfg = ConfigManager:getConfig("item") + table.sort(self.proRewards, function(a, b) + if cfg[a.id].type == cfg[b.id].type then + return a.id > b.id + else + return cfg[a.id].type > cfg[b.id].type + end + end) + return self.proRewards +end + function BountyData:getLevelState(lv) return self.claimed[lv] end @@ -283,4 +316,31 @@ function BountyData:getExpItemIcon() return info.icon end +function BountyData:getIsPopBought() + if not self:getIsOpen() then + return false + end + if self.bought then + return false + end + return self.popBoughtTime < Time:getBeginningOfServerToday() +end + +function BountyData:markPopBought() + if self.popBoughtTime >= Time:getBeginningOfServerToday() then + return + end + self.popBoughtTime = Time:getBeginningOfServerToday() + LocalData:setBountyPopTime(self.popBoughtTime) +end + +function BountyData:getRechargeId(advanced) + local cfg = ConfigManager:getConfig("act_gift") + local id = self:getGiftId(advanced) + if cfg[id] then + return cfg[id].recharge_id + end + return 0 +end + return BountyData \ No newline at end of file