推送礼包 完事儿
parent
435590808a
commit
8c4ff7e148
|
@ -4,6 +4,7 @@ local this = UpGradePackagePanel
|
||||||
|
|
||||||
local RechargeConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)--整表数据
|
local RechargeConfig = ConfigManager.GetConfig(ConfigName.RechargeCommodityConfig)--整表数据
|
||||||
local upgradeConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",21)--五档奖励数据
|
local upgradeConfig = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",21)--五档奖励数据
|
||||||
|
local fightLevelConfig = ConfigManager.GetConfig(ConfigName.MainLevelConfig)
|
||||||
|
|
||||||
local rechargeNum = 0
|
local rechargeNum = 0
|
||||||
local cursortingOrder = 0
|
local cursortingOrder = 0
|
||||||
|
@ -61,7 +62,7 @@ function this:BindEvent()
|
||||||
curIndex = curIndex - 1
|
curIndex = curIndex - 1
|
||||||
if curGiftList[curType][curIndex] then
|
if curGiftList[curType][curIndex] then
|
||||||
else
|
else
|
||||||
while(curType <= 0) do
|
while(curType >= 0) do
|
||||||
if not activityType[curType] then
|
if not activityType[curType] then
|
||||||
curType = LengthOfTable(activityType)
|
curType = LengthOfTable(activityType)
|
||||||
else
|
else
|
||||||
|
@ -152,9 +153,9 @@ function this:SetCurTypeAndIndex()
|
||||||
return curGiftList[curType][curIndex]
|
return curGiftList[curType][curIndex]
|
||||||
else
|
else
|
||||||
for k,v in pairs(curGiftList) do
|
for k,v in pairs(curGiftList) do
|
||||||
for i = 1 ,#v do
|
if v and #v > 0 then
|
||||||
curType = k
|
curType = k
|
||||||
curIndex = i
|
curIndex = 1
|
||||||
return curGiftList[curType][curIndex]
|
return curGiftList[curType][curIndex]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -163,13 +164,13 @@ function this:SetCurTypeAndIndex()
|
||||||
end
|
end
|
||||||
|
|
||||||
function this:Refresh()
|
function this:Refresh()
|
||||||
|
|
||||||
local num = self:GetInfoList()
|
local num = self:GetInfoList()
|
||||||
if num < 1 then
|
if num < 1 then
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
rechargeData = this:SetCurTypeAndIndex()
|
rechargeData = this:SetCurTypeAndIndex()
|
||||||
|
|
||||||
for k,v in pairs(activityType) do
|
for k,v in pairs(activityType) do
|
||||||
Util.GetGameObject(self.gameObject,v.comp):SetActive(false)
|
Util.GetGameObject(self.gameObject,v.comp):SetActive(false)
|
||||||
end
|
end
|
||||||
|
@ -182,7 +183,36 @@ function this:Refresh()
|
||||||
level = (math.floor(PlayerManager.level/10)-1)*10+8
|
level = (math.floor(PlayerManager.level/10)-1)*10+8
|
||||||
end
|
end
|
||||||
rechargeNum= VipManager.GetChargedNum()
|
rechargeNum= VipManager.GetChargedNum()
|
||||||
this.tip.text = curType == 1 and Language[12000]..level..Language[12001] or ""
|
|
||||||
|
|
||||||
|
if curType == 1 then
|
||||||
|
this.tip.text = Language[12000]..level..Language[12001] or ""
|
||||||
|
elseif curType == 3 then
|
||||||
|
local specialConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,91).Value
|
||||||
|
local num = tonumber(specialConfig)
|
||||||
|
local value = fightLevelConfig[FightPointPassManager.lastPassFightId].SortId
|
||||||
|
local value2 = ConfigManager.GetConfigDataByKey(ConfigName.MainLevelConfig,"SortId",math.floor(value/num)*num).Name
|
||||||
|
this.tip.text ="恭喜您通关"..value2..",我们为您准备了超值礼包,帮助您快速通关"
|
||||||
|
elseif curType == 4 then
|
||||||
|
local specialConfig = ConfigManager.GetConfigData(ConfigName.SpecialConfig,90).Value
|
||||||
|
local str = string.split(specialConfig,"|")
|
||||||
|
local nums = string.split(str[1],"#")
|
||||||
|
local canGet = false
|
||||||
|
local value = MonsterCampManager.monsterWave
|
||||||
|
local value2
|
||||||
|
if value < tonumber(nums[#nums]) then
|
||||||
|
local temp = tonumber(nums[#nums]) -tonumber(nums[#nums-1])
|
||||||
|
value2 = math.floor(value/temp) * temp
|
||||||
|
else
|
||||||
|
value2 = math.floor(value - tonumber(nums[#nums])/tonumber(str[2]))* tonumber(str[2]) + tonumber(nums[#nums])
|
||||||
|
end
|
||||||
|
this.tip.text ="恭喜您通过心魔试炼"..value2.."层,我们为您准备了超值礼包,帮助您快速通关"
|
||||||
|
else
|
||||||
|
this.tip.text = ""
|
||||||
|
end
|
||||||
|
-- this.tip.text = curType == 1 and Language[12000]..level..Language[12001] or ""
|
||||||
|
|
||||||
|
|
||||||
this.arrowsLeft:SetActive(num > 1)
|
this.arrowsLeft:SetActive(num > 1)
|
||||||
this.arrowsRight:SetActive(num > 1)
|
this.arrowsRight:SetActive(num > 1)
|
||||||
curGiftId = rechargeData.goodsId
|
curGiftId = rechargeData.goodsId
|
||||||
|
|
Loading…
Reference in New Issue