fix bug
This commit is contained in:
parent
29aa74f379
commit
784b56cefe
@ -49,22 +49,25 @@ function SummonManager:onForceSummonRsp(result)
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON)
|
||||
return
|
||||
end
|
||||
DataManager.SummonData:updateSummonCount(result.reqData.id, result.reqData.times, result.reqData.free)
|
||||
local newHero = {}
|
||||
local guarantee1 = DataManager.SummonData:getSummonWishGuarantee1(result.reqData.id)
|
||||
for _, reward in pairs(result.rewards) do
|
||||
local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id)
|
||||
if isNew then
|
||||
table.insert(newHero, reward.item.id)
|
||||
end
|
||||
if guarantee1 then
|
||||
if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then
|
||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, true)
|
||||
else
|
||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, false)
|
||||
local cfg = ConfigManager:getConfig("item")[reward.item.id]
|
||||
if cfg.type == GConst.ItemConst.ITEM_TYPE.HERO_FRAGMENT then
|
||||
local isNew = DataManager.HeroData:getHeroIsNew(reward.item.id)
|
||||
if isNew then
|
||||
table.insert(newHero, reward.item.id)
|
||||
end
|
||||
if guarantee1 then
|
||||
if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then
|
||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, true)
|
||||
else
|
||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, false)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
DataManager.SummonData:updateSummonCount(result.reqData.id, result.reqData.times, result.reqData.free)
|
||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.FORCE_SUMMON, result, newHero)
|
||||
BIReport:postForceSummon(result.reqData.free, result.reqData.times, result.rewards, result.costs)
|
||||
|
||||
|
||||
@ -70,15 +70,15 @@ function ArenaRankUI:onRefresh()
|
||||
if rank and rank == 1 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_1")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_1")
|
||||
elseif rank and rank == 2 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_2")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_2")
|
||||
elseif rank and rank == 3 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_3")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_3")
|
||||
elseif rank and rank > 0 then
|
||||
self.imgRank:setActive(false)
|
||||
self.txRank:setActive(true)
|
||||
|
||||
@ -40,17 +40,17 @@ function ArenaRankCell:refresh(rank)
|
||||
if rank == 1 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_1")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_1")
|
||||
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_2")
|
||||
elseif rank == 2 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_2")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_2")
|
||||
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_3")
|
||||
elseif rank == 3 then
|
||||
self.txRank:setActive(false)
|
||||
self.imgRank:setActive(true)
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.ARENA, "arena_ranking_3")
|
||||
self.imgRank:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_dec_3")
|
||||
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_ACT_COMMON, "act_common_bg_4")
|
||||
else
|
||||
self.imgRank:setActive(false)
|
||||
|
||||
@ -378,7 +378,7 @@ function BattleResultUI:refreshRewards()
|
||||
if index <= MAX_SCROLL_SHOW_COUNT and self.animRewards[index] == nil then
|
||||
self.animRewards[index] = self:showRewardAppearAnim(index, cell)
|
||||
end
|
||||
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_1")
|
||||
cell:showRightUpIcon(index <= self.mysteryBoxIdx, GConst.ATLAS_PATH.COMMON, "common_chest_2")
|
||||
cell:setShowFirstTag(index <= self.firstPassIdx)
|
||||
if self.isDouble then
|
||||
cell:setNumTxDouble()
|
||||
|
||||
@ -11,6 +11,8 @@ function RewardCell:init()
|
||||
self.txProb = uiMap["reward_cell.prob.tx_prob"]
|
||||
self.firstNode = uiMap["reward_cell.first_bg"]
|
||||
self.txfirst = uiMap["reward_cell.first_bg.first_tx"]
|
||||
self.rightUpIcon = uiMap["reward_cell.right_up_icon"]
|
||||
self.rightUpIcon:setActive(false)
|
||||
|
||||
self:setShowSelect(false)
|
||||
self:hideFrameAnimation()
|
||||
@ -128,6 +130,14 @@ function RewardCell:hideFrameAnimation()
|
||||
self.frameAni:setActive(false)
|
||||
end
|
||||
|
||||
function RewardCell:showRightUpIcon(show, atlas, iconName)
|
||||
self.rightUpIcon:setActive(show)
|
||||
if not show then
|
||||
return
|
||||
end
|
||||
self.rightUpIcon:setSprite(atlas, iconName)
|
||||
end
|
||||
|
||||
function RewardCell:showMask(show, syncCheck)
|
||||
self.itemCell:showMask(show)
|
||||
self.equipCell:showMask(show)
|
||||
|
||||
@ -54,9 +54,9 @@ function FormationTips:onClose()
|
||||
end
|
||||
|
||||
function FormationTips:adaptWhenOverScreen(...)
|
||||
local xOffset, _ = BaseTips.adaptWhenOverScreen(self, ...)
|
||||
local xOffset, _ = BaseTips.adaptWhenOverScreen(self.bg, ...)
|
||||
if self.arrow then
|
||||
self.arrow:setAnchoredPositionX(110 - xOffset)
|
||||
self.arrow:setAnchoredPositionX(90 - xOffset)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user