From 281e19ad741cbd74398707203010a303f1ba1ea1 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Wed, 26 May 2021 09:53:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E5=BF=83=E9=AD=94=E8=AF=95?= =?UTF-8?q?=E7=82=BC=E3=80=91=E4=B8=80=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MonsterCamp/MonsterCampNewPanel.lua | 36 ++++++++++--------- .../~Lua/View/MonsterCampSingleWave.lua | 2 +- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua index acf7f8d74e..69f5671bdb 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua @@ -92,22 +92,26 @@ function MonsterCampNewPanel:BindEvent() end,2) end) Util.AddClick(this.moppingUpBtn, function () - -- local _storeDataId,_itemId,_costNum,moppingUpNum = MonsterCampManager.MonsterCampGetYJGMCost() - -- MsgPanel.ShowTwo(string.format("是否花费%s进行一键扫荡?",_costNum,itemConfig[itemId].Name),function() end,function() - -- if BagManager.GetItemCountById(_itemId) < _costNum then - -- PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name)) - -- else - -- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,moppingUpNum,function() - -- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, moppingUpNum) - -- NetManager.SweepDemonRequest(MonsterCampManager.monsterWave - 1,true,function(msg) - -- UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function() - -- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, MonsterCampManager.GetCanBattleCount() ) - -- this.UpdatePrivilage() - -- end) - -- end) - -- end) - -- end - -- end,"取消","确定") + if MonsterCampManager.monsterWave - 1 > 0 then + local _storeDataId,_itemId,_costNum,moppingUpNum = MonsterCampManager.MonsterCampGetYJGMCost() + MsgPanel.ShowTwo(string.format("是否花费%s进行一键扫荡?",_costNum,itemConfig[itemId].Name),function() end,function() + if BagManager.GetItemCountById(_itemId) < _costNum then + PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name)) + else + ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,moppingUpNum,function() + PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, moppingUpNum) + NetManager.SweepDemonRequest(MonsterCampManager.monsterWave - 1,true,function(msg) + UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function() + PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, MonsterCampManager.GetCanBattleCount() ) + this.UpdatePrivilage() + end) + end) + end) + end + end,"取消","确定") + else + PopupTipPanel.ShowTip("当前不可扫荡!") + end end) BindRedPointObject(RedPointType.EpicExplore,Util.GetGameObject(this.btnHelpFight, "redPoint")) end diff --git a/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua b/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua index 45b3b223ae..fe354227cd 100644 --- a/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua +++ b/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua @@ -215,7 +215,7 @@ function MonsterCampSingleWave:SetIcon() self.rewardText.text = "奖励" if self.data.Id < MonsterCampManager.monsterWave - 1 then elseif self.data.Id == MonsterCampManager.monsterWave - 1 then--扫荡 - self.rewardText.text = "扫荡奖励" + -- self.rewardText.text = "扫荡奖励" self.fight.gameObject:SetActive(true) if self.freeTimes > 0 then self.fightBtnText.text = string.format("%s","17232A","免费扫荡") From f8ddf0fbe657aefe073a634d33e864c7329662ce Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Wed, 26 May 2021 10:00:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=BF=83=E9=AD=94=E8=AF=95?= =?UTF-8?q?=E7=82=BC=E3=80=91=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua | 4 +--- .../~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua index 65f7ef0575..8e13ba8fff 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua @@ -124,8 +124,8 @@ function this:SetIcon() this.fightBtnIcon.gameObject:SetActive(false) this.fightBtnNum.gameObject:SetActive(false) this.sureBtn:GetComponent("Image").sprite = Util.LoadSprite("r_hero_button_002") + this.tip.text = "奖励" if waveId == MonsterCampManager.monsterWave - 1 then - this.tip.text = "扫荡奖励" if freeTime > 0 then this.fightBtnText.text = string.format("%s","17232A","免费扫荡") else @@ -145,11 +145,9 @@ function this:SetIcon() end end elseif (waveId == MonsterCampManager.monsterWave) then - this.tip.text = "战斗奖励" this.sureBtn:GetComponent("Image").sprite = Util.LoadSprite("r_hero_button_001") this.fightBtnText.text = string.format("%s","17232A","挑 战") else - this.tip.text = "战斗奖励" this.fightBtnText.text =string.format("%s","17232A","确定") end end diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua index 69f5671bdb..514694b653 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua @@ -58,7 +58,7 @@ function MonsterCampNewPanel:BindEvent() UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.FoueElementPeo,this.helpPosition.x,this.helpPosition.y) end) Util.AddClick(this.addBtn, function () - if buyTimes < 0 then + if buyTimes <= 0 then PopupTipPanel.ShowTip("今日已无购买次数") else if BagManager.GetItemCountById(itemId) < costNum then