From 5b119201cfaf3d0a5308b03b993b3c831472d66d Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Thu, 17 Aug 2023 18:16:06 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=92=8C=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 1 + lua/app/common/data_manager.lua | 3 + lua/app/common/module_manager.lua | 2 + lua/app/config/act_gift.lua | 12 +- lua/app/config/activity_herofund.lua | 600 ++++++++++++++++++ lua/app/config/activity_herofund.lua.meta | 10 + lua/app/config/arena_gift.lua | 587 +++++++++++++++++ lua/app/config/arena_gift.lua.meta | 10 + lua/app/module/activity/hero_fund.meta | 8 + .../activity/hero_fund/hero_fund_manager.lua | 44 ++ .../hero_fund/hero_fund_manager.lua.meta | 10 + lua/app/proto/proto_msg_type.lua | 6 + lua/app/ui/activity/hero_fund.meta | 8 + lua/app/ui/activity/hero_fund/cell.meta | 8 + .../ui/activity/hero_fund/cell/fund_cell.lua | 70 ++ .../hero_fund/cell/fund_cell.lua.meta | 10 + .../ui/activity/hero_fund/hero_fund_ui.lua | 25 + .../activity/hero_fund/hero_fund_ui.lua.meta | 10 + lua/app/userdata/activity/hero_fund.meta | 8 + .../activity/hero_fund/hero_fund_data.lua | 258 ++++++++ .../hero_fund/hero_fund_data.lua.meta | 10 + 21 files changed, 1699 insertions(+), 1 deletion(-) create mode 100644 lua/app/config/activity_herofund.lua create mode 100644 lua/app/config/activity_herofund.lua.meta create mode 100644 lua/app/config/arena_gift.lua create mode 100644 lua/app/config/arena_gift.lua.meta create mode 100644 lua/app/module/activity/hero_fund.meta create mode 100644 lua/app/module/activity/hero_fund/hero_fund_manager.lua create mode 100644 lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta create mode 100644 lua/app/ui/activity/hero_fund.meta create mode 100644 lua/app/ui/activity/hero_fund/cell.meta create mode 100644 lua/app/ui/activity/hero_fund/cell/fund_cell.lua create mode 100644 lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta create mode 100644 lua/app/ui/activity/hero_fund/hero_fund_ui.lua create mode 100644 lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta create mode 100644 lua/app/userdata/activity/hero_fund.meta create mode 100644 lua/app/userdata/activity/hero_fund/hero_fund_data.lua create mode 100644 lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 8446ed67..11c8a3d7 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -139,6 +139,7 @@ BIReport.ITEM_GET_TYPE = { ARMOR_UPGRADE = "ArmorUpgrade", OFFLINE_RECOVERY = "OfflineRecovery", ACT_SUMMER = "ActSummer", + ACT_HERO_FUND = "ActHeroFund", } BIReport.ADS_CLICK_TYPE = { diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index 832c455f..393701ee 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -33,6 +33,7 @@ function DataManager:init() self:initManager("ShopData", "app/userdata/shop/shop_data") self:initManager("SummonData", "app/userdata/summon/summon_data") self:initManager("AIHelperData", "app/userdata/game_setting/ai_helper_data") + self:initManager("HeroFundData", "app/userdata/activity/hero_fund/hero_fund_data") end function DataManager:initManager(name, path) @@ -117,6 +118,7 @@ function DataManager:clear() -- 任务数据最后清理 self.TaskData:clear() self.AIHelperData:clear() + self.HeroFundData:clear() ModuleManager.TaskManager:clear() self:clearTryOpenFunc() end @@ -176,6 +178,7 @@ function DataManager:initWithServerData(data) if data.fund then self.GrowthFundData:init(data.fund.funds) end + self.HeroFundData:init(data.hero_fund) -- 任务数据最后初始化,依赖其他模块的数据 self.TaskData:init() diff --git a/lua/app/common/module_manager.lua b/lua/app/common/module_manager.lua index 377b610d..a9a3b3cf 100644 --- a/lua/app/common/module_manager.lua +++ b/lua/app/common/module_manager.lua @@ -69,6 +69,8 @@ local MODULE_PATHS = { EquipManager = "app/module/equip/equip_manager", -- 皮肤 SkinManager = "app/module/skin/skin_manager", + -- 英雄基金 + HeroFundManager = "app/module/activity/hero_fund/hero_fund_manager", } -- 这里的key对应func_open里的id diff --git a/lua/app/config/act_gift.lua b/lua/app/config/act_gift.lua index c8836073..1b5cb023 100644 --- a/lua/app/config/act_gift.lua +++ b/lua/app/config/act_gift.lua @@ -1568,6 +1568,16 @@ local act_gift = { ["cd"]=1, ["value"]=1000 }, + [140403]={ + ["type"]=14, + ["recharge_id"]=11, + ["limit"]=1 + }, + [140404]={ + ["type"]=14, + ["recharge_id"]=12, + ["limit"]=1 + }, [130002]={ ["type"]=13, ["recharge_id"]=11, @@ -1678,6 +1688,6 @@ local act_gift = { } } local config = { -data=act_gift,count=54 +data=act_gift,count=56 } return config \ No newline at end of file diff --git a/lua/app/config/activity_herofund.lua b/lua/app/config/activity_herofund.lua new file mode 100644 index 00000000..1bd3e595 --- /dev/null +++ b/lua/app/config/activity_herofund.lua @@ -0,0 +1,600 @@ +local activity_herofund = { + [1]={ + ["exp"]=30, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44003, + ["id_for_nothing"]="UgxcA2Y=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44003, + ["id_for_nothing"]="UgxcA2Y=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [2]={ + ["exp"]=60, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + }, + [3]={ + ["exp"]=90, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [4]={ + ["exp"]=120, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [5]={ + ["exp"]=150, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44003, + ["id_for_nothing"]="UgxcA2Y=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [6]={ + ["exp"]=180, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + }, + [7]={ + ["exp"]=210, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [8]={ + ["exp"]=240, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + [9]={ + ["exp"]=270, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [10]={ + ["exp"]=300, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=47, + ["id_for_nothing"]="Ug8=", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44003, + ["id_for_nothing"]="UgxcA2Y=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [11]={ + ["exp"]=330, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + [12]={ + ["exp"]=360, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + }, + [13]={ + ["exp"]=390, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [14]={ + ["exp"]=420, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [15]={ + ["exp"]=450, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=18, + ["id_for_nothing"]="VwA=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [16]={ + ["exp"]=480, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + }, + [17]={ + ["exp"]=510, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=9, + ["id_for_nothing"]="Xw==", + ["num"]=2, + ["num_for_nothing"]="VA==" + } + }, + [18]={ + ["exp"]=540, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + [19]={ + ["exp"]=570, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + [20]={ + ["exp"]=600, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=47, + ["id_for_nothing"]="Ug8=", + ["num"]=2, + ["num_for_nothing"]="VA==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=44003, + ["id_for_nothing"]="UgxcA2Y=", + ["num"]=3, + ["num_for_nothing"]="VQ==" + } + }, + [21]={ + ["exp"]=630, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + } + }, + [22]={ + ["exp"]=660, + ["reward"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1000, + ["num_for_nothing"]="VwhcAw==" + }, + ["reward_pro"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=1500, + ["num_for_nothing"]="Vw1cAw==" + }, + ["reward_pro_max"]={ + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=3000, + ["num_for_nothing"]="VQhcAw==" + } + } +} +local config = { +data=activity_herofund,count=22 +} +return config \ No newline at end of file diff --git a/lua/app/config/activity_herofund.lua.meta b/lua/app/config/activity_herofund.lua.meta new file mode 100644 index 00000000..8a555b65 --- /dev/null +++ b/lua/app/config/activity_herofund.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c683a9fc124b89c4a8e10278b027d723 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/config/arena_gift.lua b/lua/app/config/arena_gift.lua new file mode 100644 index 00000000..2aa1aa44 --- /dev/null +++ b/lua/app/config/arena_gift.lua @@ -0,0 +1,587 @@ +local arena_gift = { + [101]={ + ["score"]=950, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [102]={ + ["score"]=1000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=22, + ["id_for_nothing"]="VAo=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [103]={ + ["score"]=1050, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [104]={ + ["score"]=1100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + }, + ["unlock_hero"]={ + 54003 + } + }, + [105]={ + ["score"]=1150, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [106]={ + ["score"]=1200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + }, + ["unlock_hero"]={ + 34003 + } + }, + [107]={ + ["score"]=1250, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=22, + ["id_for_nothing"]="VAo=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [108]={ + ["score"]=1300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [109]={ + ["score"]=1350, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [110]={ + ["score"]=1400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + }, + ["unlock_hero"]={ + 24003 + } + }, + [111]={ + ["score"]=1450, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [112]={ + ["score"]=1500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [113]={ + ["score"]=1550, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [114]={ + ["score"]=1600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [115]={ + ["score"]=1650, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [116]={ + ["score"]=1700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=22, + ["id_for_nothing"]="VAo=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [117]={ + ["score"]=1750, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [118]={ + ["score"]=1800, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [119]={ + ["score"]=1850, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [120]={ + ["score"]=1900, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [121]={ + ["score"]=1950, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [122]={ + ["score"]=2000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [123]={ + ["score"]=2050, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [124]={ + ["score"]=2100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [125]={ + ["score"]=2150, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [126]={ + ["score"]=2200, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=22, + ["id_for_nothing"]="VAo=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [127]={ + ["score"]=2250, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [128]={ + ["score"]=2300, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [129]={ + ["score"]=2350, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [130]={ + ["score"]=2400, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=50, + ["num_for_nothing"]="Uwg=" + } + } + }, + [131]={ + ["score"]=2450, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [132]={ + ["score"]=2500, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [133]={ + ["score"]=2550, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [134]={ + ["score"]=2600, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [135]={ + ["score"]=2650, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=13, + ["id_for_nothing"]="Vws=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [136]={ + ["score"]=2700, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=22, + ["id_for_nothing"]="VAo=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [137]={ + ["score"]=2750, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=30, + ["num_for_nothing"]="VQg=" + } + } + }, + [138]={ + ["score"]=2800, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [139]={ + ["score"]=2850, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=10, + ["id_for_nothing"]="Vwg=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [140]={ + ["score"]=2900, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=11, + ["id_for_nothing"]="Vwk=", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [141]={ + ["score"]=2950, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [142]={ + ["score"]=3000, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=500, + ["num_for_nothing"]="Uwhc" + } + } + }, + [143]={ + ["score"]=3050, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + }, + [144]={ + ["score"]=3100, + ["reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=8, + ["id_for_nothing"]="Xg==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + } + } + } +} +local config = { +data=arena_gift,count=44 +} +return config \ No newline at end of file diff --git a/lua/app/config/arena_gift.lua.meta b/lua/app/config/arena_gift.lua.meta new file mode 100644 index 00000000..f68b73c7 --- /dev/null +++ b/lua/app/config/arena_gift.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 505a5ee453a5c8c4eb2542c5844eab6f +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/module/activity/hero_fund.meta b/lua/app/module/activity/hero_fund.meta new file mode 100644 index 00000000..8e37d3d1 --- /dev/null +++ b/lua/app/module/activity/hero_fund.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 182ed211dd57b7044ae0c6f66592ded7 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua b/lua/app/module/activity/hero_fund/hero_fund_manager.lua new file mode 100644 index 00000000..09917c12 --- /dev/null +++ b/lua/app/module/activity/hero_fund/hero_fund_manager.lua @@ -0,0 +1,44 @@ +local HeroFundManager = class("HeroFundManager", BaseModule) + +function HeroFundManager:showMainUI() + UIManager:showUI("") +end + +function HeroFundManager:reqHeroFundAward(level, rewardType) + -- 直接一键领取 + local curLevel = DataManager.HeroFundData:getWaveCount() + local heroIdWithLv = {} + for id = 1, curLevel do + if DataManager.HeroFundData:getFreeCanGet(id) then + table.insert(heroIdWithLv, {id = id, grade = 0}) + end + + if DataManager.HeroFundData:getProCanGet(id) then + table.insert(heroIdWithLv, {id = id, grade = 1}) + end + + if DataManager.HeroFundData:getUtralCanGet(id) then + table.insert(heroIdWithLv, {id = id, grade = 2}) + end + end + + if not heroIdWithLv[1] then + return + end + + local params = { + id_with_lv = heroIdWithLv + } + + self:sendMessage(ProtoMsgType.FromMsgEnum.HeroFundAwardReq, params, {}, self.rspHeroFundAward, BIReport.ITEM_GET_TYPE.ACT_HERO_FUND) +end + +function HeroFundManager:rspHeroFundAward(result) + if result.err_code == GConst.ERROR_STR.SUCCESS then + if result.reqData then + DataManager.HeroFundData:gotReward(result.reqData.id_with_lv) + end + end +end + +return HeroFundManager \ No newline at end of file diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta b/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta new file mode 100644 index 00000000..474cdb5d --- /dev/null +++ b/lua/app/module/activity/hero_fund/hero_fund_manager.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 171aacb33b4ccc4439c40b8db650c861 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/proto/proto_msg_type.lua b/lua/app/proto/proto_msg_type.lua index 16694bd4..1f1376e0 100644 --- a/lua/app/proto/proto_msg_type.lua +++ b/lua/app/proto/proto_msg_type.lua @@ -202,6 +202,8 @@ local ProtoMsgType = { [4152756314] = "PVPChallengeStartRsp", [4155165814] = "SummerTaskClaimReq", [4155167647] = "SummerTaskClaimRsp", + [4188104820] = "HeroFundAwardReq", + [4188106653] = "HeroFundAwardRsp", [4256333947] = "ExistReq", [4256335780] = "ExistRsp", }, @@ -408,6 +410,8 @@ local ProtoMsgType = { PVPChallengeStartRsp = 4152756314, SummerTaskClaimReq = 4155165814, SummerTaskClaimRsp = 4155167647, + HeroFundAwardReq = 4188104820, + HeroFundAwardRsp = 4188106653, ExistReq = 4256333947, ExistRsp = 4256335780, }, @@ -614,6 +618,8 @@ local ProtoMsgType = { PVPChallengeStartRsp = "PVPChallengeStartRsp", SummerTaskClaimReq = "SummerTaskClaimReq", SummerTaskClaimRsp = "SummerTaskClaimRsp", + HeroFundAwardReq = "HeroFundAwardReq", + HeroFundAwardRsp = "HeroFundAwardRsp", ExistReq = "ExistReq", ExistRsp = "ExistRsp", }, diff --git a/lua/app/ui/activity/hero_fund.meta b/lua/app/ui/activity/hero_fund.meta new file mode 100644 index 00000000..a69c4c11 --- /dev/null +++ b/lua/app/ui/activity/hero_fund.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bccad4c3ed05c9a4c92259b32009b0f1 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/ui/activity/hero_fund/cell.meta b/lua/app/ui/activity/hero_fund/cell.meta new file mode 100644 index 00000000..344f15fd --- /dev/null +++ b/lua/app/ui/activity/hero_fund/cell.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad4fd607b9b2d0b4ea51cd7a175ac2c0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua new file mode 100644 index 00000000..a031eccd --- /dev/null +++ b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua @@ -0,0 +1,70 @@ +local FundCell = class("FundCell", BaseCell) + +function FundCell:init() + local uiMap = self:getUIMap() + self.txLevel = uiMap["fund_cell.level.tx_level"] + self.rewardCell1 = uiMap["fund_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.rewardCell2 = uiMap["fund_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) + self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) +end + +function FundCell:refresh(level, data) + self.txLevel:setText(level) + + local isGet + + isGet = DataManager.HeroFundData:getFreeGot(level) + local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE) + if reward then + self.rewardCell1:refreshByConfig(reward, isGet, isGet) + end + self.rewardCell1:showLock(false) + if DataManager.HeroData:getFreeCanGet(level) then + self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) + self.rewardCell1:addClickListener(function() + self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE) + end) + else + self.rewardCell1.baseObject:removeRedPoint() + self.rewardCell1:addClickListener(nil) + end + + isGet = DataManager.HeroFundData:getProGot(level) + local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO) + if reward then + self.rewardCell2:refreshByConfig(reward, isGet, isGet) + end + self.rewardCell2:showLock(not DataManager.HeroFundData:getProBought()) + if DataManager.HeroData:getProCanGet(level) then + self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) + self.rewardCell2:addClickListener(function() + self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO) + end) + else + self.rewardCell2.baseObject:removeRedPoint() + self.rewardCell2:addClickListener(nil) + end + + isGet = DataManager.HeroFundData:getUtralGot(level) + local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL) + if reward then + self.rewardCell3:refreshByConfig(reward, isGet, isGet) + end + self.rewardCell3:showLock(not DataManager.HeroFundData:getUtralBought()) + if DataManager.HeroData:getUtralCanGet(level) then + self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) + self.rewardCell3:addClickListener(function() + self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL) + end) + else + self.rewardCell3.baseObject:removeRedPoint() + self.rewardCell3:addClickListener(nil) + end +end + +-- 领取奖励 +function FundCell:onClickReward(level, rewardType) + ModuleManager.HeroFundManager:getReward(level, rewardType) +end + +return FundCell \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta new file mode 100644 index 00000000..d5367fe9 --- /dev/null +++ b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1c7ef27b36c6ea042a002ca71d0b3bc3 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua new file mode 100644 index 00000000..b8ef8b7c --- /dev/null +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua @@ -0,0 +1,25 @@ +local HeroFundUI = class("HeroFundUI", BaseUI) + +"app/ui/activity/cell/activity_bounty_cell" + +function HeroFundUI:getPrefabPath() + return "" +end + +function HeroFundUI:onLoadRootComplete() + +end + +function HeroFundUI:_display() + +end + +function HeroFundUI:_addListeners() + +end + +function HeroFundUI:_bind() + +end + +return HeroFundUI \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta new file mode 100644 index 00000000..04df0cd8 --- /dev/null +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2a7c6809db6b28846acefe557b94944c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/hero_fund.meta b/lua/app/userdata/activity/hero_fund.meta new file mode 100644 index 00000000..4399e0f4 --- /dev/null +++ b/lua/app/userdata/activity/hero_fund.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c5f86b5807abb346a0327f5b30d1623 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua new file mode 100644 index 00000000..fd3baef9 --- /dev/null +++ b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua @@ -0,0 +1,258 @@ +local HeroFundData = class("HeroFundData", BaseData) + +HeroFundData.REWARD_TYPE = { + FREE = 1, + PRO = 2, + UTRAL = 3 +} + +function HeroFundData:ctor() + self:clear() +end + +function HeroFundData:clear() + self.data.isDirty = false + self.waveCount = 0 -- 波次 + self.waveLevel = 0 -- 波次等级 可领的最高等级 + self.freeLevel = 0 -- 免费领取过的等级 + self.proLevel = 0 -- 付费1领取过的等级 + self.utralLevel = 0 -- 付费2领取过的等级 + self.free_awarded = {} -- 领取过的免费id + self.pay_low_awarded = {} -- 领取过的付费1id + self.pay_high_awarded = {} -- 领取过的付费2id + self.proBounght = false -- 付费1已购买 + self.utralBounght = false -- 付费2已购买 + self.waveLevelList = {} -- 缓存波次等级 + self.waveLevelListCount = 0 -- 缓存最大等级 + self.endTime = 0 -- 活动结束时间 + + DataManager:unregisterCrossDayFunc("HeroFundData") + DataManager:unregisterTryOpenFunc("HeroFundData") +end + +function HeroFundData:init(data) + data = data or {} + + local cfg = self:getConfig() + self.waveLevelListCount = 0 + for id, info in ipairs(cfg) do + self.waveLevelList[id] = info.exp + self.waveLevelListCount = self.waveLevelListCount + 1 + end + + if self.endTime ~= 0 then -- 开过了 + return + end + + -- DataManager:registerTryOpenFunc("HeroFundData", function() + -- if self.openTs <= 0 then + -- if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then + -- self.openTs = Time:getBeginningOfServerToday() + -- self.endTime = self.openTs + self:getDurationTime() + -- self.actDay = 1 + -- DataManager:unregisterTryOpenFunc("HeroFundData") + -- end + -- end + -- end) + + -- DataManager:registerCrossDayFunc("HeroFundData", function() + -- if not ModuleManager:checkIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY) then + -- return + -- end + + -- self:setDirty() + -- end) +end + +function HeroFundData:getConfig() + return ConfigManager:getConfig("activity_herofund") +end + +function HeroFundData:setDirty() + self.data.isDirty = not self.data.isDirty +end + +function HeroFundData:getIsOpen() + if not ModuleManager:checkIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY) then + return false + end + + return self.endTime > Time:getServerTime() +end + +function HeroFundData:getRemainTime() + local remian = math.max(0, self.endTime - Time:getServerTime()) + return remian +end + +function HeroFundData:addWaveCount(count) + self.waveCount = self.waveCount + count + + local nextLevel = self.waveLevel + 1 + if self.waveLevelList[nextLevel] and self.waveCount >= self.waveLevelList[nextLevel] then -- 升级了 + for id = nextLevel, self.waveLevelListCount do + local wave = self.waveLevelList[id] + if wave and wave <= self.waveCount then + self.waveLevel = id + else + break + end + end + end + + self:setDirty() +end + +function HeroFundData:getWaveCount() + return self.waveCount +end + +function HeroFundData:getFreeGot(level) + return self.free_awarded[level] +end + +function HeroFundData:setFreeGot(level) + if not self.free_awarded[level] then + self.freeLevel = self.freeLevel + 1 + end + self.free_awarded[level] = true +end + +function HeroFundData:getProGot(level) + return self.pay_low_awarded[level] +end + +function HeroFundData:setProGot(level) + if not self.pay_low_awarded[level] then + self.proLevel = self.proLevel + 1 + end + self.pay_low_awarded[level] = true +end + +function HeroFundData:getProBought() + return self.proBounght +end + +function HeroFundData:setProBought() + self.proBounght = true + self:setDirty() +end + +function HeroFundData:getUtralGot(level) + return self.pay_high_awarded[level] +end + +function HeroFundData:setUtralGot(level) + if not self.pay_high_awarded[level] then + self.utralLevel = self.utralLevel + 1 + end + self.pay_high_awarded[level] = true +end + +function HeroFundData:getUtralBought() + return self.utralBounght +end + +function HeroFundData:setUtralBought() + self.utralBounght = true + self:setDirty() +end + +function HeroFundData:gotReward(heroIdWithLv) + if not heroIdWithLv then + return + end + + for _, info in ipairs(heroIdWithLv) do + if info.grade == 0 then + self:setFreeGot(info.id) + elseif info.grade == 1 then + self:setProGot(info.id) + elseif info.grade == 2 then + self:setUtralGot(info.id) + end + end + + self:setDirty() +end + +function HeroFundData:getFreeCanGet(level) + if self:getFreeGot(level) then + return false + end + + if self.waveLevel < level then + return false + end + + return true +end + +function HeroFundData:getProCanGet(level) + if self:getProGot(level) then + return false + end + + if not self.proBounght then + return false + end + + if self.waveLevel < level then + return false + end + + return true +end + +function HeroFundData:getUtralCanGet(level) + if self:getUtralGot(level) then + return false + end + + if not self.utralBounght then + return false + end + + if self.utralLevel < level then + return false + end + + return true +end + +function HeroFundData:getHaveReward() + if self.freeLevel < self.waveLevel then + return true + end + + if self.proBounght then + if self.proLevel < self.waveLevel then + return true + end + end + + if self.utralBounght then + if self.utralLevel < self.waveLevel then + return true + end + end + + return false +end + +function HeroFundData:getReward(level, rewardType) + local cfg = self:getConfig()[level] + if not cfg then + return + end + + if rewardType == HeroFundData.REWARD_TYPE.FREE then + return cfg.reward + elseif rewardType == HeroFundData.REWARD_TYPE.PRO then + return cfg.reward_pro + elseif rewardType == HeroFundData.REWARD_TYPE.UTRAL then + return cfg.reward_pro_max + end +end + +return HeroFundData \ No newline at end of file diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta new file mode 100644 index 00000000..e37873dc --- /dev/null +++ b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4ff7774557580a94bbc8207796f61ece +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} From 9fa692f53f0c850f1f275036f93a19f436dc7f7b Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 18 Aug 2023 09:50:44 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/activity/hero_fund/hero_fund_ui.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua index b8ef8b7c..074cdeaa 100644 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua @@ -1,13 +1,13 @@ local HeroFundUI = class("HeroFundUI", BaseUI) -"app/ui/activity/cell/activity_bounty_cell" +local FUND_CELL = "app/ui/activity/hero_fund/cell/fund_cell" function HeroFundUI:getPrefabPath() - return "" + return "assets/prefabs/ui/activity/hero_fund/activity_herofund_ui.prefab" end function HeroFundUI:onLoadRootComplete() - + end function HeroFundUI:_display() From d284ed0bc4bb04b95609a1972bc927288c882d62 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 18 Aug 2023 11:38:21 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/config/strings/cn/global.lua | 2 + .../activity/hero_fund/hero_fund_manager.lua | 6 +- .../ui/activity/hero_fund/hero_fund_ui.lua | 96 ++++++++++++++++++- .../activity/hero_fund/hero_fund_data.lua | 27 ++++++ 4 files changed, 128 insertions(+), 3 deletions(-) diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 7ed50c16..6d3878b6 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -449,6 +449,8 @@ local localization_global = ["ARENA_DESC_35"] = "可能出史诗哦~", ["ARENA_DESC_36"] = "试试手气", ["ONE_KEY_GET_DESC"] = "一键领取", + + ["ACTIVITY_OVER_EDSC"] = "活动已结束", } return localization_global \ No newline at end of file diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua b/lua/app/module/activity/hero_fund/hero_fund_manager.lua index 09917c12..1d8cc7f5 100644 --- a/lua/app/module/activity/hero_fund/hero_fund_manager.lua +++ b/lua/app/module/activity/hero_fund/hero_fund_manager.lua @@ -1,7 +1,7 @@ local HeroFundManager = class("HeroFundManager", BaseModule) function HeroFundManager:showMainUI() - UIManager:showUI("") + UIManager:showUI("app/ui/activity/hero_fund/hero_fund_ui") end function HeroFundManager:reqHeroFundAward(level, rewardType) @@ -41,4 +41,8 @@ function HeroFundManager:rspHeroFundAward(result) end end +function HeroFundManager:purcharse(id) + +end + return HeroFundManager \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua index 074cdeaa..e8f91390 100644 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua @@ -2,16 +2,37 @@ local HeroFundUI = class("HeroFundUI", BaseUI) local FUND_CELL = "app/ui/activity/hero_fund/cell/fund_cell" +local BTN_ICON = {"common_btn_green_3", "common_btn_dark_4"} + +function HeroFundUI:ctor() + self.rewardList = {} + for id, info in pairs(DataManager.HeroFundData:getConfig()) do + table.insert(self.rewardList, id) + end + table.sort(self.rewardList, function(a, b) + return a < b + end) +end + function HeroFundUI:getPrefabPath() return "assets/prefabs/ui/activity/hero_fund/activity_herofund_ui.prefab" end function HeroFundUI:onLoadRootComplete() - + self:_display() + + self:refreshTime() + if self.actCountdownSid then + self:unscheduleGlobal(self.actCountdownSid) + end + self.actCountdownSid = self:scheduleGlobal(function() + self:refreshTime() + end, 1) end function HeroFundUI:_display() - + self:refreshBtns() + self:_refreshScrollrect() end function HeroFundUI:_addListeners() @@ -19,7 +40,78 @@ function HeroFundUI:_addListeners() end function HeroFundUI:_bind() + self:bind(DataManager.HeroFundData, "isDirty", function() + self:_display() + end) +end +function HeroFundUI:refreshBtns() + local uiMap = self.root:genAllChildren() + uiMap["activity_herofund_ui.bg.title.free.tx_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE)) + + local probtn = uiMap["activity_herofund_ui.bg.title.buy1"] + local proBtntx = uiMap["activity_herofund_ui.bg.title.buy1.tx_buyed"] + + if DataManager.HeroFundData:getProBought() then + probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) + probtn:setTouchEnable(false) + proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + else + probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) + probtn:setTouchEnable(true) + probtn:addClickListener(function() + ModuleManager.HeroFundManager:purcharse(DataManager.HeroData:getProActId()) + end) + + proBtntx:setText(DataManager.HeroFundData:getProPrice()) + end + + local utralbtn = uiMap["activity_herofund_ui.bg.title.buy2"] + local utralBtntx = uiMap["activity_herofund_ui.bg.title.buy2.tx_buyed"] + + if DataManager.HeroFundData:getUtralBought() then + utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) + utralbtn:setTouchEnable(false) + utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + else + utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) + utralbtn:setTouchEnable(true) + utralbtn:addClickListener(function() + ModuleManager.HeroFundManager:purcharse(DataManager.HeroData:getUtralActId()) + end) + + utralBtntx:setText(DataManager.HeroFundData:gettUtralPrice()) + end +end + +function HeroFundUI:_refreshScrollrect() + if self.scrollRectComp then + self.scrollRectComp:updateAllCell() + return + end + + self.scrollRectComp = self.uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + self.scrollRectComp:addInitCallback(function() + return FUND_CELL + end) + self.scrollRectComp:addRefreshCallback(function(index, cell) + cell:refresh(self.rewardList[index]) + end) + self.scrollRectComp:clearCells() + self.scrollRectComp:setTotalCount(0) + self.scrollRectComp:refillCells(#self.rewardList) +end + +function HeroFundUI:refreshTime() + local uiMap = self.root:genAllChildren() + local remianTime = DataManager.HeroFundData:getRemainTime() + local str + if remianTime <= 0 then + str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) + else + str = Time:formatNumTime(remianTime) + end + uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str) end return HeroFundUI \ No newline at end of file diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua index fd3baef9..bbb65b08 100644 --- a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua +++ b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua @@ -1,5 +1,8 @@ local HeroFundData = class("HeroFundData", BaseData) +local PRO_ACT_ID = 140403 +local UTRAL_ACT_ID = 140404 + HeroFundData.REWARD_TYPE = { FREE = 1, PRO = 2, @@ -118,6 +121,18 @@ function HeroFundData:setFreeGot(level) self.free_awarded[level] = true end +function HeroFundData:getProActId() + return PRO_ACT_ID +end + +function HeroFundData:getProPrice() + local cfg = ConfigManager:getConfig("act_gift")[PRO_ACT_ID] + if not cfg then + return GConst.EMPTY_STRING + end + return GFunc.getFormatPrice(cfg.rechargeID) +end + function HeroFundData:getProGot(level) return self.pay_low_awarded[level] end @@ -138,6 +153,18 @@ function HeroFundData:setProBought() self:setDirty() end +function HeroFundData:getUtralActId() + return UTRAL_ACT_ID +end + +function HeroFundData:gettUtralPrice() + local cfg = ConfigManager:getConfig("act_gift")[UTRAL_ACT_ID] + if not cfg then + return GConst.EMPTY_STRING + end + return GFunc.getFormatPrice(cfg.rechargeID) +end + function HeroFundData:getUtralGot(level) return self.pay_high_awarded[level] end From b5fb7a7e28ec7b376a03b3662a5ef3eb14d8de72 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 18 Aug 2023 14:39:01 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/maincity/maincity_const.lua | 1 + .../ui/activity/hero_fund/cell/fund_cell.lua | 6 +-- .../ui/activity/hero_fund/hero_fund_ui.lua | 7 +-- .../cell/side_bar_hero_fund_cell.lua | 50 +++++++++++++++++++ .../cell/side_bar_hero_fund_cell.lua.meta | 10 ++++ .../activity/hero_fund/hero_fund_data.lua | 5 +- 6 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua create mode 100644 lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta diff --git a/lua/app/module/maincity/maincity_const.lua b/lua/app/module/maincity/maincity_const.lua index 714e3bb4..db1c2537 100644 --- a/lua/app/module/maincity/maincity_const.lua +++ b/lua/app/module/maincity/maincity_const.lua @@ -30,6 +30,7 @@ MainCityConst.MAIN_MODULE = { MainCityConst.LEFT_SIDE_BARS = { "app/ui/main_city/cell/side_bar_idle_cell", "app/ui/main_city/cell/side_bar_growth_fund_cell", + "app/ui/main_city/cell/side_bar_hero_fund_cell", "app/ui/main_city/cell/side_bar_seven_days_cell", "app/ui/main_city/cell/side_bar_activity_cell", -- gm放最后一个 diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua index a031eccd..dd82bac4 100644 --- a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua +++ b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua @@ -19,7 +19,7 @@ function FundCell:refresh(level, data) self.rewardCell1:refreshByConfig(reward, isGet, isGet) end self.rewardCell1:showLock(false) - if DataManager.HeroData:getFreeCanGet(level) then + if DataManager.HeroFundData:getFreeCanGet(level) then self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6) self.rewardCell1:addClickListener(function() self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE) @@ -35,7 +35,7 @@ function FundCell:refresh(level, data) self.rewardCell2:refreshByConfig(reward, isGet, isGet) end self.rewardCell2:showLock(not DataManager.HeroFundData:getProBought()) - if DataManager.HeroData:getProCanGet(level) then + if DataManager.HeroFundData:getProCanGet(level) then self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6) self.rewardCell2:addClickListener(function() self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO) @@ -51,7 +51,7 @@ function FundCell:refresh(level, data) self.rewardCell3:refreshByConfig(reward, isGet, isGet) end self.rewardCell3:showLock(not DataManager.HeroFundData:getUtralBought()) - if DataManager.HeroData:getUtralCanGet(level) then + if DataManager.HeroFundData:getUtralCanGet(level) then self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6) self.rewardCell3:addClickListener(function() self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL) diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua index e8f91390..ccaf27a3 100644 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua @@ -60,7 +60,7 @@ function HeroFundUI:refreshBtns() probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) probtn:setTouchEnable(true) probtn:addClickListener(function() - ModuleManager.HeroFundManager:purcharse(DataManager.HeroData:getProActId()) + ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getProActId()) end) proBtntx:setText(DataManager.HeroFundData:getProPrice()) @@ -77,7 +77,7 @@ function HeroFundUI:refreshBtns() utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) utralbtn:setTouchEnable(true) utralbtn:addClickListener(function() - ModuleManager.HeroFundManager:purcharse(DataManager.HeroData:getUtralActId()) + ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getUtralActId()) end) utralBtntx:setText(DataManager.HeroFundData:gettUtralPrice()) @@ -90,7 +90,8 @@ function HeroFundUI:_refreshScrollrect() return end - self.scrollRectComp = self.uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) + local uiMap = self.root:genAllChildren() + self.scrollRectComp = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) self.scrollRectComp:addInitCallback(function() return FUND_CELL end) diff --git a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua new file mode 100644 index 00000000..b1ef4967 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua @@ -0,0 +1,50 @@ +local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" +local SideBarHeroFundCell = class("SideBarHeroFundCell", SideBarBaseCellComp) + +function SideBarHeroFundCell:getModuleKey() + return ModuleManager.MODULE_KEY.SEVEN_DAY +end + +function SideBarHeroFundCell:getHasPurchase() + return false +end + +function SideBarHeroFundCell:getIsOpen() + return DataManager.HeroFundData:getIsOpen() +end + +function SideBarHeroFundCell:getSpineName() + return "ui_main_btn_sevenday" +end + +function SideBarHeroFundCell:onClick() + ModuleManager.HeroFundManager:showMainUI() +end + +function SideBarHeroFundCell:getIsShowRedPoint() + return DataManager.HeroFundData:getHaveReward() +end + +function SideBarHeroFundCell:onRefresh() + self.timeBg:setVisible(true) + self:_refreshTime() +end + +function SideBarHeroFundCell:updateTime() + if self:getIsOpen() then + self:_refreshTime() + else + self:closeBtn() + end +end + +function SideBarHeroFundCell:_refreshTime() + local remainTime = DataManager.HeroFundData:getRemainTime() + if remainTime >= 0 then + self.timeTx:setText(GFunc.getTimeStr(remainTime)) + else + self.timeTx:setText("00:00:00") + end +end + +return SideBarHeroFundCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta new file mode 100644 index 00000000..bf07cd80 --- /dev/null +++ b/lua/app/ui/main_city/cell/side_bar_hero_fund_cell.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 07f3f4c6518d616448dfb3093dbe841c +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua index bbb65b08..d96674c7 100644 --- a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua +++ b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua @@ -35,6 +35,7 @@ end function HeroFundData:init(data) data = data or {} + self.endTime = Time:getServerTime() + 2000 local cfg = self:getConfig() self.waveLevelListCount = 0 @@ -59,7 +60,7 @@ function HeroFundData:init(data) -- end) -- DataManager:registerCrossDayFunc("HeroFundData", function() - -- if not ModuleManager:checkIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY) then + -- if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then -- return -- end @@ -76,7 +77,7 @@ function HeroFundData:setDirty() end function HeroFundData:getIsOpen() - if not ModuleManager:checkIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY) then + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then return false end From c880279be1c9f7606a94a557d89e9e4450508434 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Fri, 18 Aug 2023 18:08:48 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/bi_report.lua | 1 + lua/app/common/data_manager.lua | 4 + lua/app/common/event_manager.lua | 1 + lua/app/common/pay_manager.lua | 3 + .../activity/hero_fund/hero_fund_manager.lua | 11 +- lua/app/proto/proto_msg_type.lua | 12 ++ .../ui/activity/hero_fund/cell/fund_cell.lua | 6 +- .../ui/activity/hero_fund/hero_fund_ui.lua | 58 ++++++-- lua/app/ui/main_city/main_city_ui.lua | 4 + .../activity/hero_fund/hero_fund_data.lua | 137 +++++++++++++++--- 10 files changed, 200 insertions(+), 37 deletions(-) diff --git a/lua/app/common/bi_report.lua b/lua/app/common/bi_report.lua index 11c8a3d7..07572b9a 100644 --- a/lua/app/common/bi_report.lua +++ b/lua/app/common/bi_report.lua @@ -208,6 +208,7 @@ BIReport.GIFT_TYPE = { WEAPON_GIFT = "WeaponGift", ARMOR_GIFT = "ArmorGift", ACT_SUMMER = "ActSummer", + ACT_HERO_FUND = "ActHeroFund" } BIReport.COIN_TYPE = { diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index 393701ee..a8e8c426 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -207,6 +207,10 @@ function DataManager:getIsInCreate24Hour() return passTime < 86400 end +function DataManager:getRegisterTs() + return self.registerTs or 0 +end + function DataManager:getIsTodayFirstLogin() return self.todayFirstLogin or false end diff --git a/lua/app/common/event_manager.lua b/lua/app/common/event_manager.lua index 65fee41a..00d54de2 100644 --- a/lua/app/common/event_manager.lua +++ b/lua/app/common/event_manager.lua @@ -60,6 +60,7 @@ EventManager.CUSTOM_EVENT = { -- BORAD_TOUCH_OVER = "BORAD_TOUCH_OVER" DUNGEON_ARMOR_TO_TARGET_ID = "DUNGEON_ARMOR_TO_TARGET_ID", ACTIVITY_SUMMER_END = "ACTIVITY_SUMMER_END", + MAIN_UI_CHECK_SIDE_BAR = "MAIN_UI_CHECK_SIDE_BAR", } -- 此方法不能直接在外部调用,请使用例如BaseUI,BaseModule等封装好的接口 diff --git a/lua/app/common/pay_manager.lua b/lua/app/common/pay_manager.lua index 76617cdb..2ce1013c 100644 --- a/lua/app/common/pay_manager.lua +++ b/lua/app/common/pay_manager.lua @@ -23,6 +23,7 @@ PayManager.PURCHARSE_ACT_TYPE = { WEAPON_GIFT = 11, ARMOR_GIFT = 12, ACT_SUMMER = 13, + ACT_HERO_FUND = 14, } PayManager.PURCHARSE_TYPE_CONFIG = { @@ -48,6 +49,7 @@ PayManager.BI_ITEM_GET_TYPE = { [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT, [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.ITEM_GET_TYPE.ACT_SUMMER, + [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND, }, [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.ITEM_GET_TYPE.GOLD_PIG, [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.ITEM_GET_TYPE.MALL_TREASURE, @@ -70,6 +72,7 @@ PayManager.BI_GIFT_TYPE = { [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.GIFT_TYPE.ACT_SUMMER, + [PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND, }, [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.GIFT_TYPE.GOLD_PIG, [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.GIFT_TYPE.MALL_TREASURE, diff --git a/lua/app/module/activity/hero_fund/hero_fund_manager.lua b/lua/app/module/activity/hero_fund/hero_fund_manager.lua index 1d8cc7f5..7729b60c 100644 --- a/lua/app/module/activity/hero_fund/hero_fund_manager.lua +++ b/lua/app/module/activity/hero_fund/hero_fund_manager.lua @@ -5,6 +5,10 @@ function HeroFundManager:showMainUI() end function HeroFundManager:reqHeroFundAward(level, rewardType) + if not DataManager.HeroFundData:getIsOpen() then + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)) + return + end -- 直接一键领取 local curLevel = DataManager.HeroFundData:getWaveCount() local heroIdWithLv = {} @@ -35,14 +39,13 @@ end function HeroFundManager:rspHeroFundAward(result) if result.err_code == GConst.ERROR_STR.SUCCESS then - if result.reqData then - DataManager.HeroFundData:gotReward(result.reqData.id_with_lv) - end + DataManager.HeroFundData:gotReward(result.id_with_lv) + GFunc.showRewardBox(result.rewards) end end function HeroFundManager:purcharse(id) - + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) end return HeroFundManager \ No newline at end of file diff --git a/lua/app/proto/proto_msg_type.lua b/lua/app/proto/proto_msg_type.lua index 1f1376e0..4d714615 100644 --- a/lua/app/proto/proto_msg_type.lua +++ b/lua/app/proto/proto_msg_type.lua @@ -22,6 +22,8 @@ local ProtoMsgType = { [349009610] = "TriggerGrowUpGiftNtf", [433807827] = "LevelUpReq", [433809660] = "LevelUpRsp", + [448795573] = "ChapterArmorChallengeHeroesReq", + [448797406] = "ChapterArmorChallengeHeroesRsp", [516281556] = "GuideFundMarkReq", [516283389] = "GuideFundMarkRsp", [531558517] = "PigPlayUpdateNtf", @@ -59,6 +61,8 @@ local ProtoMsgType = { [1435949623] = "AppStorePaidRsp", [1471116409] = "BindReq", [1471118242] = "BindRsp", + [1502684232] = "ChapterWeaponChallengeHeroesReq", + [1502686065] = "ChapterWeaponChallengeHeroesRsp", [1571167683] = "ChapterArmorChallengeFarmReq", [1571169516] = "ChapterArmorChallengeFarmRsp", [1571184475] = "ChapterShardsChallengeFarmReq", @@ -230,6 +234,8 @@ local ProtoMsgType = { TriggerGrowUpGiftNtf = 349009610, LevelUpReq = 433807827, LevelUpRsp = 433809660, + ChapterArmorChallengeHeroesReq = 448795573, + ChapterArmorChallengeHeroesRsp = 448797406, GuideFundMarkReq = 516281556, GuideFundMarkRsp = 516283389, PigPlayUpdateNtf = 531558517, @@ -267,6 +273,8 @@ local ProtoMsgType = { AppStorePaidRsp = 1435949623, BindReq = 1471116409, BindRsp = 1471118242, + ChapterWeaponChallengeHeroesReq = 1502684232, + ChapterWeaponChallengeHeroesRsp = 1502686065, ChapterArmorChallengeFarmReq = 1571167683, ChapterArmorChallengeFarmRsp = 1571169516, ChapterShardsChallengeFarmReq = 1571184475, @@ -438,6 +446,8 @@ local ProtoMsgType = { TriggerGrowUpGiftNtf = "TriggerGrowUpGiftNtf", LevelUpReq = "LevelUpReq", LevelUpRsp = "LevelUpRsp", + ChapterArmorChallengeHeroesReq = "ChapterArmorChallengeHeroesReq", + ChapterArmorChallengeHeroesRsp = "ChapterArmorChallengeHeroesRsp", GuideFundMarkReq = "GuideFundMarkReq", GuideFundMarkRsp = "GuideFundMarkRsp", PigPlayUpdateNtf = "PigPlayUpdateNtf", @@ -475,6 +485,8 @@ local ProtoMsgType = { AppStorePaidRsp = "AppStorePaidRsp", BindReq = "BindReq", BindRsp = "BindRsp", + ChapterWeaponChallengeHeroesReq = "ChapterWeaponChallengeHeroesReq", + ChapterWeaponChallengeHeroesRsp = "ChapterWeaponChallengeHeroesRsp", ChapterArmorChallengeFarmReq = "ChapterArmorChallengeFarmReq", ChapterArmorChallengeFarmRsp = "ChapterArmorChallengeFarmRsp", ChapterShardsChallengeFarmReq = "ChapterShardsChallengeFarmReq", diff --git a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua index dd82bac4..7e09fe44 100644 --- a/lua/app/ui/activity/hero_fund/cell/fund_cell.lua +++ b/lua/app/ui/activity/hero_fund/cell/fund_cell.lua @@ -8,8 +8,8 @@ function FundCell:init() self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL) end -function FundCell:refresh(level, data) - self.txLevel:setText(level) +function FundCell:refresh(level) + self.txLevel:setText(DataManager.HeroFundData:getLevelWave(level)) local isGet @@ -64,7 +64,7 @@ end -- 领取奖励 function FundCell:onClickReward(level, rewardType) - ModuleManager.HeroFundManager:getReward(level, rewardType) + ModuleManager.HeroFundManager:reqHeroFundAward(level, rewardType) end return FundCell \ No newline at end of file diff --git a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua index ccaf27a3..6fb45bdd 100644 --- a/lua/app/ui/activity/hero_fund/hero_fund_ui.lua +++ b/lua/app/ui/activity/hero_fund/hero_fund_ui.lua @@ -20,6 +20,8 @@ end function HeroFundUI:onLoadRootComplete() self:_display() + self:_addListeners() + self:_bind() self:refreshTime() if self.actCountdownSid then @@ -36,13 +38,20 @@ function HeroFundUI:_display() end function HeroFundUI:_addListeners() - + local uiMap = self.root:genAllChildren() + uiMap["activity_herofund_ui.bg.close_btn"]:addClickListener(function() + self:closeUI() + end) end function HeroFundUI:_bind() self:bind(DataManager.HeroFundData, "isDirty", function() self:_display() end) + + self:bind(DataManager.ShopData, "isDirty", function() + self:_display() + end) end function HeroFundUI:refreshBtns() @@ -51,56 +60,85 @@ function HeroFundUI:refreshBtns() local probtn = uiMap["activity_herofund_ui.bg.title.buy1"] local proBtntx = uiMap["activity_herofund_ui.bg.title.buy1.tx_buyed"] + local proBuy = uiMap["activity_herofund_ui.bg.title.buy1.tx_buy"] + proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + proBuy:setText(DataManager.HeroFundData:getProPrice()) if DataManager.HeroFundData:getProBought() then probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) probtn:setTouchEnable(false) - proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + proBtntx:setVisible(true) + proBuy:setVisible(false) else probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) probtn:setTouchEnable(true) probtn:addClickListener(function() ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getProActId()) end) - - proBtntx:setText(DataManager.HeroFundData:getProPrice()) + proBtntx:setVisible(false) + proBuy:setVisible(true) end local utralbtn = uiMap["activity_herofund_ui.bg.title.buy2"] local utralBtntx = uiMap["activity_herofund_ui.bg.title.buy2.tx_buyed"] + local utralBuy = uiMap["activity_herofund_ui.bg.title.buy2.tx_buy"] + utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + utralBuy:setText(DataManager.HeroFundData:getProPrice()) if DataManager.HeroFundData:getUtralBought() then utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2]) utralbtn:setTouchEnable(false) - utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE)) + utralBtntx:setVisible(true) + utralBuy:setVisible(false) else utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1]) utralbtn:setTouchEnable(true) utralbtn:addClickListener(function() ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getUtralActId()) end) - - utralBtntx:setText(DataManager.HeroFundData:gettUtralPrice()) + utralBtntx:setVisible(false) + utralBuy:setVisible(true) end end function HeroFundUI:_refreshScrollrect() + local uiMap = self.root:genAllChildren() + local mask = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.mask_img"] + local level = DataManager.HeroFundData:getWaveLevel() + local totalCount = #self.rewardList + local maskCount = math.max(0, totalCount - level) + mask:setAnchoredPositionY(-10 - level * 120) + mask:setSizeDeltaY(maskCount * 120 + 20) + local progSlider = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER) + local y = (totalCount - 1) * 120 + if (level - 1) >= 0 then + progSlider.value = (73 + ((level - 1) / (totalCount - 1)) * y) / (73 + y) + else + progSlider.value = 0 + end + mask:setVisible(level < totalCount) + if self.scrollRectComp then self.scrollRectComp:updateAllCell() return end - local uiMap = self.root:genAllChildren() + local prog = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog"] + prog:setSizeDeltaY(73 + y) self.scrollRectComp = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) self.scrollRectComp:addInitCallback(function() return FUND_CELL end) self.scrollRectComp:addRefreshCallback(function(index, cell) cell:refresh(self.rewardList[index]) + mask:getTransform():SetAsLastSibling() end) self.scrollRectComp:clearCells() self.scrollRectComp:setTotalCount(0) - self.scrollRectComp:refillCells(#self.rewardList) + if level < 1 then + level = 1 + end + self.scrollRectComp:refillCells(totalCount, nil, level) end function HeroFundUI:refreshTime() @@ -110,7 +148,7 @@ function HeroFundUI:refreshTime() if remianTime <= 0 then str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC) else - str = Time:formatNumTime(remianTime) + str = Time:formatNumTimeStr(remianTime) end uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str) end diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index f6f4320d..b9222d84 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -183,6 +183,10 @@ function MainCityUI:_addListeners() self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_COMP_MODULE, function(module) self:switchMainCompModule(module) end) + + self:addEventListener(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR, function(module) + self:checkSideBarOpenStatus() + end) DataManager.MailData:checkNewMail() end diff --git a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua index d96674c7..ecc21958 100644 --- a/lua/app/userdata/activity/hero_fund/hero_fund_data.lua +++ b/lua/app/userdata/activity/hero_fund/hero_fund_data.lua @@ -2,6 +2,7 @@ local HeroFundData = class("HeroFundData", BaseData) local PRO_ACT_ID = 140403 local UTRAL_ACT_ID = 140404 +local OPEN_AT_DAY = 7 HeroFundData.REWARD_TYPE = { FREE = 1, @@ -35,7 +36,31 @@ end function HeroFundData:init(data) data = data or {} - self.endTime = Time:getServerTime() + 2000 + self.waveCount = data.total_wave or 0 + self.endTime = 0 + if data.open_at and data.open_at > 0 then + self.endTime = GFunc.formatTimeStep(data.open_at) + (OPEN_AT_DAY + 1) * 86400 + end + + if data.funds then + if data.funds.free_awarded then + for _, id in ipairs(data.funds.free_awarded) do + self:setFreeGot(id) + end + end + + if data.funds.pay_low_awarded then + for _, id in ipairs(data.funds.pay_low_awarded) do + self:setProGot(id) + end + end + + if data.funds.pay_high_awarded then + for _, id in ipairs(data.funds.pay_high_awarded) do + self:setUtralGot(id) + end + end + end local cfg = self:getConfig() self.waveLevelListCount = 0 @@ -44,28 +69,61 @@ function HeroFundData:init(data) self.waveLevelListCount = self.waveLevelListCount + 1 end + for id = 1, self.waveLevelListCount do + local wave = self.waveLevelList[id] + if wave and wave <= self.waveCount then + self.waveLevel = id + else + break + end + end + + self.proBounght = false + self:getProBought() + + self.utralBounght = false + self:getUtralBought() + + self:initTaskListener() + if self.endTime ~= 0 then -- 开过了 return end - -- DataManager:registerTryOpenFunc("HeroFundData", function() - -- if self.openTs <= 0 then - -- if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - -- self.openTs = Time:getBeginningOfServerToday() - -- self.endTime = self.openTs + self:getDurationTime() - -- self.actDay = 1 - -- DataManager:unregisterTryOpenFunc("HeroFundData") - -- end - -- end - -- end) + DataManager:registerTryOpenFunc("HeroFundData", function() + if self.endTime ~= 0 then + return + end - -- DataManager:registerCrossDayFunc("HeroFundData", function() - -- if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then - -- return - -- end + if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then + local time = Time:getServerTime() + local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs()) + if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then + self.endTime = time + (OPEN_AT_DAY + 1) * 86400 + end + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) + self:setDirty() + DataManager:unregisterTryOpenFunc("HeroFundData") + end + end) - -- self:setDirty() - -- end) + DataManager:registerCrossDayFunc("HeroFundData", function() + if self.endTime ~= 0 then -- 开过了 + return + end + + if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then + return + end + + local time = Time:getServerTime() + local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs()) + if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then + self.endTime = time + (OPEN_AT_DAY + 1) * 86400 + end + EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR) + self:setDirty() + end) end function HeroFundData:getConfig() @@ -81,6 +139,10 @@ function HeroFundData:getIsOpen() return false end + if self.endTime <= 0 then + return false + end + return self.endTime > Time:getServerTime() end @@ -89,6 +151,14 @@ function HeroFundData:getRemainTime() return remian end +function HeroFundData:getWaveLevel() + return self.waveLevel or 0 +end + +function HeroFundData:getLevelWave(level) + return self.waveLevelList[level] or 0 +end + function HeroFundData:addWaveCount(count) self.waveCount = self.waveCount + count @@ -131,7 +201,7 @@ function HeroFundData:getProPrice() if not cfg then return GConst.EMPTY_STRING end - return GFunc.getFormatPrice(cfg.rechargeID) + return GFunc.getFormatPrice(cfg.recharge_id) end function HeroFundData:getProGot(level) @@ -146,6 +216,12 @@ function HeroFundData:setProGot(level) end function HeroFundData:getProBought() + if not self.proBounght then + if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, PRO_ACT_ID) > 0 then + self.proBounght = true + end + end + return self.proBounght end @@ -163,7 +239,7 @@ function HeroFundData:gettUtralPrice() if not cfg then return GConst.EMPTY_STRING end - return GFunc.getFormatPrice(cfg.rechargeID) + return GFunc.getFormatPrice(cfg.recharge_id) end function HeroFundData:getUtralGot(level) @@ -178,6 +254,11 @@ function HeroFundData:setUtralGot(level) end function HeroFundData:getUtralBought() + if not self.utralBounght then + if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, UTRAL_ACT_ID) > 0 then + self.utralBounght = true + end + end return self.utralBounght end @@ -241,7 +322,7 @@ function HeroFundData:getUtralCanGet(level) return false end - if self.utralLevel < level then + if self.waveLevel < level then return false end @@ -283,4 +364,20 @@ function HeroFundData:getReward(level, rewardType) end end +function HeroFundData:initTaskListener() + local nowTime = Time:getServerTime() + -- 活动结束就不用监听了 + if self.endTime > 0 and self.endTime < nowTime then + ModuleManager.TaskManager:unRegisterAllModuleTask("HeroFundData") + return false + end + + ModuleManager.TaskManager:registerTask("HeroFundData", GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, function(count) + if not self:getIsOpen() then + return + end + self:addWaveCount(count) + end) +end + return HeroFundData \ No newline at end of file