c1_lua/lua/app/module/talent/talent_manager.lua
2025-08-04 09:42:30 +08:00

68 lines
2.4 KiB
Lua

local TalentManager = class("TalentManager", BaseModule)
function TalentManager:showMainUI()
UIManager:showUI("app/ui/talent/talent_main_ui")
end
-- function TalentManager:claimReward(index, isPro)
-- local args = {
-- level = index,
-- is_pro = isPro,
-- }
-- self:sendMessage(ProtoMsgType.FromMsgEnum.BountyRewardReq, args, {}, self.onClaimReward, BIReport.ITEM_GET_TYPE.BOUNTY_REWARD)
-- end
-- function TalentManager:onClaimReward(result)
-- if result.err_code == GConst.ERROR_STR.SUCCESS then
-- if result.rewards then
-- -- 读表获取该层奖励 如果是箱子走单独奖励展示接口
-- local isOneKeyGet = false
-- local isSpecialBox = false
-- local index = result.reqData.level
-- local rewardId
-- if index == 0 then -- 一键领取
-- isOneKeyGet = true
-- else
-- local isPro = result.reqData.is_pro
-- local info = DataManager.BountyData:getSeasonInfoByLevel(index)
-- local rewardType
-- if info then
-- local reward = isPro and info.reward_pro or info.reward
-- rewardType = reward and reward.type
-- rewardId = reward and reward.id
-- if rewardType == GConst.REWARD_TYPE.ITEM then
-- local itemCfgInfo = ConfigManager:getConfig("item")[rewardId]
-- if itemCfgInfo and itemCfgInfo.type == GConst.ItemConst.ITEM_TYPE.BOX then
-- isSpecialBox = true
-- end
-- end
-- end
-- end
-- if isSpecialBox and not isOneKeyGet then
-- ModuleManager.ShopManager:showBoxOpenUI({type = GConst.ShopConst.BOX_REWARD_TYPE.BOUNTY, params = rewardId, rewards = result.rewards})
-- local openType = BIReport.BOX_OPEN_OPEN_TYPE.BOUNTY
-- BIReport:postBoxOpen(rewardId, BIReport.BOX_OPEN_BOX_TYPE.ACTIVITY, openType, 0, result.rewards)
-- else
-- GFunc.showRewardBox(result.rewards)
-- end
-- end
-- if result.reqData.is_pro ~= nil then
-- local BountyData = DataManager.BountyData
-- local index = result.reqData.level
-- if index ~= 0 then
-- if result.reqData.is_pro then
-- BountyData:onClaimProReward(result.reqData.level)
-- else
-- BountyData:onClaimReward(result.reqData.level)
-- end
-- else
-- BountyData:onOneKeyClaimReward()
-- end
-- BIReport:postBountyReward(BountyData:getBountyReportType(), BountyData:getLevel(), BountyData:getExp(), BountyData:getSeason(), result.reqData.level, result.reqData.is_pro)
-- end
-- end
-- end
return TalentManager