森罗bug修复

dev_chengFeng
ZhangBiao 2020-08-04 20:22:56 +08:00
parent 7255baef99
commit ee28c18254
4 changed files with 16 additions and 26 deletions

View File

@ -501,8 +501,6 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- 试炼副本才有的字段
if msg.essenceValue then
-- LogPink(Language[10294] .. msg.essenceValue)
-- 判断是否可寻路标志
if msg.essenceValue >= 100 then
MapTrialManager.canMove = false
@ -511,7 +509,6 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg)
end
-- -1添加Boss点 -2添加传送门点
if MapTrialManager.powerValue >= 100 or MapTrialManager.powerValue == -1 or MapTrialManager.powerValue == -2 then
-- LogPink(Language[10295])
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, MapTrialManager.cell.cellId, MapTrialManager.cell.pointId)
end
MapTrialManager.UpdatePowerValue(msg.essenceValue)
@ -532,8 +529,6 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg)
if this.difficulty ~= 2 then
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
end
end
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnMapTeamHpReduce, oldHp - battledHp)

View File

@ -22,7 +22,6 @@ local _PointerUpList = {}
function this:InitComponent()
-- 通用图标
-- this.BtnBack = Util.GetGameObject(self.gameObject, "rightUp/btnBack")
this.BtnBack = Util.GetGameObject(self.gameObject, "centerDown/bg/btnBack")
this.btnAchive = Util.GetGameObject(self.gameObject, "rightDown/btnAchive")
this.btnBag = Util.GetGameObject(self.gameObject, "rightUp/btnBag")
@ -44,9 +43,6 @@ function this:InitComponent()
this.propContent = Util.GetGameObject(this.propList, "info/Text"):GetComponent("Text")
this.propInfo:SetActive(false)
this.propList:SetActive(true)
-- 行动力警告显示
-- this.warn = Util.GetGameObject(self.gameObject, "EndLessEffect/effect")
-- this.warnRoot = Util.GetGameObject(self.gameObject, "EndLessEffect")
-- 面板遮罩, 没有接地图任务前不可点击
this.Mask = Util.GetGameObject(self.gameObject, "Mask")
@ -86,10 +82,7 @@ function this:BindEvent()
Util.AddClick(this.btnRank, function ()
UIManager.OpenPanel(UIName.CarbonScoreSortPanel,1)
end)
-- --回春散
-- Util.AddClick(this.btnXingYao,function()
-- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialXingYao)
-- end)
--奖励
Util.AddClick(this.btnReward,function()
UIManager.OpenPanel(UIName.TrialRewardPopup)
@ -178,7 +171,6 @@ function this:OnShow()
if amb and amb ~= "" then
SoundManager.PlayAmbient(amb)
end
-- this.xingYaoNum.text = BagManager.GetItemCountById(31)
playerView.OnShow()
endLessMapView.OnShow()
@ -254,8 +246,6 @@ function this.ExploreInitSet()
end
function this.InitCarbonSet()
-- 死亡表现
-- this.deadRoot:SetActive(false)
-- 面板遮罩
this.Mask:SetActive(not MapManager.isOpen)

View File

@ -64,7 +64,7 @@ function this:BindEvent()
--更新英雄HP
MapTrialManager.SetHeroHp(msg.remainHpList, MapTrialManager.selectHeroDid)
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
local fightData = BattleManager.GetBattleServerData(msg)
UIManager.OpenPanel(UIName.BattlePanel,fightData, BATTLE_TYPE.DAILY_CHALLENGE, function()
--更新精气值
@ -75,6 +75,7 @@ function this:BindEvent()
MapTrialManager.isHaveBoss = true
MapTrialManager.UpdatePowerValue(0)
end
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
end)
self:ClosePanel()
end)

View File

@ -118,10 +118,10 @@ function TrialMapPanel:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.TrialMap.OnPowerValueChanged, this.OnPowerValueChange)
Game.GlobalEvent:AddEvent(GameEvent.Bag.OnTempBagChanged, this.OnTempBagChanged)
Game.GlobalEvent:AddEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.InitBuffInfo)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.RefreshBombNum)
Game.GlobalEvent:AddEvent(GameEvent.Map.ShowEnemyInfo, this.ShowEnemyInfo)
Game.GlobalEvent:AddEvent(GameEvent.Map.RefreshHeroHp, this.SetSelectHero)
Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold, this.InitShopInfo)
Game.GlobalEvent:AddEvent(GameEvent.Bag.OnTempBagChanged, this.InitRightDown)
end
--移除事件监听(用于子类重写)
@ -129,10 +129,10 @@ function TrialMapPanel:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.TrialMap.OnPowerValueChanged, this.OnPowerValueChange)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.OnTempBagChanged, this.OnTempBagChanged)
Game.GlobalEvent:RemoveEvent(GameEvent.FoodBuff.OnFoodBuffStateChanged, this.InitBuffInfo)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.RefreshBombNum)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.ShowEnemyInfo, this.ShowEnemyInfo)
Game.GlobalEvent:RemoveEvent(GameEvent.Map.RefreshHeroHp, this.SetSelectHero)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.InitShopInfo)
Game.GlobalEvent:RemoveEvent(GameEvent.Bag.OnTempBagChanged, this.InitRightDown)
end
--界面打开时调用(用于子类重写)
@ -172,9 +172,7 @@ function this.InitShowState()
this.InitTrialMission()
this.UpdatePowerValue()
-- this.UpdateDeadTimes()
this.RefreshBombNum()
this.InitShopInfo()
this.InitBuffInfo()
this.InitRightDown()
-- this.InitBossInfo()
this.powerRoot:SetActive(istrialMap)
this.InitEffect()
@ -182,6 +180,12 @@ function this.InitShowState()
this.TrialShowTime()
end
function this.InitRightDown()
this.RefreshBombNum()
this.InitShopInfo()
this.InitBuffInfo()
end
function this.InitEffect()
this.guiji:SetActive(false)
this.chufa:SetActive(false)
@ -338,17 +342,17 @@ function this.RefreshBombNum()
local bombNum = 0
local yaoNum = 0
if CarbonManager.difficulty ~= CARBON_TYPE.TRIAL then return end
if BagManager.GetItemCountById(43) == 0 or not BagManager.GetItemCountById(43) then
if BagManager.GetTotalItemNum(43) == 0 or not BagManager.GetTotalItemNum(43) then
bombNum = 0
else
bombNum = BagManager.GetItemCountById(43)
bombNum = BagManager.GetTotalItemNum(43)
end
this.bombNum.text = bombNum
if BagManager.GetItemCountById(31) == 0 or not BagManager.GetItemCountById(31) then
if BagManager.GetTotalItemNum(31) == 0 or not BagManager.GetTotalItemNum(31) then
yaoNum = 0
else
yaoNum = BagManager.GetItemCountById(31)
yaoNum = BagManager.GetTotalItemNum(31)
end
this.xingYaoNum.text = yaoNum
end