zhibo
parent
d3530b9128
commit
a18bf96d29
|
@ -1122,6 +1122,7 @@ RedPointType = {
|
|||
EnergyMain_BaseUpLv = 89982,
|
||||
EnergyMain_RobotBuy = 89982,
|
||||
|
||||
Kefulibao = 89985, -- 客服礼包
|
||||
Association = 89986, -- 社群
|
||||
Association_FB1 = 89987,
|
||||
Association_FB2 = 89988,
|
||||
|
|
|
@ -1458,7 +1458,7 @@ function TimeToH_M_S(t)
|
|||
local allMin = math.floor(t / 60)
|
||||
local _min = allMin % 60
|
||||
local _hour = math.floor(allMin / 60)
|
||||
return _hour, string.format("%02d",_min), string.format("%02d", _sec)
|
||||
return _hour, _min, string.format("%02d", _sec)
|
||||
end
|
||||
|
||||
--- 将一段时间转换为分秒
|
||||
|
@ -1476,7 +1476,7 @@ function TimeToYMDHMS(t)
|
|||
if not t or t < 0 then
|
||||
return 0
|
||||
end
|
||||
return os.date("%Y年%m月%d日 %H:%M:%S", t)
|
||||
return os.date(GetLanguageStrById(10779), t)
|
||||
end
|
||||
|
||||
--- 将一段时间转换为时分
|
||||
|
|
|
@ -56,7 +56,7 @@ function AlameinWarRewardPopup:OnShow()
|
|||
end
|
||||
|
||||
function this.FreshData()
|
||||
local starLine = {10, 20, 30}
|
||||
local starLine = {1, 2, 3}
|
||||
this.data = {}
|
||||
local chapterConfig = G_AlameinChapter[this.chapter]
|
||||
-- 10#300103#1|10#10444#5|20#300101#1|20#6000104#1|30#300102#1|30#300104#1|30#10442#1
|
||||
|
|
|
@ -11,62 +11,63 @@ local showIndex = 0
|
|||
|
||||
local orginLayer = 0
|
||||
|
||||
local carbonIndex = 0--副本索引
|
||||
local carbonIndex = 0 --副本索引
|
||||
|
||||
local isGoBattle = fa
|
||||
--顶部背景图
|
||||
local titleBg = {
|
||||
--金币
|
||||
[1] = {bg = "X1_wuzi_banner01",icon = "X1_wuzi_jinbi",titleTip = specialConfig[41].Value, textbg = GetLanguageStrById(10328), color = Color.New(209/255,91/255,0/255,1)},
|
||||
[1] = { bg = "X1_wuzi_banner01", icon = "X1_wuzi_jinbi", titleTip = specialConfig[41].Value, textbg = GetLanguageStrById(10328), color = Color.New(209 / 255, 91 / 255, 0 / 255, 1) },
|
||||
--经验
|
||||
[2] = {bg = "X1_wuzi_banner02",icon = "X1_wuzi_jingyan",titleTip = specialConfig[42].Value, textbg = GetLanguageStrById(10329), color = Color.New(0/255,119/255,241/255,1)},
|
||||
[2] = { bg = "X1_wuzi_banner02", icon = "X1_wuzi_jingyan", titleTip = specialConfig[42].Value, textbg = GetLanguageStrById(10329), color = Color.New(0 / 255, 119 / 255, 241 / 255, 1) },
|
||||
--碎片
|
||||
[3] = {bg = "X1_wuzi_banner04",icon = "X1_wuzi_yingxiong",titleTip = specialConfig[43].Value, textbg = GetLanguageStrById(10330), color = Color.New(224/255,51/255,4/255,1)},
|
||||
[3] = { bg = "X1_wuzi_banner04", icon = "X1_wuzi_yingxiong", titleTip = specialConfig[43].Value, textbg = GetLanguageStrById(10330), color = Color.New(224 / 255, 51 / 255, 4 / 255, 1) },
|
||||
--支援
|
||||
[4] = {bg = "X1_wuzi_banner03",icon = "X1_wuzi_shouhu",titleTip = specialConfig[44].Value, textbg = GetLanguageStrById(10331), color = Color.New(137/255,76/255,212/255,1)},
|
||||
[4] = { bg = "X1_wuzi_banner03", icon = "X1_wuzi_shouhu", titleTip = specialConfig[44].Value, textbg = GetLanguageStrById(10331), color = Color.New(137 / 255, 76 / 255, 212 / 255, 1) },
|
||||
--方案
|
||||
[5] = {bg = "X1_wuzi_banner05",icon = "X1_wuzi_jiezhi",titleTip = specialConfig[45].Value, textbg = GetLanguageStrById(10332), color = Color.New(254/255,0/255,85/255,1)},
|
||||
[5] = { bg = "X1_wuzi_banner05", icon = "X1_wuzi_jiezhi", titleTip = specialConfig[45].Value, textbg = GetLanguageStrById(10332), color = Color.New(254 / 255, 0 / 255, 85 / 255, 1) },
|
||||
}
|
||||
--难度图片
|
||||
local qualityBg = {
|
||||
[1] = {color = Color.New(72/255,121/255,234/255,255/255), font = GetLanguageStrById(10304)},
|
||||
[2] = {color = Color.New(182/255,77/255,242/255,255/255), font = GetLanguageStrById(10305)},
|
||||
[3] = {color = Color.New(224/255,160/255,11/255,255/255), font = GetLanguageStrById(10306)},
|
||||
[4] = {color = Color.New(224/255,160/255,11/255,255/255), font = GetLanguageStrById(10306)},
|
||||
[5] = {color = Color.New(224/255,160/255,11/255,255/255), font = GetLanguageStrById(10306)},
|
||||
[6] = {color = Color.New(255/255,20/255,212/255,255/255), font = GetLanguageStrById(10307)},
|
||||
[7] = {color = Color.New(255/255,20/255,212/255,255/255), font = GetLanguageStrById(10307)},
|
||||
[8] = {color = Color.New(255/255,20/255,212/255,255/255), font = GetLanguageStrById(10307)},
|
||||
[9] = {color = Color.New(255/255,20/255,212/255,255/255), font = GetLanguageStrById(10307)}
|
||||
[1] = { color = Color.New(255 / 255, 255 / 255, 255 / 255, 255 / 255), font = GetLanguageStrById(10304) },
|
||||
[2] = { color = Color.New(84 / 255, 245 / 255, 60 / 255, 255 / 255), font = GetLanguageStrById(10305) },
|
||||
[3] = { color = Color.New(51 / 255, 186 / 255, 255 / 255, 255 / 255), font = GetLanguageStrById(10306) },
|
||||
[4] = { color = Color.New(231 / 255, 46 / 255, 210 / 255, 255 / 255), font = GetLanguageStrById(10288) },
|
||||
[5] = { color = Color.New(248 / 255, 145 / 255, 68 / 255, 255 / 255), font = GetLanguageStrById(10289) },
|
||||
[6] = { color = Color.New(255 / 255, 42 / 255, 36 / 255, 255 / 255), font = GetLanguageStrById(10307) },
|
||||
[7] = { color = Color.New(255 / 255, 244 / 255, 25 / 255, 255 / 255), font = GetLanguageStrById(10308) },
|
||||
[8] = { color = Color.New(255 / 255, 244 / 255, 25 / 255, 255 / 255), font = GetLanguageStrById(10309) },
|
||||
[9] = { color = Color.New(255 / 255, 244 / 255, 25 / 255, 255 / 255), font = GetLanguageStrById(10310) }
|
||||
}
|
||||
|
||||
local itemList = {}--奖励容器
|
||||
local itemList = {} --奖励容器
|
||||
|
||||
--每日副本服务器数据
|
||||
local buyTime = 0--购买次数
|
||||
local freeTime = 0--免费次数
|
||||
local buyTime = 0 --购买次数
|
||||
local freeTime = 0 --免费次数
|
||||
|
||||
--Tab
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData = { [1] = {default = "X1_wuzi_jinbi_weixuanzhong",select = "X1_wuzi_jinbi_xuanzhong" ,lock = "X1_wuzi_jinbi_weixuanzhong", name = GetLanguageStrById(10328),type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
|
||||
[2] = {default = "X1_wuzi_jingyan_weixuanzhong",select = "X1_wuzi_jingyan_xuanzhong" ,lock = "X1_wuzi_jingyan_weixuanzhong", name = GetLanguageStrById(10329),type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
|
||||
[3] = {default = "X1_wuzi_suipian_weixuanzhong",select = "X1_wuzi_suipian_xuanzhong" ,lock = "X1_wuzi_suipian_weixuanzhong", name = GetLanguageStrById(10330),type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_HERODEBRIS },
|
||||
[4] = {default = "X1_wuzi_shouhu_weixuanzhong",select = "X1_wuzi_shouhu_xuanzhong" ,lock = "X1_wuzi_shouhu_weixuanzhong", name = GetLanguageStrById(10331),type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_TALISMAN },
|
||||
[5] = {default = "X1_wuzi_jiezhi_weixuanzhong",select = "X1_wuzi_jiezhi_xuanzhong" ,lock = "X1_wuzi_jiezhi_weixuanzhong", name = GetLanguageStrById(10332),type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_SOULPRINT }
|
||||
}
|
||||
local _TabData = {
|
||||
[1] = { default = "X1_wuzi_jinbi_weixuanzhong", select = "X1_wuzi_jinbi_xuanzhong", lock = "X1_wuzi_jinbi_weixuanzhong", name = GetLanguageStrById(10328), type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
|
||||
[2] = { default = "X1_wuzi_jingyan_weixuanzhong", select = "X1_wuzi_jingyan_xuanzhong", lock = "X1_wuzi_jingyan_weixuanzhong", name = GetLanguageStrById(10329), type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
|
||||
[3] = { default = "X1_wuzi_suipian_weixuanzhong", select = "X1_wuzi_suipian_xuanzhong", lock = "X1_wuzi_suipian_weixuanzhong", name = GetLanguageStrById(10330), type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_HERODEBRIS },
|
||||
[4] = { default = "X1_wuzi_shouhu_weixuanzhong", select = "X1_wuzi_shouhu_xuanzhong", lock = "X1_wuzi_shouhu_weixuanzhong", name = GetLanguageStrById(10331), type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_TALISMAN },
|
||||
[5] = { default = "X1_wuzi_jiezhi_weixuanzhong", select = "X1_wuzi_jiezhi_xuanzhong", lock = "X1_wuzi_jiezhi_weixuanzhong", name = GetLanguageStrById(10332), type = FUNCTION_OPEN_TYPE.DAILYCHALLENGE_SOULPRINT }
|
||||
}
|
||||
|
||||
function DailyCarbonPanel:InitComponent()
|
||||
this.panel = Util.GetGameObject(this.gameObject,"Panel")
|
||||
this.panel = Util.GetGameObject(this.gameObject, "Panel")
|
||||
|
||||
this.bg = Util.GetGameObject(this.panel,"bg"):GetComponent("Image")
|
||||
this.titleIcon = Util.GetGameObject(this.panel,"bg/title/icon"):GetComponent("Image")
|
||||
this.titleText = Util.GetGameObject(this.panel,"bg/title/Text"):GetComponent("Text")
|
||||
this.titleFontBg = Util.GetGameObject(this.panel,"bg/title/fontBg"):GetComponent("Image")
|
||||
this.titleFont = Util.GetGameObject(this.panel,"bg/title/fontBg/Text"):GetComponent("Text")
|
||||
this.bg = Util.GetGameObject(this.panel, "bg"):GetComponent("Image")
|
||||
this.titleIcon = Util.GetGameObject(this.panel, "bg/title/icon"):GetComponent("Image")
|
||||
this.titleText = Util.GetGameObject(this.panel, "bg/title/Text"):GetComponent("Text")
|
||||
this.titleFontBg = Util.GetGameObject(this.panel, "bg/title/fontBg"):GetComponent("Image")
|
||||
this.titleFont = Util.GetGameObject(this.panel, "bg/title/fontBg/Text"):GetComponent("Text")
|
||||
|
||||
this.timeTip = Util.GetGameObject(this.panel,"TimeTip/Text"):GetComponent("Text")
|
||||
this.timeTip = Util.GetGameObject(this.panel, "TimeTip/Text"):GetComponent("Text")
|
||||
|
||||
this.backBtn = Util.GetGameObject(this.panel,"backBtn")
|
||||
this.backBtn = Util.GetGameObject(this.panel, "backBtn")
|
||||
this.helpBtn = Util.GetGameObject(this.panel, "HelpBtn")
|
||||
this.sweepBtn = Util.GetGameObject(this.panel, "sweepBtn")
|
||||
this.helpPosition = this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
|
@ -76,16 +77,17 @@ function DailyCarbonPanel:InitComponent()
|
|||
this.scroll = Util.GetGameObject(this.panel, "Scroll")
|
||||
local w = this.scroll.transform.rect.width
|
||||
local h = this.scroll.transform.rect.height
|
||||
this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,
|
||||
this.pre, nil, Vector2.New(this.scroll.transform.rect.width,this.scroll.transform.rect.height), 1, 1, Vector2.New(0, 0))
|
||||
this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scroll.transform,
|
||||
this.pre, nil, Vector2.New(this.scroll.transform.rect.width, this.scroll.transform.rect.height), 1, 1,
|
||||
Vector2.New(0, 0))
|
||||
this.scrollView.moveTween.MomentumAmount = 1
|
||||
this.scrollView.moveTween.Strength = 2
|
||||
|
||||
this.tabBox = Util.GetGameObject(this.panel, "TabBox")
|
||||
this.TabCtrl = TabBox.New()
|
||||
|
||||
this.HeadFrameView =SubUIManager.Open(SubUIConfig.PlayerHeadFrameView, self.gameObject.transform)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform, { showType = UpViewOpenType.ShowRight})
|
||||
this.HeadFrameView = SubUIManager.Open(SubUIConfig.PlayerHeadFrameView, self.gameObject.transform)
|
||||
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform, { showType = UpViewOpenType.ShowRight })
|
||||
end
|
||||
|
||||
function DailyCarbonPanel:BindEvent()
|
||||
|
@ -96,7 +98,7 @@ function DailyCarbonPanel:BindEvent()
|
|||
end)
|
||||
--帮助按钮
|
||||
Util.AddClick(this.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.DailyCarbon,this.helpPosition.x,this.helpPosition.y)
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.DailyCarbon, this.helpPosition.x, this.helpPosition.y)
|
||||
end)
|
||||
|
||||
--一键扫荡
|
||||
|
@ -107,15 +109,16 @@ function DailyCarbonPanel:BindEvent()
|
|||
return
|
||||
end
|
||||
|
||||
local data = ConfigManager.GetConfigDataByKey("DailyChallengeConfig","Type",carbonIndex)
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",data.PrivilegeId[1])--商店表数据
|
||||
local data = ConfigManager.GetConfigDataByKey("DailyChallengeConfig", "Type", carbonIndex)
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit",
|
||||
data.PrivilegeId[1]) --商店表数据
|
||||
|
||||
--钻石消耗提示
|
||||
if buyTime > 0 then
|
||||
local itemName = ConfigManager.GetConfigDataByKey("ItemConfig","Id",storeData.Cost[1][1])
|
||||
if BagManager.GetItemCountById(storeData.Cost[1][1]) >= storeData.Cost[2][4]*buyTime then
|
||||
-- if freeTime > 0 then
|
||||
-- NetManager.CopyOneKeySweepRequest(carbonIndex,false,function(msg)
|
||||
local itemName = ConfigManager.GetConfigDataByKey("ItemConfig", "Id", storeData.Cost[1][1])
|
||||
if BagManager.GetItemCountById(storeData.Cost[1][1]) >= storeData.Cost[2][4] * buyTime then
|
||||
-- if freeTime > 0 then
|
||||
-- NetManager.CopyOneKeySweepRequest(carbonIndex,false,function(msg)
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
-- if freeTime > 0 then
|
||||
-- PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],freeTime)
|
||||
|
@ -124,40 +127,41 @@ function DailyCarbonPanel:BindEvent()
|
|||
-- end)
|
||||
-- end)
|
||||
-- else
|
||||
local str_1 =string.format(GetLanguageStrById(50279), freeTime ,buyTime,storeData.Cost[2][4]*buyTime,GetLanguageStrById(itemName.Name))
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.Choose,str_1, nil, function(_usebuy)
|
||||
NetManager.CopyOneKeySweepRequest(carbonIndex,_usebuy,function(msg)
|
||||
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.FUNCTION_SHOP)
|
||||
for _, v in ipairs(shopData.storeItem) do
|
||||
if v.id == storeData.Id then
|
||||
if _usebuy then
|
||||
v.buyNum = v.buyNum + buyTime
|
||||
else
|
||||
v.buyNum = v.buyNum
|
||||
end
|
||||
break
|
||||
local str_1 = string.format(GetLanguageStrById(50279), freeTime, buyTime,
|
||||
storeData.Cost[2][4] * buyTime, GetLanguageStrById(itemName.Name))
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.Choose, str_1, nil, function(_usebuy)
|
||||
NetManager.CopyOneKeySweepRequest(carbonIndex, _usebuy, function(msg)
|
||||
local shopData = ShopManager.GetShopDataByType(SHOP_TYPE.FUNCTION_SHOP)
|
||||
for _, v in ipairs(shopData.storeItem) do
|
||||
if v.id == storeData.Id then
|
||||
if _usebuy then
|
||||
v.buyNum = v.buyNum + buyTime
|
||||
else
|
||||
v.buyNum = v.buyNum
|
||||
end
|
||||
break
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
-- if freeTime > 0 then
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],freeTime)
|
||||
-- end
|
||||
this.OnTabChange(carbonIndex)
|
||||
end)
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1, function()
|
||||
-- if freeTime > 0 then
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2], freeTime)
|
||||
-- end
|
||||
this.OnTabChange(carbonIndex)
|
||||
end)
|
||||
end)
|
||||
-- MsgPanel.ShowTwo(, nil,)
|
||||
end)
|
||||
-- MsgPanel.ShowTwo(, nil,)
|
||||
-- end
|
||||
else
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10343),GetLanguageStrById(itemName.Name)))
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10343), GetLanguageStrById(itemName.Name)))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
NetManager.CopyOneKeySweepRequest(carbonIndex, false, function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
NetManager.CopyOneKeySweepRequest(carbonIndex, false, function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1, function()
|
||||
if freeTime > 0 then
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],freeTime)
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2], freeTime)
|
||||
end
|
||||
this.OnTabChange(carbonIndex)
|
||||
end)
|
||||
|
@ -178,11 +182,11 @@ function DailyCarbonPanel:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
function DailyCarbonPanel:AddListener()
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh,this.FiveRefresh)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, this.FiveRefresh)
|
||||
end
|
||||
|
||||
function DailyCarbonPanel:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh,this.FiveRefresh)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, this.FiveRefresh)
|
||||
end
|
||||
|
||||
function DailyCarbonPanel:OnOpen(_carbonIndex)
|
||||
|
@ -198,15 +202,16 @@ function DailyCarbonPanel:OnShow()
|
|||
this.TabCtrl:SetTabAdapter(this.TabAdapter)
|
||||
this.TabCtrl:SetTabIsLockCheck(this.TabIsLockCheck)
|
||||
this.TabCtrl:SetChangeTabCallBack(this.OnTabChange)
|
||||
this.TabCtrl:Init_SetTabAndBox(this.tabBox, _TabData, carbonIndex, Util.GetGameObject(this.tabBox, "tab"), Util.GetGameObject(this.tabBox, "box"))
|
||||
this.TabCtrl:Init_SetTabAndBox(this.tabBox, _TabData, carbonIndex, Util.GetGameObject(this.tabBox, "tab"),
|
||||
Util.GetGameObject(this.tabBox, "box"))
|
||||
-- 音效
|
||||
SoundManager.PlayMusic(SoundConfig.BGM_Carbon)
|
||||
end
|
||||
|
||||
function DailyCarbonPanel:RefreshRedPotShow()
|
||||
local tabs = Util.GetGameObject(this.tabBox,"box").transform
|
||||
for i = 1,tabs.childCount do
|
||||
Util.GetGameObject(tabs:GetChild(i-1),"Redpot").gameObject:SetActive(CarbonManager.GetDailyCarbons(i).state)
|
||||
local tabs = Util.GetGameObject(this.tabBox, "box").transform
|
||||
for i = 1, tabs.childCount do
|
||||
Util.GetGameObject(tabs:GetChild(i - 1), "Redpot").gameObject:SetActive(CarbonManager.GetDailyCarbons(i).state)
|
||||
end
|
||||
CheckRedPointStatus(RedPointType.HeroExplore)
|
||||
end
|
||||
|
@ -231,7 +236,7 @@ function this.OnTabChange(i)
|
|||
carbonIndex = i
|
||||
curData = {}
|
||||
|
||||
curData = ConfigManager.GetAllConfigsDataByKey(ConfigName.DailyChallengeConfig,"Type",i)
|
||||
curData = ConfigManager.GetAllConfigsDataByKey(ConfigName.DailyChallengeConfig, "Type", i)
|
||||
|
||||
this.bg.sprite = Util.LoadSprite(titleBg[i].bg)
|
||||
this.titleIcon.sprite = Util.LoadSprite(titleBg[i].icon)
|
||||
|
@ -250,14 +255,14 @@ function this.SetScroll(_index)
|
|||
|
||||
for i = 1, #curData do
|
||||
local ldata = nil
|
||||
if curData[i-1] ~= nil then
|
||||
ldata = curData[i-1]
|
||||
if curData[i - 1] ~= nil then
|
||||
ldata = curData[i - 1]
|
||||
end
|
||||
local data = curData[i]
|
||||
|
||||
local _lv = 0--等级
|
||||
local _point = 0--关卡
|
||||
local _power = 0--data.ForceShow--表战力
|
||||
local _lv = 0 --等级
|
||||
local _point = 0 --关卡
|
||||
local _power = 0 --data.ForceShow--表战力
|
||||
for i = 1, #data.OpenRules do
|
||||
if data.OpenRules[i][1] == 1 then
|
||||
_lv = data.OpenRules[i][2]
|
||||
|
@ -278,9 +283,9 @@ function this.SetScroll(_index)
|
|||
end
|
||||
|
||||
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)) -- 上一个副本解锁
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||
and PlayerManager.maxForce >= _power -- 战斗力
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||
and PlayerManager.maxForce >= _power -- 战斗力
|
||||
|
||||
-- if isOpen and not CarbonManager.IsDailyCarbonPass(data.Id) then
|
||||
-- showIndex = _index
|
||||
|
@ -288,8 +293,8 @@ function this.SetScroll(_index)
|
|||
end
|
||||
|
||||
-- local itemList = {}
|
||||
this.scrollView:SetData(curData,function(index,root)
|
||||
this.SetData(root,curData[index], curData[index - 1])
|
||||
this.scrollView:SetData(curData, function(index, root)
|
||||
this.SetData(root, curData[index], curData[index - 1])
|
||||
-- itemList[index] = root
|
||||
end)
|
||||
Util.SetGray(this.sweepBtn, not this.isOk)
|
||||
|
@ -302,26 +307,27 @@ end
|
|||
function this.SetData(root, data, ldata)
|
||||
-- root:SetActive(true)
|
||||
local type = 0 --0为未开启 1为挑战 2为扫荡
|
||||
local title = Util.GetGameObject(root,"Title"):GetComponent("Text")
|
||||
local reward = Util.GetGameObject(root,"Reward")
|
||||
local tip = Util.GetGameObject(root,"Tip"):GetComponent("Text")
|
||||
local title = Util.GetGameObject(root, "Title"):GetComponent("Text")
|
||||
local reward = Util.GetGameObject(root, "Reward")
|
||||
local tip = Util.GetGameObject(root, "Tip"):GetComponent("Text")
|
||||
|
||||
local goBtn = Util.GetGameObject(root,"GoBtn")
|
||||
local sweep = Util.GetGameObject(goBtn,"sweep")
|
||||
local challenge = Util.GetGameObject(goBtn,"challenge")
|
||||
local goBtn = Util.GetGameObject(root, "GoBtn")
|
||||
local sweep = Util.GetGameObject(goBtn, "sweep")
|
||||
local challenge = Util.GetGameObject(goBtn, "challenge")
|
||||
|
||||
local Consume = Util.GetGameObject(root,"Consume")
|
||||
local Consume = Util.GetGameObject(root, "Consume")
|
||||
-- local goIcon = Util.GetGameObject(root,"Consume/Icon")
|
||||
local goIconNum = Util.GetGameObject(root,"Consume/Num"):GetComponent("Text")
|
||||
local goIconNum = Util.GetGameObject(root, "Consume/Num"):GetComponent("Text")
|
||||
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",data.PrivilegeId[1])--商店表数据
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit",
|
||||
data.PrivilegeId[1]) --商店表数据
|
||||
title.text = qualityBg[data.Quality].font
|
||||
title.color = qualityBg[data.Quality].color
|
||||
|
||||
ResetItemView(root,reward.transform,itemList,3,1,orginLayer,false,data.RewardView)
|
||||
ResetItemView(root, reward.transform, itemList, 3, 1, orginLayer, false, data.RewardView)
|
||||
|
||||
--解锁状态
|
||||
local _lv = 0 --等级
|
||||
local _lv = 0 --等级
|
||||
local _point = 0 --关卡
|
||||
local _power = 0 --data.ForceShow--表战力
|
||||
|
||||
|
@ -347,9 +353,9 @@ function this.SetData(root, data, ldata)
|
|||
local maxPower = FormationManager.GetMaxPowerForTeamID()
|
||||
-- 判断每日副本是否解锁
|
||||
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)) -- 上一个副本解锁
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||
and maxPower >= _power -- 战斗力
|
||||
and maxPower >= _power -- 战斗力
|
||||
--显示挑战或扫荡道具消耗
|
||||
Consume:SetActive(isOpen and freeTime <= 0)
|
||||
|
||||
|
@ -357,8 +363,8 @@ function this.SetData(root, data, ldata)
|
|||
goIconNum.text = storeData.Cost[2][4]
|
||||
end
|
||||
|
||||
Util.GetGameObject(challenge,"Text"):GetComponent("Text").text = GetLanguageStrById(10334)
|
||||
Util.GetGameObject(sweep,"Text"):GetComponent("Text").text = GetLanguageStrById(10336)
|
||||
Util.GetGameObject(challenge, "Text"):GetComponent("Text").text = GetLanguageStrById(10334)
|
||||
Util.GetGameObject(sweep, "Text"):GetComponent("Text").text = GetLanguageStrById(10336)
|
||||
--表现显示
|
||||
Util.SetGray(goBtn, not isOpen)
|
||||
if isOpen then
|
||||
|
@ -366,7 +372,7 @@ function this.SetData(root, data, ldata)
|
|||
goBtn:SetActive(true)
|
||||
tip.gameObject:SetActive(false)
|
||||
sweep:SetActive(false)
|
||||
if CarbonManager.IsDailyCarbonPass(data.Id) then--扫荡
|
||||
if CarbonManager.IsDailyCarbonPass(data.Id) then --扫荡
|
||||
this.isOk = true
|
||||
type = 2
|
||||
sweep:SetActive(true)
|
||||
|
@ -375,41 +381,42 @@ function this.SetData(root, data, ldata)
|
|||
type = 0
|
||||
goBtn:SetActive(false)
|
||||
tip.gameObject:SetActive(true)
|
||||
tip.text = string.format(GetLanguageStrById(10338),_power)
|
||||
tip.text = string.format(GetLanguageStrById(10338), _power)
|
||||
end
|
||||
|
||||
--点击事件
|
||||
Util.AddOnceClick(goBtn, function()
|
||||
local func = function()
|
||||
if PlayerManager.level < _lv then
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10340),_lv))
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10340), _lv))
|
||||
return
|
||||
elseif maxPower < _power then
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(12219), _power))
|
||||
return
|
||||
return
|
||||
elseif _point ~= 0 and not FightPointPassManager.IsFightPointPass(_point) then
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(12220), mainLevelConfig[_point].Name))
|
||||
return
|
||||
-- elseif PlayerManager.curMapId ~= 0 and FightPointPassManager.IsFightPointPass(PlayerManager.curMapId)==false then
|
||||
-- PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10341),mainLevelConfig[_point].Name))
|
||||
-- return
|
||||
return
|
||||
-- elseif PlayerManager.curMapId ~= 0 and FightPointPassManager.IsFightPointPass(PlayerManager.curMapId)==false then
|
||||
-- PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10341),mainLevelConfig[_point].Name))
|
||||
-- return
|
||||
end
|
||||
|
||||
|
||||
if not isOpen then
|
||||
PopupTipPanel.ShowTip(GetLanguageStrById(12191))
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--检测剩余次数
|
||||
if buyTime <= 0 and freeTime <= 0 then
|
||||
PopupTipPanel.ShowTip(GetLanguageStrById(10342))
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
--检测妖晶数量
|
||||
local itemId = storeData.Cost[1][1] --消耗道具
|
||||
if BagManager.GetItemCountById(itemId) < storeData.Cost[2][4] and freeTime <= 0 then
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10343),GetLanguageStrById(itemConfig[itemId].Name)))
|
||||
PopupTipPanel.ShowTip(string.format(GetLanguageStrById(10343),
|
||||
GetLanguageStrById(itemConfig[itemId].Name)))
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -420,7 +427,6 @@ function this.SetData(root, data, ldata)
|
|||
|
||||
isGoBattle = true
|
||||
NetManager.DailyChallengeRequest(data.Id, type, function(msg)
|
||||
|
||||
ThinkingAnalyticsManager.Track("train_start", {
|
||||
train_start_id = data.Id
|
||||
})
|
||||
|
@ -428,30 +434,31 @@ function this.SetData(root, data, ldata)
|
|||
local fightData = BattleManager.GetBattleServerData(msg)
|
||||
fightData.mapName = this.GetMapName(data.Type)
|
||||
if type == 1 then --挑战
|
||||
BattleManager.SetAgainstInfoAICommon(BATTLE_TYPE.CollectMaterials, G_DailyChallengeConfig[data.Id].MonsterId)
|
||||
BattleManager.SetAgainstInfoAICommon(BATTLE_TYPE.CollectMaterials,
|
||||
G_DailyChallengeConfig[data.Id].MonsterId)
|
||||
UIManager.OpenPanel(UIName.BattleStartPopup, function()
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.CollectMaterials , function(result)
|
||||
if result.result == 0 then
|
||||
this.SetTimeTip()
|
||||
this:RefreshRedPotShow()
|
||||
this.SetScroll()
|
||||
isGoBattle = false
|
||||
elseif result.result == 1 then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],1)
|
||||
CarbonManager.AddDailyChallengeInfo(data.Id)
|
||||
-- this.RefreshShow(carbonIndex)
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.CollectMaterials, function(result)
|
||||
if result.result == 0 then
|
||||
this.SetTimeTip()
|
||||
this:RefreshRedPotShow()
|
||||
this.SetScroll()
|
||||
isGoBattle = false
|
||||
end)
|
||||
end
|
||||
elseif result.result == 1 then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1, function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2], 1)
|
||||
CarbonManager.AddDailyChallengeInfo(data.Id)
|
||||
-- this.RefreshShow(carbonIndex)
|
||||
this.SetTimeTip()
|
||||
this:RefreshRedPotShow()
|
||||
this.SetScroll()
|
||||
isGoBattle = false
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
elseif type == 2 then --扫荡
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],1)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1, function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2], 1)
|
||||
-- this.RefreshShow(carbonIndex)
|
||||
this.SetTimeTip()
|
||||
this:RefreshRedPotShow()
|
||||
|
@ -478,33 +485,34 @@ end
|
|||
|
||||
--设置剩余次数
|
||||
function this.SetTimeTip()
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",curData[1].PrivilegeId[1])--商店表数据
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit",
|
||||
curData[1].PrivilegeId[1]) --商店表数据
|
||||
local buyTimeId = curData[1].PrivilegeId[1]
|
||||
local freeTimeId = curData[1].PrivilegeId[2]
|
||||
buyTime = ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数
|
||||
freeTime = PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数
|
||||
buyTime = ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP, storeData.Id) --购买次数
|
||||
freeTime = PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数
|
||||
local str = ""
|
||||
if freeTime > 0 then
|
||||
str = string.format(GetLanguageStrById(10344),"<color=#FFD12B><B>"..tostring(freeTime).."</B></color>")
|
||||
str = string.format(GetLanguageStrById(10344), "<color=#FFD12B><B>" .. tostring(freeTime) .. "</B></color>")
|
||||
else
|
||||
str = string.format(GetLanguageStrById(10345),"<color=#FFD12B><B>"..tostring(buyTime).."</B></color>")
|
||||
str = string.format(GetLanguageStrById(10345), "<color=#FFD12B><B>" .. tostring(buyTime) .. "</B></color>")
|
||||
end
|
||||
this.timeTip.text = str
|
||||
end
|
||||
|
||||
-- tab节点显示自定义
|
||||
function this.TabAdapter(tab, index, status)
|
||||
local select = Util.GetGameObject(tab,"select")
|
||||
local select = Util.GetGameObject(tab, "select")
|
||||
local lock = Util.GetGameObject(tab, "LockImage")
|
||||
lock:SetActive(status == "lock")
|
||||
select:SetActive(status == "select")
|
||||
local bg = Util.GetGameObject(tab,"bg"):GetComponent("Image")
|
||||
local bg = Util.GetGameObject(tab, "bg"):GetComponent("Image")
|
||||
bg.sprite = Util.LoadSprite(GetPictureFont(_TabData[index][status]))
|
||||
end
|
||||
|
||||
function this.TabIsLockCheck(index)
|
||||
if not ActTimeCtrlManager.SingleFuncState(_TabData[index].type) then
|
||||
return true,ActTimeCtrlManager.SystemOpenTip(_TabData[index].type)
|
||||
return true, ActTimeCtrlManager.SystemOpenTip(_TabData[index].type)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
@ -521,4 +529,4 @@ function this.GetMapName(type)
|
|||
return typeToMap[type]
|
||||
end
|
||||
|
||||
return DailyCarbonPanel
|
||||
return DailyCarbonPanel
|
||||
|
|
|
@ -32,14 +32,14 @@ function this:InitComponent(gameObject)
|
|||
local w = this.scroll.transform.rect.width
|
||||
local h = this.scroll.transform.rect.height
|
||||
this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, this.scroll.transform, this.pro, nil,
|
||||
Vector2.New(w, h), 1, 1, Vector2.New(0, 5))
|
||||
Vector2.New(w, h), 1, 1, Vector2.New(0, 5))
|
||||
this.scrollView.moveTween.MomentumAmount = 1
|
||||
this.scrollView.moveTween.Strength = 2
|
||||
this.myRank = Util.GetGameObject(gameObject, "myRank")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.btnReward, function ()
|
||||
Util.AddClick(this.btnReward, function()
|
||||
UIManager.OpenPanel(UIName.ExpertRewardSortPanel, activityId, 4)
|
||||
end)
|
||||
end
|
||||
|
@ -82,12 +82,12 @@ function this:OnShow(go, activeType, netIndex)
|
|||
openType = activeType
|
||||
this.banner.sprite = Util.LoadSprite(GetPictureFont(AcitvityShowTheme[activeType].Compent))
|
||||
this.expertDec.text = GetLanguageStrById(GlobalActivity[activeType].ExpertDec)
|
||||
NetManager.RequestRankInfo(netIndex, function (msg)
|
||||
NetManager.RequestRankInfo(netIndex, function(msg)
|
||||
this.rankDatas = msg.ranks
|
||||
this.scrollView:SetData(this.rankDatas, function(index, go)
|
||||
this.SetPlayerRank(go, this.rankDatas[index])
|
||||
end)
|
||||
this.SetMyRank(msg.myRankInfo)
|
||||
this.SetMyRank(msg.myRankInfo, msg.myHeroTemplateId)
|
||||
end, activityId)
|
||||
this.SetFirstReward()
|
||||
end
|
||||
|
@ -109,16 +109,18 @@ function this.SetPlayerRank(go, data)
|
|||
score = data.rankInfo.param1,
|
||||
name = data.userName,
|
||||
head = data.head,
|
||||
hero = data.heroTemplateId,
|
||||
frame = data.headFrame,
|
||||
level = data.level,
|
||||
uid = data.uid,
|
||||
})
|
||||
end
|
||||
|
||||
function this.SetMyRank(data)
|
||||
function this.SetMyRank(data,myHeroTemplateId)
|
||||
this.SetPro(this.myRank, {
|
||||
rank = data.rank,
|
||||
score = data.param1,
|
||||
hero = myHeroTemplateId,
|
||||
name = PlayerManager.nickName,
|
||||
head = PlayerManager.head,
|
||||
frame = PlayerManager.frame,
|
||||
|
@ -146,7 +148,7 @@ function this.SetPro(go, data)
|
|||
rank1.gameObject:SetActive(false)
|
||||
rank2:SetActive(true)
|
||||
if data.rank < 1 then
|
||||
rank2Txt.text = GetLanguageStrById(10041)
|
||||
rank2Txt.text = GetLanguageStrById(10041)
|
||||
else
|
||||
rank2Txt.text = data.rank
|
||||
end
|
||||
|
@ -164,7 +166,12 @@ function this.SetPro(go, data)
|
|||
end
|
||||
headList[go]:Reset()
|
||||
headList[go]:SetScale(Vector3.one * 0.5)
|
||||
headList[go]:SetHead(data.head)
|
||||
LogError("开服冲榜herotemplateid:" .. data.hero)
|
||||
if data.hero and data.hero ~= 0 and ConfigManager.GetConfigData(ConfigName.ItemConfig, data.hero) then
|
||||
headList[go]:SetHead(nil, ConfigManager.GetConfigData(ConfigName.ItemConfig, data.hero).icon)
|
||||
else
|
||||
headList[go]:SetHead(data.head)
|
||||
end
|
||||
headList[go]:SetFrame(data.frame)
|
||||
headList[go]:SetLevel(data.level)
|
||||
headList[go]:SetUID(data.uid)
|
||||
|
@ -188,14 +195,15 @@ function this.GetBg(rank)
|
|||
colorValue = Color.New(1, 0.6117647, 0.5803922, 1)
|
||||
else
|
||||
spriteName = "X1_tongyong_liebiao_05"
|
||||
colorValue = Color.New(0.7803922,0.5529412, 0.9960784, 1)
|
||||
colorValue = Color.New(0.7803922, 0.5529412, 0.9960784, 1)
|
||||
end
|
||||
return spriteName, colorValue
|
||||
end
|
||||
|
||||
function this.SetFirstReward()
|
||||
local config = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityRankingReward, "ActivityId", activityId, "MinRank", 1)
|
||||
LogError("activityId:"..activityId)
|
||||
local config = ConfigManager.GetConfigDataByDoubleKey(ConfigName.ActivityRankingReward, "ActivityId", activityId,
|
||||
"MinRank", 1)
|
||||
LogError("activityId:" .. activityId)
|
||||
for i = 1, #rewardList do
|
||||
rewardList[i].gameObject:SetActive(false)
|
||||
end
|
||||
|
@ -208,4 +216,4 @@ function this.SetFirstReward()
|
|||
end
|
||||
end
|
||||
|
||||
return RankPanel
|
||||
return RankPanel
|
||||
|
|
|
@ -58,7 +58,7 @@ function ZhenQiYiBaoPage:OnShowData()
|
|||
for i = 1, #GlobalActivity[curActId].CanBuyRechargeId do
|
||||
local data = ConfigManager.GetConfigDataByKey(ConfigName.RechargeCommodityConfig, "Id", GlobalActivity[curActId].CanBuyRechargeId[i])
|
||||
if VipManager.GetVipLevel() >= data.VipLvShow then
|
||||
--table.insert(allData,data)
|
||||
table.insert(allData,data)
|
||||
end
|
||||
end
|
||||
if allData then
|
||||
|
@ -101,8 +101,8 @@ function ZhenQiYiBaoPage:SortData()
|
|||
return
|
||||
end
|
||||
table.sort(allData, function(a,b)
|
||||
local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1
|
||||
local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1
|
||||
local aboughtNum = a.Limit - (OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) or a.Limit) > 0 and 2 or 1
|
||||
local bboughtNum = b.Limit - (OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id)or b.Limit) > 0 and 2 or 1
|
||||
if aboughtNum == bboughtNum then
|
||||
if a.Sequence == b.Sequence then
|
||||
return a.Price < b.Price
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -38,7 +38,7 @@ function BattleWinPopup:OnOpen(battlePanel, isBack, fightType, result, showRecor
|
|||
if UIManager.IsOpen(UIName.PublicGetHeroPanel) then
|
||||
UIManager.ClosePanel(UIName.PublicGetHeroPanel)
|
||||
end
|
||||
|
||||
|
||||
hadClick = false
|
||||
if battlePanel then
|
||||
m_battlePanel = battlePanel
|
||||
|
@ -79,7 +79,7 @@ end
|
|||
function BattleWinPopup:OnDestroy()
|
||||
end
|
||||
|
||||
--
|
||||
--
|
||||
function BattleWinPopup:NextStep()
|
||||
if not hadClick then -- 避免重复结算
|
||||
hadClick = true
|
||||
|
@ -90,14 +90,21 @@ function BattleWinPopup:NextStep()
|
|||
self:ClosePanel()
|
||||
return
|
||||
end
|
||||
|
||||
if m_fightType == BATTLE_TYPE.MAP_FIGHT then
|
||||
-- UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 2, function()
|
||||
MapManager.DropAddShotTimeBag(m_battleResult.drop)
|
||||
UIManager.OpenPanel(UIName.BattleEndPanel, m_battlePanel, m_battleResult.hpList, m_battleResult.drop, function() m_battlePanel:ClosePanel() self:ClosePanel() end, true)
|
||||
UIManager.OpenPanel(UIName.BattleEndPanel, m_battlePanel, m_battleResult.hpList, m_battleResult.drop,
|
||||
function()
|
||||
m_battlePanel:ClosePanel()
|
||||
self:ClosePanel()
|
||||
end, true)
|
||||
-- end)
|
||||
elseif m_fightType == BATTLE_TYPE.ELITE_MONSTER then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function() m_battlePanel:ClosePanel() self:ClosePanel() end, 1, true)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,
|
||||
function()
|
||||
m_battlePanel:ClosePanel()
|
||||
self:ClosePanel()
|
||||
end, 1, true)
|
||||
elseif m_fightType == BATTLE_TYPE.MONSTER_CAMP then
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
|
@ -106,7 +113,7 @@ function BattleWinPopup:NextStep()
|
|||
if m_backPanel then
|
||||
UIManager.OpenPanel(m_backPanel)
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_callBack then m_callBack() end
|
||||
end, nil, not m_notShowRecord)
|
||||
elseif m_fightType == BATTLE_TYPE.STORY_FIGHT then
|
||||
|
@ -115,21 +122,22 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 1, true, true,nil,false, nil, m_fightType)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 1, true, true, nil, false, nil, m_fightType)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
|
@ -141,90 +149,74 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo--ExpeditionManager.GetCurNodeInfo()
|
||||
local GetCurNodeInfo = ExpeditionManager.curAttackNodeInfo --ExpeditionManager.GetCurNodeInfo()
|
||||
local func2 = nil
|
||||
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
|
||||
if GetCurNodeInfo.type == ExpeditionNodeType.Trail then --试炼节点
|
||||
func2 = function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
||||
end
|
||||
end
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
--贪婪节点不弹领取圣物
|
||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then--贪婪节点
|
||||
if m_battleResult.drop.itemlist and #m_battleResult.drop.itemlist > 0 then
|
||||
else
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
||||
end, 0,true,true)
|
||||
elseif GetCurNodeInfo.type == ExpeditionNodeType.Trail then--试炼节点
|
||||
if m_battleResult.drop and m_battleResult.drop.Hero and m_battleResult.drop.Hero[1] then
|
||||
ExpeditionManager.UpdateHeroDatas(m_battleResult.drop.Hero[1])
|
||||
else
|
||||
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
PopupTipPanel.ShowTipByLanguageId(12192)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,m_battleResult.drop, 1,function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
|
||||
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel,true,function ()
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
--贪婪节点不弹领取圣物
|
||||
if GetCurNodeInfo.type == ExpeditionNodeType.Greed then --贪婪节点
|
||||
if m_battleResult.drop.itemlist and #m_battleResult.drop.itemlist > 0 then
|
||||
else
|
||||
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
||||
end
|
||||
end, 0,true,true,nil,false)
|
||||
end
|
||||
end,func2)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
||||
end, 0, true, true)
|
||||
elseif GetCurNodeInfo.type == ExpeditionNodeType.Trail then --试炼节点
|
||||
if m_battleResult.drop and m_battleResult.drop.Hero and m_battleResult.drop.Hero[1] then
|
||||
ExpeditionManager.UpdateHeroDatas(m_battleResult.drop.Hero[1])
|
||||
else
|
||||
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
PopupTipPanel.ShowTipByLanguageId(12192)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if GetCurNodeInfo.holyEquipID and #GetCurNodeInfo.holyEquipID > 0 then
|
||||
UIManager.OpenPanel(UIName.ExpeditionSelectHalidomPanel, true, function()
|
||||
end)
|
||||
else
|
||||
--此时战斗了但没有圣物 所有直接刷新界面动画 后并刷新界面
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Expedition.RefreshPlayAniMainPanel)
|
||||
end
|
||||
end, 0, true, true, nil, false)
|
||||
end
|
||||
end, func2)
|
||||
end
|
||||
elseif m_fightType == BATTLE_TYPE.DAILY_CHALLENGE
|
||||
or m_fightType == BATTLE_TYPE.REDCLIFF
|
||||
or m_fightType == BATTLE_TYPE.CollectMaterials
|
||||
then
|
||||
then
|
||||
m_battlePanel:ClosePanel()
|
||||
self:ClosePanel()
|
||||
elseif m_fightType == BATTLE_TYPE.GUILD_CAR_DELAY then
|
||||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,nil, 1,function()
|
||||
--车迟抢夺cd计时
|
||||
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 3,true,true,nil,false)
|
||||
end)
|
||||
end
|
||||
elseif m_fightType == BATTLE_TYPE.Climb_Tower then
|
||||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
NetManager.VirtualBattleGetInfo(function()
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, nil, 1, function()
|
||||
--车迟抢夺cd计时
|
||||
GuildCarDelayManager.SetCdTime(GuildCarDelayProType.Loot)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
|
@ -232,13 +224,32 @@ function BattleWinPopup:NextStep()
|
|||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true,nil,false, nil, m_fightType)
|
||||
end, 3, true, true, nil, false)
|
||||
end)
|
||||
end
|
||||
elseif m_fightType == BATTLE_TYPE.Climb_Tower then
|
||||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
NetManager.VirtualBattleGetInfo(function()
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true, nil, false, nil, m_fightType)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
NetManager.VirtualBattleGetInfo(function()
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
|
@ -250,27 +261,28 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.VirtualElitBattleGetInfo(function()
|
||||
ClimbTowerManager.GetRankData(function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true,nil,false, nil, BATTLE_TYPE.Climb_Tower_Advance)
|
||||
end, ClimbTowerManager.ClimbTowerType.Advance)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.VirtualElitBattleGetInfo(function()
|
||||
ClimbTowerManager.GetRankData(function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true, nil, false, nil, BATTLE_TYPE.Climb_Tower_Advance)
|
||||
end, ClimbTowerManager.ClimbTowerType.Advance)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.VirtualElitBattleGetInfo(function()
|
||||
ClimbTowerManager.GetRankData(function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
|
@ -283,24 +295,25 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.DefTrainingGetInfo(function(msg) --拉数据
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true,nil,false, nil, BATTLE_TYPE.DefenseTraining)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.DefTrainingGetInfo(function(msg) --拉数据
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true, nil, false, nil, BATTLE_TYPE.DefenseTraining)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
NetManager.DefTrainingGetInfo(function(msg)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
|
@ -312,32 +325,33 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
NetManager.BlitzInfo(function(msg)
|
||||
NetManager.BlitzTypeInfo(function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
|
||||
if BlitzStrikePreFightPopup then
|
||||
BlitzStrikePreFightPopup:ClosePanel()
|
||||
end
|
||||
if BlitzStrikePanel then
|
||||
BlitzStrikePanel.UpdateMain()
|
||||
end
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
NetManager.BlitzInfo(function(msg)
|
||||
NetManager.BlitzTypeInfo(function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
|
||||
if BlitzStrikePreFightPopup then
|
||||
BlitzStrikePreFightPopup:ClosePanel()
|
||||
end
|
||||
if BlitzStrikePanel then
|
||||
BlitzStrikePanel.UpdateMain()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end, 0, true, true,nil,false)
|
||||
end)
|
||||
end, 0, true, true, nil, false)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
NetManager.BlitzInfo(function(msg)
|
||||
NetManager.BlitzTypeInfo(function()
|
||||
if m_battlePanel then
|
||||
|
@ -359,41 +373,43 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
--胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,false, 1,function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
UIManager.ClosePanel(UIName.HegemonyPopup)
|
||||
UIManager.ClosePanel(UIName.BattlePanel)
|
||||
this:ClosePanel()
|
||||
end,7,true,true,nil,false,HegemonyManager.curFightId)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, false, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
UIManager.ClosePanel(UIName.HegemonyPopup)
|
||||
UIManager.ClosePanel(UIName.BattlePanel)
|
||||
this:ClosePanel()
|
||||
end, 7, true, true, nil, false, HegemonyManager.curFightId)
|
||||
end)
|
||||
end
|
||||
end, 0.1):Start()
|
||||
elseif m_fightType == BATTLE_TYPE.ALAMEIN_WAR then
|
||||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
AlameinWarManager.RequestMainData(function()
|
||||
AlameinWarStagePanel.UpdateMain(true)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end, 0, true, true,nil,false)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
AlameinWarManager.RequestMainData(function()
|
||||
AlameinWarStagePanel.UpdateMain(true)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end, 0, true, true, nil, false)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
AlameinWarManager.RequestMainData(function()
|
||||
AlameinWarStagePanel.UpdateMain(true)
|
||||
if m_battlePanel then
|
||||
|
@ -407,55 +423,57 @@ function BattleWinPopup:NextStep()
|
|||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, LaddersArenaManager.drop, 1,function()
|
||||
UIManager.ClosePanel(UIName.PlayerInfoPopup)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 8, true, true,nil,false)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, LaddersArenaManager.drop, 1, function()
|
||||
UIManager.ClosePanel(UIName.PlayerInfoPopup)
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 8, true, true, nil, false)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,LaddersArenaManager.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, LaddersArenaManager.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 8, true, true,nil,false)
|
||||
end, 8, true, true, nil, false)
|
||||
end
|
||||
elseif m_fightType == BATTLE_TYPE.PVEActivity then
|
||||
local bestData, allDamage = BattleRecordManager.GetBattleBestData()
|
||||
if bestData then
|
||||
-- 胜利显示本场比赛的表现最好的英雄
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage, function(_BattleBestPopup)
|
||||
-- -- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true,nil,false)
|
||||
end)
|
||||
UIManager.OpenPanel(UIName.BattleBestPopup, bestData.roleId, bestData.damage, allDamage,
|
||||
function(_BattleBestPopup)
|
||||
-- -- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if _BattleBestPopup then
|
||||
_BattleBestPopup:ClosePanel()
|
||||
end
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true, nil, false)
|
||||
end)
|
||||
else
|
||||
-- 打开关卡奖励界面
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1,function()
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, m_battleResult.drop, 1, function()
|
||||
if m_battlePanel then
|
||||
m_battlePanel:ClosePanel()
|
||||
end
|
||||
self:ClosePanel()
|
||||
end, 0, true, true,nil,false)
|
||||
end, 0, true, true, nil, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return BattleWinPopup
|
||||
return BattleWinPopup
|
||||
|
|
|
@ -3114,7 +3114,6 @@ function this:AbilityUpdateUI()
|
|||
if isOpen then -- isOpen
|
||||
local isOn = false
|
||||
local warWaySlotId = curHeroData[string.format("warWaySlot%dId", i)]
|
||||
LogRed("sssssssssssssssssssssssssssssssss" .. warWaySlotId)
|
||||
if warWaySlotId and warWaySlotId ~= 0 then
|
||||
isOn = true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue