diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
index 566eec75b..a667d6ad9 100644
--- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
+++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua
@@ -1122,6 +1122,7 @@ RedPointType = {
EnergyMain_BaseUpLv = 89982,
EnergyMain_RobotBuy = 89982,
+ Kefulibao = 89985, -- 客服礼包
Association = 89986, -- 社群
Association_FB1 = 89987,
Association_FB2 = 89988,
diff --git a/Assets/ManagedResources/~Lua/Common/functions.lua b/Assets/ManagedResources/~Lua/Common/functions.lua
index 3d2a21e0a..a39f4cd39 100644
--- a/Assets/ManagedResources/~Lua/Common/functions.lua
+++ b/Assets/ManagedResources/~Lua/Common/functions.lua
@@ -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
--- 将一段时间转换为时分
diff --git a/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarRewardPopup.lua b/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarRewardPopup.lua
index 927091868..3ca104d53 100644
--- a/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarRewardPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/AlameinWar/AlameinWarRewardPopup.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/DailyCarbonPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/DailyCarbonPanel.lua
index 655e50c6e..af75b775f 100644
--- a/Assets/ManagedResources/~Lua/Modules/Carbon/DailyCarbonPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Carbon/DailyCarbonPanel.lua
@@ -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),""..tostring(freeTime).."")
+ str = string.format(GetLanguageStrById(10344), "" .. tostring(freeTime) .. "")
else
- str = string.format(GetLanguageStrById(10345),""..tostring(buyTime).."")
+ str = string.format(GetLanguageStrById(10345), "" .. tostring(buyTime) .. "")
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
\ No newline at end of file
+return DailyCarbonPanel
diff --git a/Assets/ManagedResources/~Lua/Modules/ChongBang/RankPanel.lua b/Assets/ManagedResources/~Lua/Modules/ChongBang/RankPanel.lua
index d821b2b8a..26b915e16 100644
--- a/Assets/ManagedResources/~Lua/Modules/ChongBang/RankPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/ChongBang/RankPanel.lua
@@ -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
\ No newline at end of file
+return RankPanel
diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua
index 567cec9c4..e0dbe197f 100644
--- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua
+++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ZhenQiYiBaoPage.lua
@@ -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
diff --git a/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua b/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua
index 2cbad01ce..96b2b2070 100644
--- a/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/LuckyTurnTable/LuckyTurnTablePanel.lua
@@ -12,22 +12,22 @@ local this = LuckyTurnTablePanel
---背景盘图片切换资源名
-- local BgName = { "x1_choujiang_beijing_renwu_01","x1_choujiang_beijing_renwu_02","N1_bg_xunbao_haohuaxunbao","x_xytb_quan_33" }
-local BgColor = {Color.New(72/255,157/255,228/255,255/255),
- Color.New(188/255,133/255,252/255,255/255)}
+local BgColor = { Color.New(72 / 255, 157 / 255, 228 / 255, 255 / 255),
+ Color.New(188 / 255, 133 / 255, 252 / 255, 255 / 255) }
local BtnBg = {
- {"x1_choujiang_jinbichoujiang_01","x1_choujiang_jinbichoujiang_02"},
- {"x1_choujiang_zuanshichoujiang_01","x1_choujiang_zuanshichoujiang_02"},
+ { "x1_choujiang_jinbichoujiang_01", "x1_choujiang_jinbichoujiang_02" },
+ { "x1_choujiang_zuanshichoujiang_01", "x1_choujiang_zuanshichoujiang_02" },
}
---转盘旋转类型
local TableTurnType = {
- Normal = 1,--默认旋转
- Expedite = 2,--加快旋转
+ Normal = 1, --默认旋转
+ Expedite = 2, --加快旋转
}
local curTurnPos = 1 --当前位置
-this.thread = nil --协程
+this.thread = nil --协程
this.refreshTimer = nil
this.upView = nil
@@ -38,25 +38,26 @@ function LuckyTurnTablePanel:InitComponent(gameObject)
LuckyTurnTableManager.InitTableData()
LuckyTurnTableManager.GetLuckyTurnRequest()
- this.luckyTurnPanel = Util.GetGameObject(self.gameObject,"Panel")
+ this.luckyTurnPanel = Util.GetGameObject(self.gameObject, "Panel")
this.PlayerHeadFrameView = SubUIManager.Open(SubUIConfig.PlayerHeadFrameView, self.gameObject.transform)
- this.upView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowRight, panelType = PanelType.LuckyTreasure })
- this.maskBG = Util.GetGameObject(this.luckyTurnPanel,"Mask")
- this.helpBtn = Util.GetGameObject(this.luckyTurnPanel,"HelpBtn")
+ this.upView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform,
+ { showType = UpViewOpenType.ShowRight, panelType = PanelType.LuckyTreasure })
+ this.maskBG = Util.GetGameObject(this.luckyTurnPanel, "Mask")
+ this.helpBtn = Util.GetGameObject(this.luckyTurnPanel, "HelpBtn")
this.helpPosition = this.helpBtn:GetComponent("RectTransform").localPosition
- this.backBtn = Util.GetGameObject(this.luckyTurnPanel,"BackBtn")
+ this.backBtn = Util.GetGameObject(this.luckyTurnPanel, "BackBtn")
--this.activityCountDownText = Util.GetGameObject(this.luckyTurnPanel, "CountDownTimeText"):GetComponent("Text")--活动倒计时
- this.luckyTreasureBtn = Util.GetGameObject(this.luckyTurnPanel, "Content/Top/LuckyTreasureBtn")--幸运探宝按钮
+ this.luckyTreasureBtn = Util.GetGameObject(this.luckyTurnPanel, "Content/Top/LuckyTreasureBtn") --幸运探宝按钮
this.luckyTreasureSelectBG = Util.GetGameObject(this.luckyTreasureBtn, "SelectBG")
- this.luckyTreasureText = Util.GetGameObject(this.luckyTreasureBtn,"Text"):GetComponent("Text")
- this.luckyTreasureTitle = Util.GetGameObject(this.luckyTreasureBtn,"title"):GetComponent("Image")
+ this.luckyTreasureText = Util.GetGameObject(this.luckyTreasureBtn, "Text"):GetComponent("Text")
+ this.luckyTreasureTitle = Util.GetGameObject(this.luckyTreasureBtn, "title"):GetComponent("Image")
this.luckyTreasureBtn.gameObject:SetActive(false)
- this.advancedTreasureBtn = Util.GetGameObject(this.luckyTurnPanel, "Content/Top/AdvancedTreasureBtn")--高级探宝按钮
+ this.advancedTreasureBtn = Util.GetGameObject(this.luckyTurnPanel, "Content/Top/AdvancedTreasureBtn") --高级探宝按钮
this.advancedTreasureSelectBG = Util.GetGameObject(this.advancedTreasureBtn, "SelectBG")
- this.advancedTreasureText = Util.GetGameObject(this.advancedTreasureBtn,"Text"):GetComponent("Text")
- this.advancedTreasureTitle = Util.GetGameObject(this.advancedTreasureBtn,"title"):GetComponent("Image")
+ this.advancedTreasureText = Util.GetGameObject(this.advancedTreasureBtn, "Text"):GetComponent("Text")
+ this.advancedTreasureTitle = Util.GetGameObject(this.advancedTreasureBtn, "title"):GetComponent("Image")
this.bg1 = Util.GetGameObject(self.gameObject, "Panel/BG1"):GetComponent("Image")
this.bg2 = Util.GetGameObject(this.luckyTurnPanel, "Content/TurnTableImage/BG/BG2")
@@ -64,22 +65,22 @@ function LuckyTurnTablePanel:InitComponent(gameObject)
---跑马灯位置(物品位置)
this.itemList = {}
- for i = 1,8 do
- this.itemList[i] = Util.GetGameObject(this.luckyTurnPanel, "Content/TurnTableImage/ItemList/Item"..i)
+ for i = 1, 8 do
+ this.itemList[i] = Util.GetGameObject(this.luckyTurnPanel, "Content/TurnTableImage/ItemList/Item" .. i)
end
- this.itemEffectIcon = {}--跑马灯亮灯
- this.itemViewList = {}--跑马灯itemviewList
+ this.itemEffectIcon = {} --跑马灯亮灯
+ this.itemViewList = {} --跑马灯itemviewList
this.itemViewCurPos = {}
- local tab = {{14,0},{3,0},{12001,0},{5,0},{4,0},{21,0},{60068,0},{60071,0}}---防白片临时数据
+ local tab = { { 14, 0 }, { 3, 0 }, { 12001, 0 }, { 5, 0 }, { 4, 0 }, { 21, 0 }, { 60068, 0 }, { 60071, 0 } } ---防白片临时数据
for i = 1, 8 do
this.itemEffectIcon[i] = Util.GetGameObject(this.itemList[i], "Image")
- local parent = Util.GetGameObject(this.itemList[i].transform,"box").transform
- this.itemViewList[i] = SubUIManager.Open(SubUIConfig.ItemView,parent)
- this.itemViewList[i]:OnOpen(false, {tab[1][1],tab[1][2]},0.75)
+ local parent = Util.GetGameObject(this.itemList[i].transform, "box").transform
+ this.itemViewList[i] = SubUIManager.Open(SubUIConfig.ItemView, parent)
+ this.itemViewList[i]:OnOpen(false, { tab[1][1], tab[1][2] }, 0.75)
local rect = this.itemViewList[i].transform
- rect.anchoredPosition = Vector2.New(0,0)
+ rect.anchoredPosition = Vector2.New(0, 0)
rect.anchorMin = Vector2.New(0.5, 0.5)
rect.anchorMax = Vector2.New(0.5, 0.5)
rect.pivot = Vector2.New(0.5, 0.5)
@@ -88,53 +89,54 @@ function LuckyTurnTablePanel:InitComponent(gameObject)
--记录
this.recordTextList = {}
- for i = 1,6 do
- this.recordTextList[i] = Util.GetGameObject(this.luckyTurnPanel, "TreasureRecord/RecordTextList/Viewport/Content/Text"..i):GetComponent("Text")
+ for i = 1, 6 do
+ this.recordTextList[i] = Util.GetGameObject(this.luckyTurnPanel,
+ "TreasureRecord/RecordTextList/Viewport/Content/Text" .. i):GetComponent("Text")
end
--拥有道具数量
- this.propBtn = Util.GetGameObject(this.luckyTurnPanel,"Content/Prop")
- this.propImage = Util.GetGameObject(this.luckyTurnPanel, "Content/Prop/PropImage"):GetComponent("Image")--道具
+ this.propBtn = Util.GetGameObject(this.luckyTurnPanel, "Content/Prop")
+ this.propImage = Util.GetGameObject(this.luckyTurnPanel, "Content/Prop/PropImage"):GetComponent("Image") --道具
this.propText = Util.GetGameObject(this.luckyTurnPanel, "Content/Prop/PropText"):GetComponent("Text")
- this.bottom = Util.GetGameObject(this.luckyTurnPanel,"Bottom")
- this.treasureOnceBtn = Util.GetGameObject(this.bottom,"TreasureOnceBtn")
- this.treasureOnceText = Util.GetGameObject(this.treasureOnceBtn,"Text"):GetComponent("Text")--探宝次数
- this.treasureOnceIcon = Util.GetGameObject(this.treasureOnceBtn,"Icon"):GetComponent("Image")--消耗道具图标
- this.treasureOnceNum = Util.GetGameObject(this.treasureOnceBtn,"Num"):GetComponent("Text")--消耗道具数量
- this.treasureMultipleBtn = Util.GetGameObject(this.bottom,"TreasureMultipleBtn")
- this.treasureMultipleText = Util.GetGameObject(this.treasureMultipleBtn,"Text"):GetComponent("Text")
- this.treasureMultipleIcon = Util.GetGameObject(this.treasureMultipleBtn,"Icon"):GetComponent("Image")
- this.treasureMultipleNum = Util.GetGameObject(this.treasureMultipleBtn,"Num"):GetComponent("Text")
- this.refreshBtn = Util.GetGameObject(self.gameObject,"Content/TurnTableImage/RefreshBtn")
- this.freeDetail = Util.GetGameObject(this.refreshBtn,"FreeDetail")
- this.detail = Util.GetGameObject(this.refreshBtn,"Detail")
- this.costItemImage = Util.GetGameObject(this.detail,"CostItemImage"):GetComponent("Image")
- this.costItemNumText = Util.GetGameObject(this.detail,"CostItemNumText"):GetComponent("Text")
- this.freeRefreshTime = Util.GetGameObject(this.refreshBtn,"FreeRefreshTime/Text"):GetComponent("Text")
+ this.bottom = Util.GetGameObject(this.luckyTurnPanel, "Bottom")
+ this.treasureOnceBtn = Util.GetGameObject(this.bottom, "TreasureOnceBtn")
+ this.treasureOnceText = Util.GetGameObject(this.treasureOnceBtn, "Text"):GetComponent("Text") --探宝次数
+ this.treasureOnceIcon = Util.GetGameObject(this.treasureOnceBtn, "Icon"):GetComponent("Image") --消耗道具图标
+ this.treasureOnceNum = Util.GetGameObject(this.treasureOnceBtn, "Num"):GetComponent("Text") --消耗道具数量
+ this.treasureMultipleBtn = Util.GetGameObject(this.bottom, "TreasureMultipleBtn")
+ this.treasureMultipleText = Util.GetGameObject(this.treasureMultipleBtn, "Text"):GetComponent("Text")
+ this.treasureMultipleIcon = Util.GetGameObject(this.treasureMultipleBtn, "Icon"):GetComponent("Image")
+ this.treasureMultipleNum = Util.GetGameObject(this.treasureMultipleBtn, "Num"):GetComponent("Text")
+ this.refreshBtn = Util.GetGameObject(self.gameObject, "Content/TurnTableImage/RefreshBtn")
+ this.freeDetail = Util.GetGameObject(this.refreshBtn, "FreeDetail")
+ this.detail = Util.GetGameObject(this.refreshBtn, "Detail")
+ this.costItemImage = Util.GetGameObject(this.detail, "CostItemImage"):GetComponent("Image")
+ this.costItemNumText = Util.GetGameObject(this.detail, "CostItemNumText"):GetComponent("Text")
+ this.freeRefreshTime = Util.GetGameObject(this.refreshBtn, "FreeRefreshTime/Text"):GetComponent("Text")
- this.slider = Util.GetGameObject(this.luckyTurnPanel,"Slider")
- this.luckyValueNum = Util.GetGameObject(this.slider, "LuckyValue/LuckyValueNum"):GetComponent("Text")--幸运值
+ this.slider = Util.GetGameObject(this.luckyTurnPanel, "Slider")
+ this.luckyValueNum = Util.GetGameObject(this.slider, "LuckyValue/LuckyValueNum"):GetComponent("Text") --幸运值
this.luckySlider = Util.GetGameObject(this.slider, "LuckySlider"):GetComponent("Slider")
- this.rewardBoxList = {}--奖励盒
- this.rewardBox = Util.GetGameObject(this.slider,"RewardBox")
- for i = 1,5 do
- this.rewardBoxList[i] = Util.GetGameObject(this.rewardBox,"Item"..i)
+ this.rewardBoxList = {} --奖励盒
+ this.rewardBox = Util.GetGameObject(this.slider, "RewardBox")
+ for i = 1, 5 do
+ this.rewardBoxList[i] = Util.GetGameObject(this.rewardBox, "Item" .. i)
end
- this.rewardPanel = Util.GetGameObject(this.slider,"RewardPanel")--幸运值奖励预览面板
- this.itemViewParent = Util.GetGameObject(this.rewardPanel,"ItemViewParent")--item父物体
- this.rewardPanelMaskBtn = Util.GetGameObject(this.rewardPanel,"Mask")--幸运值奖励预览遮罩按钮
- this.rewardItemView = SubUIManager.Open(SubUIConfig.ItemView,this.itemViewParent.transform)
+ this.rewardPanel = Util.GetGameObject(this.slider, "RewardPanel") --幸运值奖励预览面板
+ this.itemViewParent = Util.GetGameObject(this.rewardPanel, "ItemViewParent") --item父物体
+ this.rewardPanelMaskBtn = Util.GetGameObject(this.rewardPanel, "Mask") --幸运值奖励预览遮罩按钮
+ this.rewardItemView = SubUIManager.Open(SubUIConfig.ItemView, this.itemViewParent.transform)
-- 奖励预览
this.btnPreview = Util.GetGameObject(self.gameObject, "Panel/Content/Top/btnPreview")
this.maxTimes = Util.GetGameObject(self.gameObject, "Panel/maxTimes"):GetComponent("Text")
this.mask = Util.GetGameObject(self.gameObject, "Panel/Content/Top/mask")
- this.maskText = Util.GetGameObject(this.mask,"Text"):GetComponent("Text")
- this.maskTitle = Util.GetGameObject(this.mask,"title"):GetComponent("Image")
- this.material = Util.GetGameObject(this.rewardBox,"material"):GetComponent("Image").material
+ this.maskText = Util.GetGameObject(this.mask, "Text"):GetComponent("Text")
+ this.maskTitle = Util.GetGameObject(this.mask, "title"):GetComponent("Image")
+ this.material = Util.GetGameObject(this.rewardBox, "material"):GetComponent("Image").material
this.shopBtn = Util.GetGameObject(self.gameObject, "Panel/Content/shopBtn")
@@ -144,15 +146,15 @@ end
---绑定事件(用于子类重写)
function LuckyTurnTablePanel:BindEvent()
--帮助按钮
- Util.AddClick(this.helpBtn,function()
- UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.LuckyTurn,this.helpPosition.x,this.helpPosition.y)
+ Util.AddClick(this.helpBtn, function()
+ UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.LuckyTurn, this.helpPosition.x, this.helpPosition.y)
end)
--返回按钮
- Util.AddClick(this.backBtn,function()
+ Util.AddClick(this.backBtn, function()
self:ClosePanel()
end)
--幸运探宝按钮
- Util.AddClick(this.luckyTreasureBtn, function()
+ Util.AddClick(this.luckyTreasureBtn, function()
if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then
return
end
@@ -174,7 +176,7 @@ function LuckyTurnTablePanel:BindEvent()
this.advancedTreasureBtn:SetActive(false)
this.mask.transform.position = this.advancedTreasureBtn.transform.position
this.maskText.text = this.advancedTreasureText.text
- this.maskTitle.sprite = this.advancedTreasureTitle.sprite
+ this.maskTitle.sprite = this.advancedTreasureTitle.sprite
end)
--幸运值奖励预览遮罩按钮
Util.AddClick(this.rewardPanelMaskBtn, function()
@@ -187,7 +189,7 @@ function LuckyTurnTablePanel:BindEvent()
end)
Util.AddClick(this.shopBtn, function()
- UIManager.OpenPanel(UIName.MainShopPanel,61)
+ UIManager.OpenPanel(UIName.MainShopPanel, 61)
end)
end
@@ -204,13 +206,13 @@ end
---界面打开时调用(用于子类重写)
function LuckyTurnTablePanel:OnOpen(_TreasureType)
LuckyTurnTableManager.curTreasureType = _TreasureType and _TreasureType or TreasureType.Lucky
- maxTimesCount = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,53).Value)
+ maxTimesCount = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 53).Value)
end
---界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function LuckyTurnTablePanel:OnShow()
this.maskBG.gameObject:SetActive(false)
- if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then--防止当前为高级探宝时 按下探宝后跳转到幸运探宝
+ if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then --防止当前为高级探宝时 按下探宝后跳转到幸运探宝
this.LuckyTurnOnShow(TreasureType.Lucky)
this.luckyTreasureBtn:SetActive(false)
@@ -218,16 +220,14 @@ function LuckyTurnTablePanel:OnShow()
this.mask.transform.position = this.luckyTreasureBtn.transform.position
this.maskText.text = this.luckyTreasureText.text
this.maskTitle.sprite = this.luckyTreasureTitle.sprite
-
- elseif LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
+ elseif LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
this.LuckyTurnOnShow(TreasureType.Advanced)
this.luckyTreasureBtn:SetActive(true)
this.advancedTreasureBtn:SetActive(false)
this.mask.transform.position = this.advancedTreasureBtn.transform.position
this.maskText.text = this.advancedTreasureText.text
- this.maskTitle.sprite = this.advancedTreasureTitle.sprite
-
+ this.maskTitle.sprite = this.advancedTreasureTitle.sprite
end
this.PlayerHeadFrameView:OnShow()
this.upView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.LuckyTreasure })
@@ -289,13 +289,13 @@ end
---打开面板
function this.LuckyTurnOnShow(treasureType)
if not this.turnEffect then
- this.turnEffect = Timer.New(nil,1,-1,true)
+ this.turnEffect = Timer.New(nil, 1, -1, true)
end
if not this.outsideLightTurnEffect then
- this.outsideLightTurnEffect = Timer.New(nil,1,-1,true)
+ this.outsideLightTurnEffect = Timer.New(nil, 1, -1, true)
end
if not this.refreshTimer then
- this.refreshTimer = Timer.New(nil,1,-1,true)
+ this.refreshTimer = Timer.New(nil, 1, -1, true)
end
--初始化幸运探宝
this.SwitchTreasureType(treasureType)
@@ -307,7 +307,7 @@ function this.SwitchTreasureType(treasureType)
this.ClearDefault()
if treasureType == TreasureType.Lucky then
LuckyTurnTableManager.curTreasureType = treasureType
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.luckyTimes,maxTimesCount)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.luckyTimes, maxTimesCount)
this.upView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.LuckyTreasure })
@@ -315,7 +315,7 @@ function this.SwitchTreasureType(treasureType)
this.bg2:SetActive(true)
this.treasureOnceBtn:GetComponent("Image").sprite = Util.LoadSprite(GetPictureFont(BtnBg[1][1]))
this.treasureMultipleBtn:GetComponent("Image").sprite = Util.LoadSprite(GetPictureFont(BtnBg[1][2]))
- this.bg1.color = BgColor[1]
+ this.bg1.color = BgColor[1]
--显示免费刷新状态
this.RefreshBtnCountDown()
@@ -325,7 +325,7 @@ function this.SwitchTreasureType(treasureType)
this.luckyTreasureText.text = GetLanguageStrById(11138)
--请求跑马灯物品数据
LuckyTurnTableManager.GetLuckyTurnRequest(function(msg)
- this.SetItemViewShow(msg.posInfos,function()
+ this.SetItemViewShow(msg.posInfos, function()
this.SetItemViewGray(LuckyTurnTableManager.luckyData)
end)
end)
@@ -336,27 +336,29 @@ function this.SwitchTreasureType(treasureType)
--启动定时刷新转盘记录
LuckyTurnTableManager.StartLuckyTurnRecordDataUpdate()
--设置需要材料显示
- this.SetPropShow(60,treasureType)
+ this.SetPropShow(60, treasureType)
--探宝按钮显示
- local oneData,moreData,icon = LuckyTurnTableManager.GetTreasureBtnInfo(treasureType)
- this.SetTreasureBtnShow(oneData,moreData,icon)
+ local oneData, moreData, icon = LuckyTurnTableManager.GetTreasureBtnInfo(treasureType)
+ this.SetTreasureBtnShow(oneData, moreData, icon)
--探宝泉预览
- Util.AddOnceClick(this.propBtn,function()
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,60)
+ Util.AddOnceClick(this.propBtn, function()
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 60)
end)
--探宝1次按钮
Util.AddOnceClick(this.treasureOnceBtn, function()
- if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - oneData[2] >= 0
- and LuckyTurnTableManager.luckyTimes + 1 <= maxTimesCount then
- LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Lucky,false,function()
+ if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - oneData[2] >= 0
+ and LuckyTurnTableManager.luckyTimes + 1 <= maxTimesCount then
+ LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Lucky, false, function()
ThinkingAnalyticsManager.Track("activity_turntable_start", {
activity_turntable_sart_luckycoin = LuckyTurnTableManager.GetTreasureTicketNum(treasureType)
})
- this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Lucky,LuckyTurnTableManager.luckyTempData.posInfos[1].pos)
- this.SetPropShow(60,TreasureType.Lucky)--更新消耗道具显示
+ this.SetTableTurnEffect(TableTurnType.Expedite, TreasureType.Lucky,
+ LuckyTurnTableManager.luckyTempData.posInfos[1].pos)
+ this.SetPropShow(60, TreasureType.Lucky) --更新消耗道具显示
this.RrFreshInfo()
LuckyTurnTableManager.SetTimes(LuckyTurnTableManager.luckyTimes + 1)
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.luckyTimes,maxTimesCount)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.luckyTimes,
+ maxTimesCount)
end)
else
--PopupTipPanel.ShowTip("幸运探宝券不足!")
@@ -364,23 +366,25 @@ function this.SwitchTreasureType(treasureType)
PopupTipPanel.ShowTipByLanguageId(12261)
return
else
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,60,nil)
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 60, nil)
end
end
end)
--探宝10次按钮
Util.AddOnceClick(this.treasureMultipleBtn, function()
- if LuckyTurnTableManager.GetTreasureTicketNum(treasureType)-moreData[2] >= 0
- and LuckyTurnTableManager.luckyTimes + 15 <= maxTimesCount then
- LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Lucky,true,function()
+ if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - moreData[2] >= 0
+ and LuckyTurnTableManager.luckyTimes + 15 <= maxTimesCount then
+ LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Lucky, true, function()
ThinkingAnalyticsManager.Track("activity_turntable_start", {
activity_turntable_sart_luckycoin = LuckyTurnTableManager.GetTreasureTicketNum(treasureType)
})
- this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Lucky,LuckyTurnTableManager.luckyTempData.posInfos[1].pos)
- this.SetPropShow(60,TreasureType.Lucky)--更新消耗道具显示
+ this.SetTableTurnEffect(TableTurnType.Expedite, TreasureType.Lucky,
+ LuckyTurnTableManager.luckyTempData.posInfos[1].pos)
+ this.SetPropShow(60, TreasureType.Lucky) --更新消耗道具显示
this.RrFreshInfo()
LuckyTurnTableManager.SetTimes(LuckyTurnTableManager.luckyTimes + 15)
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.luckyTimes,maxTimesCount)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.luckyTimes,
+ maxTimesCount)
end)
else
--PopupTipPanel.ShowTip("幸运探宝券不足!")
@@ -388,31 +392,31 @@ function this.SwitchTreasureType(treasureType)
PopupTipPanel.ShowTipByLanguageId(12261)
return
else
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,60,nil)
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 60, nil)
end
end
end)
--刷新按钮
Util.AddOnceClick(this.refreshBtn, function()
- if BagManager.GetItemCountById(62) > 0 then--如果是免费刷新
+ if BagManager.GetItemCountById(62) > 0 then --如果是免费刷新
this.PlayItemListAnim()
- LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Lucky,true,function()
+ LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Lucky, true, function()
ThinkingAnalyticsManager.Track("activity_turntable_refresh", {
activity_turntable_refresh_diamond = BagManager.GetItemCountById(16)
})
- this.SetItemViewShow(LuckyTurnTableManager.luckyData,function()
+ this.SetItemViewShow(LuckyTurnTableManager.luckyData, function()
this.SetItemViewGray(LuckyTurnTableManager.luckyData)
end)
this.RefreshBtnCountDown()
end)
else
- if LuckyTurnTableManager.GetRefreshItemNum() - LuckyTurnTableManager.dialRewardSettingConfig[1].Cost[2][4] >= 0 then--如果材料够
+ if LuckyTurnTableManager.GetRefreshItemNum() - LuckyTurnTableManager.dialRewardSettingConfig[1].Cost[2][4] >= 0 then --如果材料够
this.PlayItemListAnim()
- LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Lucky,false,function()
+ LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Lucky, false, function()
ThinkingAnalyticsManager.Track("activity_turntable_refresh", {
activity_turntable_refresh_diamond = BagManager.GetItemCountById(16)
})
- this.SetItemViewShow(LuckyTurnTableManager.luckyData,function()
+ this.SetItemViewShow(LuckyTurnTableManager.luckyData, function()
this.SetItemViewGray(LuckyTurnTableManager.luckyData)
end)
this.RefreshBtnCountDown()
@@ -429,7 +433,7 @@ function this.SwitchTreasureType(treasureType)
elseif treasureType == TreasureType.Advanced then
LuckyTurnTableManager.curTreasureType = treasureType
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.advanceTimes,maxTimesCount)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.advanceTimes, maxTimesCount)
this.upView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.AdvancedTreasure })
this.bg2:SetActive(false)
@@ -442,11 +446,11 @@ function this.SwitchTreasureType(treasureType)
--设置顶部按钮
this.advancedTreasureSelectBG:SetActive(true)
- this.advancedTreasureText.text = GetLanguageStrById(11140)
+ this.advancedTreasureText.text = GetLanguageStrById(11140)
--请求跑马灯物品数据
LuckyTurnTableManager.GetLuckyTurnRequest(function(msg)
- this.SetItemViewShow(msg.posInfosAdvance,function()
+ this.SetItemViewShow(msg.posInfosAdvance, function()
this.SetItemViewGray(LuckyTurnTableManager.advancedData)
end)
end)
@@ -458,68 +462,72 @@ function this.SwitchTreasureType(treasureType)
LuckyTurnTableManager.StartLuckyTurnRecordDataUpdate(treasureType)
--设置需要材料显示
- this.SetPropShow(61,treasureType)
+ this.SetPropShow(61, treasureType)
--探宝按钮显示
- local oneData,moreData,icon = LuckyTurnTableManager.GetTreasureBtnInfo(treasureType)
- this.SetTreasureBtnShow(oneData,moreData,icon)
+ local oneData, moreData, icon = LuckyTurnTableManager.GetTreasureBtnInfo(treasureType)
+ this.SetTreasureBtnShow(oneData, moreData, icon)
--探宝泉预览
- Util.AddOnceClick(this.propBtn,function()
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61)
+ Util.AddOnceClick(this.propBtn, function()
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 61)
end)
--探宝1次按钮
Util.AddOnceClick(this.treasureOnceBtn, function()
if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - oneData[2] >= 0 and LuckyTurnTableManager.advanceTimes + 1 <= maxTimesCount then
- LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Advanced,false,function()
+ LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Advanced, false, function()
ThinkingAnalyticsManager.Track("activity_highturn_start", {
activity_highturn_start_id = LuckyTurnTableManager.GetTreasureTicketNum(treasureType)
})
- LuckyTurnTableManager.SetTimes(nil,LuckyTurnTableManager.advanceTimes + 1)
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.advanceTimes,maxTimesCount)
-
- this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Advanced,LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
- this.SetPropShow(61,TreasureType.Advanced)
+ LuckyTurnTableManager.SetTimes(nil, LuckyTurnTableManager.advanceTimes + 1)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.advanceTimes,
+ maxTimesCount)
+
+ this.SetTableTurnEffect(TableTurnType.Expedite, TreasureType.Advanced,
+ LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
+ this.SetPropShow(61, TreasureType.Advanced)
this.RrFreshInfo()
this.ShowRecordMessage(LuckyTurnTableManager.curTreasureType)
end)
else
- if not RECHARGEABLE then--(是否开启充值)
+ if not RECHARGEABLE then --(是否开启充值)
PopupTipPanel.ShowTipByLanguageId(12262)
else
if LuckyTurnTableManager.advanceTimes + 1 > maxTimesCount then
PopupTipPanel.ShowTipByLanguageId(12249)
return
else
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil)
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 61, nil)
end
end
end
end)
--探宝10次按钮
Util.AddOnceClick(this.treasureMultipleBtn, function()
- if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - moreData[2] >= 0
- and LuckyTurnTableManager.advanceTimes + 10 <= maxTimesCount then
- LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Advanced,true,function()
+ if LuckyTurnTableManager.GetTreasureTicketNum(treasureType) - moreData[2] >= 0
+ and LuckyTurnTableManager.advanceTimes + 10 <= maxTimesCount then
+ LuckyTurnTableManager.GetLuckyTurnRankRequest(TreasureType.Advanced, true, function()
ThinkingAnalyticsManager.Track("activity_highturn_start", {
activity_highturn_start_id = LuckyTurnTableManager.GetTreasureTicketNum(treasureType)
})
- LuckyTurnTableManager.SetTimes(nil,LuckyTurnTableManager.advanceTimes + 10)
- this.maxTimes.text = string.format(GetLanguageStrById(12260),LuckyTurnTableManager.advanceTimes,maxTimesCount)
-
- this.SetTableTurnEffect(TableTurnType.Expedite,TreasureType.Advanced,LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
- this.SetPropShow(61,TreasureType.Advanced)
+ LuckyTurnTableManager.SetTimes(nil, LuckyTurnTableManager.advanceTimes + 10)
+ this.maxTimes.text = string.format(GetLanguageStrById(12260), LuckyTurnTableManager.advanceTimes,
+ maxTimesCount)
+
+ this.SetTableTurnEffect(TableTurnType.Expedite, TreasureType.Advanced,
+ LuckyTurnTableManager.advancedTempData.posInfos[1].pos)
+ this.SetPropShow(61, TreasureType.Advanced)
this.RrFreshInfo()
this.ShowRecordMessage(LuckyTurnTableManager.curTreasureType)
end)
else
- if not RECHARGEABLE then--(是否开启充值)
+ if not RECHARGEABLE then --(是否开启充值)
PopupTipPanel.ShowTipByLanguageId(12262)
else
if LuckyTurnTableManager.advanceTimes + 10 > maxTimesCount then
PopupTipPanel.ShowTipByLanguageId(12249)
return
else
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,61,nil)
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, 61, nil)
end
end
end
@@ -528,23 +536,24 @@ function this.SwitchTreasureType(treasureType)
Util.AddOnceClick(this.refreshBtn, function()
if BagManager.GetItemCountById(63) > 0 then
this.PlayItemListAnim()
- LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Advanced,true,function()
+ LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Advanced, true, function()
ThinkingAnalyticsManager.Track("activity_hightum_refreshcost", {
activity_highturn_refresh_diamond = 0
})
- this.SetItemViewShow(LuckyTurnTableManager.advancedData,function()
+ this.SetItemViewShow(LuckyTurnTableManager.advancedData, function()
this.SetItemViewGray(LuckyTurnTableManager.advancedData)
end)
this.RefreshBtnCountDown()
end)
else
- if LuckyTurnTableManager.GetRefreshItemNum()-LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2][4] >= 0 then
+ if LuckyTurnTableManager.GetRefreshItemNum() - LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2][4] >= 0 then
this.PlayItemListAnim()
- LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Advanced,false,function()
+ LuckyTurnTableManager.GetLuckyTurnRefreshRequest(TreasureType.Advanced, false, function()
ThinkingAnalyticsManager.Track("activity_hightum_refreshcost", {
- activity_highturn_refresh_diamond = LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2][4]
+ activity_highturn_refresh_diamond = LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2]
+ [4]
})
- this.SetItemViewShow(LuckyTurnTableManager.advancedData,function()
+ this.SetItemViewShow(LuckyTurnTableManager.advancedData, function()
this.SetItemViewGray(LuckyTurnTableManager.advancedData)
end)
this.RefreshBtnCountDown()
@@ -568,10 +577,10 @@ function this.ClearDefault()
this.advancedTreasureSelectBG:SetActive(false)
this.advancedTreasureText.text = GetLanguageStrById(11142)
--清除红点
- Util.GetGameObject(this.luckyTreasureBtn,"redPoint"):SetActive(false)
- Util.GetGameObject(this.advancedTreasureBtn,"redPoint"):SetActive(false)
+ Util.GetGameObject(this.luckyTreasureBtn, "redPoint"):SetActive(false)
+ Util.GetGameObject(this.advancedTreasureBtn, "redPoint"):SetActive(false)
for i = 1, 5 do
- Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(false)
+ Util.GetGameObject(this.rewardBoxList[i], "redPoint"):SetActive(false)
end
-- for i = 1, 6 do
@@ -580,7 +589,7 @@ function this.ClearDefault()
end
--设置转盘滚动 1旋转类型 2探宝类型 3服务器给的探宝后位置
-function this.SetTableTurnEffect(turnType,treasureType,pos)
+function this.SetTableTurnEffect(turnType, treasureType, pos)
if turnType == TableTurnType.Normal then --默认旋转
this.TurnEffectReset(0.5)
this.turnEffect:Start()
@@ -593,23 +602,25 @@ function this.SetTableTurnEffect(turnType,treasureType,pos)
-- coroutine.wait(0.4)
-- this.TurnEffectReset(0.1)
coroutine.wait(0.1)
- this.TurnEffectReset(0.1,true,pos,function()--当效果播放完毕后 从管理器取得数据
+ this.TurnEffectReset(0.1, true, pos, function() --当效果播放完毕后 从管理器取得数据
local timer = Timer.New(function()
this.DelayMaskWithBool(false)
if treasureType == TreasureType.Lucky then
- UIManager.OpenPanel(UIName.RewardItemPopup,LuckyTurnTableManager.luckyTempData.drop,1,function()
- this.SetTableTurnEffect(TableTurnType.Normal)--恢复转盘旋转
- LuckyTurnTableManager.isCanGetWorldMessage = true
- end)--打开奖励弹窗
- this.SetItemViewGray(LuckyTurnTableManager.luckyData)--刷新物品是否置灰
+ UIManager.OpenPanel(UIName.RewardItemPopup, LuckyTurnTableManager.luckyTempData.drop, 1,
+ function()
+ this.SetTableTurnEffect(TableTurnType.Normal) --恢复转盘旋转
+ LuckyTurnTableManager.isCanGetWorldMessage = true
+ end) --打开奖励弹窗
+ this.SetItemViewGray(LuckyTurnTableManager.luckyData) --刷新物品是否置灰
elseif treasureType == TreasureType.Advanced then
- UIManager.OpenPanel(UIName.RewardItemPopup,LuckyTurnTableManager.advancedTempData.drop,1,function()
- this.SetTableTurnEffect(TableTurnType.Normal)--恢复转盘旋转
- LuckyTurnTableManager.isCanGetWorldMessage = true
- end)
+ UIManager.OpenPanel(UIName.RewardItemPopup, LuckyTurnTableManager.advancedTempData.drop, 1,
+ function()
+ this.SetTableTurnEffect(TableTurnType.Normal) --恢复转盘旋转
+ LuckyTurnTableManager.isCanGetWorldMessage = true
+ end)
this.SetItemViewGray(LuckyTurnTableManager.advancedData)
end
- end,0.5,1,true)
+ end, 0.5, 1, true)
timer:Start()
end)
end)
@@ -617,34 +628,35 @@ function this.SetTableTurnEffect(turnType,treasureType,pos)
end
--转盘滚动特效重设 1移动速度,值越小越快 2是否停止 3停止位置
-function this.TurnEffectReset(turnSpeed,isStop,pos,func)
+function this.TurnEffectReset(turnSpeed, isStop, pos, func)
this.turnEffect:Reset(function()
if curTurnPos == 1 then
this.itemEffectIcon[8]:SetActive(false)
else
- this.itemEffectIcon[curTurnPos-1]:SetActive(false)
+ this.itemEffectIcon[curTurnPos - 1]:SetActive(false)
end
if curTurnPos >= 9 then
curTurnPos = 1
end
if isStop then
- if pos == curTurnPos then--如果停到对应位置
- this.turnEffect:Stop()--暂停跑马灯
- if func then--回调
+ if pos == curTurnPos then --如果停到对应位置
+ this.turnEffect:Stop() --暂停跑马灯
+ if func then --回调
func()
end
end
end
this.itemEffectIcon[curTurnPos]:SetActive(true)
curTurnPos = curTurnPos + 1
- end,turnSpeed,-1,true)
+ end, turnSpeed, -1, true)
end
--设置跑马灯物品显示 func确保先生成itemview 再置灰
-function this.SetItemViewShow(data,func)
- for i = 1, #this.itemViewList do
- local tab = {LuckyTurnTableManager.dialRewardConfig[data[i].luckId].Reward[1],LuckyTurnTableManager.dialRewardConfig[data[i].luckId].Reward[2]}
- this.itemViewList[i]:OnOpen(false, {tab[1],tab[2]},1, false, false, false, sortingOrder)
+function this.SetItemViewShow(data, func)
+ for i = 1, #this.itemViewList do
+ local tab = { LuckyTurnTableManager.dialRewardConfig[data[i].luckId].Reward[1], LuckyTurnTableManager
+ .dialRewardConfig[data[i].luckId].Reward[2] }
+ this.itemViewList[i]:OnOpen(false, { tab[1], tab[2] }, 1, false, false, false, sortingOrder)
end
if func then
func()
@@ -655,10 +667,11 @@ end
function this.SetItemViewGray(data)
for i = 1, #data do
if LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum ~= 0 then
- Util.SetGray(this.itemViewList[i].gameObject,data[i].luckTimes >= LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum)
+ Util.SetGray(this.itemViewList[i].gameObject,
+ data[i].luckTimes >= LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum)
end
if LuckyTurnTableManager.dialRewardConfig[data[i].luckId].LimitNum == 0 then
- Util.SetGray(this.itemViewList[i].gameObject,false)
+ Util.SetGray(this.itemViewList[i].gameObject, false)
end
end
end
@@ -680,17 +693,17 @@ function this.ShowRecordMessage(type)
end
--设置道具拥有显示 1道具id 2探宝类型
-function this.SetPropShow(itemId,treasureType)
+function this.SetPropShow(itemId, treasureType)
this.propImage.sprite = SetIcon(itemId)
this.propText.text = LuckyTurnTableManager.GetTreasureTicketNum(treasureType)
end
--探宝按钮显示
-function this.SetTreasureBtnShow(oneData,moreData,icon)
- this.treasureOnceText.text = GetLanguageStrById(11143)..oneData[1]..GetLanguageStrById(10054)
+function this.SetTreasureBtnShow(oneData, moreData, icon)
+ this.treasureOnceText.text = GetLanguageStrById(11143) .. oneData[1] .. GetLanguageStrById(10054)
this.treasureOnceNum.text = oneData[2]
this.treasureOnceIcon.sprite = icon
- this.treasureMultipleText.text = GetLanguageStrById(11143)..moreData[1]..GetLanguageStrById(10054)
+ this.treasureMultipleText.text = GetLanguageStrById(11143) .. moreData[1] .. GetLanguageStrById(10054)
this.treasureMultipleNum.text = moreData[2]
this.treasureMultipleIcon.sprite = icon
end
@@ -715,17 +728,17 @@ function this.RefreshBtnCountDown()
if time > intervalTime then
time = intervalTime
end
- this.freeRefreshTime.text = TimeToHMS(time)--立即刷新一次
+ this.freeRefreshTime.text = TimeToHMS(time) --立即刷新一次
this.refreshTimer:Reset(function()
if time < 0 then
time = 0
this.refreshTimer:Stop()
this.SetRefreshBtnShowState(true)
- NetManager.GetRefreshCountDownRequest({62})
+ NetManager.GetRefreshCountDownRequest({ 62 })
end
time = time - 1
this.freeRefreshTime.text = TimeToHMS(time)
- end,1,-1,true)
+ end, 1, -1, true)
this.refreshTimer:Start()
end
elseif LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
@@ -733,26 +746,26 @@ function this.RefreshBtnCountDown()
if BagManager.GetItemCountById(63) > 0 then
--显示免费刷新
this.SetRefreshBtnShowState(true)
- this.freeRefreshTime.text = " "--" 0:00:00"
+ this.freeRefreshTime.text = " " --" 0:00:00"
else
--显示道具刷新
this.SetRefreshBtnShowState(false)
- local time = BagManager.GetNextRefreshTime(63)-GetTimeStamp()
+ local time = BagManager.GetNextRefreshTime(63) - GetTimeStamp()
local intervalTime = LuckyTurnTableManager.GetItemRecoverTime(63)
if time > intervalTime then
time = intervalTime
end
- this.freeRefreshTime.text = TimeToHMS(time)--立即刷新一次
+ this.freeRefreshTime.text = TimeToHMS(time) --立即刷新一次
this.refreshTimer:Reset(function()
if time < 0 then
this.refreshTimer:Stop()
time = 0
this.SetRefreshBtnShowState(true)
- NetManager.GetRefreshCountDownRequest({63})
+ NetManager.GetRefreshCountDownRequest({ 63 })
end
- time = time-1
+ time = time - 1
this.freeRefreshTime.text = TimeToHMS(time)
- end,1,-1,true)
+ end, 1, -1, true)
this.refreshTimer:Start()
end
end
@@ -768,11 +781,13 @@ function this.SetRefreshBtnShowState(isFree)
this.detail:SetActive(true)
if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then
this.costItemImage.sprite = SetIcon(LuckyTurnTableManager.dialRewardSettingConfig[1].Cost[1][1])
- this.costItemNumText.text = LuckyTurnTableManager.dialRewardSettingConfig[1].Cost[2][4]--..GetLanguageStrById(11144)
+ this.costItemNumText.text = LuckyTurnTableManager.dialRewardSettingConfig[1].Cost[2]
+ [4] --..GetLanguageStrById(11144)
end
if LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
this.costItemImage.sprite = SetIcon(LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[1][1])
- this.costItemNumText.text = LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2][4]--..GetLanguageStrById(11144)
+ this.costItemNumText.text = LuckyTurnTableManager.dialRewardSettingConfig[2].Cost[2]
+ [4] --..GetLanguageStrById(11144)
end
end
end
@@ -788,16 +803,19 @@ function this.PlayItemListAnim()
this.itemList[i].transform.position = this.itemViewCurPos[i]
end
end
+
-----------------------------------------------------------------------
---本地检查红点 幸运高级按钮
function this.CheckRedPoint()
for i = 1, #this.rewardBoxList do
if LuckyTurnTableManager.value_1 >= LuckyTurnTableManager.boxReward_One[i].Values[1][1] then
- Util.GetGameObject(this.luckyTreasureBtn,"redPoint"):SetActive(LuckyTurnTableManager.GetRewardState(30,LuckyTurnTableManager.boxReward_One[i].Id)==0)
+ Util.GetGameObject(this.luckyTreasureBtn, "redPoint"):SetActive(LuckyTurnTableManager.GetRewardState(30,
+ LuckyTurnTableManager.boxReward_One[i].Id) == 0)
end
if LuckyTurnTableManager.value_2 >= LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
- Util.GetGameObject(this.advancedTreasureBtn,"redPoint"):SetActive(LuckyTurnTableManager.GetRewardState(31,LuckyTurnTableManager.boxReward_Two[i].Id)==0)
+ Util.GetGameObject(this.advancedTreasureBtn, "redPoint"):SetActive(LuckyTurnTableManager.GetRewardState(31,
+ LuckyTurnTableManager.boxReward_Two[i].Id) == 0)
end
end
end
@@ -806,107 +824,118 @@ end
function this.SetRewardBox()
if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then
for i = 1, 5 do
- local BG1 = Util.GetGameObject(this.rewardBoxList[i],"BG1"):GetComponent("Image")
- local BG2 = Util.GetGameObject(this.rewardBoxList[i],"BG1/BG2"):GetComponent("Image")
- local baoxiang = Util.GetGameObject(this.rewardBoxList[i],"BG1/UI_baoxiang")
+ local BG1 = Util.GetGameObject(this.rewardBoxList[i], "BG1"):GetComponent("Image")
+ local BG2 = Util.GetGameObject(this.rewardBoxList[i], "BG1/BG2"):GetComponent("Image")
+ local baoxiang = Util.GetGameObject(this.rewardBoxList[i], "BG1/UI_baoxiang")
- Util.GetGameObject(this.rewardBoxList[i],"Value"):GetComponent("Text").text = LuckyTurnTableManager.boxReward_One[i].Values[1][1]
+ Util.GetGameObject(this.rewardBoxList[i], "Value"):GetComponent("Text").text = LuckyTurnTableManager
+ .boxReward_One[i].Values[1][1]
+ Util.GetGameObject(this.rewardBoxList[i], "Num"):GetComponent("Text").text = "X" .. LuckyTurnTableManager
+ .boxReward_One[i].Reward[1][2]
BG2.sprite = SetIcon(LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
BG1.sprite = SetFrame(LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
- Util.GetGameObject(this.rewardBoxList[i],"yilingqu"):SetActive(false)
+ Util.GetGameObject(this.rewardBoxList[i], "yilingqu"):SetActive(false)
--显示奖盒红点
--BG1:灰色合箱子 BG2:灰色开箱子 BG3:彩色合箱子
if LuckyTurnTableManager.value_1 >= LuckyTurnTableManager.boxReward_One[i].Values[1][1] then
- if LuckyTurnTableManager.GetRewardState(30,LuckyTurnTableManager.boxReward_One[i].Id) == 0 then
- Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(true)
- BG1.material = nil
- BG2.material = nil
+ if LuckyTurnTableManager.GetRewardState(30, LuckyTurnTableManager.boxReward_One[i].Id) == 0 then
+ Util.GetGameObject(this.rewardBoxList[i], "redPoint"):SetActive(true)
+ --BG1.material = nil
+ --BG2.material = nil
baoxiang:SetActive(true)
- else--奖励已领取
- BG1.material = this.material
- BG2.material = this.material
+ else --奖励已领取
+ --BG1.material = this.material
+ --BG2.material = this.material
baoxiang:SetActive(false)
- Util.GetGameObject(this.rewardBoxList[i],"yilingqu"):SetActive(true)
+ Util.GetGameObject(this.rewardBoxList[i], "yilingqu"):SetActive(true)
end
- else--幸运值未超过该箱子
- BG1.material = this.material
- BG2.material = this.material
+ else --幸运值未超过该箱子
+ --BG1.material = this.material
+ --BG2.material = this.material
baoxiang:SetActive(false)
end
+
Util.AddOnceClick(this.rewardBoxList[i], function()
RedpotManager.CheckRedPointStatus(RedPointType.LuckyTurn)
--如果幸运值达到奖励要求值
if LuckyTurnTableManager.value_1 >= LuckyTurnTableManager.boxReward_One[i].Values[1][1] then
--奖励未领取 先请求领取
- if LuckyTurnTableManager.GetRewardState(30,LuckyTurnTableManager.boxReward_One[i].Id) == 0 then
- NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_One[i].Id, 30,function(drop)
+ if LuckyTurnTableManager.GetRewardState(30, LuckyTurnTableManager.boxReward_One[i].Id) == 0 then
+ NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_One[i].Id, 30, function(drop)
ThinkingAnalyticsManager.Track("activity_turntable_reward", {
activity_turntable_reward_luckynum = LuckyTurnTableManager.value_1
})
- UIManager.OpenPanel(UIName.RewardItemPopup,drop)
- Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(false)--隐藏红点
+ UIManager.OpenPanel(UIName.RewardItemPopup, drop)
+ Util.GetGameObject(this.rewardBoxList[i], "redPoint"):SetActive(false) --隐藏红点
this.RrFreshInfo()
end)
- else--奖励已领取 可预览
+ else --奖励已领取 可预览
-- this.OpenRewardPreview(LuckyTurnTableManager.boxReward_One,i)
-- print(LuckyTurnTableManager.boxReward_One[i].Values[1][1])
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,
+ LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
end
else
--奖励不可领,可预览
-- this.OpenRewardPreview(LuckyTurnTableManager.boxReward_One,i)
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,
+ LuckyTurnTableManager.boxReward_One[i].Reward[1][1])
end
end)
end
- elseif LuckyTurnTableManager.curTreasureType==TreasureType.Advanced then
+ elseif LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
for i = 1, 5 do
- local BG1 = Util.GetGameObject(this.rewardBoxList[i],"BG1"):GetComponent("Image")
- local BG2 = Util.GetGameObject(this.rewardBoxList[i],"BG1/BG2"):GetComponent("Image")
- local baoxiang = Util.GetGameObject(this.rewardBoxList[i],"BG1/UI_baoxiang")
- Util.GetGameObject(this.rewardBoxList[i],"Value"):GetComponent("Text").text = LuckyTurnTableManager.boxReward_Two[i].Values[1][1]
+ local BG1 = Util.GetGameObject(this.rewardBoxList[i], "BG1"):GetComponent("Image")
+ local BG2 = Util.GetGameObject(this.rewardBoxList[i], "BG1/BG2"):GetComponent("Image")
+ local baoxiang = Util.GetGameObject(this.rewardBoxList[i], "BG1/UI_baoxiang")
+ Util.GetGameObject(this.rewardBoxList[i], "Value"):GetComponent("Text").text = LuckyTurnTableManager
+ .boxReward_Two[i].Values[1][1]
+ Util.GetGameObject(this.rewardBoxList[i], "Num"):GetComponent("Text").text = "X" .. LuckyTurnTableManager
+ .boxReward_Two[i].Reward[1][2]
BG2.sprite = SetIcon(LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
BG1.sprite = SetFrame(LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
- Util.GetGameObject(this.rewardBoxList[i],"yilingqu"):SetActive(false)
+ Util.GetGameObject(this.rewardBoxList[i], "yilingqu"):SetActive(false)
--显示红点
- if LuckyTurnTableManager.value_2>=LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
- if LuckyTurnTableManager.GetRewardState(31,LuckyTurnTableManager.boxReward_Two[i].Id)==0 then
- Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(true)
- BG1.material = nil
- BG2.material = nil
+ if LuckyTurnTableManager.value_2 >= LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
+ if LuckyTurnTableManager.GetRewardState(31, LuckyTurnTableManager.boxReward_Two[i].Id) == 0 then
+ Util.GetGameObject(this.rewardBoxList[i], "redPoint"):SetActive(true)
+ --BG1.material = nil
+ --BG2.material = nil
baoxiang:SetActive(true)
else
- BG1.material = this.material
- BG2.material = this.material
+ --BG1.material = this.material
+ --BG2.material = this.material
baoxiang:SetActive(false)
- Util.GetGameObject(this.rewardBoxList[i],"yilingqu"):SetActive(true)
+ Util.GetGameObject(this.rewardBoxList[i], "yilingqu"):SetActive(true)
end
else
- BG1.material = this.material
- BG2.material = this.material
+ --BG1.material = this.material
+ --BG2.material = this.material
baoxiang:SetActive(false)
end
Util.AddOnceClick(this.rewardBoxList[i], function()
RedpotManager.CheckRedPointStatus(RedPointType.LuckyTurn)
if LuckyTurnTableManager.value_2 >= LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
if LuckyTurnTableManager.GetRewardState(31, LuckyTurnTableManager.boxReward_Two[i].Id) == 0 then
- NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_Two[i].Id, 31,function(drop)
+ NetManager.GetActivityRewardRequest(LuckyTurnTableManager.boxReward_Two[i].Id, 31, function(drop)
ThinkingAnalyticsManager.Track("activity_highturn_reward", {
activity_highturn_reward_luckynum = LuckyTurnTableManager.value_2
})
- UIManager.OpenPanel(UIName.RewardItemPopup,drop)
- Util.GetGameObject(this.rewardBoxList[i],"redPoint"):SetActive(false)--隐藏红点
+ UIManager.OpenPanel(UIName.RewardItemPopup, drop)
+ Util.GetGameObject(this.rewardBoxList[i], "redPoint"):SetActive(false) --隐藏红点
this.RrFreshInfo()
end)
else
-- this.OpenRewardPreview(LuckyTurnTableManager.boxReward_Two,i)
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,
+ LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
end
else
-- this.OpenRewardPreview(LuckyTurnTableManager.boxReward_Two,i)
- UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
+ UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,
+ LuckyTurnTableManager.boxReward_Two[i].Reward[1][1])
end
end)
end
@@ -935,48 +964,48 @@ function this.RewardBgProgress()
end
---设置奖盒预览信息 并打开面板
-function this.OpenRewardPreview(boxReward,i)
+function this.OpenRewardPreview(boxReward, i)
--设置奖励预览信息 并打开面板
- local tab = {boxReward[i].Reward[1][1],boxReward[i].Reward[1][2]}
- this.rewardItemView:OnOpen(false, {tab[1],tab[2]},1, false, false, false, sortingOrder)
+ local tab = { boxReward[i].Reward[1][1], boxReward[i].Reward[1][2] }
+ this.rewardItemView:OnOpen(false, { tab[1], tab[2] }, 1, false, false, false, sortingOrder)
this.rewardPanelMaskBtn.gameObject:SetActive(true)
this.rewardPanel.gameObject:SetActive(true)
end
-local luckyLevels = {0.2,0.42,0.63,0.83,1}--幸运值条到达档位时实际位置
+local luckyLevels = { 0.2, 0.42, 0.63, 0.83, 1 } --幸运值条到达档位时实际位置
---刷新幸运值
function this.RefreshLuckyValue()
if LuckyTurnTableManager.curTreasureType == TreasureType.Lucky then
LuckyTurnTableManager.SetLuckyValue()
local data = LuckyTurnTableManager.GetLuckyValue()
-
+
this.luckySlider.minValue = 0
this.luckySlider.maxValue = LuckyTurnTableManager.boxReward_One[5].Values[1][1]
- this.luckyValueNum.text = data--.."/"..LuckyTurnTableManager.boxReward_One[5].Values[1][1]
+ this.luckyValueNum.text = data --.."/"..LuckyTurnTableManager.boxReward_One[5].Values[1][1]
--确定档位
- local nowLevel = 5--如果data超过最高档位,认为是最高档位
- for i = 1,5 do
+ local nowLevel = 5 --如果data超过最高档位,认为是最高档位
+ for i = 1, 5 do
if data <= LuckyTurnTableManager.boxReward_One[i].Values[1][1] then
nowLevel = i
break
end
end
- local pLevelValue = 0--上一档值
- local pLuckyLevel = 0--上一档幸运条值
+ local pLevelValue = 0 --上一档值
+ local pLuckyLevel = 0 --上一档幸运条值
if nowLevel > 1 then
- pLevelValue = LuckyTurnTableManager.boxReward_One[nowLevel-1].Values[1][1]
- pLuckyLevel = luckyLevels[nowLevel-1]
+ pLevelValue = LuckyTurnTableManager.boxReward_One[nowLevel - 1].Values[1][1]
+ pLuckyLevel = luckyLevels[nowLevel - 1]
end
- local nowLevelValue = LuckyTurnTableManager.boxReward_One[nowLevel].Values[1][1]--当前档值
- local LevelValue = luckyLevels[nowLevel]--当前档幸运条值
- local sliderValue = (data-pLevelValue)/(nowLevelValue-pLevelValue)*(LevelValue-pLuckyLevel)+pLuckyLevel
+ local nowLevelValue = LuckyTurnTableManager.boxReward_One[nowLevel].Values[1][1] --当前档值
+ local LevelValue = luckyLevels[nowLevel] --当前档幸运条值
+ local sliderValue = (data - pLevelValue) / (nowLevelValue - pLevelValue) * (LevelValue - pLuckyLevel) +
+ pLuckyLevel
this.luckySlider.value = data
-
elseif LuckyTurnTableManager.curTreasureType == TreasureType.Advanced then
LuckyTurnTableManager.SetLuckyValue()
local data = LuckyTurnTableManager.GetLuckyValue()
@@ -987,23 +1016,24 @@ function this.RefreshLuckyValue()
--确定档位
local nowLevel = 5
- for i = 1,5 do
+ for i = 1, 5 do
if data <= LuckyTurnTableManager.boxReward_Two[i].Values[1][1] then
nowLevel = i
break
end
end
- local pLevelValue = 0--上一档值
- local pLuckyLevel = 0--上一档幸运条值
+ local pLevelValue = 0 --上一档值
+ local pLuckyLevel = 0 --上一档幸运条值
if nowLevel > 1 then
- pLevelValue = LuckyTurnTableManager.boxReward_Two[nowLevel-1].Values[1][1]
- pLuckyLevel = luckyLevels[nowLevel-1]
+ pLevelValue = LuckyTurnTableManager.boxReward_Two[nowLevel - 1].Values[1][1]
+ pLuckyLevel = luckyLevels[nowLevel - 1]
end
- local nowLevelValue = LuckyTurnTableManager.boxReward_Two[nowLevel].Values[1][1]--当前档值
- local LevelValue = luckyLevels[nowLevel]--当前档幸运条值
- local sliderValue = (data-pLevelValue)/(nowLevelValue-pLevelValue)*(LevelValue-pLuckyLevel)+pLuckyLevel
+ local nowLevelValue = LuckyTurnTableManager.boxReward_Two[nowLevel].Values[1][1] --当前档值
+ local LevelValue = luckyLevels[nowLevel] --当前档幸运条值
+ local sliderValue = (data - pLevelValue) / (nowLevelValue - pLevelValue) * (LevelValue - pLuckyLevel) +
+ pLuckyLevel
this.luckySlider.value = data
end
end
@@ -1024,9 +1054,10 @@ function this.DelayMaskWithTime(delayTime)
local closeMask = Timer.New(function()
this.maskBG.gameObject:SetActive(false)
this.allMask:SetActive(false)
- end,delayTime,1,true)
+ end, delayTime, 1, true)
closeMask:Start()
end
+
---延时遮罩 1按bool
function this.DelayMaskWithBool(b)
if b then
@@ -1038,5 +1069,4 @@ function this.DelayMaskWithBool(b)
end
end
-
-return LuckyTurnTablePanel
\ No newline at end of file
+return LuckyTurnTablePanel
diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua
index f263315e2..9ce0f0dc6 100644
--- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua
@@ -26,14 +26,14 @@ local moveTranList
--当前拖动的游戏物体
local dragGo = nil
--local isCanDragMsg = true
- local activitys = {}
- local activityTabs = {}
+local activitys = {}
+local activityTabs = {}
-- local activeSelfTabs = {}
local moveSceneList = {
[1] = 1,
}
-local isOpen = true --收/缩
-local isStart = false --动画是否开启
+local isOpen = true --收/缩
+local isStart = false --动画是否开启
local CrossService = false --跨服天梯是否解锁
--初始化组件(用于子类重写)
@@ -65,10 +65,10 @@ function this:InitComponent()
--adb18适龄
this.btn18adb = Util.GetGameObject(this.gameObject, "RightDown/btn18adb")
this.adb_ageTip = Util.GetGameObject(this.gameObject, "RightDown/btn18adb/adb_ageTip")
-
+
---------------LeftDown----------------
this.leftDown = Util.GetGameObject(this.gameObject, "LeftDown")
-
+
--手札
this.btnBattlePass = Util.GetGameObject(this.gameObject, "LeftDown/btnZhanZhengXueYuan")
this.btnBattlePassRedPoint = Util.GetGameObject(this.btnBattlePass, "redPoint")
@@ -76,21 +76,21 @@ function this:InitComponent()
-------------------场景中的按钮------------------------
-- 按钮
local layer1 = Util.GetGameObject(this.gameObject, "scene/layer1")
- this.btnEquipInformationCenter = Util.GetGameObject(layer1, "btnEquipInformationCenter")--启明星科技
- this.btnShangdian = Util.GetGameObject(layer1, "btnShangdian")--超市
- this.btnheishi = Util.GetGameObject(layer1, "btnheishi")--黑市
- this.btnzhihuan = Util.GetGameObject(layer1, "btnzhihuan")--医院
- this.btnElementDrawCard = Util.GetGameObject(layer1, "btnElementDrawCard")--俱乐部
- this.btnRecruit = Util.GetGameObject(layer1, "btnRecruit")--猎头公司
- this.btnTower = Util.GetGameObject(layer1, "btnTower")--神之塔
- this.btnJingjichang = Util.GetGameObject(layer1, "btnJingjichang")--地下竞技场
- this.btnColorfulWorld = Util.GetGameObject(layer1, "btnColorfulWorld")--时空战场
- this.btnFenjie = Util.GetGameObject(layer1, "btnFenjie")--人事管理处
- this.btnhecheng = Util.GetGameObject(layer1, "btnhecheng")--实验室
- this.btnEquipCompound = Util.GetGameObject(layer1, "btnEquipCompound")--研究所
- this.btnInfiniteWar = Util.GetGameObject(layer1, "btnInfiniteWar")--无限战争
- this.btnBase = Util.GetGameObject(layer1, "btnBase")--能源基地
- this.btnPowerCenter = Util.GetGameObject(layer1, "btnPowerCenter")--异能中心
+ this.btnEquipInformationCenter = Util.GetGameObject(layer1, "btnEquipInformationCenter") --启明星科技
+ this.btnShangdian = Util.GetGameObject(layer1, "btnShangdian") --超市
+ this.btnheishi = Util.GetGameObject(layer1, "btnheishi") --黑市
+ this.btnzhihuan = Util.GetGameObject(layer1, "btnzhihuan") --医院
+ this.btnElementDrawCard = Util.GetGameObject(layer1, "btnElementDrawCard") --俱乐部
+ this.btnRecruit = Util.GetGameObject(layer1, "btnRecruit") --猎头公司
+ this.btnTower = Util.GetGameObject(layer1, "btnTower") --神之塔
+ this.btnJingjichang = Util.GetGameObject(layer1, "btnJingjichang") --地下竞技场
+ this.btnColorfulWorld = Util.GetGameObject(layer1, "btnColorfulWorld") --时空战场
+ this.btnFenjie = Util.GetGameObject(layer1, "btnFenjie") --人事管理处
+ this.btnhecheng = Util.GetGameObject(layer1, "btnhecheng") --实验室
+ this.btnEquipCompound = Util.GetGameObject(layer1, "btnEquipCompound") --研究所
+ this.btnInfiniteWar = Util.GetGameObject(layer1, "btnInfiniteWar") --无限战争
+ this.btnBase = Util.GetGameObject(layer1, "btnBase") --能源基地
+ this.btnPowerCenter = Util.GetGameObject(layer1, "btnPowerCenter") --异能中心
this.operateIcon = {
[FUNCTION_OPEN_TYPE.InvestigateCenter] = this:AddFuncItem(this.btnEquipInformationCenter, 1000),
@@ -129,23 +129,24 @@ function this:InitComponent()
}
-- 红点
- this.rpShangdian = Util.GetGameObject(this.btnShangdian, "redPoint")--超市
- this.rpElementDrawCard = Util.GetGameObject(this.btnElementDrawCard, "redPoint")--俱乐部
- this.rpRecruit = Util.GetGameObject(this.btnRecruit, "redPoint")--猎头公司
- this.rpTower = Util.GetGameObject(this.btnTower,"redPoint") --神之塔
- this.rpJingjichang = Util.GetGameObject(this.btnJingjichang, "redPoint")--地下竞技场
- this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint")--时空战场
- this.rpFenjie = Util.GetGameObject(this.btnFenjie, "redPoint")--人事管理处
- this.rpEquipCompound = Util.GetGameObject(this.btnEquipCompound,"redPoint") --研究所
- this.rpBlackShop = Util.GetGameObject(this.btnheishi, "redPoint")--黑市
- this.rpEnergyBase = Util.GetGameObject(this.btnBase, "redPoint")--能源基地
- this.rpPowerCenter = Util.GetGameObject(this.btnPowerCenter, "redPoint")--异能中心
+ this.rpShangdian = Util.GetGameObject(this.btnShangdian, "redPoint") --超市
+ this.rpElementDrawCard = Util.GetGameObject(this.btnElementDrawCard, "redPoint") --俱乐部
+ this.rpRecruit = Util.GetGameObject(this.btnRecruit, "redPoint") --猎头公司
+ this.rpTower = Util.GetGameObject(this.btnTower, "redPoint") --神之塔
+ this.rpJingjichang = Util.GetGameObject(this.btnJingjichang, "redPoint") --地下竞技场
+ this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint") --时空战场
+ this.rpFenjie = Util.GetGameObject(this.btnFenjie, "redPoint") --人事管理处
+ this.rpEquipCompound = Util.GetGameObject(this.btnEquipCompound, "redPoint") --研究所
+ this.rpBlackShop = Util.GetGameObject(this.btnheishi, "redPoint") --黑市
+ this.rpEnergyBase = Util.GetGameObject(this.btnBase, "redPoint") --能源基地
+ this.rpPowerCenter = Util.GetGameObject(this.btnPowerCenter, "redPoint") --异能中心
this.PlayerHeadFrameView = SubUIManager.Open(SubUIConfig.PlayerHeadFrameView, self.gameObject.transform)
this.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
this.ChatTipView = SubUIManager.Open(SubUIConfig.ChatTipView, self.transform, 1)
- this.GuideTaskView = SubUIManager.Open(SubUIConfig.GuideTaskView, self.transform, this.sortingOrder,this.btnRoot.transform,this.leftDown.transform)
+ this.GuideTaskView = SubUIManager.Open(SubUIConfig.GuideTaskView, self.transform, this.sortingOrder,
+ this.btnRoot.transform, this.leftDown.transform)
moveTranList = {}
for i = 1, #moveSceneList do
@@ -159,7 +160,7 @@ function this:InitComponent()
-- this.getRewardButton = Util.GetGameObject(self.gameObject, "RightDown/mainTask/getRewardButton")
this.mainTaskGRewardImage = Util.GetGameObject(self.gameObject, "RightDown/mainTask/getRewardButton/getRewardImage")
this.mainTaskJumpImage = Util.GetGameObject(self.gameObject, "RightDown/mainTask/getRewardButton/jumpImage")
- this.mainTask:SetActive(false)-- 删除
+ this.mainTask:SetActive(false) -- 删除
this.GuideEffectGo = poolManager:LoadAsset("GuideEffect", PoolManager.AssetType.GameObject)
this.GuideEffectGo.transform:SetParent(this.mainTaskGRewardImage.transform)
@@ -195,12 +196,12 @@ function this:InitComponent()
-- 重新设置背景位置,使关联场景背景正确
this:SetPos(self.bgTran.anchoredPosition)
- this.taskGuideFinger = Util.GetGameObject(this.GuideTaskView.gameObject, "button/tipButtom")--任务引导
- this.battleGuideFinger = Util.GetGameObject(this.BtView.gameObject, "Down/btnJieLing/tipButtom")--闯关引导
+ this.taskGuideFinger = Util.GetGameObject(this.GuideTaskView.gameObject, "button/tipButtom") --任务引导
+ this.battleGuideFinger = Util.GetGameObject(this.BtView.gameObject, "Down/btnJieLing/tipButtom") --闯关引导
this.InitPictureQuality()
end
-local isRetract--收/缩
+local isRetract --收/缩
local isRetractStart = false --动画是否开启
--绑定事件(用于子类重写)
function this:BindEvent()
@@ -228,9 +229,9 @@ function this:BindEvent()
self.leftBoundary = boundary
self.rightBoundary = -boundary
- self.moveTween.OnUpdate = function (v2)
+ self.moveTween.OnUpdate = function(v2)
this:MoveOffset(v2)
- end
+ end
self.moveTween.MomentumAmount = 1
self.moveTween.Strength = 1
@@ -249,27 +250,27 @@ function this:BindEvent()
--猎头公司
this:AddButtonEventTriggerListener(this.btnRecruit, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.RECURITY, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.RECURITY, function()
UIManager.OpenPanel(UIName.RecruitPanel)
end)
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.RECURITY)
end)
--俱乐部
this:AddButtonEventTriggerListener(this.btnElementDrawCard, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.ELEMENT_RECURITY, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.ELEMENT_RECURITY, function()
UIManager.OpenPanel(UIName.CompoundHeroPanel)
end)
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.ELEMENT_RECURITY)
end)
--实验室
this:AddButtonEventTriggerListener(this.btnhecheng, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.ASSEMBLE, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.ASSEMBLE, function()
UIManager.OpenPanel(UIName.AssemblePanel)
end)
end)
--医院
this:AddButtonEventTriggerListener(this.btnzhihuan, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.HeroExchange, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.HeroExchange, function()
UIManager.OpenPanel(UIName.HeroExchangePanel)
end)
end)
@@ -289,9 +290,9 @@ function this:BindEvent()
--时空战场
this:AddButtonEventTriggerListener(this.btnColorfulWorld, function()
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.TRIAL)
- or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR)
- or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MINSKBATTLE)
- or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALAMEIN_WAR) then
+ or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR)
+ or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MINSKBATTLE)
+ or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALAMEIN_WAR) then
PlayerManager.carbonType = 2
UIManager.OpenPanel(UIName.CarbonTypePanelV2)
else
@@ -307,7 +308,7 @@ function this:BindEvent()
--超市
this:AddButtonEventTriggerListener(this.btnShangdian, function()
- JumpManager.GoJumpAppoint(JumpType.Store, {SHOP_TYPE.ITEM_SHOP})
+ JumpManager.GoJumpAppoint(JumpType.Store, { SHOP_TYPE.ITEM_SHOP })
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.SHOP)
end)
@@ -324,14 +325,14 @@ function this:BindEvent()
end
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.COMPOUND)
end)
-
+
--神之塔
this:AddButtonEventTriggerListener(this.btnTower, function()
JumpManager.GoJump(8401)
end)
--启明星科技
- this:AddButtonEventTriggerListener(this.btnEquipInformationCenter, function ()
+ this:AddButtonEventTriggerListener(this.btnEquipInformationCenter, function()
-- JumpManager.GoJump(80011)
-- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.InvestigateCenter) then
-- UIManager.OpenPanel(UIName.FormationCenterPanel)
@@ -339,14 +340,14 @@ function this:BindEvent()
-- UIManager.OpenPanel(UIName.FormationCenterActivePanel)
-- end
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.InvestigateCenter, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.InvestigateCenter, function()
UIManager.OpenPanel(UIName.FormationCenterPanel)
end)
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.InvestigateCenter)
end)
--无限战争
- this:AddButtonEventTriggerListener(this.btnInfiniteWar, function ()
+ this:AddButtonEventTriggerListener(this.btnInfiniteWar, function()
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.laddersChallenge) then
UIManager.OpenPanel(UIName.LaddersTypePanel)
else
@@ -356,12 +357,12 @@ function this:BindEvent()
--能源基地
this:AddButtonEventTriggerListener(this.btnBase, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.EnergyBase, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.EnergyBase, function()
local info = EnergyBaseManager.GetFacilityInfos()
if info then
UIManager.OpenPanel(UIName.EnergyBaseMainPanel)
else
- EnergyBaseManager.SetBaseEnergyInfoData(function ()
+ EnergyBaseManager.SetBaseEnergyInfoData(function()
UIManager.OpenPanel(UIName.EnergyBaseMainPanel)
end)
end
@@ -371,7 +372,7 @@ function this:BindEvent()
--异能中心
this:AddButtonEventTriggerListener(this.btnPowerCenter, function()
- this.FunctionClickEvent(FUNCTION_OPEN_TYPE.PowerCenter, function ()
+ this.FunctionClickEvent(FUNCTION_OPEN_TYPE.PowerCenter, function()
UIManager.OpenPanel(UIName.PowerCenterPanel)
end)
this.ScenceBtnClick(FUNCTION_OPEN_TYPE.PowerCenter)
@@ -394,12 +395,12 @@ function this:BindEvent()
local activiteIds = {}
for i = 1, #RankKingList do
if RankKingList[i].isRankingMainPanelShow then
- table.insert(types,RankKingList[i].rankType)
- table.insert(activiteIds,RankKingList[i].activiteId)
+ table.insert(types, RankKingList[i].rankType)
+ table.insert(activiteIds, RankKingList[i].activiteId)
end
end
- NetManager.RankFirstRequest(types,activiteIds,function (msg)
- UIManager.OpenPanel(UIName.RankingListMainPanel,msg)
+ NetManager.RankFirstRequest(types, activiteIds, function(msg)
+ UIManager.OpenPanel(UIName.RankingListMainPanel, msg)
end)
else
local tip = ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.ALLRANKING)
@@ -419,7 +420,7 @@ function this:BindEvent()
end)
--收缩按钮
- Util.AddClick(this.btnRetract, function ()
+ Util.AddClick(this.btnRetract, function()
if isRetractStart then
return
end
@@ -433,7 +434,7 @@ function this:BindEvent()
this.MiddleGrid:GetComponent("Animator"):Play("X1_UI_MainPanel_GridClose")
this.RightUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_RightVerticalClose")
this.LeftUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_LeftVerticalClose")
- this.timeRetract = Timer.New(function ()
+ this.timeRetract = Timer.New(function()
this.MiddleGrid:SetActive(false)
this.RightUpVertical:SetActive(false)
this.LeftUpVertical:SetActive(false)
@@ -450,7 +451,7 @@ function this:BindEvent()
this.MiddleGrid:GetComponent("Animator"):Play("X1_UI_MainPanel_GridOpen")
this.RightUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_RightVerticalOpen")
this.LeftUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_LeftVerticalOpen")
- this.timeRetract = Timer.New(function ()
+ this.timeRetract = Timer.New(function()
this.timeRetract:Stop()
this.btnRetractIcon.sprite = Util.LoadSprite("X1_zhucheng_huodong_shouqi")
isStart = false
@@ -459,7 +460,7 @@ function this:BindEvent()
end
end)
- Util.AddClick(this.btn18adb, function ()
+ Util.AddClick(this.btn18adb, function()
this.adb_ageTip:SetActive(not this.adb_ageTip.activeSelf)
end)
@@ -558,18 +559,23 @@ function this:OnSortingOrderChange()
this.BtView:SetOrderStatus({ sortOrder = self.sortingOrder })
- Util.GetGameObject(this.battleGuideFinger,"icon"):GetComponent("Canvas").sortingOrder = self.canvas.sortingOrder + 55
- Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger,"icon/ring"), self.canvas.sortingOrder + 55)
- Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger,"icon/glow"), self.canvas.sortingOrder + 55)
- Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger,"icon/diliang"), self.canvas.sortingOrder + 55)
- Util.GetGameObject(this.taskGuideFinger,"icon"):GetComponent("Canvas").sortingOrder = self.canvas.sortingOrder + 55
- Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger,"icon/ring"), self.canvas.sortingOrder + 55)
- Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger,"icon/glow"), self.canvas.sortingOrder + 55)
- Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger,"icon/diliang"), self.canvas.sortingOrder + 55)
+ Util.GetGameObject(this.battleGuideFinger, "icon"):GetComponent("Canvas").sortingOrder = self.canvas.sortingOrder +
+ 55
+ Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger, "icon/ring"), self.canvas.sortingOrder + 55)
+ Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger, "icon/glow"), self.canvas.sortingOrder + 55)
+ Util.SetParticleSortLayer(Util.GetGameObject(this.battleGuideFinger, "icon/diliang"), self.canvas.sortingOrder + 55)
+ Util.GetGameObject(this.taskGuideFinger, "icon"):GetComponent("Canvas").sortingOrder = self.canvas.sortingOrder + 55
+ Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger, "icon/ring"), self.canvas.sortingOrder + 55)
+ Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger, "icon/glow"), self.canvas.sortingOrder + 55)
+ Util.SetParticleSortLayer(Util.GetGameObject(this.taskGuideFinger, "icon/diliang"), self.canvas.sortingOrder + 55)
end
function this:OnOpen()
-
+ if PlayerManager.serverTime - PlayerPrefs.GetInt("kefulibao", PlayerManager.serverTime - 86400)>= 86400 then
+ ChangeRedPointStatus(RedPointType.Kefulibao,1)
+ else
+ ChangeRedPointStatus(RedPointType.Kefulibao,0)
+ end
this.btn18adb:SetActive(GetChannelConfig().Button_Logon_AgeTipsAbd)
activitys = DynamicActivityManager.GetActivityTableDataByPageInde(0)
@@ -598,7 +604,7 @@ function this:OnShow()
this.MiddleGrid:GetComponent("Animator"):Play("X1_UI_MainPanel_GridOpen")
this.RightUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_RightVerticalOpen")
this.LeftUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_LeftVerticalOpen")
- this.timeRetract = Timer.New(function ()
+ this.timeRetract = Timer.New(function()
this.timeRetract:Stop()
this.btnRetractIcon.sprite = Util.LoadSprite("X1_zhucheng_huodong_shouqi")
isStart = false
@@ -661,7 +667,7 @@ function this:OnShow()
FirstRechargeManager.PlayerPrefsSetStrItemId(1)
--发送埋点数据
patBool = false
- UIManager.OpenPanel(UIName.FirstRechargePanel,nil,function()
+ UIManager.OpenPanel(UIName.FirstRechargePanel, nil, function()
end)
end
end
@@ -677,7 +683,7 @@ function this:OnShow()
end
end
- GuildManager.CheckGuildTip()-- 检测公会tip
+ GuildManager.CheckGuildTip() -- 检测公会tip
local timer = Timer.New(function()
this.CheckRedPoint()
@@ -703,7 +709,7 @@ end
--界面销毁时调用(用于子类重写)
function this:OnDestroy()
- for k,v in ipairs(activitys) do
+ for k, v in ipairs(activitys) do
-- if v.RpType > 0 then
-- if v.RpType == 21000 then
-- ClearRedPointObject(RedPointType.AdjutantActivity, activityTabs[k].redpot)
@@ -719,7 +725,7 @@ function this:OnDestroy()
ClearRedPointObject(RedPointType.EightTheLogin_2, activityTabs[k].redpot)
elseif v.Id == 15 then
ClearRedPointObject(RedPointType.IncentivePlan, activityTabs[k].redpot)
- elseif v.Id == 2002 then --自选招募
+ elseif v.Id == 2002 then --自选招募
ClearRedPointObject(RedPointType.SelfRecruit, activityTabs[k].redpot)
elseif v.Id == 4003 then
ClearRedPointObject(RedPointType.Association, activityTabs[k].redpot)
@@ -747,9 +753,9 @@ function this:OnDestroy()
ClearRedPointObject(RedPointType.PrivilegeTurn, activityTabs[k].redpot)
elseif v.Id == 2007 then
ClearRedPointObject(RedPointType.PrivilegeCardThreePage, activityTabs[k].redpot)
- elseif v.Id == ActivityTypeDef.LevelLiJin then --万元礼金
+ elseif v.Id == ActivityTypeDef.LevelLiJin then --万元礼金
ClearRedPointObject(RedPointType.WanYuan, activityTabs[k].redpot)
- elseif v.Id == 2011 then --再充
+ elseif v.Id == 2011 then --再充
ClearRedPointObject(RedPointType.AgainRecharge, activityTabs[k].redpot)
elseif v.Id == 4000 then
ClearRedPointObject(RedPointType.Festival, activityTabs[k].redpot)
@@ -809,7 +815,7 @@ function this:Update()
end
function this:AddFuncItem(btnGO, pos)
- return {go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos}
+ return { go = btnGO, open = Util.GetGameObject(btnGO, "open"), lock = Util.GetGameObject(btnGO, "lock"), pos = pos }
end
function this:InsertNewText(btn)
@@ -879,50 +885,57 @@ end
function this.CreatActivity()
ActivityGiftManager.SetRedState(0)
- for k,v in ipairs(activitys) do
+ for k, v in ipairs(activitys) do
repeat
- if not activityTabs[k] then
- activityTabs[k] = {}
- local root
- if v.ShowType == 1 then
- root = this.RightUpVertical
- elseif v.ShowType == 2 then
- root = this.MiddleGrid
- elseif v.ShowType == 3 then
- root = this.LeftUpVertical
- else
- break
- end
- activityTabs[k].go = newObjToParent(this.activityTabPrefab,root)
- activityTabs[k].img = Util.GetGameObject(activityTabs[k].go, "icon"):GetComponent("Image")
- activityTabs[k].timeImg = Util.GetGameObject(activityTabs[k].go, "Image_1")
- activityTabs[k].timeText = Util.GetGameObject(activityTabs[k].timeImg, "time"):GetComponent("Text")
- activityTabs[k].redpot = Util.GetGameObject(activityTabs[k].go, "redPoint")
- activityTabs[k].name = Util.GetGameObject(activityTabs[k].go, "Image_2/name"):GetComponent("Text")
- activityTabs[k].effect = Util.GetGameObject(activityTabs[k].go, "effect")
- activityTabs[k].redpot:SetActive(false)
- end
-
- activityTabs[k].go.gameObject.name = "tab"..v.Id
- activityTabs[k].go.gameObject:SetActive(false)
- if v.ShowTime == 0 then
- activityTabs[k].timeImg.gameObject:SetActive(false)
- else
- activityTabs[k].timeImg.gameObject:SetActive(true)
- end
- this.BindBtnRedPoint(activityTabs[k].redpot, v)
- --设置图片文字
- if v.ActiveType > 0 then
- local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
- if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) and v.ActiveType ~= 42 then
- local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups, "ActId", GlobalActConfig[activityId].ShowArt, "PageType", 0, "ActiveType", v.ActiveType)
- if not tempConfig then
- tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups, "ActId", activityId, "PageType", 0, "ActiveType", v.ActiveType)
+ if not activityTabs[k] then
+ activityTabs[k] = {}
+ local root
+ if v.ShowType == 1 then
+ root = this.RightUpVertical
+ elseif v.ShowType == 2 then
+ root = this.MiddleGrid
+ elseif v.ShowType == 3 then
+ root = this.LeftUpVertical
+ else
+ break
end
- if tempConfig then
- activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1])
- activityTabs[k].name.text = GetLanguageStrById(tempConfig.Sesc)
- activityTabs[k].effect:SetActive(tempConfig.ShowEffect == 1)
+ activityTabs[k].go = newObjToParent(this.activityTabPrefab, root)
+ activityTabs[k].img = Util.GetGameObject(activityTabs[k].go, "icon"):GetComponent("Image")
+ activityTabs[k].timeImg = Util.GetGameObject(activityTabs[k].go, "Image_1")
+ activityTabs[k].timeText = Util.GetGameObject(activityTabs[k].timeImg, "time"):GetComponent("Text")
+ activityTabs[k].redpot = Util.GetGameObject(activityTabs[k].go, "redPoint")
+ activityTabs[k].name = Util.GetGameObject(activityTabs[k].go, "Image_2/name"):GetComponent("Text")
+ activityTabs[k].effect = Util.GetGameObject(activityTabs[k].go, "effect")
+ activityTabs[k].redpot:SetActive(false)
+ end
+
+ activityTabs[k].go.gameObject.name = "tab" .. v.Id
+ activityTabs[k].go.gameObject:SetActive(false)
+ if v.ShowTime == 0 then
+ activityTabs[k].timeImg.gameObject:SetActive(false)
+ else
+ activityTabs[k].timeImg.gameObject:SetActive(true)
+ end
+ this.BindBtnRedPoint(activityTabs[k].redpot, v)
+ --设置图片文字
+ if v.ActiveType > 0 then
+ local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
+ if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) and v.ActiveType ~= 42 then
+ local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups, "ActId",
+ GlobalActConfig[activityId].ShowArt, "PageType", 0, "ActiveType", v.ActiveType)
+ if not tempConfig then
+ tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups, "ActId",
+ activityId, "PageType", 0, "ActiveType", v.ActiveType)
+ end
+ if tempConfig then
+ activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1])
+ activityTabs[k].name.text = GetLanguageStrById(tempConfig.Sesc)
+ activityTabs[k].effect:SetActive(tempConfig.ShowEffect == 1)
+ else
+ activityTabs[k].img.sprite = Util.LoadSprite(v.Icon[1])
+ activityTabs[k].name.text = GetLanguageStrById(v.Sesc)
+ activityTabs[k].effect:SetActive(v.ShowEffect == 1)
+ end
else
activityTabs[k].img.sprite = Util.LoadSprite(v.Icon[1])
activityTabs[k].name.text = GetLanguageStrById(v.Sesc)
@@ -933,23 +946,18 @@ function this.CreatActivity()
activityTabs[k].name.text = GetLanguageStrById(v.Sesc)
activityTabs[k].effect:SetActive(v.ShowEffect == 1)
end
- else
- activityTabs[k].img.sprite = Util.LoadSprite(v.Icon[1])
- activityTabs[k].name.text = GetLanguageStrById(v.Sesc)
- activityTabs[k].effect:SetActive(v.ShowEffect == 1)
- end
- activityTabs[k].img:SetNativeSize()
+ activityTabs[k].img:SetNativeSize()
- Util.AddOnceClick(activityTabs[k].go,function()
- if v.ActiveType > 0 then
- this:TabBtnAction(v.ActiveType, 1, v)
- elseif v.FunType > 0 then
- this:TabBtnAction(v.FunType, 2, v)
- else
- this:TabBtnAction(v.ActId, 0, v)
- end
- this.CloseGuide()
- end)
+ Util.AddOnceClick(activityTabs[k].go, function()
+ if v.ActiveType > 0 then
+ this:TabBtnAction(v.ActiveType, 1, v)
+ elseif v.FunType > 0 then
+ this:TabBtnAction(v.FunType, 2, v)
+ else
+ this:TabBtnAction(v.ActId, 0, v)
+ end
+ this.CloseGuide()
+ end)
until true
end
end
@@ -999,14 +1007,12 @@ function this.BindBtnRedPoint(redpoint, data)
BindRedPointObject(RedPointType.WanYuan, redpoint)
elseif data.Id == 2011 then
BindRedPointObject(RedPointType.AgainRecharge, redpoint)
- elseif data.Id == 2015 then
- redpoint:SetActive(false)
elseif data.Id == 4000 then
BindRedPointObject(RedPointType.Festival, redpoint)
elseif data.Id == 4004 then
BindRedPointObject(RedPointType.PhoneBuilding, redpoint)
elseif data.Id == 9018 then
-
+
else
BindRedPointObject(RedPointType.PatFace, redpoint)
end
@@ -1034,7 +1040,7 @@ function this:TabBtnAction(id, actType, data)
elseif id == ActivityTypeDef.DemonSlayer then
UIManager.OpenPanel(UIName.DemonSlayerPanel)
elseif id == ActivityTypeDef.TreasureOfSomeBody then
- UIManager.OpenPanel(UIName.GrowthManualPanel,2,1)
+ UIManager.OpenPanel(UIName.GrowthManualPanel, 2, 1)
elseif id == ActivityTypeDef.TreasureStore then
ActivityGiftManager.SetRedState(1)
CheckRedPointStatus(RedPointType.MunitionsMerchant)
@@ -1045,13 +1051,13 @@ function this:TabBtnAction(id, actType, data)
if dynamicAct then
curindex = GlobalActConfig[dynamicAct].ShowArt
end
- UIManager.OpenPanel(UIName.DynamicActivityPanel,curindex)
+ UIManager.OpenPanel(UIName.DynamicActivityPanel, curindex)
elseif id == ActivityTypeDef.SupremeHero then
UIManager.OpenPanel(UIName.SupremeHeroPopup)
elseif id == ActivityTypeDef.NiuZhuan then
UIManager.OpenPanel(UIName.NiuZhuanQianKunPanel)
- elseif id == ActivityTypeDef.NiuQi then
- UIManager.OpenPanel(UIName.NiuQiChongTianPanel,data)
+ elseif id == ActivityTypeDef.NiuQi then
+ UIManager.OpenPanel(UIName.NiuQiChongTianPanel, data)
elseif id == ActivityTypeDef.FuXingGaoZhao then
UIManager.OpenPanel(UIName.FuXingGaoZhaoPanel)
elseif id == ActivityTypeDef.EightDayGift then
@@ -1061,7 +1067,7 @@ function this:TabBtnAction(id, actType, data)
if ActivityGiftManager.IsQualifiled(ActivityTypeDef.LifeMemebr) and not not ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LifeMemebr) then
tabIndex = 12
end
- UIManager.OpenPanel(UIName.OperatingPanel,{tabIndex = tabIndex, extraParam = 2, showType = 2})
+ UIManager.OpenPanel(UIName.OperatingPanel, { tabIndex = tabIndex, extraParam = 2, showType = 2 })
elseif id == ActivityTypeDef.AdjutantCurrent then
UIManager.OpenPanel(UIName.AdjutantActivityPanel)
elseif id == ActivityTypeDef.SignInDays then
@@ -1071,28 +1077,31 @@ function this:TabBtnAction(id, actType, data)
elseif id == ActivityTypeDef.ArtilleryDrills then
UIManager.OpenPanel(UIName.ArtilleryDrillsPanel)
elseif id == ActivityTypeDef.SelfRecruit then
- UIManager.OpenPanel(UIName.SelfRecruitMainPanel,ActivityTypeDef.SelfRecruit,1)
+ UIManager.OpenPanel(UIName.SelfRecruitMainPanel, ActivityTypeDef.SelfRecruit, 1)
elseif id == ActivityTypeDef.LevelLiJin then
local allData = OperatingManager.GetWanYuanLiBao(ActivityTypeDef.LoginLiJin)
- local index = 1
+ local index = 1
if allData == nil then
index = 2
end
- UIManager.OpenPanel(UIName.WanYuanPanel,index)
+ UIManager.OpenPanel(UIName.WanYuanPanel, index)
elseif id == 500 then
- UIManager.OpenPanel(UIName.AgainRechargePanel)
+ UIManager.OpenPanel(UIName.AgainRechargePanel)
elseif id == 50000 then
UIManager.OpenPanel(UIName.CardActivityPanel)
elseif id == 201 then
- local url = ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig, "Key", "Hanbok_Questionnaire_URL").Value
+ local url = ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig, "Key", "Hanbok_Questionnaire_URL")
+ .Value
UnityEngine.Application.OpenURL(url)
elseif id == 202 then
UIManager.OpenPanel(UIName.OpenServiceGiftPanel)
elseif id == 6001 then
UIManager.OpenPanel(UIName.TreasureStorePopup, ActivityTypeDef.OpenServiceShop)
elseif id == 6002 then
- UIManager.OpenPanel(UIName.DailyFlashBuyPanel)
+ UIManager.OpenPanel(UIName.DailyFlashBuyPanel)
elseif id == 213 then
+ PlayerPrefs.SetInt("kefulibao", PlayerManager.serverTime)
+ ChangeRedPointStatus(RedPointType.Kefulibao,0)
UnityEngine.Application.OpenURL("https://wpa1.qq.com/LYkphZ3C?_type=wpa&qidian=true")
elseif id == 800 then
UIManager.OpenPanel(UIName.SeasonalActivity)
@@ -1106,13 +1115,13 @@ function this:TabBtnAction(id, actType, data)
end
elseif id == 6004 then
UIManager.OpenPanel(UIName.NewcomerDiscountsPanel)
- elseif id ==214 then
+ elseif id == 214 then
UIManager.OpenPanel(UIName.OperatingTokensPanel)
end
elseif actType == 2 then
if id == FUNCTION_OPEN_TYPE.SERVER_START_GIFT then
UIManager.OpenPanel(UIName.CourtesyDressPanel)
- elseif id == JumpType.recharge then
+ elseif id == JumpType.recharge then
UIManager.OpenPanel(UIName.MainRechargePanel)
elseif id == FUNCTION_OPEN_TYPE.EXPERT then
UIManager.OpenPanel(UIName.ExpertPanel)
@@ -1133,7 +1142,7 @@ function this:TabBtnAction(id, actType, data)
if ActivityGiftManager.IsQualifiled(ActivityTypeDef.LifeMemebr) and not not ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.LifeMemebr) then
tabIndex = 12
end
- UIManager.OpenPanel(UIName.OperatingPanel,{tabIndex = tabIndex, extraParam = 2, showType = 2})
+ UIManager.OpenPanel(UIName.OperatingPanel, { tabIndex = tabIndex, extraParam = 2, showType = 2 })
elseif id == 95 then
UIManager.OpenPanel(UIName.TimeLimitSkinPanel)
elseif id == FUNCTION_OPEN_TYPE.ValuePack then
@@ -1150,10 +1159,10 @@ function this:TabBtnAction(id, actType, data)
end)
elseif id == FUNCTION_OPEN_TYPE.PVEActivity then
UIManager.OpenPanel(UIName.PVEActivityPanel)
- elseif id == JumpType.ChaosZz then
- NetManager.CampSimpleInfoGetReq(function (msg)
+ elseif id == JumpType.ChaosZz then
+ NetManager.CampSimpleInfoGetReq(function(msg)
if msg.camp ~= 0 then
- NetManager.CampWarInfoGetReq(function (msg)
+ NetManager.CampWarInfoGetReq(function(msg)
UIManager.OpenPanel(UIName.ChaosMainPanel, msg)
end)
else
@@ -1163,7 +1172,7 @@ function this:TabBtnAction(id, actType, data)
elseif id == 202 then
UIManager.OpenPanel(UIName.PrivilegeCardPanel)
elseif id == 203 then
- UIManager.OpenPanel(UIName.PrivilegeTurnTable,TreasureType.PrivilegeOne)
+ UIManager.OpenPanel(UIName.PrivilegeTurnTable, TreasureType.PrivilegeOne)
elseif id == 204 then
UIManager.OpenPanel(UIName.PrivilegeCardThreePanel)
elseif id == 200 then
@@ -1172,7 +1181,7 @@ function this:TabBtnAction(id, actType, data)
UIManager.OpenPanel(UIName.TokensPanel)
elseif id == 205 then
local index = 1
- local type = {300, 306, 305, 303, 308, 304, 307, 309, 302, 301}
+ local type = { 300, 306, 305, 303, 308, 304, 307, 309, 302, 301 }
for i = 1, #type do
local activityId = ActivityGiftManager.GetActivityIdByType(type[i])
if activityId > 0 then
@@ -1181,11 +1190,11 @@ function this:TabBtnAction(id, actType, data)
end
end
UIManager.OpenPanel(UIName.ChongBangPanel, index)
- elseif id == 206 then--BT奇葩资源阁
+ elseif id == 206 then --BT奇葩资源阁
if AppConst.isSDKLogin then
SDKMgr:Relation(1)
end
- elseif id == 207 then--BT奇葩超级折扣
+ elseif id == 207 then --BT奇葩超级折扣
if AppConst.isSDKLogin then
SDKMgr:Relation(2)
end
@@ -1238,16 +1247,16 @@ function this.InitFuncShow(funcType)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MINSKBATTLE)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALAMEIN_WAR)
- -- elseif funcType == FUNCTION_OPEN_TYPE.laddersChallenge then
- -- isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.laddersChallenge)
- -- and CrossService
- -- elseif funcType == FUNCTION_OPEN_TYPE.InvestigateCenter then
- -- isOpen = true
+ -- elseif funcType == FUNCTION_OPEN_TYPE.laddersChallenge then
+ -- isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.laddersChallenge)
+ -- and CrossService
+ -- elseif funcType == FUNCTION_OPEN_TYPE.InvestigateCenter then
+ -- isOpen = true
else
isOpen = ActTimeCtrlManager.SingleFuncState(funcType)
end
- Util.SetGray(this.operateIcon[funcType].lock,true)
+ Util.SetGray(this.operateIcon[funcType].lock, true)
Util.SetGray(Util.GetGameObject(this.operateIcon[funcType].lock.transform.parent, "Text"), true)
this.operateIcon[funcType].lock:SetActive(not isOpen)
this.operateIcon[funcType].open:SetActive(isOpen)
@@ -1261,11 +1270,11 @@ function this.InitFuncShow(funcType)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.PEOPLE_MIRROR)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.MINSKBATTLE)
or ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ALAMEIN_WAR)
- -- elseif i == FUNCTION_OPEN_TYPE.laddersChallenge then
- -- isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.laddersChallenge)
- -- and CrossService
- -- elseif i == FUNCTION_OPEN_TYPE.InvestigateCenter then
- -- isOpen = true
+ -- elseif i == FUNCTION_OPEN_TYPE.laddersChallenge then
+ -- isOpen = ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.laddersChallenge)
+ -- and CrossService
+ -- elseif i == FUNCTION_OPEN_TYPE.InvestigateCenter then
+ -- isOpen = true
else
isOpen = ActTimeCtrlManager.SingleFuncState(i)
end
@@ -1285,8 +1294,8 @@ function this.TimeFormat()
if v.ActId == 666 then
local giftList = {}
giftList = OperatingManager.GetInfoList()
- if #giftList > 0 then
- local time = giftList[1].endTime - GetTimeStamp()
+ if #giftList > 0 then
+ local time = giftList[1].endTime - GetTimeStamp()
if time < 1 then
OperatingManager.RemoveItemInfoByType(GoodsTypeDef.DirectPurchaseGift, giftList[1].goodsId)
activityTabs[k].go.gameObject:SetActive(false)
@@ -1301,99 +1310,99 @@ function this.TimeFormat()
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ChaosZZ) then
if ChaosManager.isOpen then
local time = ActTimeCtrlManager.GetActLeftTime(FUNCTION_OPEN_TYPE.ChaosZZ)
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
if time >= 86400 then
activityTabs[k].timeText.text = TimeToDH(time)
else
activityTabs[k].timeText.text = TimeToHMS(time)
end
else
- activityTabs[k].go.gameObject:SetActive(false)
+ activityTabs[k].go.gameObject:SetActive(false)
end
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
elseif v.ActId == 510001 then
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.SelfRecruit)
if id and id > 0 then
--local time = ActTimeCtrlManager.GetActLeftTime(FUNCTION_OPEN_TYPE.ChaosZZ)
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
-- if time >= 86400 then
-- activityTabs[k].timeText.text = TimeToDH(time)
-- else
-- activityTabs[k].timeText.text = TimeToHMS(time)
-- end
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
elseif v.ActId == 203 then
local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LevelLiJin)
- local loginId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LoginLiJin)
+ local loginId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LoginLiJin)
-- local id = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.LevelLiJin)
-- RefreShWanYuanRedPoint
- if (id and id > 0) or (loginId and loginId>0) then
+ if (id and id > 0) or (loginId and loginId > 0) then
if PrivilegeTurnManager:GetWanYuanShowState() then
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
else
- activityTabs[k].go.gameObject:SetActive(false)
+ activityTabs[k].go.gameObject:SetActive(false)
end
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
elseif v.ActId == 500 then
if FirstRechargeManager.GetFirstRewardState() then
if FirstRechargeManager.GetAgainReceiveAll() then
activityTabs[k].go.gameObject:SetActive(false)
else
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
end
else
activityTabs[k].go.gameObject:SetActive(false)
end
elseif v.Id == 2005 then
if ActTimeCtrlManager.SingleFuncState(202) then
- activityTabs[k].go.gameObject:SetActive(true)
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
- -- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
+ -- activityTabs[k].go.gameObject:SetActive(true)
elseif v.Id == 2006 then
if ActTimeCtrlManager.SingleFuncState(203) then
- activityTabs[k].go.gameObject:SetActive(true)
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
+ activityTabs[k].go.gameObject:SetActive(true)
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
elseif v.Id == 2007 then
- if ActTimeCtrlManager.SingleFuncState(204) then
+ if ActTimeCtrlManager.SingleFuncState(204) then
local data = tequanCardConfig[3]
local show = true
for index, value in ipairs(data.BuyRule) do
- if value~=0 then
- local showData = tequanCardConfig[value]
- if PrivilegeManager.GetPrivilegeOpenStatusById(showData.PrivilegeID) == false then
+ if value ~= 0 then
+ local showData = tequanCardConfig[value]
+ if PrivilegeManager.GetPrivilegeOpenStatusById(showData.PrivilegeID) == false then
show = false
break
end
end
end
- activityTabs[k].go.gameObject:SetActive(show)
- else
- activityTabs[k].go.gameObject:SetActive(false)
- end
- elseif v.ActId == 112 then
- -- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.EnergyBase) then
- -- activityTabs[k].go.gameObject:SetActive(true)
- -- else
- -- activityTabs[k].go.gameObject:SetActive(false)
- -- end
- activityTabs[k].go.gameObject:SetActive(true)
- elseif v.ActId == 112 then
- -- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.EnergyBase) then
- -- activityTabs[k].go.gameObject:SetActive(true)
- -- else
- -- activityTabs[k].go.gameObject:SetActive(false)
- -- end
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(show)
+ else
+ activityTabs[k].go.gameObject:SetActive(false)
+ end
+ elseif v.ActId == 112 then
+ -- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.EnergyBase) then
+ -- activityTabs[k].go.gameObject:SetActive(true)
+ -- else
+ -- activityTabs[k].go.gameObject:SetActive(false)
+ -- end
+ activityTabs[k].go.gameObject:SetActive(true)
+ elseif v.ActId == 112 then
+ -- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.EnergyBase) then
+ -- activityTabs[k].go.gameObject:SetActive(true)
+ -- else
+ -- activityTabs[k].go.gameObject:SetActive(false)
+ -- end
+ activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActId == 668 then
-- 加入对月卡的判断
local isMonthCardActive = OperatingManager.IsMonthCardActive()
@@ -1401,32 +1410,32 @@ function this.TimeFormat()
local isOpen_328 = OperatingManager.IsBaseOpen(GoodsTypeDef.MONTHCARD_328)
activityTabs[k].go.gameObject:SetActive(isMonthCardActive and (isOpen_128 or isOpen_328))
-- if isMonthCardActive then
- local cardType = nil
- if isOpen_328 then
- cardType = GoodsTypeDef.MONTHCARD_328
- end
- if not cardType and isOpen_128 then
- cardType = GoodsTypeDef.MONTHCARD_128
- end
- if cardType then
- local data = OperatingManager.GetGiftGoodsInfo(cardType)
- if data then
- local time = data.endTime - PlayerManager.serverTime
- if time < 1 then
- activityTabs[k].go.gameObject:SetActive(false)
- else
- activityTabs[k].go.gameObject:SetActive(true)
- activityTabs[k].timeImg.gameObject:SetActive(false)
- -- if OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_128) > 0 and OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_328) > 0 then
- -- activityTabs[k].timeImg.gameObject:SetActive(false)
- -- elseif time >= 86400 then
- -- activityTabs[k].timeText.text = TimeToDH(time)
- -- else
- -- activityTabs[k].timeText.text = TimeToHMS(time)
- -- end
- end
+ local cardType = nil
+ if isOpen_328 then
+ cardType = GoodsTypeDef.MONTHCARD_328
+ end
+ if not cardType and isOpen_128 then
+ cardType = GoodsTypeDef.MONTHCARD_128
+ end
+ if cardType then
+ local data = OperatingManager.GetGiftGoodsInfo(cardType)
+ if data then
+ local time = data.endTime - PlayerManager.serverTime
+ if time < 1 then
+ activityTabs[k].go.gameObject:SetActive(false)
+ else
+ activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].timeImg.gameObject:SetActive(false)
+ -- if OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_128) > 0 and OperatingManager.GetGoodsBuyTime(GoodsTypeDef.MONTHCARD_328) > 0 then
+ -- activityTabs[k].timeImg.gameObject:SetActive(false)
+ -- elseif time >= 86400 then
+ -- activityTabs[k].timeText.text = TimeToDH(time)
+ -- else
+ -- activityTabs[k].timeText.text = TimeToHMS(time)
+ -- end
end
end
+ end
-- end
elseif v.ActId == 667 then
local limitSkinGift = OperatingManager.GetTimeLimitSkinInfoList()
@@ -1437,8 +1446,8 @@ function this.TimeFormat()
if time > 0 then
activityTabs[k].go.gameObject:SetActive(true)
activityTabs[k].timeText.text = TimeToFelaxible(time)
- local canGet = BagManager.GetTotalItemNum(1221) > 0 and BagManager.GetTotalItemNum(1222) > 0 and
- BagManager.GetTotalItemNum(1223) > 0 and BagManager.GetTotalItemNum(1224) > 0
+ local canGet = BagManager.GetTotalItemNum(1221) > 0 and BagManager.GetTotalItemNum(1222) > 0 and
+ BagManager.GetTotalItemNum(1223) > 0 and BagManager.GetTotalItemNum(1224) > 0
activityTabs[k].redpot:SetActive(canGet)
else
activityTabs[k].go.gameObject:SetActive(false)
@@ -1450,10 +1459,11 @@ function this.TimeFormat()
activityTabs[k].timeText.transform.parent.gameObject:SetActive(ActData.value == 0)
activityTabs[k].go.gameObject:SetActive(ActData.value ~= 2)
if ActData.value == 0 then
- local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
- local time = ActData.startTime + tonumber(data[1])*86400 - GetTimeStamp()
+ local data = string.split(
+ ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig, "Id", 109).Value, "#")
+ local time = ActData.startTime + tonumber(data[1]) * 86400 - GetTimeStamp()
activityTabs[k].timeText.text = TimeToFelaxible(time)
- if time <= 0 then
+ if time <= 0 then
activityTabs[k].go.gameObject:SetActive(false)
end
end
@@ -1469,7 +1479,7 @@ function this.TimeFormat()
local endTime = ActivityGiftManager.GetTaskEndTime(ActivityTypeDef.SupremeHero)
if endTime - PlayerManager.serverTime > 0 then
local time = endTime - PlayerManager.serverTime
- if time>= 86400 then
+ if time >= 86400 then
activityTabs[k].timeText.text = TimeToDH(time)
else
activityTabs[k].timeText.text = TimeToHMS(time)
@@ -1478,20 +1488,22 @@ function this.TimeFormat()
activityTabs[k].go.gameObject:SetActive(false)
end
else
- activityTabs[k].go.gameObject:SetActive(false)
+ activityTabs[k].go.gameObject:SetActive(false)
end
elseif v.FunType and v.FunType == 41 then
if v.Id == 209 then
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
else
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
end
elseif v.ActiveType == 201 then
activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActiveType == 202 then
activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActiveType == ActivityTypeDef.SignInDays then
- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActiveType == 210 then
activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActiveType == 211 then
@@ -1499,8 +1511,9 @@ function this.TimeFormat()
else
local info = ActivityGiftManager.GetActivityTypeInfo(v.ActiveType)
local extraTime = 0
- if ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Type",v.ActiveType).GapTime and ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Type",v.ActiveType).GapTime > 0 then
- extraTime = ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Type",v.ActiveType).GapTime*86400
+ if ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity, "Type", v.ActiveType).GapTime and ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity, "Type", v.ActiveType).GapTime > 0 then
+ extraTime = ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity, "Type",
+ v.ActiveType).GapTime * 86400
end
local tempTime = info.endTime - GetTimeStamp()
if tempTime - extraTime > 0 then
@@ -1525,7 +1538,7 @@ function this.TimeFormat()
-- 当日五点开始显示
if tempTime > 0 and tempTime < 16 * 60 * 60 then
activityTabs[k].go.gameObject:SetActive(true)
- activityTabs[k].timeText.text = GetLanguageStrById(11211)..TimeToHMS(tempTime)
+ activityTabs[k].timeText.text = GetLanguageStrById(11211) .. TimeToHMS(tempTime)
else
activityTabs[k].go.gameObject:SetActive(false)
end
@@ -1534,7 +1547,7 @@ function this.TimeFormat()
activityTabs[k].timeText.text = GetLanguageStrById(11212)
end
elseif v.FunType == FUNCTION_OPEN_TYPE.GUILD_BATTLE then
- local timeDown = GuildBattleManager.overTime-GetTimeStamp()
+ local timeDown = GuildBattleManager.overTime - GetTimeStamp()
if timeDown <= 0 then
activityTabs[k].go.gameObject:SetActive(false)
else
@@ -1555,9 +1568,9 @@ function this.TimeFormat()
if isActive then
local tmData = ArenaTopMatchManager.GetBaseData()
if tmData then
- if tmData.progress == -1 then--即将开启
+ if tmData.progress == -1 then --即将开启
activityTabs[k].go.gameObject:SetActive(false)
- elseif tmData.progress == -2 then--已结束
+ elseif tmData.progress == -2 then --已结束
activityTabs[k].go.gameObject:SetActive(false)
else
local startTime, endTime = ArenaTopMatchManager.GetTopMatchTime()
@@ -1577,7 +1590,7 @@ function this.TimeFormat()
if LaddersArenaManager.GetStage() ~= 2 or LaddersArenaManager.Enterable() == -1 then
activityTabs[k].go.gameObject:SetActive(false)
else
- local peakednessTime= LaddersArenaManager.GetLeftTime()-435600
+ local peakednessTime = LaddersArenaManager.GetLeftTime() - 435600
if peakednessTime > 0 then
--九境巅峰时间定死为两天
activityTabs[k].timeText.text = TimeToHMS(peakednessTime)
@@ -1616,12 +1629,12 @@ end
--为限时折扣写的
function this:GetInfoList()
local giftList = {}
- local infoList = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift)--拿取所有类型5礼包信息(包含需要的礼包)
- local infoList2 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",21)
+ local infoList = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DirectPurchaseGift) --拿取所有类型5礼包信息(包含需要的礼包)
+ local infoList2 = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig, "ShowType", 21)
for index, value in pairs(infoList) do
for i = 1, #infoList2 do
if infoList2[i].Id == value.goodsId then
- table.insert(giftList,value)
+ table.insert(giftList, value)
end
end
end
@@ -1637,22 +1650,26 @@ end
--后台推送
function this.RefreshActivityBtn(context)
- for k, v in ipairs(activitys) do
+ for k, v in ipairs(activitys) do
local ishow = DynamicActivityManager.IsQualifiled(v.Id)
if ishow then
- if v.ActiveType > 0 and v.ActiveType == context.type then
- local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
+ if v.ActiveType > 0 and v.ActiveType == context.type then
+ local activityId = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
if activityId and activityId > 0 and ActivityGiftManager.IsQualifiled(v.ActiveType) then
if v.FunType and v.FunType == 41 then
if v.Id == 209 then
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
else
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
end
elseif v.ActiveType == 20000 then
- local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups,"ActId",GlobalActConfig[activityId].ShowArt,"PageType",0,"ActiveType:",v.ActiveType)
+ local tempConfig = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.ActivityGroups, "ActId",
+ GlobalActConfig[activityId].ShowArt, "PageType", 0, "ActiveType:", v.ActiveType)
if not tempConfig then
- tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.ActivityGroups,"ActId",activityId,"PageType",0)
+ tempConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.ActivityGroups, "ActId",
+ activityId, "PageType", 0)
end
if tempConfig then
activityTabs[k].img.sprite = Util.LoadSprite(tempConfig.Icon[1])
@@ -1667,9 +1684,11 @@ function this.RefreshActivityBtn(context)
if ActTimeCtrlManager.SingleFuncState(v.FunType) then
if v.FunType and v.FunType == 41 then
if v.Id == 209 then
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
else
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
end
else
activityTabs[k].go.gameObject:SetActive(context.status == 1)
@@ -1755,7 +1774,8 @@ function this.RefreshActivityShow()
activityTabs[k].go.gameObject:SetActive(true)
if GuideManager.IsInMainGuide() or UIManager.IsOpen(UIName.GuidePanel) then
else
- local isEject = PlayerPrefs.GetInt(PlayerManager.uid .. "SupremeHeroPopupisEject") == 0
+ local isEject = PlayerPrefs.GetInt(PlayerManager.uid .. "SupremeHeroPopupisEject") ==
+ 0
if isEject then
PlayerPrefs.SetInt(PlayerManager.uid .. "SupremeHeroPopupisEject", 1)
UIManager.OpenPanel(UIName.SupremeHeroPopup)
@@ -1769,9 +1789,11 @@ function this.RefreshActivityShow()
end
elseif v.FunType and v.FunType == 41 then
if v.Id == 209 then
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab4").activeSelf)
else
- activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
+ activityTabs[k].go.gameObject:SetActive(DailyRechargeManager.DailyRechargeExist() and
+ not Util.GetGameObject(this.RightUpVertical, "tab209").activeSelf)
end
elseif v.ActiveType == 201 then
activityTabs[k].go.gameObject:SetActive(ActivityGiftManager.IsQualifiled(v.ActiveType))
@@ -1786,9 +1808,9 @@ function this.RefreshActivityShow()
activityTabs[k].go.gameObject:SetActive(false)
end
elseif v.ActiveType == ActivityTypeDef.SignInDays then
- activityTabs[k].go.gameObject:SetActive(true)
- -- elseif v.ActiveType == ActivityTypeDef.SignInDays then
- -- activityTabs[k].go.gameObject:SetActive(true)
+ activityTabs[k].go.gameObject:SetActive(true)
+ -- elseif v.ActiveType == ActivityTypeDef.SignInDays then
+ -- activityTabs[k].go.gameObject:SetActive(true)
elseif v.ActiveType == 210 then
activityTabs[k].go.gameObject:SetActive(GetActivityState(4002))
elseif v.ActiveType == 211 then
@@ -1813,9 +1835,9 @@ function this.RefreshActivityShow()
local isActive = ArenaTopMatchManager.IsTopMatchActive()
if isActive then
local tmData = ArenaTopMatchManager.GetBaseData()
- if tmData.progress == -1 then--即将开启
+ if tmData.progress == -1 then --即将开启
activityTabs[k].go.gameObject:SetActive(false)
- elseif tmData.progress == -2 then--已结束
+ elseif tmData.progress == -2 then --已结束
activityTabs[k].go.gameObject:SetActive(false)
else
activityTabs[k].go.gameObject:SetActive(true)
@@ -1825,7 +1847,7 @@ function this.RefreshActivityShow()
end
elseif v.FunType == FUNCTION_OPEN_TYPE.ThousandDraw then
activityTabs[k].go.gameObject:SetActive(true)
- NetManager.ThousandDrawInfo(function (msg)
+ NetManager.ThousandDrawInfo(function(msg)
activityTabs[k].go.gameObject:SetActive(msg.round > 0)
end)
elseif v.FunType == FUNCTION_OPEN_TYPE.laddersChallenge then
@@ -1834,8 +1856,8 @@ function this.RefreshActivityShow()
else
activityTabs[k].go.gameObject:SetActive(true)
end
- -- elseif v.FunType == FUNCTION_OPEN_TYPE.GUILD_BATTLE then
- -- activityTabs[k].go.gameObject:SetActive(true)
+ -- elseif v.FunType == FUNCTION_OPEN_TYPE.GUILD_BATTLE then
+ -- activityTabs[k].go.gameObject:SetActive(true)
elseif v.FunType == FUNCTION_OPEN_TYPE.PVEActivity then
if PVEActivityManager.ActivityList() and #PVEActivityManager.ActivityList() > 0 then
activityTabs[k].go.gameObject:SetActive(true)
@@ -1901,10 +1923,10 @@ function this.SetRetract()
end
if isRetract then
isRetract = false
- PlayerPrefs.SetInt(PlayerManager.uid.."isRetract", 1)
+ PlayerPrefs.SetInt(PlayerManager.uid .. "isRetract", 1)
this.RightUpGrid:GetComponent("Animator"):Play("X1_UI_MainPanel_GridClose")
this.RightUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_VerticalClose")
- this.timeRetract = Timer.New(function ()
+ this.timeRetract = Timer.New(function()
this.RightUpGrid:SetActive(false)
this.RightUpVertical:SetActive(false)
this.timeRetract:Stop()
@@ -1914,12 +1936,12 @@ function this.SetRetract()
this.timeRetract:Start()
else
isRetract = true
- PlayerPrefs.SetInt(PlayerManager.uid.."isRetract", 0)
+ PlayerPrefs.SetInt(PlayerManager.uid .. "isRetract", 0)
this.RightUpGrid:SetActive(true)
this.RightUpVertical:SetActive(true)
this.RightUpGrid:GetComponent("Animator"):Play("X1_UI_MainPanel_GridOpen")
this.RightUpVertical:GetComponent("Animator"):Play("X1_UI_MainPanel_VerticalOpen")
- this.timeRetract = Timer.New(function ()
+ this.timeRetract = Timer.New(function()
this.timeRetract:Stop()
this.btnRetractIcon.sprite = Util.LoadSprite("X1_zhucheng_huodong_shouqi")
isRetractStart = false
@@ -1960,10 +1982,10 @@ function this.BindRedPoint()
BindRedPointObject(RedPointType.Friend, this.friendRed)
BindRedPointObject(RedPointType.RankingSort, this.rankRed)
BindRedPointObject(RedPointType.Recruit, this.rpRecruit)
- BindRedPointObject(RedPointType.BattlePassMission,this.btnBattlePassRedPoint)
- BindRedPointObject(RedPointType.ClimbTower,this.rpTower)
- BindRedPointObject(RedPointType.SpaceTimeBattlefield,this.rpColorfulWorld)
- BindRedPointObject(RedPointType.ResearchInstitute,this.rpEquipCompound)
+ BindRedPointObject(RedPointType.BattlePassMission, this.btnBattlePassRedPoint)
+ BindRedPointObject(RedPointType.ClimbTower, this.rpTower)
+ BindRedPointObject(RedPointType.SpaceTimeBattlefield, this.rpColorfulWorld)
+ BindRedPointObject(RedPointType.ResearchInstitute, this.rpEquipCompound)
BindRedPointObject(RedPointType.BlackShop, this.rpBlackShop)
BindRedPointObject(RedPointType.EnergyMain, this.rpEnergyBase)
BindRedPointObject(RedPointType.PowerCenter, this.rpPowerCenter)
@@ -1989,10 +2011,10 @@ function this.ClearRedPoint()
ClearRedPointObject(RedPointType.Friend, this.friendRed)
ClearRedPointObject(RedPointType.RankingSort, this.rankRed)
ClearRedPointObject(RedPointType.Recruit, this.rpRecruit)
- ClearRedPointObject(RedPointType.BattlePassMission,this.btnBattlePassRedPoint)
- ClearRedPointObject(RedPointType.ClimbTower,this.rpTower)
- ClearRedPointObject(RedPointType.SpaceTimeBattlefield,this.rpColorfulWorld)
- ClearRedPointObject(RedPointType.ResearchInstitute,this.rpEquipCompound)
+ ClearRedPointObject(RedPointType.BattlePassMission, this.btnBattlePassRedPoint)
+ ClearRedPointObject(RedPointType.ClimbTower, this.rpTower)
+ ClearRedPointObject(RedPointType.SpaceTimeBattlefield, this.rpColorfulWorld)
+ ClearRedPointObject(RedPointType.ResearchInstitute, this.rpEquipCompound)
ClearRedPointObject(RedPointType.BlackShop, this.rpBlackShop)
ClearRedPointObject(RedPointType.EnergyMain, this.rpEnergyBase)
ClearRedPointObject(RedPointType.PowerCenter, this.rpPowerCenter)
@@ -2095,19 +2117,21 @@ function this.SetMainIconPos()
this.btnShangdian:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.SHOP)
this.btnheishi:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.BlackShop)
- this.btnEquipInformationCenter:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.InvestigateCenter)
+ this.btnEquipInformationCenter:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE
+ .InvestigateCenter)
this.btnzhihuan:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.HeroExchange)
this.btnhecheng:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.ASSEMBLE)
this.btnRecruit:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.RECURITY)
this.btnFenjie:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.HERO_RESOLVE)
this.btnColorfulWorld:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.TRIAL)
- this.btnElementDrawCard:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.ELEMENT_RECURITY)
+ this.btnElementDrawCard:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE
+ .ELEMENT_RECURITY)
this.btnJingjichang:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.ARENA)
this.btnEquipCompound:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.COMPOUND)
this.btnTower:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.CLIMB_TOWER)
this.btnInfiniteWar:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.laddersChallenge)
this.btnBase:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.EnergyBase)
- this.btnPowerCenter:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.PowerCenter)
+ this.btnPowerCenter:GetComponent("RectTransform").localPosition = this.GetBtnPos(FUNCTION_OPEN_TYPE.PowerCenter)
end
--获取按钮位置
@@ -2127,7 +2151,7 @@ function this.GetBtnPos(type)
pos = data.NightCoordinates
end
- return Vector3(pos[1],pos[2],0)
+ return Vector3(pos[1], pos[2], 0)
end
--弱引导
@@ -2194,7 +2218,7 @@ function this.RefreshInBattle()
end
function this.InitPictureQuality()
- local level = PlayerPrefs.GetInt("Picture_quality"..PlayerManager.uid)
+ local level = PlayerPrefs.GetInt("Picture_quality" .. PlayerManager.uid)
if level ~= nil and level ~= "" and level ~= 0 then
if level == 1 then
AppConst.GameFrameRate = 15
@@ -2206,4 +2230,4 @@ function this.InitPictureQuality()
end
end
-return MainPanel
\ No newline at end of file
+return MainPanel
diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
index a1886433b..53bbeb231 100644
--- a/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
+++ b/Assets/ManagedResources/~Lua/Modules/Popup/BattleWinPopup.lua
@@ -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
\ No newline at end of file
+return BattleWinPopup
diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua
index efb410fdc..93986c744 100644
--- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua
+++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua
@@ -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