diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index 7c7c24ab3e..b92aafedcd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -608,10 +608,19 @@ end function this.RefreshSoliderInfo() this.RefreshBossInfo() this.lvTxt.text=SmallSoldierManager.level + LogError("SmallSoldierManager.level===="..SmallSoldierManager.level) local lotteryConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,SmallSoldierManager.level) - this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),lotteryConfig.Soldiers[2]) - this.btnlvRed:SetActive(BagManager.GetItemCountById(lotteryConfig.Soldiers[1])>lotteryConfig.Soldiers[2]) - this.lvBar.fillAmount = BagManager.GetItemCountById(lotteryConfig.Soldiers[1])/lotteryConfig.Soldiers[2] + + if lotteryConfig.Soldiers[1] and lotteryConfig.Soldiers[2] then + this.btnlvRed:SetActive(BagManager.GetItemCountById(lotteryConfig.Soldiers[1])>lotteryConfig.Soldiers[2]) + this.lvBar.fillAmount = BagManager.GetItemCountById(lotteryConfig.Soldiers[1])/lotteryConfig.Soldiers[2] + this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),lotteryConfig.Soldiers[2]) + else + this.btnlvRed:SetActive(false) + this.lvBar.fillAmount = 1 + this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),0) + end + this.btn_change:SetActive(SmallSoldierManager.changeSolider~=nil) if SmallSoldierManager.changeSolider then local changeConfig=ConfigManager.GetConfigData(ConfigName.SoldiersSetting,SmallSoldierManager.changeSolider.id) diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua index bf47d6a1d2..a7a7c47905 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua @@ -6,7 +6,7 @@ local lotteryConfig=ConfigManager.GetConfig(ConfigName.SoldiersLotteryConfig) local specialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,178).Value local aaa=string.split(specialConfig,"#") local list={} - +local isMax=false local activityId=0 local curLv=0 local progress=0 @@ -62,6 +62,10 @@ function SmallSoldierLvInfoPanel:BindEvent() end) Util.AddClick(self.btn_go,function() + if isMax then + PopupTipPanel.ShowTip("已提升到最高等级") + return + end if isCan==false then PopupTipPanel.ShowTip("兵力不足") return @@ -114,6 +118,11 @@ local itemList={} function SmallSoldierLvInfoPanel:OnShow() curLv=SmallSoldierManager.level local nextLv=curLv+1 + if nextLv>50 then + nextLv=50 + isMax=true + + end --local self.curlv.text="当前等级:"..curLv self.nextlv.text="下一等级:"..nextLv @@ -168,6 +177,7 @@ function SmallSoldierLvInfoPanel:OnShow() if SmallSoldierManager.upEndTime>0 then self:ShowLeftTime() end + self.ScrollView:SetData(lotteryData, function (index, go) self:SingleDataShow(go,lotteryData[index]) end,false)