From 1bc3f1e9f22c9ac63c5c4405954acc549e97ab47 Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Mon, 29 Sep 2025 19:52:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../localization_global_const.lua | 1 + lua/app/config/strings/cn/global.lua | 1 + lua/app/module/fund_level.meta | 8 ++++ .../module/fund_level/fund_level_manager.lua | 48 +++++++++++++++++++ .../fund_level/fund_level_manager.lua.meta | 10 ++++ lua/app/proto/proto_msg_type.lua | 12 ++--- lua/app/ui/fund/fund_level_comp.lua | 2 +- 7 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 lua/app/module/fund_level.meta create mode 100644 lua/app/module/fund_level/fund_level_manager.lua create mode 100644 lua/app/module/fund_level/fund_level_manager.lua.meta diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index 13efb5a9..277b1f89 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -859,6 +859,7 @@ local LocalizationGlobalConst = ACT_HERO_SUIT_DESC_4 = "ACT_HERO_SUIT_DESC_4", ACT_HERO_SUIT_DESC_5 = "ACT_HERO_SUIT_DESC_5", ACT_HERO_SUIT_DESC_6 = "ACT_HERO_SUIT_DESC_6", + EQUIP_DESC_31 = "EQUIP_DESC_31", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index b8f7c24f..1d6af971 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -859,6 +859,7 @@ local localization_global = ["ACT_HERO_SUIT_DESC_4"] = "登陆", ["ACT_HERO_SUIT_DESC_5"] = "免费奖励", ["ACT_HERO_SUIT_DESC_6"] = "高级奖励", + ["EQUIP_DESC_31"] = "等级", } return localization_global \ No newline at end of file diff --git a/lua/app/module/fund_level.meta b/lua/app/module/fund_level.meta new file mode 100644 index 00000000..1dd23816 --- /dev/null +++ b/lua/app/module/fund_level.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2937649ae280744de962adb2bdc209ed +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/lua/app/module/fund_level/fund_level_manager.lua b/lua/app/module/fund_level/fund_level_manager.lua new file mode 100644 index 00000000..48e89e7c --- /dev/null +++ b/lua/app/module/fund_level/fund_level_manager.lua @@ -0,0 +1,48 @@ +local FundLevelManager = class("FundLevelManager", BaseModule) + +function FundLevelManager:getReward(stage) + if not DataManager.FundLevelData:canGetRewards(stage) then + return + end + self:sendMessage(ProtoMsgType.FromMsgEnum.LevelFundClaimedReq, {id = 0, grade = 0, stage = stage}, self.onGetReward, BIReport.ITEM_GET_TYPE.ACT_LEVEL_FUND_REWARD) +end + +function FundLevelManager:onGetReward(result) + if result.err_code ~= GConst.ERROR_STR.SUCCESS then + return + end + + local currStage = result.reqData.stage + local minId = DataManager.FundLevelData:getMinUnclaimedRewardIndex(currStage) + local maxId = DataManager.FundLevelData:getMaxUnclaimedRewardIndex(currStage) + minId = DataManager.FundLevelData:getConfigIdByIndex(currStage, minId) + maxId = DataManager.FundLevelData:getConfigIdByIndex(currStage, maxId) + local cur = DataManager.FundLevelData:getMaxUnclaimedId() + GFunc.showRewardBox(result.rewards) + DataManager.FundLevelData:initData(result.info) + BIReport:postGrowFund(currStage, minId, maxId, cur, result.rewards) +end + +function FundLevelManager:onBuyLevelGift(id) + PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT) +end + +--region 上报 +local EVENT_GROW_FUND = "client_grow_fund" -- 成长基金 + +BIReport.ITEM_GET_TYPE.ACT_LEVEL_FUND_REWARD = "act_level_fund_reward" + +function BIReport:postGrowFund(stage, minId, maxId, curLv, rewards) + local args = { + opt_type = "Reward", + fund_stage = stage, + min_id = minId, + max_id = maxId, + cur_lv = curLv, + reward_str = rewards and GFunc.getRewardsStr(rewards) or nil, + } + self:report(EVENT_GROW_FUND, args) +end +--endregion + +return FundLevelManager \ No newline at end of file diff --git a/lua/app/module/fund_level/fund_level_manager.lua.meta b/lua/app/module/fund_level/fund_level_manager.lua.meta new file mode 100644 index 00000000..1feee56b --- /dev/null +++ b/lua/app/module/fund_level/fund_level_manager.lua.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 4af6ab743dc85e74e9fcaeedec38b94c +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 7a155c5e..b5417920 100644 --- a/lua/app/proto/proto_msg_type.lua +++ b/lua/app/proto/proto_msg_type.lua @@ -127,6 +127,8 @@ local ProtoMsgType = { [2706989220] = "TriggerGrowUpGift2Ntf", [2708281176] = "PVPChallengeSettlementReq", [2708283009] = "PVPChallengeSettlementRsp", + [2729912836] = "LevelFundClaimedReq", + [2729914669] = "LevelFundClaimedRsp", [2731281392] = "MailExtractReq", [2731283225] = "MailExtractRsp", [2772586812] = "DebugPowerReq", @@ -197,8 +199,6 @@ local ProtoMsgType = { [3796804170] = "ChapterFundClaimedRsp", [3805364358] = "EquipUpgradeReq", [3805366191] = "EquipUpgradeRsp", - [3851279152] = "FundClaimedReq", - [3851280985] = "FundClaimedRsp", [3851969243] = "HeroChangeSkinReq", [3851971076] = "HeroChangeSkinRsp", [3904148760] = "GMReq", @@ -352,6 +352,8 @@ local ProtoMsgType = { TriggerGrowUpGift2Ntf = 2706989220, PVPChallengeSettlementReq = 2708281176, PVPChallengeSettlementRsp = 2708283009, + LevelFundClaimedReq = 2729912836, + LevelFundClaimedRsp = 2729914669, MailExtractReq = 2731281392, MailExtractRsp = 2731283225, DebugPowerReq = 2772586812, @@ -422,8 +424,6 @@ local ProtoMsgType = { ChapterFundClaimedRsp = 3796804170, EquipUpgradeReq = 3805364358, EquipUpgradeRsp = 3805366191, - FundClaimedReq = 3851279152, - FundClaimedRsp = 3851280985, HeroChangeSkinReq = 3851969243, HeroChangeSkinRsp = 3851971076, GMReq = 3904148760, @@ -577,6 +577,8 @@ local ProtoMsgType = { TriggerGrowUpGift2Ntf = "TriggerGrowUpGift2Ntf", PVPChallengeSettlementReq = "PVPChallengeSettlementReq", PVPChallengeSettlementRsp = "PVPChallengeSettlementRsp", + LevelFundClaimedReq = "LevelFundClaimedReq", + LevelFundClaimedRsp = "LevelFundClaimedRsp", MailExtractReq = "MailExtractReq", MailExtractRsp = "MailExtractRsp", DebugPowerReq = "DebugPowerReq", @@ -647,8 +649,6 @@ local ProtoMsgType = { ChapterFundClaimedRsp = "ChapterFundClaimedRsp", EquipUpgradeReq = "EquipUpgradeReq", EquipUpgradeRsp = "EquipUpgradeRsp", - FundClaimedReq = "FundClaimedReq", - FundClaimedRsp = "FundClaimedRsp", HeroChangeSkinReq = "HeroChangeSkinReq", HeroChangeSkinRsp = "HeroChangeSkinRsp", GMReq = "GMReq", diff --git a/lua/app/ui/fund/fund_level_comp.lua b/lua/app/ui/fund/fund_level_comp.lua index 0bfed18f..da4ac077 100755 --- a/lua/app/ui/fund/fund_level_comp.lua +++ b/lua/app/ui/fund/fund_level_comp.lua @@ -42,7 +42,7 @@ function FundLevelComp:init() self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_4)) self.txDesc2:setText(I18N:getGlobalText(I18N.GlobalConst.FORCE_DESC_29)) - self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_5)) + self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_31)) self.txCommon:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_5)) self.txPro:setText(I18N:getGlobalText(I18N.GlobalConst.FUND_DESC_6)) self.txGet:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM_ALL))