diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index a9da239ca7..3a3e5a0342 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -7,6 +7,7 @@ -- 启用功能引导 ENABLE_FUNC_GUIDE = 1 --0关闭1开启 +RECHARGEABLE = true --false不可充值 true可充值 -- 引导类型 GuideType = { Force = 1,--强制 diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua index c386e1cdc3..084952fee9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua @@ -41,6 +41,7 @@ function ExpeditionMainPanel:InitComponent() self.Btn2 = Util.GetGameObject(self.parent, "lowGO/Btn2") self.Btn3 = Util.GetGameObject(self.parent, "lowGO/Btn3") self.Btn4 = Util.GetGameObject(self.parent, "upLeftGo/Btn4") + self.Btn4Image = Util.GetGameObject(self.parent, "upLeftGo/Image") self.Btn5 = Util.GetGameObject(self.parent, "lowGO/Btn5") self.helpBtn = Util.GetGameObject(self.parent, "upLeftGo/helpBtn") self.redPoint = Util.GetGameObject(self.parent, "upLeftGo/Btn4/redPoint") @@ -58,8 +59,6 @@ function ExpeditionMainPanel:InitComponent() end nodeItemGrid[i] = nodeGridItemsGri end - --self.mask = Util.GetGameObject(self.parent, "mask") - --self.mask:SetActive(false) npc = NameManager.roleSex == ROLE_SEX.BOY and "live2d_npc_map" or "live2d_npc_map_nv" local scale = NameManager.roleSex == ROLE_SEX.BOY and Vector3.one*0.2 or Vector3.one * 0.12 self.liveNode = poolManager:LoadLive(npc, Util.GetTransform(self.parent, "playerLive"), scale, Vector3.zero) @@ -234,15 +233,11 @@ function ExpeditionMainPanel:OnShowNodeData(isMoveGrid) self.grid:GetComponent("RectTransform").anchoredPosition = Vector3.New(0,y,0) end end - --self.ScrollView:SetData(curAllLayNodeList, function (index, go) - -- self:SingleLayNodeShow(go,curAllLayNodeList[index],(#AllLayNodeList - index) + 1) - --end) - --LogError("#AllLayNodeList - GetCurNodeInfo.lay "..#AllLayNodeList - GetCurNodeInfo.lay) - --local curIndex = #AllLayNodeList - GetCurNodeInfo.lay - --if curIndex == 0 then - -- curIndex = curIndex + 1 - --end - --self.ScrollView:SetIndex(curIndex) + + if not RECHARGEABLE then--(是否开启充值) + self.Btn4:SetActive(false) + self.Btn4Image:SetActive(false) + end end --实例化每层信息 @@ -551,13 +546,6 @@ end --界面销毁时调用(用于子类重写) function ExpeditionMainPanel:OnDestroy() - --if live2dList and #live2dList > 0 then - -- for i = 1, #live2dList do - -- poolManager:UnLoadLive(live2dList[i][1], live2dList[i][2], PoolManager.AssetType.GameObject) - -- live2dList[i] = nil - -- end - --end - --live2dList = {} if self.liveNode then poolManager:UnLoadLive(npc, self.liveNode, PoolManager.AssetType.GameObject) self.liveNode = nil @@ -575,12 +563,6 @@ function ExpeditionMainPanel:InitLiveSet(iconId, go) local configData = ConfigManager.GetConfigData(ConfigName.ExpeditionNodeConfig,iconId) local live2d = poolManager:LoadLive(configData.Icon, Util.GetTransform(go, "goParent"), Vector3.one * configData.Scale, Vector3.New(configData.Position[1], configData.Position[2],0)) - --local curLive = {configData.Icon,live2d} - --table.insert(live2dList,curLive) - --local skeleton = live2d:GetComponent("SkeletonGraphic") - --if skeleton and iconId == 2 then--首领 - -- skeleton.AnimationState:SetAnimation(0, "idle2", true) - --end return {name=configData.Icon, go=live2d} end -- 设置文本透明度 @@ -597,10 +579,8 @@ end function ExpeditionMainPanel:SingleNodeInfoIconShow(nodeGo,layNodeData) local infoIcon = Util.GetGameObject(nodeGo, "infoIcon") local warPowerGo = Util.GetGameObject(infoIcon, "warPowerGo") - --local iconImage = Util.GetGameObject(warPowerGo, "iconImage"):GetComponent("Image") local powerText = Util.GetGameObject(warPowerGo, "powerText"):GetComponent("Text") local textIconGo = Util.GetGameObject(infoIcon, "textIconGo") - --local iconImage2 = Util.GetGameObject(textIconGo, "iconImage"):GetComponent("Image") infoIcon :SetActive(false) warPowerGo:SetActive(false) textIconGo:SetActive(false) @@ -614,21 +594,7 @@ function ExpeditionMainPanel:SingleNodeInfoIconShow(nodeGo,layNodeData) warPowerGo:SetActive(true) powerText.text = layNodeData.bossTeaminfo.totalForce end - --if GetCurNodeInfo.lay == layNodeData.lay then--当前层 - -- if layNodeData.type == ExpeditionNodeType.Jy or layNodeData.type == ExpeditionNodeType.Boss or layNodeData.type == ExpeditionNodeType.Common then - -- warPowerGo:SetActive(false) - -- --iconImage.sprite = Util.LoadSprite(ExpeditionManager.NodeInfoIcon[layNodeData.type]) - -- powerText.text = layNodeData.bossTeaminfo.totalForce - -- elseif layNodeData.type == ExpeditionNodeType.Resurgence or layNodeData.type == ExpeditionNodeType.Reply or layNodeData.type == ExpeditionNodeType.Halidom then - -- --iconImage2.sprite = Util.LoadSprite(ExpeditionManager.NodeInfoIcon[layNodeData .type]) - -- end - -- if isAllHaveAttack then - -- if layNodeData.state == ExpeditionNodeState.No then--关闭 状态 - -- elseif layNodeData.state == ExpeditionNodeState.NoGetEquip then--未领圣物状态 - -- --iconImage2.sprite = Util.LoadSprite(ExpeditionManager.NodeInfoIcon[ExpeditionNodeType.Halidom]) - -- end - -- end - --end + end function ExpeditionMainPanel:PlayerMoveFun() @@ -651,7 +617,6 @@ function ExpeditionMainPanel:PlayerMoveFun() end):OnComplete(function () --Log("行走完毕") SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) - --self.mask:SetActive(isPlayerMove) --隐藏该层级所有形象 --播放下落动画 for i = 1, #targetPosGoAndData.layAllData do diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FastExploreInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FastExploreInfoPopup.lua index 186b2e1bd0..ff3e5302a6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FastExploreInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FastExploreInfoPopup.lua @@ -109,6 +109,9 @@ end function this:OnShow() this.RefreshItemNum() + if not RECHARGEABLE then--(是否开启充值) + this.privilege:SetActive(false) + end end -- diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua index 5f540adfb6..58db12d5b3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/GuildMainCityPanel.lua @@ -81,7 +81,6 @@ local _StageNameIcon = { [GUILD_FIGHT_STAGE.EMPTEY] = {"r_gonghui_bencilunkong"}, } - --初始化组件(用于子类重写) function GuildMainCityPanel:InitComponent() this.btnBack = Util.GetGameObject(self.transform, "btnBack") @@ -95,8 +94,6 @@ function GuildMainCityPanel:InitComponent() this.enemyGuild = Util.GetGameObject(this.stageView, "stage/enemy") this.myStar = Util.GetGameObject(this.stageView, "stage/my/starNum"):GetComponent("Text") this.enemyStar = Util.GetGameObject(this.stageView, "stage/enemy/starNum"):GetComponent("Text") - - this.rightBox = Util.GetGameObject(self.transform, "layout/panel2/btnbox") this.btnOneKeyDefend = Util.GetGameObject(this.rightBox, "oneKeyDefend") this.btnCheckDefend = Util.GetGameObject(this.rightBox, "checkDefend") @@ -106,11 +103,6 @@ function GuildMainCityPanel:InitComponent() this.btnResult = Util.GetGameObject(this.rightBox, "result") this.btnRedPacket=Util.GetGameObject(this.rightBox,"redPacket") this.btnRedPacketRedPoint=Util.GetGameObject(this.btnRedPacket,"redPoint") - -- this.leftBox = Util.GetGameObject(self.transform, "layout/panel2/leftBox") - -- this.btnBoss = Util.GetGameObject(this.leftBox, "boss/boss") - -- this.rpBoss = Util.GetGameObject(this.leftBox, "boss/boss/redpot") - - -- 嚣张的头像 this.level = Util.GetGameObject(self.gameObject, "LeftUp/headBox/lvFrame/lv"):GetComponent("Text") this.playName = Util.GetGameObject(self.gameObject, "LeftUp/headBox/name"):GetComponent("Text") @@ -124,16 +116,10 @@ function GuildMainCityPanel:InitComponent() this.vipLevelText = Util.GetGameObject(this.vipPrivilegeBtn, "bg/vip"):GetComponent("Image") this.vipRedPoint = Util.GetGameObject(self.gameObject, "LeftUp/vipPrivilege/redPoint") screenAdapte(this.vipPrivilegeBtn) - - - -- 聊天 this.ChatTipView = SubUIManager.Open(SubUIConfig.ChatTipView, self.transform, 2) this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft }) this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.gameObject.transform) - - -- ctrlView.InitComponent(self.gameObject) - for type, data in pairs(_GuildBuildConfig) do if data.btnName then local btn = Util.GetGameObject(self.gameObject, "Bg/"..data.btnName) @@ -304,6 +290,11 @@ function GuildMainCityPanel:OnShow() end this.FreshPlayerInfo() this.SetPlayerHead() + + if not RECHARGEABLE then--(是否开启充值) + this.btnRedPacket:SetActive(false) + end + end @@ -363,9 +354,6 @@ function this.RefreshStageShow() this.stageName.sprite = Util.LoadSprite(_StageNameIcon[curStage][2]) end elseif curStage == GUILD_FIGHT_STAGE.EMPTEY then - -- elseif curStage == GUILD_FIGHT_STAGE.DISSMISS - -- or curStage == GUILD_FIGHT_STAGE.CLOSE then - -- this.stageView:SetActive(false) end -- 刷新展示信息 @@ -411,7 +399,6 @@ function this.GuildBaseInfoAdapter(node, data) nameText.text = "..." logoSpr.sprite = Util.LoadSprite("r_gonghui_pipeiwenhao") end - -- logoSpr:SetNativeSize() end -- 刷新获取星数的显示 @@ -548,18 +535,12 @@ function this.RefreshDeathPos() LogBlue(tostring(Language[10931]..msg.status)) DeathPosManager.status=msg.status CheckRedPointStatus(RedPointType.Guild_DeathPos)--阶段切换时 检测红点 - -- ctrlView.SetBuildFlagShow(GUILD_MAP_BUILD_TYPE.TENPOS,msg.status~=DeathPosStatus.Close) end) end --界面关闭时调用(用于子类重写) function GuildMainCityPanel:OnClose() - Log(Language[10932]) - -- ctrlView.Dispose() - -- _IsMapView = false - -- _IsWalkData = false - -- _BGMFlag = nil -- 计时器关闭 if this._TimeCounter then @@ -576,7 +557,6 @@ function GuildMainCityPanel:OnDestroy() SubUIManager.Close(this.UpView) SubUIManager.Close(this.BtView) -- 移除红点 - -- ClearRedPointObject(RedPointType.Guild_Boss) for type, data in pairs(_GuildBuildConfig) do if data.btnName then local btn = Util.GetGameObject(self.gameObject, "Bg/"..data.btnName) diff --git a/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua b/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua index 90d6b53abd..66c984806f 100644 --- a/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua @@ -255,7 +255,6 @@ function this.SwitchTreasureType(treasureType) this.SetItemViewGray(LuckyTurnTableManager.luckyData) end) end) - -- this.SetItemViewGray(LuckyTurnTableManager.luckyData) --立即刷新一次转盘记录 if (LuckyTurnTableManager.isCanGetWorldMessage) then LuckyTurnTableManager.TimeUpdate() @@ -396,11 +395,15 @@ function this.SwitchTreasureType(treasureType) this.RrFreshInfo() end) else - if LuckyTurnTableManager.advanceTimes + 1 > maxTimesCount then - PopupTipPanel.ShowTip("不可超出最大探宝次数!") - return + if not RECHARGEABLE then--(是否开启充值) + PopupTipPanel.ShowTip(Language[12262]) else - UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil) + if LuckyTurnTableManager.advanceTimes + 1 > maxTimesCount then + PopupTipPanel.ShowTip("不可超出最大探宝次数!") + return + else + UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil) + end end end end) @@ -417,11 +420,15 @@ function this.SwitchTreasureType(treasureType) this.RrFreshInfo() end) else - if LuckyTurnTableManager.advanceTimes + 10 > maxTimesCount then - PopupTipPanel.ShowTip("不可超出最大探宝次数!") - return + if not RECHARGEABLE then--(是否开启充值) + PopupTipPanel.ShowTip(Language[12262]) else - UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil) + if LuckyTurnTableManager.advanceTimes + 10 > maxTimesCount then + PopupTipPanel.ShowTip("不可超出最大探宝次数!") + return + else + UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil) + end end end end) @@ -450,7 +457,6 @@ function this.SwitchTreasureType(treasureType) end) else PopupTipPanel.ShowTip(Language[11139]) - --UIManager.OpenPanel(UIName.ShopExchangePopup, SHOP_TYPE.FUNCTION_SHOP, 10013, Language[10646]) end end end) diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingPanel.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingPanel.lua index 5c6e3d9fbe..4a52e38461 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingPanel.lua @@ -237,6 +237,14 @@ function OperatingPanel:RefreshTabStatus() end + if not RECHARGEABLE then--(是否开启充值) + self.operateTabs[1]:SetActive(false) + self.operateTabs[2]:SetActive(false) + self.operateTabs[9]:SetActive(false) + self.operateTabs[3]:SetActive(false) + self.operateTabs[7]:SetActive(false)--, SALARY_TYPE.BASE_128 + self.operateTabs[8]:SetActive(false)--, SALARY_TYPE.BASE_328 + end end function OperatingPanel:GetPriorityIndex() diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 9c267ca01f..e4b3655f55 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -86,10 +86,7 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.LuckyCat_GetReward, RedPointType.LuckyCat) -- 充值 - RPData:SetParent(RedPointType.Shop_Page_Recharge, RedPointType.Recharge) RPData:SetParent(RedPointType.VIP_SHOP_DETAIL, RedPointType.Shop_Page_Recharge) - RPData:SetParent(RedPointType.DailyGift, RedPointType.Recharge) - RPData:SetParent(RedPointType.GrowthPackage, RedPointType.Recharge)--成长礼包 -- 主界面商店 RPData:SetParent(RedPointType.Shop_Page_General, RedPointType.Shop) RPData:SetParent(RedPointType.Shop_Page_Coin, RedPointType.Shop) @@ -132,15 +129,6 @@ function this.InitRedPointAllRelate() -- 外敌 RPData:SetParent(RedPointType.SecretTer_Boss, RedPointType.Alien) RPData:SetParent(RedPointType.SecretTer_CallAlianInvasionTime, RedPointType.Alien) - -- --剧情副本 - -- RPData:SetParent(RedPointType.NormalExplore_OpenMap, RedPointType.OrdinaryExplore) - -- RPData:SetParent(RedPointType.NormalExplore_GetStarReward, RedPointType.OrdinaryExplore) - -- --试炼副本 - -- RPData:SetParent(RedPointType.EpicExplore_OpenCarbon, RedPointType.EpicExplore) - -- RPData:SetParent(RedPointType.EpicExplore_GetReward, RedPointType.EpicExplore) - -- --精英副本 - -- RPData:SetParent(RedPointType.HeroExplore_OpenMap, RedPointType.HeroExplore) - -- RPData:SetParent(RedPointType.HeroExplore_Feats, RedPointType.HeroExplore) --秘盒红点 RPData:SetParent(RedPointType.SecretBox_Red1, RedPointType.SecretBox) --角色招募红点 @@ -151,8 +139,7 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.GrowthGift, RedPointType.Operating) RPData:SetParent(RedPointType.CumulativeSignIn, RedPointType.Operating) RPData:SetParent(RedPointType.GiftPage, RedPointType.Operating) - RPData:SetParent(RedPointType.MonthCard, RedPointType.Operating) - + --乾坤包囊、限时召唤 RPData:SetParent(RedPointType.TimeLimited, RedPointType.DynamicActivity) RPData:SetParent(RedPointType.QianKunBox, RedPointType.DynamicActivity) @@ -214,6 +201,14 @@ function this.InitRedPointAllRelate() RPData:SetParent(RedPointType.Achievement_Main, RedPointType.DailyTaskMain) --大闹天宫 天宫秘宝 RPData:SetParent(RedPointType.Expedition_Treasure, RedPointType.Expedition) + + --若充值未开启就直接取消红点就ok了 + if RECHARGEABLE then--(是否开启充值) + RPData:SetParent(RedPointType.MonthCard, RedPointType.Operating) + RPData:SetParent(RedPointType.Shop_Page_Recharge, RedPointType.Recharge) + RPData:SetParent(RedPointType.DailyGift, RedPointType.Recharge) + RPData:SetParent(RedPointType.GrowthPackage, RedPointType.Recharge)--成长礼包 + end end -- 注册红点检测方法 @@ -269,15 +264,6 @@ function this.RegisterRedCheckFunc() RPData:AddCheckFunc(RedPointType.SecretTer_IsCanFight, FightPointPassManager.IsShowFightRP) -- 外敌 RPData:AddCheckFunc(RedPointType.SecretTer_CallAlianInvasionTime, AdventureManager.HaveCallAlianInvasionTime,FUNCTION_OPEN_TYPE.FIGHT_ALIEN) - -- --普通副本 - -- RPData:AddCheckFunc(RedPointType.NormalExplore_OpenMap, CarbonManager.CarbonRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON) - -- RPData:AddCheckFunc(RedPointType.NormalExplore_GetStarReward, CarbonManager.CarbonGetRewardRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON) - -- --试炼副本 - -- RPData:AddCheckFunc(RedPointType.EpicExplore_OpenCarbon, CarbonManager.CarbonTrialOpen,FUNCTION_OPEN_TYPE.NORMALCARBON) - -- RPData:AddCheckFunc(RedPointType.EpicExplore_GetReward, CarbonManager.CheckTrialRedPoint,FUNCTION_OPEN_TYPE.NORMALCARBON) - -- --精英本 - -- RPData:AddCheckFunc(RedPointType.HeroExplore_OpenMap, CarbonManager.CarbonHeroRedShow,FUNCTION_OPEN_TYPE.NORMALCARBON) - -- RPData:AddCheckFunc(RedPointType.HeroExplore_Feats, CarbonManager.CheckHeroRedPoint,FUNCTION_OPEN_TYPE.NORMALCARBON) --秘盒红点 RPData:AddCheckFunc(RedPointType.SecretBox_Red1, SecretBoxManager.CheckSecretRedPoint,FUNCTION_OPEN_TYPE.SECRETBOX) --角色招募红点 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index 829227703b..661a2686de 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -203,10 +203,18 @@ function RewardItemSingleShowPopup:OnShow() end for i = 1, #jumpSortData do if jumpSortData[i].id > 0 then - if this.isRewardItemPop == true then - SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,false) + if not RECHARGEABLE then--(是否开启充值) + if this.isRewardItemPop == true or itemConfigData.Id == 61 or itemConfigData.Id == 19 then + SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,false) + else + SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,true) + end else - SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,true) + if this.isRewardItemPop == true then + SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,false) + else + SubUIManager.Open(SubUIConfig.JumpView, this.equipProGrid.transform, jumpSortData[i].id,true) + end end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Recharge/MainRechargePanel.lua b/Assets/ManagedResources/~Lua/Modules/Recharge/MainRechargePanel.lua index 01ab5f2234..67622cd378 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recharge/MainRechargePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recharge/MainRechargePanel.lua @@ -8,7 +8,8 @@ local this = MainShopPanel local oldAccumRecharge = 0 -- Tab管理器 local TabBox = require("Modules/Common/TabBox") -local _PageInfo = { +local _PageInfo = {} +local _PageInfoCanRecharge={ [1] = { -- 充值 default = "r_shop_chongzhi_01", lock = "r_shop_chongzhi_01", select = "r_shop_chongzhi_02", rpType = RedPointType.Shop_Page_Recharge, @@ -29,6 +30,12 @@ local _PageInfo = { params = {SHOP_TYPE.VIP_GIFT},-- 成长礼包 }, } +local _PageInfoCantRecharge={ + [1] = { -- 充值 + default = "t_tqsc_icon2", lock = "t_tqsc_icon2", select = "t_tqsc_icon1", + params = {DirectBuyType.FINDTREASURE_GIFT},-- 特权礼包 +}, +} local GiftView = require("Modules/Recharge/View/GiftView") local RechargeView = require("Modules/Recharge/View/RechargeView") @@ -47,12 +54,21 @@ function MainShopPanel:InitComponent() this.bg[3] = Util.GetGameObject(self.gameObject, "bg3") local giftView = GiftView.new(self, Util.GetGameObject(self.transform, "content/page_1")) - self.PageList = { - [1] = RechargeView.new(self, Util.GetGameObject(self.transform, "content/ShopView")), - [2] = giftView, - [3] = giftView, - [4] = giftView, - } + + if not RECHARGEABLE then--(是否开启充值) + _PageInfo = _PageInfoCantRecharge + self.PageList = { + [1] = giftView, + } + else + _PageInfo = _PageInfoCanRecharge + self.PageList = { + [1] = RechargeView.new(self, Util.GetGameObject(self.transform, "content/ShopView")), + [2] = giftView, + [3] = giftView, + [4] = giftView, + } + end -- 上部货币显示 this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform, { showType = UpViewOpenType.ShowLeft}) end @@ -137,10 +153,6 @@ end -- tab改变事件 function this.OnPageTabChange(index, lastIndex) this._CurPageIndex = index - -- if lastIndex then - -- this.PageList[lastIndex]:OnHide() - -- this.PageList[lastIndex].gameObject:SetActive(false) - -- end for i = 1, #this.PageList do this.PageList[i]:OnHide() this.PageList[i].gameObject:SetActive(false) diff --git a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua index 81ef09f205..e172acc6aa 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftView.lua @@ -117,8 +117,11 @@ function GiftView:RefreshGiftData() self.scrollView.gameObject:SetActive(true) elseif self.buyType == DirectBuyType.FINDTREASURE_GIFT then--特权礼包界面 --两部分组成 寻宝特权在商品里 极速探索礼包在直购里 + --(24暂时关闭) local topspeedData = self:ResetShopData(ShopManager.GetShopDataByType(SHOP_TYPE.FINDTREASURE_GIFT).storeItem, self.buyType, DataType.Shop) - shopData = self:ResetShopData(OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift), self.buyType, DataType.Direct) + if RECHARGEABLE then--(是否开启充值) + shopData = self:ResetShopData(OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift), self.buyType, DataType.Direct) + end for i = 1, #topspeedData do table.insert(shopData,topspeedData[i]) end @@ -174,7 +177,6 @@ function GiftView:ResetShopData(shopData, buyType, DataTypeIndex) elseif limitNum - boughtNum > 0 then curSortId = 2 end - --DataTypeIndex 1 商品 2 直购商品 newData[#newData + 1] = {data = shopData[i],DataType = DataTypeIndex,sortId = curSortId} elseif DataTypeIndex == DataType.Direct then --所有直购 进行筛选 类型一致的取出 @@ -338,9 +340,7 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) --道具商品 和 直购商品 获取数据的地方不一致 if DataTypeIndex == DataType.Shop then if isPrivilegeGift then--特权商城 - --BindRedPointObject(RedPointType.GrowthPackage, redPoint)--绑定红点(不需要了,红点机制更改) shopItemData = shopItemConfig[data.id] - --shows = ShopManager.GetShopItemGoodsInfo(data.id) shows = shopItemData.Goods name.text = shopItemData.GoodsName boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.FINDTREASURE_GIFT, data.id) @@ -366,7 +366,6 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) boughtNum = ShopManager.GetShopItemHadBuyTimes(SHOP_TYPE.VIP_GIFT, data.id) limitNum = ShopManager.GetShopItemLimitBuyCount(data.id) costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.VIP_GIFT, data.id, 1) - --redPoint:SetActive(rechargeNum >= shopItemConfig[data.id].BuyRule[2] and boughtNum == 0) -- 根据充值状态修改按钮图片 local isCanBuy = rechargeNum >= shopItemConfig[data.id].BuyRule[2] btnBuy:GetComponent("Image").sprite = Util.LoadSprite(isCanBuy and "s_slbz_1anniuongse" or "s_slbz_1anniuhuangse") @@ -382,7 +381,6 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) name.text = shopItemData.Name boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.goodsId) limitNum = shopItemData.Limit - --limitNum = OperatingManager.GetLeftBuyTime(GoodsTypeDef.DirectPurchaseGift,data.goodsId) costId, finalNum, oriCostNum = nil,shopItemData.Price,nil tipImage:SetActive(isPrivilegeGift) if isPrivilegeGift then @@ -420,7 +418,6 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) for i = 1, #shows do if self.ItemList[item][i] then self.ItemList[item][i]:OnOpen(false, {shows[i][1],shows[i][2]}, 0.9,false,false,false,self.mainPanel.sortingOrder) - -- self.ItemList[item][i]:OnOpen(false, {14,100000}, 0.9,false,false,false,self.mainPanel.sortingOrder) self.ItemList[item][i].gameObject:SetActive(true) end end @@ -490,8 +487,6 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) buyInfo.text="" end end - -- 红点 - --redPoint:SetActive(finalNum == 0 and isCanBuy) -- 请求购买 Util.AddOnceClick(btnBuy, function() @@ -517,7 +512,6 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex) else NetManager.RequestBuyGiftGoods(data.goodsId, function() FirstRechargeManager.RefreshAccumRechargeValue(data.goodsId) - -- OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DirectPurchaseGift, data.goodsId) -- 改成后端推了 PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0) CheckRedPointStatus(RedPointType.DailyGift) CheckRedPointStatus(RedPointType.GrowthPackage) @@ -674,10 +668,6 @@ function GiftView:SpecialTime(t) else if _min>=1 then return string.format(Language[11752], _min), _min - -- else - -- if _sec >=0 then - -- return string.format("%02d秒", _sec), _sec - -- end end end end @@ -688,23 +678,25 @@ function GiftView:TimeCountDown() self.localTimerV2:Stop() self.localTimerV2 = nil end - self.localTimerV2 = Timer.New(function() - local t1,t2=timerList[1].freshTime,timerList[2].freshTime - t1=t1-1 - t2=t2-1 - if t1 < 0 then - -- body刷新 - self:RefreshGiftData() - end - if t2 < 0 then - -- body刷新 - self:RefreshGiftData() - end - timerList[1].pre.text=Language[10561]..self:SpecialTime(t1-GetTimeStamp())--self:SpecialTime - timerList[2].pre.text=Language[10561]..self:SpecialTime(t2-GetTimeStamp()) - end,1,-1,true) - self.localTimerV2:Start() + if RECHARGEABLE then--(是否开启充值) + self.localTimerV2 = Timer.New(function() + local t1,t2=timerList[1].freshTime,timerList[2].freshTime + t1=t1-1 + t2=t2-1 + if t1 < 0 then + -- body刷新 + self:RefreshGiftData() + end + if t2 < 0 then + -- body刷新 + self:RefreshGiftData() + end + timerList[1].pre.text=Language[10561]..self:SpecialTime(t1-GetTimeStamp())--self:SpecialTime + timerList[2].pre.text=Language[10561]..self:SpecialTime(t2-GetTimeStamp()) + end,1,-1,true) + self.localTimerV2:Start() + end end ------------------------------ return GiftView \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/View/UpView.lua b/Assets/ManagedResources/~Lua/View/UpView.lua index d93a3039af..8f14e1aad3 100644 --- a/Assets/ManagedResources/~Lua/View/UpView.lua +++ b/Assets/ManagedResources/~Lua/View/UpView.lua @@ -139,11 +139,6 @@ function UpView:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, self.UpdateGoldVal, self) end ----@param args table --- args: { --- showType = int, --- panelType = int, --- } --界面打开时调用(用于子类重写) function UpView:OnOpen(args) self.Pname = self.transform.parent.name --方便调试 @@ -212,7 +207,6 @@ function UpView:UpdateGoldVal() elseif panelShowItemList[i] == 53 then Util.GetGameObject(self.cnyList[i], "value"):GetComponent("Text").text = PrintWanNum(BagManager.GetTotalItemNum(panelShowItemList[i])).."/"..MonsterCampManager.GetMaxCostItem() elseif panelShowItemList[i] == 87 then - -- Util.GetGameObject(self.cnyList[i], "icon"):GetComponent("RectTransform").sizeDelta=Vector2.New(85,85) Util.GetGameObject(self.cnyList[i], "value"):GetComponent("Text").text = PrintWanNum(BagManager.GetTotalItemNum(panelShowItemList[i])) else Util.GetGameObject(self.cnyList[i], "value"):GetComponent("Text").text = PrintWanNum(BagManager.GetTotalItemNum(panelShowItemList[i])) @@ -270,7 +264,6 @@ function UpView:UpdateTime() if RemainTime >= 0 then local _, _hour, _min, _sec = TimeToHMS(RemainTime) local timeStr = string.format("%02d:%02d:%02d", _hour, _min, _sec) - --RemainTime > 3600 and string.format("%02d:%02d", _hour, _min) or string.format("%02d:%02d", _min, _sec) self.cnyTime[i].text = timeStr else self.cnyTime[i].text = "" @@ -285,9 +278,12 @@ end function UpView:OnClick(index) local panelShowItemList={} local reChargeType = self.itemList[index] - + + Log("reChargeType:"..reChargeType) + if (not RECHARGEABLE) and (reChargeType==16 or reChargeType==20 or reChargeType==19 or reChargeType==61) then--(是否开启充值) + return + end if(reChargeType==20) then - --UIManager.OpenPanel(UIName.OperatingPanel,{tabIndex =1,extraParam =2}) UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 20)--元素神符 end self:RechargeType(reChargeType) @@ -306,8 +302,6 @@ function UpView:RechargeType(_type) --功能快捷购买 UIManager.OpenPanel(UIName.QuickPurchasePanel, { type = _type }) elseif _type == UpViewRechargeType.DemonCrystal then - -- 妖晶兑换 - --UIManager.OpenPanel(UIName.ShopExchangePopup, SHOP_TYPE.FUNCTION_SHOP, 10013, "兑换妖晶") -- 充值商店 if not MapManager.isInMap then if not ShopManager.IsActive(SHOP_TYPE.SOUL_STONE_SHOP) then @@ -349,43 +343,6 @@ function UpView:RechargeType(_type) _type==UpViewRechargeType.SummonStamps then UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _type) - --elseif _type==UpViewRechargeType.StarFireBuLingStone then - -- -- 分解 - -- JumpManager.GoJump(24001) - --elseif _type==UpViewRechargeType.SpiritJade then - -- -- 密盒 - -- if UIManager.IsOpen(UIName.SecretBoxPanel) then - -- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _type) - -- else - -- JumpManager.GoJump(21001) - -- end - --elseif _type==UpViewRechargeType.BadgeGlory then - -- -- 竞技场 - -- JumpManager.GoJump(8001) - --elseif _type==UpViewRechargeType.StarSoul then - -- -- 魂印分解 - -- JumpManager.GoJump(24004) - --elseif _type==UpViewRechargeType.FriendPoint then - -- -- 好友 - -- JumpManager.GoJump(25001) - --elseif _type==UpViewRechargeType.GuildToken then - -- -- 公会主界面 - -- JumpManager.GoJump(4001) - --elseif _type==UpViewRechargeType.ChoasCoin then - -- -- 混沌玉 - -- if UIManager.IsOpen(UIName.ElementDrawCardPanel) then - -- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _type) - -- else - -- JumpManager.GoJump(1002) - -- end - --elseif _type==UpViewRechargeType.TopMatchCoin then - -- -- 至尊之证 - -- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ARENA) then - -- --UIManager.OpenPanel(UIName.ArenaTopMatchPanel) - -- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _type) - -- else - -- PopupTipPanel.ShowTip("竞技场暂未开启") - -- end end end