无尽提交

dev_chengFeng
jiaoyangna 2021-05-27 10:46:22 +08:00
parent b197244667
commit da6437e2a2
7 changed files with 65 additions and 54 deletions

View File

@ -2027,6 +2027,8 @@ GENERAL_POPUP_TYPE={
RecrutDetail = 36, --限时招募奖励详情
WuJinShuXing = 37,
XiuXingSelectHero = 38,--修行选择英雄弹窗
WuJinSetting = 39,
}
--通用信息弹窗类型

View File

@ -681,10 +681,13 @@ function this.SetRewardData()
if v.Id == allMissionData[j].missionId then
v.progress = allMissionData[j].progress
if allMissionData[j].state == 2 then
-- goText.text="已领取"
v.state = 0
elseif allMissionData[j].state == 1 then
-- goText.text="领取"
v.state = allMissionData[j].state
elseif allMissionData[j].state == 0 then
-- goText.text="前往"
v.state = 2
end
v.info = v.Desc ..("(")..v.progress.."/"..v.value..(")")

View File

@ -143,6 +143,18 @@ function this:BindEvent()
end,1)
end)
--帮助按钮
Util.AddClick(this.btnSetting,function()
if ctrlView.GetCallListCount() > 1 then
PopupTipPanel.ShowTip(Language[11259])
return
end
if CarbonManager.carbonType == CARBON_TYPE.TRIAL then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialSetting)
else
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.WuJinSetting)
end
end)
--missionView.BindEvent()
trialPanel:BindEvent()
endLessMapView:BindEvent()

View File

@ -59,7 +59,7 @@ function this:BindEvent()
-- CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
local fightData = BattleManager.GetBattleServerData(msg)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE, function()
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.MAP_FIGHT, function()
--更新精气值
--LogGreen("战斗后的更新精气值:"..msg.essenceValue)
MapTrialManager.powerValue = msg.essenceValue
@ -74,53 +74,51 @@ function this:BindEvent()
-- 刷新数据
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
end, 0.2):Start()
if msg.result == 1 then
UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
end)
end
-- if msg.result == 1 then
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.enventDrop,1,function()
-- end)
-- end
end)
self:ClosePanel()
end)
else
--先保存编队
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)
--先保存编队
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
--更新英雄HP
MapTrialManager.SetHeroHp(msg.remainHpList, MapTrialManager.selectHeroDid)
local fightData = BattleManager.GetBattleServerData(msg)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE, function()
--更新精气值
--LogGreen("战斗后的更新精气值:"..msg.essenceValue)
MapTrialManager.powerValue = msg.essenceValue
--召唤Boss
if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then
MapTrialManager.isHaveBoss = true
MapTrialManager.UpdatePowerValue(0)
--请求战斗数据
NetManager.QuickFightRequest(function(msg)
--战斗赢了 击杀小怪数量+1包括BOSS吗
if msg.result==1 then
MapTrialManager.SetKillCount(MapTrialManager.GetKilCount()+1)
end
-- 延迟一秒刷新显示,避免战斗界面关闭时地图界面没有打开,无法监听删点事件,导致怪物点无法删除的问题
Timer.New(function()
-- 刷新数据
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
end, 0.2):Start()
--更新英雄HP
MapTrialManager.SetHeroHp(msg.remainHpList, MapTrialManager.selectHeroDid)
local fightData = BattleManager.GetBattleServerData(msg)
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE, function()
--更新精气值
--LogGreen("战斗后的更新精气值:"..msg.essenceValue)
MapTrialManager.powerValue = msg.essenceValue
--召唤Boss
if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then
MapTrialManager.isHaveBoss = true
MapTrialManager.UpdatePowerValue(0)
end
-- 延迟一秒刷新显示,避免战斗界面关闭时地图界面没有打开,无法监听删点事件,导致怪物点无法删除的问题
Timer.New(function()
-- 刷新数据
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
end, 0.2):Start()
end)
self:ClosePanel()
end)
self:ClosePanel()
end)
end
end)
end

View File

@ -128,14 +128,6 @@ function TrialMapPanel:BindEvent()
end
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.Sunro,this.helpPos.x,this.helpPos.y)
end)
--设置按钮
Util.AddClick(MapPanel.btnSetting, function ()
if ctrlView.GetCallListCount() > 1 then
PopupTipPanel.ShowTip(Language[11259])
return
end
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TrialSetting)
end)
end
--添加事件监听(用于子类重写)

View File

@ -381,16 +381,19 @@ function EndLessMapView:ShowHeroData()
end
function EndLessMapView:RefreshTargetRoote()
-- 0 "已领取"
-- 1 "领取"
-- 2 "前往"
this.curMission = EndLessMapManager.GetRewardData()
LogGreen(this.curMission.state.." this.curMission.state")
if this.curMission.state == 0 then
this.TargetBtn1.gameObject:SetActive(false)
this.TargetBtn2.gameObject:SetActive(true)
if this.curMission.state == 2 then
this.TargetBtn1.gameObject:SetActive(true) --未完成
this.TargetBtn2.gameObject:SetActive(false) --以达成
this.TargetRootText.text = string.format("%s<color=#55c688>(%s/%s)</color>",this.curMission.Desc,this.curMission.progress,this.curMission.value)
else
this.TargetBtn1.gameObject:SetActive(true)
this.TargetBtn2.gameObject:SetActive(false)
if this.curMission.index == #EndLessMapManager.mission and this.curMission.state == 2 then
this.TargetBtn1.gameObject:SetActive(false)
this.TargetBtn2.gameObject:SetActive(true)
if this.curMission.index == #EndLessMapManager.mission and this.curMission.state == 0 then
this.TargetRootText.text = "已完成全部任务"
else
this.TargetRootText.text = string.format("%s<color=#FFFFFF>(%s/%s)</color>",this.curMission.Desc,this.curMission.value,this.curMission.value)

View File

@ -67,6 +67,7 @@ local contentScripts = {
[32] = {view = require("Modules/Popup/View/GeneralPopup_YunYouMan"), panelName = "GeneralPopup_YunYouMan",type=GENERAL_POPUP_TYPE.YunYouMan},
--招募奖励详情
[33] = {view = require("Modules/Popup/View/GeneralPopup_RecruitReward"), panelName = "GeneralPopup_RecruitReward",type=GENERAL_POPUP_TYPE.RecrutReward},
[34] = {view = require("Modules/Popup/View/GeneralPopup_EndlessPanel"), panelName = "GeneralPopup_EndlessPanel",type=GENERAL_POPUP_TYPE.WuJinSetting},
}
--子模块预设
local contentPrefabs={}