【bug】

dev_chengFeng
zhangqiang 2021-05-27 11:07:32 +08:00
parent bccaf6557c
commit ac0feb82be
4 changed files with 25 additions and 20 deletions

View File

@ -471,6 +471,7 @@ GameEvent = {
--心魔试炼
MonsterCamp={
UpdatePri = "MonsterCamp.UpdatePri",
UpdatePanel = "MonsterCamp.UpdatePanel",
},
--修行引导
Practice={

View File

@ -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()

View File

@ -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

View File

@ -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)--每日金币副本