装备礼包重登不弹窗
This commit is contained in:
parent
11624308ea
commit
5d8cb4bfff
@ -19,7 +19,7 @@ function DungeonArmorEntity:init(data)
|
||||
self.fundRewards = data.fund_rewards
|
||||
self.totalChallengeCount = data.total_challenge_count
|
||||
|
||||
self:updateGift(data.gift_info)
|
||||
self:updateGift(data.gift_info, true)
|
||||
DataManager.FormationData:initDungeonArmor(self.heroes)
|
||||
|
||||
DataManager:registerCrossDayFunc("DungeonArmorEntity", function()
|
||||
@ -52,8 +52,8 @@ function DungeonArmorEntity:refreshFarmCount(chapterId, count)
|
||||
end
|
||||
|
||||
-- 更新礼包状态
|
||||
function DungeonArmorEntity:updateGift(giftInfo)
|
||||
DataManager.ShopData:initGift(PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT, giftInfo)
|
||||
function DungeonArmorEntity:updateGift(giftInfo, isInit)
|
||||
DataManager.ShopData:initGift(PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT, giftInfo, isInit)
|
||||
end
|
||||
|
||||
function DungeonArmorEntity:setStarReward(starId)
|
||||
|
||||
@ -15,7 +15,7 @@ function DungeonWeaponEntity:init(data)
|
||||
self.totalChallengeCount = data.total_challenge_count or {}
|
||||
self.data.isDirty = not self.data.isDirty
|
||||
|
||||
self:updateGift(data.gift_info)
|
||||
self:updateGift(data.gift_info, true)
|
||||
DataManager.FormationData:initDungeonWeapon(self.heroes)
|
||||
|
||||
DataManager:registerCrossDayFunc("DungeonWeaponEntity", function()
|
||||
@ -38,8 +38,8 @@ function DungeonWeaponEntity:refreshInfoOnFarm(result)
|
||||
end
|
||||
|
||||
-- 更新礼包状态
|
||||
function DungeonWeaponEntity:updateGift(giftInfo)
|
||||
DataManager.ShopData:initGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT, giftInfo)
|
||||
function DungeonWeaponEntity:updateGift(giftInfo, isInit)
|
||||
DataManager.ShopData:initGift(PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT, giftInfo, isInit)
|
||||
end
|
||||
|
||||
function DungeonWeaponEntity:setDirty()
|
||||
|
||||
@ -823,7 +823,7 @@ end
|
||||
-- 武器礼包 --------------------------------------------------------------------------------------------
|
||||
|
||||
-- 初始化礼包(礼包类型1下的礼包,可以直接复用这里的方法)
|
||||
function ShopData:initGift(giftType, gift)
|
||||
function ShopData:initGift(giftType, gift, isInit)
|
||||
if giftType == nil or gift == nil then
|
||||
return
|
||||
end
|
||||
@ -846,7 +846,7 @@ function ShopData:initGift(giftType, gift)
|
||||
local tempId = self.gifts[giftType] and self.gifts[giftType].id or 0
|
||||
self.gifts[giftType] = giftStruct
|
||||
|
||||
if self:hasGift(giftType) then
|
||||
if not isInit and self:hasGift(giftType) then
|
||||
if tempId == self.gifts[giftType].id then
|
||||
if EDITOR_MODE then
|
||||
Logger.logHighlight("重复礼包数据,不处理弹窗:" .. tempId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user