【心愿抽卡】====修改概率显示,必得剩余次数修改

dev_chengFeng
wangzhenxing 2021-06-02 11:29:26 +08:00
parent 8ec2d60c3f
commit ba04ea8e71
3 changed files with 17 additions and 17 deletions

View File

@ -167,6 +167,7 @@ BattleEventName = {
RoleBeExile = indexAdd(),--角色被放逐
RoleExileEnd = indexAdd(),--角色放逐结束
RoleAddBuffFail = indexAdd(),--角色添加buff失败
RecordRageChange = indexAdd(), -- 怒气改变时
}
BattleMaxFrame = 1000000

View File

@ -174,7 +174,19 @@ function TimeLimitUpHero:RefreshHeroData()
end
lastLiveName=GetResourcePath(curConfig.Live)
heroLiveObj=HeroManager.LoadHerolive1(curConfig,self.heroPar)
local reMaintimes = ActivityGiftManager.GetActivityValueInfo(self.actId)
local totalTimes = 0
for i = 1, #wishConfig.UpList do
if wishConfig.UpList[i][1]==curHeroId then
totalTimes=wishConfig.UpList[i][4]
end
end
reMaintimes = totalTimes - reMaintimes
if reMaintimes <= 0 then
reMaintimes = 1
end
self.callTimeTxt.text=reMaintimes
end
local freeTime = 0
@ -249,19 +261,6 @@ function TimeLimitUpHero:RefreshGetHeroTimes()
end
Util.AddOnceClick(m.btn,sureFunc)
end
local reMaintimes = ActivityGiftManager.GetActivityValueInfo(self.actId)
local totalTimes = 0
for i = 1, #wishConfig.UpList do
if wishConfig.UpList[i][1]==curHeroId then
totalTimes=wishConfig.UpList[i][4]
end
end
reMaintimes = totalTimes - reMaintimes
if reMaintimes == 0 then
reMaintimes = totalTimes
end
self.callTimeTxt.text=reMaintimes
end
function TimeLimitUpHero:Recruit(actId,type,itemId)

View File

@ -123,7 +123,7 @@ function this:ShowUpItem(config,actId)
end
end
hero:OnOpen(false,{config.Id,1},1.1,true)
hero.name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (num/100000)*100) .."%</color>"
hero.name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", 5 ).."%</color>"
hero.gameObject:SetActive(true)
for k,v in ipairs(this.ratePreList) do
@ -134,11 +134,11 @@ function this:ShowUpItem(config,actId)
-- return a.GetRate>b.GetRate
-- end)
local rateList={}
local hero={tag="5星神将UP",name=config.ReadingName,value=num,Color=1}
local hero={tag="5星神将UP",name=config.ReadingName,value=0.05,Color=1}
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,sort=value.Sort}
local data={tag=itemConfig.Name,name=value.ItemId[2],value=value.FakeRate,Color=0,sort=value.Sort}
table.insert(rateList,data)
end
table.sort(rateList,function(a,b)
@ -165,7 +165,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((m.value/100000)*100).."%"
this.ratePreList[n].rate.text=(m.value*100).."%"
end
end