【心魔试炼】提交
parent
172f98c207
commit
da9aeed441
|
@ -640,6 +640,8 @@ RedPointType = {
|
|||
OrdinaryExplore = 115, --大闹天宫副本
|
||||
HeroExplore = 116, --日常副本
|
||||
EpicExplore = 117, --心魔副本
|
||||
EpicExplore_LevleReward = 11701, --心魔副本章节奖励
|
||||
EpicExplore_MoppingUp = 11702, --心魔副本免费挑战次数
|
||||
LegendExplore = 118, --车迟斗法副本
|
||||
EndLess = 119,--无尽副本
|
||||
EndlessPanel = 1191,--无尽副本界面红点
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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("<color=#%s>%s</color>",color,costNum)
|
||||
this.fightBtnText.text = string.format("<color=#%s>%s</color>",color,"扫荡")
|
||||
if buyTime < 1 then
|
||||
Util.SetGray(this.fightBtn,true)
|
||||
Util.SetGray(this.sureBtn,true)
|
||||
end
|
||||
end
|
||||
elseif (waveId == MonsterCampManager.monsterWave) then
|
||||
|
|
|
@ -260,5 +260,8 @@ function this.MonsterCampBattle(id,type,func)
|
|||
end
|
||||
end)
|
||||
end
|
||||
function this.CarbonRedCheck()
|
||||
return this.GetCanBattleCount() > 0
|
||||
end
|
||||
|
||||
return this
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
--万象境副本
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue