From da9aeed441a4045a5308334aed788dbf648d0c67 Mon Sep 17 00:00:00 2001
From: zhangqiang <657634622@qq.com>
Date: Wed, 26 May 2021 11:48:44 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BF=83=E9=AD=94=E8=AF=95=E7=82=BC?=
=?UTF-8?q?=E3=80=91=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/Carbon/CarbonManager.lua | 2 +-
.../View/MonsterCampFormationInfo.lua | 18 +++---
.../MonsterCamp/MonsterCampManager.lua | 3 +
.../MonsterCamp/MonsterCampNewPanel.lua | 52 ++++++++++--------
.../~Lua/Modules/Player/RedpotManager.lua | 5 +-
.../~Lua/Modules/Popup/BattleWinPopup.lua | 55 ++++++++++++++-----
.../~Lua/View/MonsterCampSingleWave.lua | 1 +
8 files changed, 91 insertions(+), 47 deletions(-)
diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
index 8b4218228f..6c74876965 100644
--- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
+++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
@@ -640,6 +640,8 @@ RedPointType = {
OrdinaryExplore = 115, --大闹天宫副本
HeroExplore = 116, --日常副本
EpicExplore = 117, --心魔副本
+ EpicExplore_LevleReward = 11701, --心魔副本章节奖励
+ EpicExplore_MoppingUp = 11702, --心魔副本免费挑战次数
LegendExplore = 118, --车迟斗法副本
EndLess = 119,--无尽副本
EndlessPanel = 1191,--无尽副本界面红点
diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
index 9b237fb114..c702b81597 100644
--- a/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Carbon/CarbonManager.lua
@@ -828,7 +828,7 @@ function this. CarbonRedCheck(redType)
end
end
end
- return false
+ return MonsterCampManager.GetCanBattleCount() > 0
--大闹天宫
elseif redType == RedPointType.OrdinaryExplore then
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.EXPEDITION) then
diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua
index 8e13ba8fff..e6d3893879 100644
--- a/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Expedition/View/MonsterCampFormationInfo.lua
@@ -72,9 +72,13 @@ function this:BindEvent()
end
function this:BtnClickEvent()
local x = function()
- NetManager.SweepDemonRequest(waveId,false,function()
- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
- this:SetIcon()
+ NetManager.SweepDemonRequest(waveId,false,function(msg)
+ UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
+ PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
+ Game.GlobalEvent:DispatchEvent(GameEvent.MonsterCamp.UpdatePri)
+ this:SetIcon()
+ CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp)
+ end)
end)
end
if waveId == MonsterCampManager.monsterWave - 1 then
@@ -85,12 +89,12 @@ function this:BtnClickEvent()
end
if freeTime <= 0 then
if BagManager.GetItemCountById(itemId) < costNum then
- PopupTipPanel.ShowTip(string.format(Language[10343], itemConfig[itemId].Name))
+ PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name))
return
end
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数?",costNum,itemConfig[itemId].Name),function() end,function()
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, 1)
+ PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, 1)
x()
end)
end,"取消","确定")
@@ -120,7 +124,7 @@ function this:SetIcon()
freeTime = MonsterCampManager.GetCanBattleCount()
buyTime = MonsterCampManager.GetCanBuyBattleCount()
storeDataId,itemId,costNum = MonsterCampManager.MonsterCampGetCost()
- Util.SetGray(this.fightBtn,false)
+ Util.SetGray(this.sureBtn,false)
this.fightBtnIcon.gameObject:SetActive(false)
this.fightBtnNum.gameObject:SetActive(false)
this.sureBtn:GetComponent("Image").sprite = Util.LoadSprite("r_hero_button_002")
@@ -141,7 +145,7 @@ function this:SetIcon()
this.fightBtnNum.text =string.format("%s",color,costNum)
this.fightBtnText.text = string.format("%s",color,"扫荡")
if buyTime < 1 then
- Util.SetGray(this.fightBtn,true)
+ Util.SetGray(this.sureBtn,true)
end
end
elseif (waveId == MonsterCampManager.monsterWave) then
diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua
index 8b75d90fb8..62d29e5fde 100644
--- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampManager.lua
@@ -260,5 +260,8 @@ function this.MonsterCampBattle(id,type,func)
end
end)
end
+function this.CarbonRedCheck()
+ return this.GetCanBattleCount() > 0
+end
return this
\ No newline at end of file
diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua
index 514694b653..28187147db 100644
--- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/MonsterCampNewPanel.lua
@@ -68,7 +68,8 @@ function MonsterCampNewPanel:BindEvent()
MsgPanel.ShowTwo(string.format("是否花费%s%s购买一次扫荡次数?",costNum,itemConfig[itemId].Name),function() end,function()
ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,1,function()
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, 1)
- this.UpdatePrivilage()
+ this.UpdatePrivilage()
+ CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp)
end)
end,"取消","确定")
end
@@ -86,34 +87,38 @@ function MonsterCampNewPanel:BindEvent()
if rewardFunc then
rewardFunc()
end
- CheckRedPointStatus(RedPointType.EpicExplore)
+ CheckRedPointStatus(RedPointType.EpicExplore_LevleReward)
end)
end)
end,2)
end)
Util.AddClick(this.moppingUpBtn, function ()
- if MonsterCampManager.monsterWave - 1 > 0 then
- local _storeDataId,_itemId,_costNum,moppingUpNum = MonsterCampManager.MonsterCampGetYJGMCost()
- MsgPanel.ShowTwo(string.format("是否花费%s进行一键扫荡?",_costNum,itemConfig[itemId].Name),function() end,function()
- if BagManager.GetItemCountById(_itemId) < _costNum then
- PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name))
- else
- ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,moppingUpNum,function()
- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, moppingUpNum)
- NetManager.SweepDemonRequest(MonsterCampManager.monsterWave - 1,true,function(msg)
- UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, MonsterCampManager.GetCanBattleCount() )
- this.UpdatePrivilage()
- end)
+ if MonsterCampManager.monsterWave - 1 <= 0 then
+ PopupTipPanel.ShowTip("无法扫荡,请先挑战心魔试炼!")
+ return
+ end
+ if freeTimes <= 0 and buyTimes <= 0 then
+ PopupTipPanel.ShowTip("今日已无扫荡次数!")
+ return
+ end
+ local _storeDataId,_itemId,_costNum,moppingUpNum = MonsterCampManager.MonsterCampGetYJGMCost()
+ MsgPanel.ShowTwo(string.format("是否花费%s进行一键扫荡?",_costNum,itemConfig[itemId].Name),function() end,function()
+ if BagManager.GetItemCountById(_itemId) < _costNum then
+ PopupTipPanel.ShowTip(string.format(Language[10298], itemConfig[itemId].Name))
+ else
+ ShopManager.RequestBuyShopItem(SHOP_TYPE.FUNCTION_SHOP,storeDataId,moppingUpNum,function()
+ PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BUY_BATTLENUM, moppingUpNum)
+ NetManager.SweepDemonRequest(MonsterCampManager.monsterWave - 1,true,function(msg)
+ UIManager.OpenPanel(UIName.RewardItemPopup,msg.Drop,1,function()
+ PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, MonsterCampManager.GetCanBattleCount() )
+ this.UpdatePrivilage()
end)
end)
- end
- end,"取消","确定")
- else
- PopupTipPanel.ShowTip("当前不可扫荡!")
- end
+ end)
+ end
+ end,"取消","确定")
end)
- BindRedPointObject(RedPointType.EpicExplore,Util.GetGameObject(this.btnHelpFight, "redPoint"))
+ BindRedPointObject(RedPointType.EpicExplore_LevleReward,Util.GetGameObject(this.btnHelpFight, "redPoint"))
end
this.UpdatePrivilage = function()
@@ -184,8 +189,7 @@ function this.InitMonsterShow()
local tempData = this.SingleDataShow(go, monsterInfo[index])
this.singledataList[monsterInfo[index].Id] = tempData
end)
- LogYellow("MonsterCampManager.monsterWave "..MonsterCampManager.monsterWave)
- this.scrollView:SetIndex(#monsterInfo - MonsterCampManager.monsterWave)
+ this.scrollView:SetIndex(#monsterInfo - MonsterCampManager.monsterWave - 1)
end
--界面关闭时调用(用于子类重写)
@@ -195,7 +199,7 @@ end
--界面销毁时调用(用于子类重写)
function MonsterCampNewPanel:OnDestroy()
- ClearRedPointObject(RedPointType.EpicExplore,Util.GetGameObject(this.btnHelpFight, "redPoint"))
+ ClearRedPointObject(RedPointType.EpicExplore_LevleReward,Util.GetGameObject(this.btnHelpFight, "redPoint"))
for k,v in pairs(this.singledataList) do
v:OnDestroy()
end
diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua
index acf56cf53c..19780007f6 100644
--- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua
@@ -178,6 +178,8 @@ function this.InitRedPointAllRelate()
-- --试炼副本
-- RPData:SetParent(RedPointType.EpicExplore_OpenCarbon, RedPointType.EpicExplore)
-- RPData:SetParent(RedPointType.EpicExplore_GetReward, RedPointType.EpicExplore)
+ RPData:SetParent(RedPointType.EpicExplore_LevleReward, RedPointType.EpicExplore)
+ RPData:SetParent(RedPointType.EpicExplore_MoppingUp, RedPointType.EpicExplore)
-- --精英副本
-- RPData:SetParent(RedPointType.HeroExplore_OpenMap, RedPointType.HeroExplore)
-- RPData:SetParent(RedPointType.HeroExplore_Feats, RedPointType.HeroExplore)
@@ -476,7 +478,8 @@ function this.RegisterRedCheckFunc()
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck)
- RPData:AddCheckFunc(RedPointType.EpicExplore, CarbonManager.CarbonRedCheck)
+ RPData:AddCheckFunc(RedPointType.EpicExplore_LevleReward, CarbonManager.CarbonRedCheck)
+ RPData:AddCheckFunc(RedPointType.EpicExplore_MoppingUp, MonsterCampManager.CarbonRedCheck)
RPData:AddCheckFunc(RedPointType.LegendExplore, CarbonManager.CarbonRedCheck)
--万象境副本
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
index a615bddf49..9e3c8c2304 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
@@ -106,21 +106,48 @@ function BattleWinPopup:NextStep()
end
-- 兽潮来袭结算界面特殊显示
function this.ShowBattleResultByMonsterCamp(drop)
- if m_battlePanel then
- m_battlePanel:ClosePanel()
+ local bestData, allDamage= BattleRecordManager.GetBattleBestData()
+ if bestData then
+ -- 胜利显示本场比赛的表现最好的英雄
+ UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId,bestData.skinId, bestData.damage, allDamage, function(_BattleBestPopup)
+ -- 打开关卡奖励界面
+ UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function(isBackBattle)
+ LogPink("isBackBattle "..tostring(isBackBattle))
+ if not isBackBattle then
+ if _BattleBestPopup then
+ _BattleBestPopup:ClosePanel()
+ end
+ if m_battlePanel then
+ m_battlePanel:ClosePanel()
+ end
+ this:ClosePanel()
+ if m_callBack then m_callBack() end
+ --内容优化 心魔试炼推送
+ Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
+ CheckRedPointStatus(RedPointType.EpicExplore_LevleReward)
+ this:ClosePanel()
+ end
+ end, nil, true,true)
+ end)
end
- this:ClosePanel()
- if m_backPanel then
- UIManager.OpenPanel(m_backPanel)
- end
- UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
- LogPink("isBackBattle "..tostring(isBackBattle))
- if not isBackBattle then
- if m_callBack then m_callBack() end
- --内容优化 心魔试炼推送
- Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
- end
- end, nil, not m_notShowRecord)
+
+
+
+ -- if m_battlePanel then
+ -- m_battlePanel:ClosePanel()
+ -- end
+ -- this:ClosePanel()
+ -- if m_backPanel then
+ -- UIManager.OpenPanel(m_backPanel)
+ -- end
+ -- UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function(isBackBattle)--isBackBattle true时 为回放不走回调
+ -- LogPink("isBackBattle "..tostring(isBackBattle))
+ -- if not isBackBattle then
+ -- if m_callBack then m_callBack() end
+ -- --内容优化 心魔试炼推送
+ -- Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend,FacePanelType.MonsterWave)
+ -- end
+ -- end, nil, not m_notShowRecord)
end
-- 新关卡战斗结算界面特殊显示
function this.ShowBattleResultByStoryFight(drop)
diff --git a/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua b/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua
index fe354227cd..d17f938788 100644
--- a/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua
+++ b/Assets/ManagedResources/~Lua/View/MonsterCampSingleWave.lua
@@ -100,6 +100,7 @@ function MonsterCampSingleWave:OnOpen()
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.MONSTERCAMP_BATTLENUM, 1)
Game.GlobalEvent:DispatchEvent(GameEvent.MonsterCamp.UpdatePri)
self:UpdatePrivilage()
+ CheckRedPointStatus(RedPointType.EpicExplore_MoppingUp)
end)
end)
end