From ac0feb82be4487dd42723a190317adbfbd61b2af Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Thu, 27 May 2021 11:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90bug=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManagedResources/~Lua/Logic/GameEvent.lua | 1 + .../View/MonsterCampFormationInfo.lua | 1 + .../MonsterCamp/MonsterCampNewPanel.lua | 27 +++++-------------- .../~Lua/Modules/Player/JumpManager.lua | 16 +++++++++++ 4 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index abcb27d41d..917b63b198 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -471,6 +471,7 @@ GameEvent = { --心魔试炼 MonsterCamp={ UpdatePri = "MonsterCamp.UpdatePri", + UpdatePanel = "MonsterCamp.UpdatePanel", }, --修行引导 Practice={ diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua index e6d3893879..9b0f2c5a20 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua @@ -68,6 +68,7 @@ function this:BindEvent() -- end) Util.AddClick(this.backBtn, function() parent:ClosePanel() + Game.GlobalEvent:DispatchEvent(GameEvent.MonsterCamp.UpdatePanel) end) end function this:BtnClickEvent() diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua index eb17b1cbd0..77e59bcb7a 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua @@ -134,13 +134,13 @@ end --添加事件监听(用于子类重写) function MonsterCampNewPanel:AddListener() Game.GlobalEvent:AddEvent(GameEvent.MonsterCamp.UpdatePri, self.UpdatePrivilage,self) - -- Game.GlobalEvent:AddEvent(GameEvent.FourEle.RefreshView, self.OnShow,self) + Game.GlobalEvent:AddEvent(GameEvent.MonsterCamp.UpdatePanel, this.OnShowPanel) end --移除事件监听(用于子类重写) function MonsterCampNewPanel:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.MonsterCamp.UpdatePri, self.UpdatePrivilage,self) - -- Game.GlobalEvent:RemoveEvent(GameEvent.FourEle.RefreshView, self.OnShow,self) + Game.GlobalEvent:RemoveEvent(GameEvent.MonsterCamp.UpdatePanel, this.OnShowPanel) end --界面打开时调用(用于子类重写) @@ -150,6 +150,9 @@ end --界面打开时调用(用于子类重写) function MonsterCampNewPanel:OnShow() + this.OnShowPanel() +end +function this.OnShowPanel() CheckRedPointStatus(RedPointType.EpicExplore_LevleReward) CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp) storeDataId,itemId,costNum = MonsterCampManager.MonsterCampGetCost() @@ -159,24 +162,8 @@ function MonsterCampNewPanel:OnShow() this.freeMoppingTimes.text = "免费扫荡:" ..freeTimes this.buyMoppingTimes.text= "购买次数:" ..buyTimes this.InitMonsterShow() - - -- local waves = MonsterCampManager.GetFourElementTotalWave() - -- if not PlayerPrefs.HasKey("FourElement"..PlayerManager.uid) then - -- PlayerPrefs.SetInt("FourElement"..PlayerManager.uid,-1) - -- end - -- if waves ~= PlayerPrefs.GetInt("FourElement"..PlayerManager.uid) then - -- PlayerPrefs.SetInt("FourElement"..PlayerManager.uid,waves) - -- local propertyId = SacredTreeManager.GetUnLockNewProperty(waves) - -- if propertyId > 0 then - -- UIManager.OpenPanel(UIName.RewardItemPopup,nil,nil,nil,CompShowType.fourElement,nil,nil,nil,propertyId) - -- local power = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL) - -- if power - MonsterCampManager.oldpower > 0 then - -- UIManager.OpenPanel(UIName.WarPowerChangeNotifyPanelV2,{oldValue = MonsterCampManager.oldpower,newValue = power}) - -- end - -- end - -- end + PatFaceManager.RefreshPatface() end - function this.SingleDataShow(go, data) local singledata = MonsterCampSingleWave:New(go) singledata:InitComponent(go,data) @@ -190,7 +177,7 @@ function this.InitMonsterShow() this.scrollView:SetData(monsterInfo, function (index, go) local tempData = this.SingleDataShow(go, monsterInfo[index]) this.singledataList[monsterInfo[index].Id] = tempData - end) + end,true,true) this.scrollView:SetIndex(#monsterInfo - MonsterCampManager.monsterWave - 1) end diff --git a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua index 67d8502c39..1bc14c6da8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/JumpManager.lua @@ -483,6 +483,22 @@ local jumpDic = { [JumpType.Compound] = function(data)--锻造炉 local index = 1 if data then index = data[2] end + local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig) + if index == 2 then + local string = ConfigData[40].Value + local num = string.split(string.split(string,"|")[1],"#")[2] + if PlayerManager.level < tonumber(num) then + PopupTipPanel.ShowTip(string.format(Language[10770],num)) + return + end + end + if index == 3 then + local string = ConfigData[89].Value + if PlayerManager.level < tonumber(string) then + PopupTipPanel.ShowTip(string.format(Language[10770],string)) + return + end + end UIManager.OpenPanel(UIName.CompoundPanel,index) end, [JumpType.DailyCarbon_Gold] = function(data)--每日金币副本