diff --git a/Assets/ManagedResources/~Lua/Modules/GodPrint/GodPrintPopUp.lua b/Assets/ManagedResources/~Lua/Modules/GodPrint/GodPrintPopUp.lua index 1428b56cae..ce93ca1b63 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodPrint/GodPrintPopUp.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodPrint/GodPrintPopUp.lua @@ -250,8 +250,9 @@ function GodPrintPopUp:RefreshShow(type) if equipConfig[soulId] then --魂印效果 local txt = "" - if equipConfig[soulId].PassiveSkill then - self.effectText.text = GetLanguageStrById(passiveSkillConfig[equipConfig[soulId].PassiveSkill[1]].Desc) + local pass=equipConfig[soulId].PassiveSkill + if pass~=nil and tonumber(pass[1])~=nil and tonumber(pass[1])~=0 then + self.effectText.text = GetLanguageStrById(passiveSkillConfig[pass[1]].Desc) else if equipConfig[soulId].Property then for index, value in ipairs(equipConfig[soulId].Property) do --propertyconfig diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/GMChangePanel.lua b/Assets/ManagedResources/~Lua/Modules/Operating/GMChangePanel.lua index cb34edf70a..44a2d3c50a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/GMChangePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/GMChangePanel.lua @@ -7,6 +7,9 @@ local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig) local rechargeCommodityConfig=ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig) local icons={"gm_shuachong_scGM_02_zh","gm_shuachong_cjGM_02_zh","gm_shuachong_sjGM_02_zh","gm_shuachong_wsGM_02_zh"} local sortingOrder = 0 +local isFirst=true +local curBtn=nil +local curConfig=nil --初始化组件(用于子类重写) function GMChangePanel:InitComponent() this.spLoader = SpriteLoader.New() @@ -39,7 +42,7 @@ function GMChangePanel:InitComponent() this.shopItemPre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 5),false) this.scrollView.moveTween.MomentumAmount = 1 this.scrollView.moveTween.Strength = 2 - local isFirst=true + for k, v in ConfigPairs(GMInfo) do if v.IsOpen==1 then local tabBtn = newObjToParent(this.itemPre,this.grid) @@ -48,7 +51,9 @@ function GMChangePanel:InitComponent() this.TabBtnOnClick(tabBtn,v) end) if isFirst then - this.TabBtnOnClick(tabBtn,v) + --this.TabBtnOnClick(tabBtn,v) + curBtn=tabBtn + curConfig=v isFirst=false end end @@ -125,6 +130,8 @@ function GMChangePanel:ShowTopInfo() end function this.TabBtnOnClick(btn,config) + curBtn=btn + curConfig=config --local _level=_privilegeLv>0 and _privilegeLv or 1 --local clickBtn=this.tabGrid.transform:GetChild(_level-1) this.selectBtn.transform:SetParent(btn.gameObject.transform) @@ -209,21 +216,13 @@ end -- 打开,重新打开时回调 function GMChangePanel:OnShow(_sortingOrder) - + this:ShowTopInfo() + this.TabBtnOnClick(curBtn,curConfig) end - - - - - - - - - --界面关闭时调用(用于子类重写) function GMChangePanel:OnClose() - + isFirst=true end --界面销毁时调用(用于子类重写) function GMChangePanel:OnDestroy() diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 6a9caf675a..a3b983d770 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -48,8 +48,8 @@ function this.SetBasicValues(giftGoodsList) if giftGoodsInfo.goodsId and giftGoodsInfo.goodsId ~= 0 then local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId) if rechargeConfigLocal then - -- LogBlue("礼包类型:"..tostring(rechargeConfigLocal.Type).." 礼包ID:"..tostring(giftGoodsInfo.goodsId).." 已购:"..tostring(giftGoodsInfo.buyTimes) - -- .."次 开始时间:"..tostring(giftGoodsInfo.startTime).." 结束时间:"..tostring(giftGoodsInfo.endTime).. " 可购:" ..tostring(giftGoodsInfo.dynamicBuyTimes).." 是否已买:"..tostring(giftGoodsInfo.isBought)) + -- LogBlue("礼包类型:"..tostring(rechargeConfigLocal.Type).." 礼包ID:"..tostring(giftGoodsInfo.goodsId).." 已购:"..tostring(giftGoodsInfo.buyTimes) + -- .."次 开始时间:"..tostring(giftGoodsInfo.startTime).." 结束时间:"..tostring(giftGoodsInfo.endTime).. " 可购:" ..tostring(giftGoodsInfo.dynamicBuyTimes).." 是否已买:"..tostring(giftGoodsInfo.isBought)) if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then else if giftGoodsInfoList[rechargeConfigLocal.Type] then @@ -82,7 +82,7 @@ function this.IsBuyGift(goodsId) return false end for _, v in ipairs(giftGoodsInfo)do - if v.goodsId == goodsId and v.buyTimes > 0 then + if v.goodsId == goodsId and (v.buyTimes > 0 or v.isBought>0 )then return true end end @@ -211,9 +211,17 @@ function this.GetGoodsBuyTime(type, goodsId) end for k,v in pairs(giftGoodsInfoList[type]) do if not goodsId then + --LogError("goodid====="..goodsId) return v.buyTimes end if v.goodsId == goodsId then + if rechargeConfig[goodsId] then + if rechargeConfig[goodsId].Otype==3 then + return v.isBought + else + return v.buyTimes + end + end return v.buyTimes end end