基金ad奖励显示fix

This commit is contained in:
Fang 2023-07-25 15:43:33 +08:00
parent 6753303909
commit 5fcf27a659
2 changed files with 3 additions and 7 deletions

View File

@ -1,6 +1,6 @@
local chapter_dungeon_equip = {
[1]={
["level"]=5,
["level"]=1,
["scene"]="dungeon_equip",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",

View File

@ -18,13 +18,12 @@ function DungeonArmorEntity:init(data)
self.starRewards = data.star_rewards or {}
self.fundRewards = data.fund_rewards
self.totalChallengeCount = data.total_challenge_count
self.fundAd = data.ad or false
self:updateGift(data.gift_info)
DataManager.FormationData:initDungeonArmor(self.heroes)
DataManager:registerCrossDayFunc("DungeonArmorEntity", function()
self.fundAd = false
self.fundRewards[FUND_AD_REWARD_ID] = false
self.farmCount = table.clearOrCreate(self.farmCount)
self:setDirty()
end)
@ -487,7 +486,7 @@ end
-- 是否有可领取的基金奖励
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
return true
end
@ -497,9 +496,6 @@ end
-- 是否已领取基金奖励
function DungeonArmorEntity:isGotFundReward(id)
if id == FUND_AD_REWARD_ID then
self.fundAd = true
end
return self.fundRewards and self.fundRewards[id]
end