TCX_LongZhu
DESKTOP-MMO982B\User 2026-04-10 15:15:04 +08:00
parent 5ff63f2a5a
commit ad23a765aa
2 changed files with 254 additions and 188 deletions

View File

@ -53,6 +53,9 @@ local jumpDic = {
[20015] = function(data) [20015] = function(data)
this.JumpActivity(20015,data[1]) this.JumpActivity(20015,data[1])
end, end,
[20019] = function(data)
this.JumpActivity(20019, data[1])
end,
[JumpType.Arena] = function(data)--竞技场 [JumpType.Arena] = function(data)--竞技场
local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND) local arenaDefend = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_DEFEND)
-- local arenaAttack = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_ATTACK) -- local arenaAttack = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_ARENA_ATTACK)
@ -1022,9 +1025,11 @@ function this.GoJump(_jumpId,fun,...)
this.isOpen = false this.isOpen = false
end end
else else
LogError("==="..jumpSData.Type)
jumpDic[jumpSData.Type](jumpSData.Skipfactor,args) jumpDic[jumpSData.Type](jumpSData.Skipfactor,args)
end end
else else
LogError("==="..jumpSData.Type)
jumpDic[jumpSData.Type](jumpSData.Skipfactor,args) jumpDic[jumpSData.Type](jumpSData.Skipfactor,args)
end end
end end

View File

@ -9,92 +9,89 @@ end
local gameSetting = ConfigManager.GetConfig(ConfigName.GameSetting) local gameSetting = ConfigManager.GetConfig(ConfigName.GameSetting)
local AllActSetConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig) local AllActSetConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig)
local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig) local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local artResourcesConfig =ConfigManager.GetConfig(ConfigName.ArtResourcesConfig) local artResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local lotterySetting=ConfigManager.GetConfig(ConfigName.LotterySetting) local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
local privilegeConfig=ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig) local privilegeConfig = ConfigManager.GetConfig(ConfigName.PrivilegeTypeConfig)
local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig) local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
local wishConfig=ConfigManager.GetConfig(ConfigName.WishConfig) local wishConfig = ConfigManager.GetConfig(ConfigName.WishConfig)
local getId=0 local getId = 0
function RecruitEquipPanelNew:InitComponent() function RecruitEquipPanelNew:InitComponent()
self.spLoader = SpriteLoader.New() self.spLoader = SpriteLoader.New()
self.panel = Util.GetGameObject(self.gameObject,"Panel") self.panel = Util.GetGameObject(self.gameObject, "Panel")
self.bg1 = Util.GetGameObject(self.gameObject,"Bg/Bg1"):GetComponent("Image") self.bg1 = Util.GetGameObject(self.gameObject, "Bg/Bg1"):GetComponent("Image")
self.bg2 = Util.GetGameObject(self.gameObject,"Bg/Bg2"):GetComponent("Image") self.bg2 = Util.GetGameObject(self.gameObject, "Bg/Bg2"):GetComponent("Image")
self.bg3 = Util.GetGameObject(self.gameObject,"Bg/Bg3"):GetComponent("Image") self.bg3 = Util.GetGameObject(self.gameObject, "Bg/Bg3"):GetComponent("Image")
self.title=Util.GetGameObject(self.panel,"title"):GetComponent("Image") self.title = Util.GetGameObject(self.panel, "title/Text"):GetComponent("Text")
self.root=Util.GetGameObject(self.panel,"root") self.root = Util.GetGameObject(self.panel, "root")
self.rewardBox = Util.GetGameObject(self.panel, "btngroup/rewardBox") self.rewardBox = Util.GetGameObject(self.panel, "btngroup/rewardBox")
self.rewardBox:SetActive(false)
self.boxIcon = Util.GetGameObject(self.rewardBox, "boxIcon") self.boxIcon = Util.GetGameObject(self.rewardBox, "boxIcon")
self.slider = Util.GetGameObject(self.rewardBox,"Bg/Slider"):GetComponent("Image") self.slider = Util.GetGameObject(self.rewardBox, "Bg/Slider"):GetComponent("Image")
self.sliderText = Util.GetGameObject(self.rewardBox, "progress/Text"):GetComponent("Text") self.sliderText = Util.GetGameObject(self.rewardBox, "progress/Text"):GetComponent("Text")
self.boxNameText = Util.GetGameObject(self.rewardBox, "di/Text"):GetComponent("Text") self.boxNameText = Util.GetGameObject(self.rewardBox, "di/Text"):GetComponent("Text")
self.boxNameText.text="等级宝箱" self.boxNameText.text = "等级宝箱"
self.boxBtn=Util.GetGameObject(self.rewardBox,"Btn") self.boxBtn = Util.GetGameObject(self.rewardBox, "Btn")
self.UI_effect_RecruitPanel_box_normal = Util.GetGameObject(self.rewardBox,"UI_effect_RecruitPanel_box_normal") self.UI_effect_RecruitPanel_box_normal = Util.GetGameObject(self.rewardBox, "UI_effect_RecruitPanel_box_normal")
effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_normal, "quan01")) effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_normal, "quan01"))
self.UI_effect_RecruitPanel_box_open = Util.GetGameObject(self.rewardBox,"UI_effect_RecruitPanel_box_open") self.UI_effect_RecruitPanel_box_open = Util.GetGameObject(self.rewardBox, "UI_effect_RecruitPanel_box_open")
effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_open, "quan01")) effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_open, "quan01"))
effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_open, "quan02")) effectAdapte(Util.GetGameObject(self.UI_effect_RecruitPanel_box_open, "quan02"))
self.UI_effect_RecruitPanel_particle = Util.GetGameObject(self.gameObject,"UI_effect_RecruitPanel_particle") self.UI_effect_RecruitPanel_particle = Util.GetGameObject(self.gameObject, "UI_effect_RecruitPanel_particle")
self.previewBtn = Util.GetGameObject(self.panel, "PreviewBtn") self.previewBtn = Util.GetGameObject(self.panel, "PreviewBtn")
self.helpBtn = Util.GetGameObject(self.panel, "helpBtn") self.helpBtn = Util.GetGameObject(self.panel, "helpBtn")
self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition self.helpPosition = self.helpBtn:GetComponent("RectTransform").localPosition
self.wish = Util.GetGameObject(self.panel,"wishBtn") self.wish = Util.GetGameObject(self.panel, "wishBtn")
self.wishNoOpen = Util.GetGameObject(self.wish,"noOpen") self.wishNoOpen = Util.GetGameObject(self.wish, "noOpen")
self.wishBtn = Util.GetGameObject(self.wishNoOpen,"Img") self.wishBtn = Util.GetGameObject(self.wishNoOpen, "Img")
self.wishTextImg = Util.GetGameObject(self.wishNoOpen,"ImgText") self.wishTextImg = Util.GetGameObject(self.wishNoOpen, "ImgText")
self.wishText = Util.GetGameObject(self.wishTextImg,"Text"):GetComponent("Text") self.wishText = Util.GetGameObject(self.wishTextImg, "Text"):GetComponent("Text")
self.wishTipIma = Util.GetGameObject(self.wishNoOpen,"tip"):GetComponent("Text") self.wishTipIma = Util.GetGameObject(self.wishNoOpen, "tip"):GetComponent("Text")
self.wishOpen = Util.GetGameObject(self.wish,"upHeroGrid") self.wishOpen = Util.GetGameObject(self.wish, "upHeroGrid")
self.wishPre = Util.GetGameObject(self.wish,"upHeroPre") self.wishPre = Util.GetGameObject(self.wish, "upHeroPre")
self.lsth = Util.GetGameObject(self.gameObject,"btngroup/zqbg") self.lsth = Util.GetGameObject(self.gameObject, "btngroup/zqbg")
Util.GetGameObject(self.gameObject,"btngroup/zqbg/Text"):GetComponent("Text").text="意念礼包" self.lsth.gameObject:SetActive(ActivityGiftManager.IsActivityTypeOpen(20015) ~= nil)
self.lsth.gameObject:SetActive(ActivityGiftManager.IsActivityTypeOpen(20015)~=nil) self.zqbgRed = Util.GetGameObject(self.gameObject, "btngroup/zqbg/red")
self.zqbgRed = Util.GetGameObject(self.gameObject,"btngroup/zqbg/red") BindRedPointObject(RedPointType.WishEquipStore, self.zqbgRed)
BindRedPointObject(RedPointType.WishEquipStore,self.zqbgRed) --self.zqbgEffect = Util.GetGameObject(self.gameObject, "btngroup/zqbg/Fx_Circle 1")
--self.zqbgEffect = Util.GetGameObject(self.gameObject,"btngroup/zqbg/Fx_Circle 1") -- self.tip = Util.GetGameObject(self.panel, "tip/text"):GetComponent("Text")
-- self.tip = Util.GetGameObject(self.panel, "tip/text"):GetComponent("Text")
self.tenTip = Util.GetGameObject(self.panel, "TenTip") self.tenTip = Util.GetGameObject(self.panel, "TenTip")
self.tenTipText = Util.GetGameObject(self.tenTip, "scroll/Text"):GetComponent("Text") self.tenTipText = Util.GetGameObject(self.tenTip, "scroll/Text"):GetComponent("Text")
self.upper = Util.GetGameObject(self.panel,"Upper/Num"):GetComponent("Text")--"今日召唤上限:" self.upper = Util.GetGameObject(self.panel, "Upper/Num"):GetComponent("Text") --Language[10596]
if not self.upHeroPreList then if not self.upHeroPreList then
self.upHeroPreList = {} self.upHeroPreList = {}
end end
for i = 1,3 do for i = 1, 3 do
self.upHeroPreList[i] = {} self.upHeroPreList[i] = {}
self.upHeroPreList[i].go = Util.GetGameObject(self.wishOpen,"upHeroPre"..i) self.upHeroPreList[i].go = Util.GetGameObject(self.wishOpen, "upHeroPre" .. i)
self.upHeroPreList[i].pos = Util.GetGameObject(self.upHeroPreList[i].go,"di") self.upHeroPreList[i].pos = Util.GetGameObject(self.upHeroPreList[i].go, "di")
self.upHeroPreList[i].itempos = Util.GetGameObject(self.upHeroPreList[i].go,"itempos") self.upHeroPreList[i].itempos = Util.GetGameObject(self.upHeroPreList[i].go, "itempos")
self.upHeroPreList[i].item = SubUIManager.Open(SubUIConfig.ItemView,self.upHeroPreList[i].itempos.transform) self.upHeroPreList[i].item = SubUIManager.Open(SubUIConfig.ItemView, self.upHeroPreList[i].itempos.transform)
self.upHeroPreList[i].item.gameObject:SetActive(false) self.upHeroPreList[i].item.gameObject:SetActive(false)
self.upHeroPreList[i].item.transform:SetSiblingIndex(0) self.upHeroPreList[i].item.transform:SetSiblingIndex(0)
self.upHeroPreList[i].choosed = Util.GetGameObject(self.upHeroPreList[i].go,"state") self.upHeroPreList[i].choosed = Util.GetGameObject(self.upHeroPreList[i].go, "state")
--心愿神将现在只显示一个 --心愿神将现在只显示一个
if i>1 then if i > 1 then
self.upHeroPreList[i].go:SetActive(false) self.upHeroPreList[i].go:SetActive(false)
else else
self.upHeroPreList[i].go:SetActive(true) self.upHeroPreList[i].go:SetActive(true)
end end
end end
self.btns = {} self.btns = {}
for i = 1,2 do for i = 1, 2 do
self.btns[i] = {} self.btns[i] = {}
self.btns[i].btn = Util.GetGameObject(self.gameObject,"btngroup/btn"..i) self.btns[i].btn = Util.GetGameObject(self.gameObject, "btngroup/btn" .. i)
self.btns[i].layoutDi = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/di"):GetComponent("Image") self.btns[i].layoutDi = Util.GetGameObject(self.btns[i].btn.gameObject, "layout/di"):GetComponent("Image")
self.btns[i].red = Util.GetGameObject(self.btns[i].btn.gameObject,"redPoint") self.btns[i].red = Util.GetGameObject(self.btns[i].btn.gameObject, "redPoint")
self.btns[i].info = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/Text"):GetComponent("Text") self.btns[i].info = Util.GetGameObject(self.btns[i].btn.gameObject, "layout/Text"):GetComponent("Text")
self.btns[i].icon = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/icon"):GetComponent("Image") self.btns[i].icon = Util.GetGameObject(self.btns[i].btn.gameObject, "layout/icon"):GetComponent("Image")
self.btns[i].num = Util.GetGameObject(self.btns[i].btn.gameObject,"layout/num"):GetComponent("Text") self.btns[i].num = Util.GetGameObject(self.btns[i].btn.gameObject, "layout/num"):GetComponent("Text")
self.btns[i].time = Util.GetGameObject(self.btns[i].btn.gameObject,"time"):GetComponent("Text") self.btns[i].time = Util.GetGameObject(self.btns[i].btn.gameObject, "time"):GetComponent("Text")
end end
end end
@ -102,23 +99,35 @@ function RecruitEquipPanelNew:OnFocus()
CheckRedPointStatus(RedPointType.WishEquipStore) CheckRedPointStatus(RedPointType.WishEquipStore)
end end
function RecruitEquipPanelNew:BindEvent() function RecruitEquipPanelNew:BindEvent()
Util.AddOnceClick(self.lsth, function() Util.AddOnceClick(self.lsth, function()
local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish) local isOpen
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish) local tip
if isOpen==false then if self.config.ShopData[1][1] == 4 then
isOpen = CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
tip = GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
else
isOpen = CheckFunctionOpen(FUNCTION_OPEN_TYPE.Fabaojulingxinyuan)
tip = GetFunctionOpenTip(FUNCTION_OPEN_TYPE.Fabaojulingxinyuan)
end
--[[
if isOpen == false then
PopupTipPanel.ShowTip(tip) PopupTipPanel.ShowTip(tip)
return return
end end
JumpManager.GoJump(40082) ]]
if self.config.ShopData[1][1] == 4 then
JumpManager.GoJump(40082)
else
JumpManager.GoJump(40089)
end
end) end)
--帮助按钮 --帮助按钮
Util.AddClick(self.helpBtn, function() Util.AddClick(self.helpBtn, function()
UIManager.OpenPanel(UIName.HelpPopup,self.config.HelpId,self.helpPosition.x,self.helpPosition.y) UIManager.OpenPanel(UIName.HelpPopup, self.config.HelpId, self.helpPosition.x, self.helpPosition.y)
end) end)
--宝箱按钮 --宝箱按钮
Util.AddClick(self.boxBtn,function() Util.AddClick(self.boxBtn, function()
--UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitBox) --UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitBox)
--self.UI_effect_RecruitPanel_box_normal:SetActive(true) --self.UI_effect_RecruitPanel_box_normal:SetActive(true)
-- if RecruitManager.isCanOpenBox then -- if RecruitManager.isCanOpenBox then
@ -127,99 +136,109 @@ function RecruitEquipPanelNew:BindEvent()
-- else -- else
-- UIManager.OpenPanel(UIName.WishHeroRewardPopup,self.config.ShopData[1][1]) -- UIManager.OpenPanel(UIName.WishHeroRewardPopup,self.config.ShopData[1][1])
-- end -- end
UIManager.OpenPanel(UIName.WishHeroRewardPopup,self.config.ShopData[1][1]) UIManager.OpenPanel(UIName.WishHeroRewardPopup, self.config.ShopData[1][1])
end) end)
--奖池预览按钮 --奖池预览按钮
Util.AddClick(self.previewBtn, function() Util.AddClick(self.previewBtn, function()
UIManager.OpenPanel(UIName.HeroPreviewNewPanel,true,true,self.config.ShopData[4][1]) UIManager.OpenPanel(UIName.HeroPreviewNewPanel, true, true, self.config.ShopData[4][1])
end) end)
end end
function RecruitEquipPanelNew:AddListener() function RecruitEquipPanelNew:AddListener()
Game.GlobalEvent:AddEvent(GameEvent.Recruit.OnRecruitRefreshData, self.UpdataPanel,self) Game.GlobalEvent:AddEvent(GameEvent.Recruit.OnRecruitRefreshData, self.UpdataPanel, self)
end end
function RecruitEquipPanelNew:RemoveListener() function RecruitEquipPanelNew:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Recruit.OnRecruitRefreshData, self.UpdataPanel,self) Game.GlobalEvent:RemoveEvent(GameEvent.Recruit.OnRecruitRefreshData, self.UpdataPanel, self)
end end
function RecruitEquipPanelNew:OnSortingOrderChange(sortingOrder) function RecruitEquipPanelNew:OnSortingOrderChange(sortingOrder)
self.sortingOrder = sortingOrder self.sortingOrder = sortingOrder
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_box_normal, self.sortingOrder + 1) Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_box_normal, self.sortingOrder + 1)
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_box_open, self.sortingOrder + 1) Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_box_open, self.sortingOrder + 1)
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1) Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1)
--SetParticleSortLayer(self.zqbgEffect,self.sortingOrder+1) --SetParticleSortLayer(self.zqbgEffect, self.sortingOrder + 1)
end end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function RecruitEquipPanelNew:OnOpen(_Config,_index, parent) function RecruitEquipPanelNew:OnOpen(_Config, _index, parent)
self.config = _Config self.config = _Config
self.parent = parent self.parent = parent
self.gameObject.name = "RecruitEquipPanelNew"..self.config.Id self.gameObject.name = "RecruitEquipPanelNew" .. self.config.Id
end end
function RecruitEquipPanelNew:OnShow(sortingOrder) function RecruitEquipPanelNew:OnShow(sortingOrder)
self.sortingOrder = sortingOrder self.sortingOrder = sortingOrder
self:OnSortingOrderChange(sortingOrder) self:OnSortingOrderChange(sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)
RecruitManager.curWishType=self.config.ShopData[1][1] RecruitManager.curWishType = self.config.ShopData[1][1]
self.singleConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting,"LotteryType",self.config.ShopData[1][1],"PerCount",1) self.singleConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting, "LotteryType",
self.tenConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting,"LotteryType",self.config.ShopData[1][1],"PerCount",10) self.config.ShopData[1][1], "PerCount", 1)
self.XianZhaoConfig = ConfigManager.GetConfigDataByKey(ConfigName.LotterySetting,"LotteryType",TableRecruitType.xianyuan) self.tenConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.LotterySetting, "LotteryType",
self:UpdataPanel() self.config.ShopData[1][1], "PerCount", 10)
self.XianZhaoConfig = ConfigManager.GetConfigDataByKey(ConfigName.LotterySetting, "LotteryType",
TableRecruitType.xianyuan)
self:UpdataPanel()
SoundManager.PlayMusic(SoundConfig.BGM_Recruit) SoundManager.PlayMusic(SoundConfig.BGM_Recruit)
if self.liveNode then if self.liveNode then
poolManager:UnLoadLive(self.liveNode.name, self.liveNode) poolManager:UnLoadLive(self.liveNode.name, self.liveNode)
end end
if self.config.ShopData[2][1] == 1 then if self.config.ShopData[2][1] == 1 then
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig,self.config.ShopData[2][2]) local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, self.config.ShopData[2][2])
local name = GetResourcePath(heroConfig.Painting) local name = GetResourcePath(heroConfig.Live)
self.liveNode = poolManager:LoadLive(name, self.root.transform, Vector3.one *1., Vector3.New(heroConfig.Position[1], heroConfig.Position[2], 0)) self.liveNode = poolManager:LoadLive(name, self.root.transform, Vector3.one * heroConfig.Scale,
self.liveNode.name = name Vector3.New(heroConfig.Position[1], heroConfig.Position[2], 0))
SetHEeroLiveToward(self.liveNode,heroConfig.Toward) self.liveNode.name = name
SetHEeroLiveToward(self.liveNode, heroConfig.Toward)
local SkeletonGraphic = self.liveNode:GetComponent("SkeletonGraphic") local SkeletonGraphic = self.liveNode:GetComponent("SkeletonGraphic")
SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true)
end end
CheckRedPointStatus(RedPointType.WishEquipStore) CheckRedPointStatus(RedPointType.WishEquipStore)
end end
local progresss=0 local progresss = 0
local wishLv=0 local wishLv = 0
function RecruitEquipPanelNew:UpdataPanel() function RecruitEquipPanelNew:UpdataPanel()
-- self.bg1.sprite = self.spLoader:LoadSprite(self.config.Icon[3]) self.bg1.sprite = self.spLoader:LoadSprite(self.config.Icon[3])
self.bg2.sprite = self.spLoader:LoadSprite(self.config.Icon[4]) self.bg2.sprite = self.spLoader:LoadSprite(self.config.Icon[4])
self.bg3.sprite = self.spLoader:LoadSprite(self.config.Icon[8]) self.bg3.sprite = self.spLoader:LoadSprite(self.config.Icon[8])
if self.config.ShopData[1][1] == 4 then
self.title.text = "意念招募"
else
self.title.text = "羁绊招募"
end
--self.title.sprite = self.spLoader:LoadSprite(self.config.Icon[5]) --self.title.sprite = self.spLoader:LoadSprite(self.config.Icon[5])
--宝箱活动数据 --宝箱活动数据
local actconfigs=ActivityGiftManager.GetActivityInfoByType(11901) local actconfigs = ActivityGiftManager.GetActivityInfoByType(11901)
if actconfigs then if actconfigs then
for i = 1,#actconfigs.mission do for i = 1, #actconfigs.mission do
progresss=actconfigs.mission[i].progress progresss = actconfigs.mission[i].progress
end end
end end
--LogError("progress==============="..progresss) --LogError("progress==============="..progresss)
for i, v in ConfigPairs(wishConfig) do for i, v in ConfigPairs(wishConfig) do
if RecruitManager.drawTimes[4] and RecruitManager.drawTimes[4]>= v.DrawCardNumber and v.LotteryType==4 then if RecruitManager.drawTimes[self.config.ShopData[1][1]] and RecruitManager.drawTimes[self.config.ShopData[1][1]] >= v.DrawCardNumber and v.LotteryType == 4 then
wishLv=v.Level wishLv = v.Level
RecruitManager.SetWishPro(v.Weight/10000*100,v.MythWeight/10000*100) RecruitManager.SetWishPro(v.Weight / 10000 * 100, v.MythWeight / 10000 * 100)
end end
end end
self.boxNameText.text="宝箱等级:"..wishLv self.boxNameText.text = "宝箱等级:" .. wishLv
--self.title:SetNativeSize() --:SetNativeSize()
for i = 1,2 do for i = 1, 2 do
self.btns[i].layoutDi.sprite = self.spLoader:LoadSprite(self.config.Icon[6]) self.btns[i].layoutDi.sprite = self.spLoader:LoadSprite(self.config.Icon[6])
end end
self.parent.mask2.sprite = self.spLoader:LoadSprite(self.config.Icon[7]) self.parent.mask2.sprite = self.spLoader:LoadSprite(self.config.Icon[7])
self.parent.mask1.sprite = self.spLoader:LoadSprite(self.config.Icon[7]) self.parent.mask1.sprite = self.spLoader:LoadSprite(self.config.Icon[7])
-- self.tip.text = self.config.TitleText -- self.tip.text = self.config.TitleText
self:UpdataWishPanel() self:UpdataWishPanel()
self:UpdataBoxReward() self:UpdataBoxReward()
local num=PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.MoneyTimes) local num = PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.MoneyTimes)
self.upper.text=string.format(self.config.TitleText,PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes),privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2]) --string.format(self.config.TitleText,PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes),privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2].." 剩余钻石召唤次数:"..num) --特权上限 self.upper.text = string.format(GetLanguageStrById(self.config.TitleText),
PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes),
privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2]) --string.format(self.config.TitleText,PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes),privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2]..Language[12580]..num) --特权上限
self:UpdatePanelData() self:UpdatePanelData()
self:TimeCountDown() self:TimeCountDown()
end end
@ -228,62 +247,85 @@ function RecruitEquipPanelNew:UpdataWishPanel()
self.tenTip.gameObject:SetActive(false) self.tenTip.gameObject:SetActive(false)
--如果没有达到150抽按钮置灰 --如果没有达到150抽按钮置灰
local data = tonumber(specialConfig[119].Value) local data = tonumber(specialConfig[119].Value)
NetManager.ChoiceWishHeroRequest(self.config.ShopData[1][1],function () NetManager.ChoiceWishHeroRequest(self.config.ShopData[1][1], function()
if RecruitManager.drawTimes[self.config.ShopData[1][1]] then
if RecruitManager.drawTimes[4] then LogError(" RecruitManager.drawTimes[4]===" .. RecruitManager.drawTimes[self.config.ShopData[1][1]])
LogError(" RecruitManager.drawTimes[4]===".. RecruitManager.drawTimes[4])
if wishLv < data then if wishLv < data then
self.wishNoOpen.gameObject:SetActive(true) self.wishNoOpen.gameObject:SetActive(true)
self.wishOpen.gameObject:SetActive(false) self.wishOpen.gameObject:SetActive(false)
Util.SetGray(self.wishBtn,true) Util.SetGray(self.wishBtn, true)
local wishData=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig,"Level",data,"LotteryType",4) --self.wishText.text = string.format("%s/%s", wishLv, data)
self.wishText.text = string.format("%s/%s",RecruitManager.drawTimes[4] or 0,wishData.DrawCardNumber) --self.wishTipIma.text = Language[12581] .. data .. Language[12582]
--self.wishText.text = string.format("%s/%s",wishLv,data) local wishData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig, "Level", data,
--self.wishTipIma.text = "宝箱等级"..data.."级后开启心愿功能,\n将有更高概率获得心愿意念~" "LotteryType", self.config.ShopData[1][1])
self.wishTipIma.text = "召唤次数达到"..wishData.DrawCardNumber.."次后开启心愿功能,\n将有更高概率获得心愿意念~" --LogError("sssssssssss" .. self.config.ShopData[1][1])
self.wishText.text = string.format("%s/%s", RecruitManager.drawTimes[self.config.ShopData[1][1]] or 0,
wishData.DrawCardNumber)
if self.config.ShopData[1][1] == 4 then
self.wishTipIma.text = "召唤次数达到" .. wishData.DrawCardNumber .. "次后开启心愿功能,\n将有更高概率获得心愿法宝~"
else
self.wishTipIma.text = "召唤次数达到" .. wishData.DrawCardNumber .. "次后开启心愿功能,\n将有更高概率获得羁绊碎片~"
end
else else
self.wishNoOpen.gameObject:SetActive(false) self.wishNoOpen.gameObject:SetActive(false)
self.wishOpen.gameObject:SetActive(true) self.wishOpen.gameObject:SetActive(true)
for i = 1,1 do for i = 1, 1 do
local data = RecruitManager.WishEquipData[i] local data = nil
local id =0 if self.config.ShopData[1][1] == 4 then
if data then data = RecruitManager.WishEquipData[i]
id=data.heroTid else
data = RecruitManager.WishJulingData[i]
end
local id = 0
if data then
id = data.heroTid
end end
LogError("id================================"..id)
if id > 0 then if id > 0 then
self.upHeroPreList[i].item.gameObject:SetActive(true) self.upHeroPreList[i].item.gameObject:SetActive(true)
self.upHeroPreList[i].item:OnOpen(false, {id,0},1, false, false, false, self.sortingOrder) self.upHeroPreList[i].item:OnOpen(false, { id, 0 }, 1, false, false, false, self.sortingOrder)
self.upHeroPreList[i].item.frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(ConfigManager.GetConfigData(ConfigName.ItemConfig,id).Quantity)) self.upHeroPreList[i].item.frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(
ConfigManager.GetConfigData(ConfigName.ItemConfig, id).Quantity))
self.upHeroPreList[i].choosed:SetActive(data.status == 1) self.upHeroPreList[i].choosed:SetActive(data.status == 1)
else else
self.upHeroPreList[i].item.gameObject:SetActive(false) self.upHeroPreList[i].item.gameObject:SetActive(false)
self.upHeroPreList[i].choosed.gameObject:SetActive(false) self.upHeroPreList[i].choosed.gameObject:SetActive(false)
end end
Util.AddOnceClick(self.upHeroPreList[i].pos,function() Util.AddOnceClick(self.upHeroPreList[i].pos, function()
local tempdata = tonumber(specialConfig[119].Value) local tempdata = tonumber(specialConfig[119].Value)
if RecruitManager.drawTimes[4] then if RecruitManager.drawTimes[self.config.ShopData[1][1]] then
RecruitManager.curWishType=self.config.ShopData[1][1] RecruitManager.curWishType = self.config.ShopData[1][1]
if RecruitManager.drawTimes[4] >= tempdata then if RecruitManager.drawTimes[self.config.ShopData[1][1]] >= tempdata then
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.WishEquipDraw) if self.config.ShopData[1][1] == 4 then
UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.WishEquipDraw)
else
UIManager.OpenPanel(UIName.GeneralBigPopup, GENERAL_POPUP_TYPE.WishJulingDraw)
end
else else
PopupTipPanel.ShowTip(string.format("%s次英雄召唤后开启心愿抽卡",tempdata - RecruitManager.drawTimes[4])) PopupTipPanel.ShowTip(string.format(Language[12583],
tempdata - RecruitManager.drawTimes[self.config.ShopData[1][1]]))
end end
else else
PopupTipPanel.ShowTip(string.format("%s次英雄召唤后开启心愿抽卡",tempdata)) PopupTipPanel.ShowTip(string.format(Language[12583], tempdata))
end end
end) end)
end end
end end
else else
self.wishNoOpen.gameObject:SetActive(true) self.wishNoOpen.gameObject:SetActive(true)
self.wishOpen.gameObject:SetActive(false) self.wishOpen.gameObject:SetActive(false)
Util.SetGray(self.wishBtn,true) Util.SetGray(self.wishBtn, true)
--self.wishText.text = string.format("%s/%s",0,data) --self.wishText.text = string.format("%s/%s", 0, data)
--self.wishTipIma.text = "宝箱等级"..data.."级后开启心愿功能,\n将有更高概率获得心愿意念~" --self.wishTipIma.text = Language[12581] .. data .. Language[12582]
local wishData=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig,"Level",data,"LotteryType",4) LogError("==========Level:"..data.." LotteryType:"..self.config.ShopData[1][1])
self.wishText.text = string.format("%s/%s",RecruitManager.drawTimes[4] or 0,wishData.DrawCardNumber) local wishData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig, "Level", data,
self.wishTipIma.text = "召唤次数达到"..wishData.DrawCardNumber.."次后开启心愿功能,\n将有更高概率获得心愿意念~" "LotteryType", self.config.ShopData[1][1])
self.wishText.text = string.format("%s/%s", RecruitManager.drawTimes[self.config.ShopData[1][1]] or 0,
wishData.DrawCardNumber)
if self.config.ShopData[1][1] == 4 then
self.wishTipIma.text = "召唤次数达到" .. wishData.DrawCardNumber .. "次后开启心愿功能,\n将有更高概率获得心愿法宝~"
else
self.wishTipIma.text = "召唤次数达到" .. wishData.DrawCardNumber .. "次后开启心愿功能,\n将有更高概率获得羁绊碎片~"
end
end end
--self:CheckNewWishHero() --self:CheckNewWishHero()
end) end)
@ -291,36 +333,45 @@ function RecruitEquipPanelNew:UpdataWishPanel()
-- if RecruitManager.isTenRecruit == 0 then -- if RecruitManager.isTenRecruit == 0 then
-- self.tenTipText.text = "<color=#FFB83B><size=30>每次十连</size><color=#FEDA90><size=30>必得</size></color></color><color=#FFB83B><size=30>五星</size></color><color=#FEDA90><size=30>神将法宝</size></color>" -- self.tenTipText.text = "<color=#FFB83B><size=30>每次十连</size><color=#FEDA90><size=30>必得</size></color></color><color=#FFB83B><size=30>五星</size></color><color=#FEDA90><size=30>神将法宝</size></color>"
-- else -- else
self.tenTipText.text = string.format("剩余<color=#22A70C>%s次</color>必得五星意念",RecruitManager.GetRecruit2MustCount()) if self.config.ShopData[1][1] == 4 then
self.tenTip:SetActive(true)
self.tenTipText.text = string.format("剩余<color=#22A70C>%s次</color>必得五星意念", RecruitManager.GetRecruit2MustCount())
else
self.tenTip:SetActive(false)
self.tenTipText.text = string.format("剩余<color=#22A70C>%s次</color>必得五星意念", RecruitManager.GetRecruit2MustCount())
end
--end --end
end end
function RecruitEquipPanelNew:UpdataBoxReward() function RecruitEquipPanelNew:UpdataBoxReward()
--local num = BagManager.GetItemCountById(self.XianZhaoConfig.CostItem[1][1]) --local num = BagManager.GetItemCountById(self.XianZhaoConfig.CostItem[1][1])
LogError("更新宝箱显示s") LogError("更新宝箱显示s")
local actconfigs=ActivityGiftManager.GetActivityInfoByType(11901) local actconfigs = ActivityGiftManager.GetActivityInfoByType(11901)
RecruitManager.isCanOpenBox=false RecruitManager.isCanOpenBox = false
if actconfigs then if actconfigs then
for i = 1,#actconfigs.mission do for i = 1, #actconfigs.mission do
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig,"Level",actconfigs.mission[i].missionId,"LotteryType",4) local config = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig, "Level",
if config and actconfigs.mission[i].state==0 and RecruitManager.drawTimes[4] and RecruitManager.drawTimes[4]>=config.DrawCardNumber then actconfigs.mission[i].missionId, "LotteryType", self.config.ShopData[1][1])
RecruitManager.isCanOpenBox=true if config and actconfigs.mission[i].state == 0 and RecruitManager.drawTimes[self.config.ShopData[1][1]] and RecruitManager.drawTimes[self.config.ShopData[1][1]] >= config.DrawCardNumber then
getId=actconfigs.mission[i].missionId RecruitManager.isCanOpenBox = true
getId = actconfigs.mission[i].missionId
break break
end end
end end
end end
self.boxIcon:GetComponent("Animator").enabled = RecruitManager.isCanOpenBox self.boxIcon:GetComponent("Animator").enabled = RecruitManager.isCanOpenBox
local wishData=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig,"Level",wishLv+1,"LotteryType",4) local wishData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.WishConfig, "Level", wishLv + 1, "LotteryType",
self.config.ShopData[1][1])
if wishData then if wishData then
self.sliderText.text = string.format("%s/%s", RecruitManager.drawTimes[4] or 0,wishData.DrawCardNumber ) self.sliderText.text = string.format("%s/%s", RecruitManager.drawTimes[self.config.ShopData[1][1]] or 0,
if RecruitManager.drawTimes[4] then wishData.DrawCardNumber)
self.slider.fillAmount = RecruitManager.drawTimes[4]/wishData.DrawCardNumber if RecruitManager.drawTimes[self.config.ShopData[1][1]] then
self.slider.fillAmount = RecruitManager.drawTimes[self.config.ShopData[1][1]] / wishData.DrawCardNumber
else else
self.slider.fillAmount = 0 /wishData.DrawCardNumber self.slider.fillAmount = 0 / wishData.DrawCardNumber
end end
else else
self.slider.fillAmount = 1 self.slider.fillAmount = 1
self.sliderText.text ="<color=#E15362>宝箱已达最大等级</color>" self.sliderText.text ="<color=#E15362>宝箱已达最大等级</color>"
@ -341,14 +392,14 @@ function RecruitEquipPanelNew:OnDestroy()
self.timer:Stop() self.timer:Stop()
self.timer = nil self.timer = nil
end end
ClearRedPointObject(RedPointType.WishEquipStore,self.zqbgRed) ClearRedPointObject(RedPointType.WishEquipStore, self.zqbgRed)
for i = 1,3 do for i = 1, 3 do
if self.upHeroPreList[i] then if self.upHeroPreList[i] then
SubUIManager.Close(self.upHeroPreList[i].item) SubUIManager.Close(self.upHeroPreList[i].item)
end end
end end
self.upHeroPreList = {} self.upHeroPreList = {}
if self.liveNode then if self.liveNode then
poolManager:UnLoadLive(self.liveNode.name, self.liveNode) poolManager:UnLoadLive(self.liveNode.name, self.liveNode)
self.liveNode = nil self.liveNode = nil
@ -356,7 +407,7 @@ function RecruitEquipPanelNew:OnDestroy()
end end
--刷新剩余次数 --刷新剩余次数
function RecruitEquipPanelNew:UpdatePanelData() function RecruitEquipPanelNew:UpdatePanelData()
local freeTime = 0 local freeTime = 0
if self.singleConfig.FreeTimes and self.singleConfig.FreeTimes > 0 then if self.singleConfig.FreeTimes and self.singleConfig.FreeTimes > 0 then
freeTime = PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.FreeTimes) freeTime = PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.FreeTimes)
@ -368,88 +419,98 @@ function RecruitEquipPanelNew:UpdatePanelData()
local isFree = freeTime >= 1 and n == 1 local isFree = freeTime >= 1 and n == 1
m.icon.gameObject:SetActive(not isFree) m.icon.gameObject:SetActive(not isFree)
m.num.gameObject:SetActive(not isFree) m.num.gameObject:SetActive(not isFree)
local itemId=0 local itemId = 0
local itemNum=0 local itemNum = 0
local type = 0 local type = 0
if n == 1 then if n == 1 then
type = self.singleConfig.Id type = self.singleConfig.Id
m.info.text = "1次" m.info.text = "1次"
m.time.gameObject:SetActive(true) m.time.gameObject:SetActive(true)
m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure[RevertPreConfigure[self.config.ShopData[3][1]]])) m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure
[RevertPreConfigure[self.config.ShopData[3][1]]]))
else else
m.time.gameObject:SetActive(false) m.time.gameObject:SetActive(false)
type = self.tenConfig.Id type = self.tenConfig.Id
m.info.text = "10次" m.info.text = "10次"
m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure[RevertPreConfigure[self.config.ShopData[3][2]]])) m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure
[RevertPreConfigure[self.config.ShopData[3][2]]]))
end end
if self.config.ShopData[1][1] == TableRecruitType.Youqing then if self.config.ShopData[1][1] == TableRecruitType.Youqing then
m.time.gameObject:SetActive(false) m.time.gameObject:SetActive(false)
end end
local d = {} local d = {}
if (isFree) then if (isFree) then
m.time.gameObject:SetActive(false) m.time.gameObject:SetActive(false)
m.info.text="免费召唤" m.info.text="免费召唤"
else else
local d = RecruitManager.GetExpendData(type) local d = RecruitManager.GetExpendData(type)
itemId=d[1] itemId = d[1]
itemNum=d[2] itemNum = d[2]
m.icon.sprite=self.spLoader:LoadSprite(artResourcesConfig[itemConfig[itemId].ResourceID].Name) m.icon.sprite = self.spLoader:LoadSprite(artResourcesConfig[itemConfig[itemId].ResourceID].Name)
m.num.text= PrintWanNum2(itemNum) m.num.text = PrintWanNum2(itemNum)
end end
Util.AddOnceClick(m.btn,function() Util.AddOnceClick(m.btn, function()
local isOpen =CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish) local isOpen
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish) local tip
if isOpen==false then if self.config.ShopData[1][1] == 4 then
isOpen = CheckFunctionOpen(FUNCTION_OPEN_TYPE.EquipWish)
tip = GetFunctionOpenTip(FUNCTION_OPEN_TYPE.EquipWish)
else
isOpen = CheckFunctionOpen(FUNCTION_OPEN_TYPE.Fabaojulingxinyuan)
tip = GetFunctionOpenTip(FUNCTION_OPEN_TYPE.Fabaojulingxinyuan)
end
if isOpen == false then
PopupTipPanel.ShowTip(tip) PopupTipPanel.ShowTip(tip)
return return
end end
if not isFree then if not isFree then
if BagManager.GetItemCountById(itemId)<itemNum then if BagManager.GetItemCountById(itemId) < itemNum then
PopupTipPanel.ShowTip(itemConfig[itemId].Name.."数量不足!") PopupTipPanel.ShowTip(itemConfig[itemId].Name.."数量不足!")
return return
end end
end end
local state = PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_RecruitConfirm"..self.config.ShopData[3][2]) local state = PlayerPrefs.GetInt(PlayerManager.uid ..
LogGreen("self.config.ShopData[3][2]:"..self.config.ShopData[3][2].." state:"..state) "GeneralPopup_RecruitConfirm" .. self.config.ShopData[3][2])
LogGreen("self.config.ShopData[3][2]:" .. self.config.ShopData[3][2] .. " state:" .. state)
local recrutId = n == 1 and self.singleConfig.Id or self.tenConfig.Id local recrutId = n == 1 and self.singleConfig.Id or self.tenConfig.Id
local recrutNum = n == 1 and 1 or 10 local recrutNum = n == 1 and 1 or 10
if state==0 and itemId == 16 and not isFree then if state == 0 and itemId == 16 and not isFree then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecruitConfirm,recrutId,function() UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.RecruitConfirm, recrutId, function()
self:Recruit(recrutNum,recrutId,n,itemId) self:Recruit(recrutNum, recrutId, n, itemId)
end) end)
else else
self:Recruit(recrutNum,recrutId,n,itemId) self:Recruit(recrutNum, recrutId, n, itemId)
end end
end) end)
end end
end end
function RecruitEquipPanelNew:Recruit(recrutType,recrutId,bType,itemId) function RecruitEquipPanelNew:Recruit(recrutType, recrutId, bType, itemId)
if PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes)+recrutType>privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2] then if PrivilegeManager.GetPrivilegeUsedTimes(self.singleConfig.MaxTimes) + recrutType > privilegeConfig[self.singleConfig.MaxTimes].Condition[1][2] then
PopupTipPanel.ShowTip("无法超出每日召唤次数上限!") PopupTipPanel.ShowTip("无法超出每日召唤次数上限!")
return return
end end
if itemId==16 and PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.MaxTimes)<recrutType then if itemId == 16 and PrivilegeManager.GetPrivilegeRemainValue(self.singleConfig.MaxTimes) < recrutType then
PopupTipPanel.ShowTip("无法超出每日钻石召唤次数上限!") PopupTipPanel.ShowTip("无法超出每日钻石召唤次数上限!")
return return
end end
RecruitManager.RecruitRequest(recrutId, function(msg) RecruitManager.RecruitRequest(recrutId, function(msg)
PrivilegeManager.RefreshPrivilegeUsedTimes(self.singleConfig.MaxTimes,recrutType)--记录抽卡次数 PrivilegeManager.RefreshPrivilegeUsedTimes(self.singleConfig.MaxTimes, recrutType) --记录抽卡次数
if itemId==16 then if itemId == 16 then
PrivilegeManager.RefreshPrivilegeUsedTimes(self.singleConfig.MoneyTimes,recrutType) PrivilegeManager.RefreshPrivilegeUsedTimes(self.singleConfig.MoneyTimes, recrutType)
end end
if bType == 1 then if bType == 1 then
UIManager.OpenPanel(UIName.WishEquipBuyOnePanel, msg.drop, recrutId,
UIManager.OpenPanel(UIName.WishEquipBuyOnePanel,msg.drop,recrutId,{self.config.ShopData[3][1],self.config.ShopData[3][2]}) { self.config.ShopData[3][1], self.config.ShopData[3][2] })
else else
RecruitManager.isTenRecruit = 1 RecruitManager.isTenRecruit = 1
UIManager.OpenPanel(UIName.WishEquipBuyTenPanel,msg.drop,recrutId,{self.config.ShopData[3][1],self.config.ShopData[3][2]}) UIManager.OpenPanel(UIName.WishEquipBuyTenPanel, msg.drop, recrutId,
{ self.config.ShopData[3][1], self.config.ShopData[3][2] })
end end
CheckRedPointStatus(self.config.RpType) CheckRedPointStatus(self.config.RpType)
end,self.singleConfig.FreeTimes) end, self.singleConfig.FreeTimes)
end end
function RecruitEquipPanelNew:TimeCountDown() function RecruitEquipPanelNew:TimeCountDown()
@ -457,7 +518,7 @@ function RecruitEquipPanelNew:TimeCountDown()
self.timer:Stop() self.timer:Stop()
self.timer = nil self.timer = nil
end end
local timeDown=CalculateSecondsNowTo_N_OClock(0) local timeDown = CalculateSecondsNowTo_N_OClock(0)
self.btns[1].time.text = Language[10023]..TimeToHMS(timeDown) self.btns[1].time.text = Language[10023]..TimeToHMS(timeDown)
self.timer = Timer.New(function() self.timer = Timer.New(function()
if timeDown < 1 then if timeDown < 1 then
@ -473,11 +534,11 @@ end
--检查是否有新开放的心愿英雄 --检查是否有新开放的心愿英雄
function RecruitEquipPanelNew:CheckNewWishHero() function RecruitEquipPanelNew:CheckNewWishHero()
if #RecruitManager.newWishList > 0 and #RecruitManager.newWishList<10 then if #RecruitManager.newWishList > 0 and #RecruitManager.newWishList < 10 then
if not GuideManager.IsFunctionGuideExist() and not GuideManager.IsInMainGuide() then if not GuideManager.IsFunctionGuideExist() and not GuideManager.IsInMainGuide() then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.NewAddWishHero) UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.NewAddWishHero)
end end
end end
end end
return RecruitEquipPanelNew return RecruitEquipPanelNew