From 09cd47db46695a0b1ad14489411705008213acd4 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Thu, 29 Oct 2020 11:18:11 +0900 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=81=B5=E5=85=BD=E3=80=91bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=20=20buffctr=20=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Battle/View/Unit/BuffCtrl.lua | 5 +++-- .../View/GeneralPopup_PokemonRestore.lua | 2 +- .../Modules/Resolve/View/Resolve_Pokemon.lua | 21 +++++++++++-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua index db0c630613..c283f49bf7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/BuffCtrl.lua @@ -48,9 +48,10 @@ end - +local unitObj function BuffCtrl.New(unit, buffRoot) local o = {} + unitObj=unit setmetatable(o, {__index = BuffCtrl}) o:ctor(unit, buffRoot) return o @@ -100,7 +101,7 @@ function BuffCtrl:AddBuffEffect(buffName, isTrigger, offset) local node = BattleManager.LoadAsset(buffName, sortingOrder) -- node.transform:SetParent(self.RootPanel.transform) -- node.transform.localScale = Vector3.one - node.transform:SetParent(self.GameObject.transform) + node.transform:SetParent(unitObj.transform) node.transform.localScale = Vector3.one node.transform.localPosition = offset and Vector3.New(offset[1], offset[2], 0) or Vector3.zero--self.GameObject.transform.localPosition self.BuffEffectList[buffName].node = node diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua index 56e187398f..4f82171f02 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_PokemonRestore.lua @@ -15,7 +15,7 @@ function this:InitComponent(gameObject) this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text") this.titleText.text="确认放生" this.infoTxt=Util.GetGameObject(gameObject,"Body/infoText"):GetComponent("Text") - this.cancelBtn=Util.GetGameObject(gameObject,"CancelBtn") + this.cancelBtn=Util.GetGameObject(gameObject,"cancelBtn") this.confirmBtn=Util.GetGameObject(gameObject,"resetBtn") this.getInfoTxt=Util.GetGameObject(gameObject,"Body/Text"):GetComponent("Text") this.getInfoTxt.text="放生后获得" diff --git a/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_Pokemon.lua b/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_Pokemon.lua index 601dcc51e3..75041e8523 100644 --- a/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_Pokemon.lua +++ b/Assets/ManagedResources/~Lua/Modules/Resolve/View/Resolve_Pokemon.lua @@ -163,14 +163,16 @@ function this:BindEvent() LogError("灵兽长度 "..#pokemonIds.."碎片id "..selectChipId.." num"..selectChipNum) NetManager.PokemonFreeRequest(pokemonIds,selectChipId,selectChipNum,function(msg) UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function() - if pokemonIds and #pokemonIds>0 then - PokemonManager.RemovePokemonData(pokemonIds) - else - BagManager.HeroLvUpUpdateItemsNum(selectChipId,selectChipNum) - end - this.SortTypeClick(sortingOrder) + end) - + if pokemonIds and #pokemonIds>0 then + PokemonManager.RemovePokemonData(pokemonIds) + -- else + -- LogError("分解前数量"..BagManager.GetItemCountById(selectChipId)) + -- BagManager.HeroLvUpUpdateItemsNum(selectChipId,selectChipNum) + -- LogError("分解后数量"..BagManager.GetItemCountById(selectChipId)) + end + this.SortTypeClick(sortingOrder) end) end) @@ -358,9 +360,10 @@ function this.SingleHeroDataShow(go,_heroData,isGray) this.selectText.gameObject:SetActive(true) this.chipObj:SetActive(false) isPokemon = true - end + end + choosed:SetActive(true) selectHeroData[heroData.dynamicId]=heroData - choosed:SetActive(true) + this.selectText.text = Language[11775]..LengthOfTable(selectHeroData).."/"..maxSelectNum end end)