From da6437e2a247db8cd3c3dfbcdbaf8711840bcf84 Mon Sep 17 00:00:00 2001
From: jiaoyangna <3046463818@qq.com>
Date: Thu, 27 May 2021 10:46:22 +0800
Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../~Lua/Common/GlobalDefine.lua | 2 +
.../~Lua/Modules/Map/EndLessMapManager.lua | 3 +
.../~Lua/Modules/Map/MapPanel.lua | 12 +++
.../~Lua/Modules/Map/ShowEnemyInfoPanel.lua | 78 +++++++++----------
.../~Lua/Modules/Map/TrialMapPanel.lua | 8 --
.../~Lua/Modules/Map/View/EndLessMapView.lua | 15 ++--
.../~Lua/Modules/Popup/GeneralPopup.lua | 1 +
7 files changed, 65 insertions(+), 54 deletions(-)
diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
index 13017873b0..694a768125 100644
--- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
+++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
@@ -2027,6 +2027,8 @@ GENERAL_POPUP_TYPE={
RecrutDetail = 36, --限时招募奖励详情
WuJinShuXing = 37,
XiuXingSelectHero = 38,--修行选择英雄弹窗
+
+ WuJinSetting = 39,
}
--通用信息弹窗类型
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
index 5fba3dd37f..c579fc8c5d 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua
@@ -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..(")")
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua
index 9596d2a838..b7f45cd6fe 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/MapPanel.lua
@@ -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()
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua
index a0866640ba..1e2c0ee90d 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua
index 2487e9743c..b84dc1bea7 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMapPanel.lua
@@ -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
--添加事件监听(用于子类重写)
diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
index 35d8908e8a..043d005f2c 100644
--- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua
@@ -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(%s/%s)",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(%s/%s)",this.curMission.Desc,this.curMission.value,this.curMission.value)
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/GeneralPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/GeneralPopup.lua
index 7757084fcd..dd4e84f22d 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/GeneralPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/GeneralPopup.lua
@@ -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={}