From 6f182e075a6af211436ad3dc9dff23fb1b255e3c Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 25 Aug 2020 10:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=AE=AB=E7=A7=98=E5=AE=9D=20?= =?UTF-8?q?=E8=A7=A3=E9=94=81=E9=A2=9D=E5=A4=96=E5=A5=96=E5=8A=B1=E6=96=87?= =?UTF-8?q?=E5=AD=97=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E2=80=9D=E7=BD=AE=E6=8D=A2=E7=8E=89=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompoundHero/view/CompoundHero_Replace.lua | 15 +++++++++------ .../GeneralPopup_HeavenUnlockExtraRewardPanel.lua | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua index 200a99e18c..6d7c224f07 100644 --- a/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua +++ b/Assets/ManagedResources/~Lua/Modules/CompoundHero/view/CompoundHero_Replace.lua @@ -7,6 +7,9 @@ local curSelectHero = {} local curSelectHeroConfig = {} local heroSelectBtn = {} local heroDatas +local t +local replaceItemIdConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,68) +local replaceCostConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,69) local HeroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig) @@ -45,7 +48,12 @@ end function this:BindEvent() --置换 Util.AddClick(this.replaceBtn,function() - if not not curSelectHero.id then + + if not curSelectHero.id then + PopupTipPanel.ShowTip("请选择想要置换的神将!") + elseif curSelectHero.id and (t>BagManager.GetTotalItemNum(tonumber(replaceItemIdConfig.Value))) then + PopupTipPanel.ShowTip("置换玉不足!") + else NetManager.SaveHeroChangeRequest(curSelectHero.dynamicId,function (msg) HeroManager.ResetHeroChangeId(curSelectHero.dynamicId,msg.heroTempId)--改变英雄changeId @@ -63,8 +71,6 @@ function this:BindEvent() local value = this.RebuildData(msg.heroTempId,curSelectHero) this.SetHero(this.replaceHero,value) end) - else - PopupTipPanel.ShowTip("请选择想要置换的神将!") end end) --取消 @@ -403,14 +409,11 @@ function this.SetBtnSelect(_parObj) end function this.ShowCostInfo() - local replaceItemIdConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,68) - local replaceCostConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,69) if replaceItemIdConfig then this.costImage:GetComponent("Image").sprite = SetIcon(tonumber(replaceItemIdConfig.Value)) end if curSelectHero and replaceCostConfig then - local t local getCostByStar = string.split(replaceCostConfig.Value,"|") if curSelectHero.star == 4 then t = tonumber(string.split(getCostByStar[1],"#")[2]) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua index 62bebf260a..ef8e920d8c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HeavenUnlockExtraRewardPanel.lua @@ -57,7 +57,7 @@ function this:OnShow(_parent,...) rewardStateData = TreasureOfHeavenManger.GetState() rewardData = TreasureOfHeavenManger.GetAllRewardData() this:showRewardTianGong() - this.tip.text = "解锁高阶战令,激活进阶专属奖励" + this.tip.text = "解锁秘宝,可以领取额外专属奖励,并直接获得200积分" elseif curType == 2 then rewardData = QinglongSerectTreasureManager.GetAllRewardData() this:showRewardQinglong()