dev_chengFeng
ZhangBiao 2020-07-21 09:38:34 +08:00
parent b7aaa633c9
commit 9ed616d8be
8 changed files with 20 additions and 137 deletions

View File

@ -521,24 +521,6 @@ function this.InitQuickFightData(monsterGroupId, eventId, msg)
battledHp = this.GetMapTotalBlood()
-- if this.difficulty == 1 or this.difficulty == 3 or this.difficulty == 4 then
-- PopupText(strShow, 0.5, 2)
-- elseif this.difficulty == 2 then
-- -- UIManager.OpenPanel(UIName.BattleEndPanel, nil, data.hpList, data.drop, func)
-- UIManager.OpenPanel(UIName.RewardItemPopup,data.drop,1,
-- -- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- func
-- )
-- end
-- func = nil
-- LogPink(" MapManager.curTriggerPos ".. MapManager.curTriggerPos)
-- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
-- -- 试炼副本不能直接结束事件点
-- if this.difficulty ~= 2 then
-- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- end
if this.difficulty == 1 or this.difficulty == 3 or this.difficulty == 4 then
PopupText(strShow, 0.5, 2)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointRemove, MapManager.curTriggerPos)
@ -894,19 +876,11 @@ function this.CarbonHeroRedShow()
local carbonId = mission[i].Id
if (DifficultyData[carbonId].Type == 3) then
local isCanShowRedPoint = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. "hero" .. carbonId)
--Log("isCanShowRedpoint ======= "..carbonId.." ======= "..isCanShowRedPoint)
--Log(tostring(mission[i].MapId ~= 100))
--Log(tostring(this.CheckMapIdUnLock(carbonId)))
--Log(tostring(this.CheckCarbonUnLock(carbonId)))
if isCanShowRedPoint == "0" and mission[i].MapId ~= 100 and this.CheckMapIdUnLock(carbonId) and this.CheckCarbonUnLock(carbonId) then
isShow = true
end
end
end
--local isCanShowHeroRedPoint = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. "Hero")
--if (isCanShowHeroRedPoint == "0") then
-- isShow = true
--end
end
return isShow
end

View File

@ -152,11 +152,11 @@ function this.InitStatsInfo()
end
local levelNum
if MapTrialManager.IsFinalLevel() then
levelNum = MapTrialManager.curTowerLevel
else
-- if MapTrialManager.IsFinalLevel() then
-- levelNum = MapTrialManager.curTowerLevel
-- else
levelNum = MapTrialManager.curTowerLevel - 1
end
-- end
if levelNum <= 0 or MapTrialManager.doneTime == 0 then
levelNum = Language[10318]
else

View File

@ -497,7 +497,7 @@ function this.OnMapOut(nextMapId, outType)
distMapId = nextMapId
end
LogPink("MapTrialManager.curTowerLevel"..MapTrialManager.curTowerLevel)
NetManager.MapOutRequest(outType, function (msg)
if nextMapId == 100 or nextMapId == 0 then
this.BackHome()

View File

@ -57,13 +57,6 @@ function this.RefreshTrialInfo(towerCopyInfo)
Log(Language[11244] .. this.powerValue)
end
-- 试炼副本可复活次数, 随着VIP改变
-- function this.GetRelifeTimes()
-- local limitDeadTimes = trailSetting[1].RebornTimes
-- return limitDeadTimes
-- end
-- 取得最初的服务器精气值
function this.UpdatePowerValue(value)
this.powerValue = value
@ -83,14 +76,18 @@ end
-- 进入下一层
function this.GoNextLevel()
local curMapId = trailConfig[MapTrialManager.curTowerLevel + 1].MapId
LogGreen("下一普通层的ID是"..curMapId)
this.isChangeLevel = true
Game.GlobalEvent:DispatchEvent(GameEvent.Map.Out, curMapId, 1)
this.bossType = 0
end
-- 是否是试炼副本的最后一层
-- 是否是试炼副本的最后一层(没有最后一层了,判断是否是问号层)
function this.IsFinalLevel()
local isFinalLevel = false
if MapTrialManager.curTowerLevel > 10000 then
MapTrialManager.curTowerLevel = MapTrialManager.curTowerLevel - 10000
end
if CarbonManager.difficulty == 2 then
local curMapData = trailConfig[MapTrialManager.curTowerLevel + 1]
if not curMapData or curMapData.MapId == 0 then
@ -119,6 +116,7 @@ end
-- 黄四郎:好
function this.GoSurprisedLevel()
local mapId = this.GetSurprisedLevelMapId()
LogGreen("下一惊喜层的ID是"..mapId)
this.isChangeLevel = true
Game.GlobalEvent:DispatchEvent(GameEvent.Map.Out, mapId, 1)
this.bossType = 0
@ -126,18 +124,18 @@ end
-- 获取惊喜层地图id
function this.GetSurprisedLevelMapId()
local level = MapTrialManager.curTowerLevel
if level < 10000 then
level = level + 10000
if MapTrialManager.curTowerLevel < 10000 then
MapTrialManager.curTowerLevel = MapTrialManager.curTowerLevel + 10000
end
LogRed("MapTrialManager.curTowerLevel"..MapTrialManager.curTowerLevel)
local mId = 0
for mapId, _ in ConfigPairs(trailConfig) do
if mapId >= level then
if mapId >= MapTrialManager.curTowerLevel then
mId = mapId
break
end
end
LogPink("trailConfig[mId].MapId"..trailConfig[mId].MapId)
return trailConfig[mId].MapId
end

View File

@ -73,7 +73,6 @@ function this:BindEvent()
MapTrialManager.powerValue = msg.essenceValue
--召唤Boss
if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then
-- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, msg.cell.cellId,msg.cell.pointId)
MapTrialManager.isHaveBoss = true
MapTrialManager.UpdatePowerValue(0)
end
@ -147,14 +146,7 @@ function this.SetSelectHero()
SetHeroStars(star, value.star)
--选择
-- if isMainIn or isFirstIn then
-- choosed:SetActive(index==1)
-- if index==1 then
-- MapTrialManager.selectHeroDid=value.heroId
-- end
-- else
choosed:SetActive(MapTrialManager.selectHeroDid==value.heroId)
-- end
choosed:SetActive(MapTrialManager.selectHeroDid==value.heroId)
Util.AddOnceClick(item,function()
if value.heroHp>0 then

View File

@ -60,13 +60,6 @@ function TrialMapPanel:InitComponent(root, mapPanel)
this.selectHero=Util.GetGameObject(root,"centerDown/selectHero")
this.s_grid=Util.GetGameObject(this.selectHero,"grid")
this.s_pre=Util.GetGameObject(this.s_grid,"pre")
--敌人信息
-- this.enemyInfo=Util.GetGameObject(root,"centerDown/enemyInfo")
-- this.e_liveRoot=Util.GetGameObject(this.enemyInfo,"liveRoot")
-- this.e_name=Util.GetGameObject(this.enemyInfo,"name/text"):GetComponent("Text")
-- this.e_level=Util.GetGameObject(this.enemyInfo,"name/level/Text"):GetComponent("Text")
-- this.e_cancelBtn=Util.GetGameObject(this.enemyInfo,"cancelBtn")
-- this.e_fightBtn=Util.GetGameObject(this.enemyInfo,"fightBtn")
this.upView = SubUIManager.Open(SubUIConfig.UpView, root.transform, { showType = UpViewOpenType.ShowLeft })
this.helpBtn=Util.GetGameObject(root,"helpBtn")
@ -75,74 +68,9 @@ end
function TrialMapPanel:BindEvent()
--敌人信息取消按钮
-- Util.AddClick(this.e_cancelBtn,function()
-- -- this.enemyInfo:SetActive(false)
-- Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTriggerEnd)
-- end)
--敌人信息确认战斗按钮
-- Util.AddClick(this.e_fightBtn,function()
-- for i, v in ipairs(MapManager.trialHeroInfo) do
-- if MapTrialManager.selectHeroDid==v.heroId then
-- if v.heroHp<=0 then
-- PopupTipPanel.ShowTip(Language[11247])
-- return
-- end
-- end
-- end
-- --先保存编队
-- local curFormation = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_DREAMLAND)
-- local choosedList={}
-- table.insert(choosedList, {heroId = MapTrialManager.selectHeroDid, position=2})
-- FormationManager.RefreshFormation(FormationTypeDef.FORMATION_DREAMLAND,choosedList,
-- FormationManager.formationList[FormationTypeDef.FORMATION_DREAMLAND].teamPokemonInfos)
-- --请求战斗数据
-- NetManager.QuickFightRequest(function(msg)
-- --战斗赢了 击杀小怪数量+1包括BOSS吗
-- if msg.result==1 then
-- MapTrialManager.SetKillCount(MapTrialManager.GetKilCount()+1)
-- end
-- CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
-- local fightData = BattleManager.GetBattleServerData(msg)
-- UIManager.OpenPanel(UIName.BattlePanel,fightData, BATTLE_TYPE.DAILY_CHALLENGE, function()
-- -- this.enemyInfo:SetActive(false)
-- --更新精气值
-- MapTrialManager.UpdatePowerValue(msg.essenceValue)
-- --更新英雄HP
-- MapTrialManager.SetHeroHp(msg.remainHpList,MapTrialManager.selectHeroDid,function()
-- this.SetSelectHero(false)
-- end)
-- --召唤Boss
-- if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then
-- -- Game.GlobalEvent:DispatchEvent(GameEvent.Map.PointAdd, msg.cell.cellId,msg.cell.pointId)
-- MapTrialManager.isHaveBoss = true
-- MapTrialManager.UpdatePowerValue(0)
-- end
-- end)
-- end)
-- end)
Util.AddClick(this.btnBomb, function ()
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialBomb)
-- bombNum = BagManager.GetTempBagCountById(43)
-- this.bombNum.text = bombNum
-- LogGreen(bombNum)
-- if bombNum > 0 then
-- if MapTrialManager.isHaveBoss then
-- PopupTipPanel.ShowTip(Language[11248])
-- return
-- else
-- UIManager.OpenPanel(UIName.TrialOpPanel, 2)
-- -- 停止自动寻路
-- -- ctrlView.OnRoleDead()
-- end
-- else
-- PopupTipPanel.ShowTip(Language[11249])
-- end
end)
-- 打开补给点
@ -338,15 +266,6 @@ function this.OnSortingOrderChange()
orginLayer = MapPanel.sortingOrder
end
-- function this.InitBossInfo()
-- if powerValue ==-1 then
-- UIManager.OpenPanel(UIName.TrialOpPanel, 1)
-- -- 停止自动寻路
-- -- ctrlView.OnRoleDead()
-- end
-- end
-- 初始化部buff显示
function this.InitBuffInfo()

View File

@ -24,9 +24,9 @@ function this.UpdateEventPoint(msg, optionId, func)
-- 行为类型
local behaviorType = msg.EventBehaviorCommon.behaviorType
-- 推任务专用消息
LogGreen(Language[11377].. (msg.eventId or Language[11378]))
LogGreen(Language[11379].. behaviorType)
LogGreen(Language[11380] .. (msg.leftTime or Language[11381]))
-- LogGreen(Language[11377].. (msg.eventId or Language[11378]))
-- LogGreen(Language[11379].. behaviorType)
-- LogGreen(Language[11380] .. (msg.leftTime or Language[11381]))
local beArgs = {}
for i=1, #msg.EventBehaviorCommon.eventBehaviorValues do
local item = msg.EventBehaviorCommon.eventBehaviorValues[i]