基金ad奖励显示fix
This commit is contained in:
parent
6753303909
commit
5fcf27a659
@ -1,6 +1,6 @@
|
|||||||
local chapter_dungeon_equip = {
|
local chapter_dungeon_equip = {
|
||||||
[1]={
|
[1]={
|
||||||
["level"]=5,
|
["level"]=1,
|
||||||
["scene"]="dungeon_equip",
|
["scene"]="dungeon_equip",
|
||||||
["block_icon"]="battle_hinder_13",
|
["block_icon"]="battle_hinder_13",
|
||||||
["chess_board"]="chessboard_2",
|
["chess_board"]="chessboard_2",
|
||||||
|
|||||||
@ -18,13 +18,12 @@ function DungeonArmorEntity:init(data)
|
|||||||
self.starRewards = data.star_rewards or {}
|
self.starRewards = data.star_rewards or {}
|
||||||
self.fundRewards = data.fund_rewards
|
self.fundRewards = data.fund_rewards
|
||||||
self.totalChallengeCount = data.total_challenge_count
|
self.totalChallengeCount = data.total_challenge_count
|
||||||
self.fundAd = data.ad or false
|
|
||||||
|
|
||||||
self:updateGift(data.gift_info)
|
self:updateGift(data.gift_info)
|
||||||
DataManager.FormationData:initDungeonArmor(self.heroes)
|
DataManager.FormationData:initDungeonArmor(self.heroes)
|
||||||
|
|
||||||
DataManager:registerCrossDayFunc("DungeonArmorEntity", function()
|
DataManager:registerCrossDayFunc("DungeonArmorEntity", function()
|
||||||
self.fundAd = false
|
self.fundRewards[FUND_AD_REWARD_ID] = false
|
||||||
self.farmCount = table.clearOrCreate(self.farmCount)
|
self.farmCount = table.clearOrCreate(self.farmCount)
|
||||||
self:setDirty()
|
self:setDirty()
|
||||||
end)
|
end)
|
||||||
@ -487,7 +486,7 @@ end
|
|||||||
|
|
||||||
-- 是否有可领取的基金奖励
|
-- 是否有可领取的基金奖励
|
||||||
function DungeonArmorEntity:hasCanGetFundReward()
|
function DungeonArmorEntity:hasCanGetFundReward()
|
||||||
for index, id in ipairs(self:getFundStageRewardIds(self:getCurFundStage())) do
|
for index, id in ipairs(self:getFundRewardIdsSort(self:getCurFundStage())) do
|
||||||
if self:isCanGetFundReward(id) and not self:isGotFundReward(id) then
|
if self:isCanGetFundReward(id) and not self:isGotFundReward(id) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -497,9 +496,6 @@ end
|
|||||||
|
|
||||||
-- 是否已领取基金奖励
|
-- 是否已领取基金奖励
|
||||||
function DungeonArmorEntity:isGotFundReward(id)
|
function DungeonArmorEntity:isGotFundReward(id)
|
||||||
if id == FUND_AD_REWARD_ID then
|
|
||||||
self.fundAd = true
|
|
||||||
end
|
|
||||||
return self.fundRewards and self.fundRewards[id]
|
return self.fundRewards and self.fundRewards[id]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user