[限时祈愿]=============抽卡修改
parent
e63200f4a2
commit
53cbc08d48
File diff suppressed because it is too large
Load Diff
|
@ -112,7 +112,6 @@ end
|
|||
--界面打开时调用(用于子类重写)
|
||||
function QianKunBoxBuyOnePanel:OnOpen(...)
|
||||
SoundManager.PlaySound(SoundConfig.UI_Siyuanzhen)
|
||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.QianKunBox })
|
||||
local args = { ... }
|
||||
this.drop=args[1]
|
||||
this.recruitType = args[2]
|
||||
|
@ -128,14 +127,16 @@ function QianKunBoxBuyOnePanel:OnOpen(...)
|
|||
local itemId=0
|
||||
local itemNum=0
|
||||
local d
|
||||
local upConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",this.recruitType)
|
||||
local upConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",this.recruitType)
|
||||
if upConfig then
|
||||
local wish=ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1)
|
||||
if wish then
|
||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.TimelimitCall })
|
||||
d = RecruitManager.GetExpendDataByCostItem(wish.CostItemSingle)
|
||||
isLimitUpHero=true
|
||||
end
|
||||
else
|
||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.QianKunBox })
|
||||
d = RecruitManager.GetExpendData(this.recruitType)
|
||||
end
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ function TimeLimitUpHero:InitComponent()
|
|||
self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition
|
||||
|
||||
self.btnActivity = Util.GetGameObject(self.gameObject,"btngroup/btnActivity")
|
||||
self.btnActivity:GetComponent("Image").sprite=self.spLoader:LoadSprite("r_shilian-jiangli_zh")
|
||||
self.btnRewardBtn = Util.GetGameObject(self.gameObject,"btngroup/btnRewardBtn")
|
||||
self.btnRewardBtn:SetActive(false)
|
||||
|
||||
|
@ -68,6 +69,10 @@ function TimeLimitUpHero:InitComponent()
|
|||
self.heroNameTxt=Util.GetGameObject(self.gameObject,"Bg2/PreviewBtn/di/Name/Text"):GetComponent("Text")
|
||||
self.heroProImg=Util.GetGameObject(self.gameObject,"Bg2/PreviewBtn/di/Image"):GetComponent("Image")
|
||||
self.starPar=Util.GetGameObject(self.gameObject,"Bg2/PreviewBtn/di/Image"):GetComponent("Image")
|
||||
self.gailvImg=Util.GetGameObject(self.gameObject,"btn_hero/InfoImg2"):GetComponent("Image")
|
||||
self.changeImg=Util.GetGameObject(self.gameObject,"btn_hero/InfoImg"):GetComponent("Image")
|
||||
self.changeImg.sprite=self.spLoader:LoadSprite("x_xinjiangzhaohuan_icondi_ghwj_zh")
|
||||
self.gailvImg.sprite=self.spLoader:LoadSprite("x_xinjiangzhaohuan_gailv")
|
||||
Util.AddClick(self.btn_hero.gameObject, function()
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ChooseUpHero,self.actId,curHeroId)
|
||||
end)
|
||||
|
|
|
@ -132,17 +132,14 @@ function this:ShowUpItem(config,actId)
|
|||
-- end)
|
||||
local rateList={}
|
||||
local hero={tag="5星神将UP",name=config.ReadingName,value=num,Color=1}
|
||||
|
||||
--local aaa=ConfigManager.GetConfigData(ConfigName.WishActivityPool,2)
|
||||
--LogError("aaa==="..aaa.GetRate)
|
||||
for key, value in ConfigPairs(pool) do
|
||||
local id=value.ItemId[1]
|
||||
local itemConfig=ConfigManager.TryGetConfigData(ConfigName.ItemConfig,id)
|
||||
local data={tag=itemConfig.Name,name=value.ItemId[2],value=value.GetRate,Color=0}
|
||||
local data={tag=itemConfig.Name,name=value.ItemId[2],value=value.GetRate,Color=0,sort=value.Sort}
|
||||
table.insert(rateList,data)
|
||||
end
|
||||
table.sort(rateList,function(a,b)
|
||||
return a.value>b.value
|
||||
return a.sort<b.sort
|
||||
end)
|
||||
table.insert(rateList,1,hero)
|
||||
for n,m in ipairs(rateList) do
|
||||
|
@ -165,7 +162,7 @@ function this:ShowUpItem(config,actId)
|
|||
this.ratePreList[n].rate.color=Color.New(0.66, 0.62,0.54, 1)
|
||||
end
|
||||
this.ratePreList[n].name.text=m.name
|
||||
this.ratePreList[n].rate.text=string.format("%.2f",(m.value/100000)*100).."%"
|
||||
this.ratePreList[n].rate.text=string.format((m.value/100000)*100).."%"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -111,7 +111,7 @@ function TenRecruitPanel:OnOpen(...)
|
|||
end
|
||||
end
|
||||
local d=nil
|
||||
local config=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",type)
|
||||
local config=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",type)
|
||||
if config then
|
||||
local Setting= ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1)
|
||||
d=RecruitManager.GetExpendDataByCostItem(Setting.CostItemMul)
|
||||
|
|
Loading…
Reference in New Issue