fix bug
This commit is contained in:
parent
afc8818849
commit
3824222f1c
@ -671,6 +671,8 @@ local LocalizationGlobalConst =
|
|||||||
HERO_DESC_18 = "HERO_DESC_18",
|
HERO_DESC_18 = "HERO_DESC_18",
|
||||||
HERO_DESC_19 = "HERO_DESC_19",
|
HERO_DESC_19 = "HERO_DESC_19",
|
||||||
HERO_DESC_20 = "HERO_DESC_20",
|
HERO_DESC_20 = "HERO_DESC_20",
|
||||||
|
SUMMON_DESC_3 = "SUMMON_DESC_3",
|
||||||
|
SUMMON_DESC_4 = "SUMMON_DESC_4",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -671,6 +671,8 @@ local localization_global =
|
|||||||
["HERO_DESC_18"] = "去升级",
|
["HERO_DESC_18"] = "去升级",
|
||||||
["HERO_DESC_19"] = "星级达到{0}",
|
["HERO_DESC_19"] = "星级达到{0}",
|
||||||
["HERO_DESC_20"] = "可继续升级",
|
["HERO_DESC_20"] = "可继续升级",
|
||||||
|
["SUMMON_DESC_3"] = "在[高级招聘]中,如果连续49次没有获得传说快递员,则第50次必 当获得传说快递员;且在[高级招聘]中获得任意传说快递员时,该",
|
||||||
|
["SUMMON_DESC_4"] = "概率预览",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -36,10 +36,10 @@ local skill = {
|
|||||||
["desc"]="光合特工:为团队回复一次生命。"
|
["desc"]="光合特工:为团队回复一次生命。"
|
||||||
},
|
},
|
||||||
[3500120]={
|
[3500120]={
|
||||||
["desc"]="快递仙人:额外造成4次大量技能伤害。"
|
["desc"]="树懒镖师:额外造成4次技能伤害。"
|
||||||
},
|
},
|
||||||
[3500220]={
|
[3500220]={
|
||||||
["desc"]="树懒镖师:额外造成4次技能伤害。"
|
["desc"]="快递仙人:额外造成4次大量技能伤害。"
|
||||||
},
|
},
|
||||||
[4300120]={
|
[4300120]={
|
||||||
["desc"]="气泡柴犬:额外造成一次技能伤害。"
|
["desc"]="气泡柴犬:额外造成一次技能伤害。"
|
||||||
@ -48,10 +48,10 @@ local skill = {
|
|||||||
["desc"]="海的女儿:额外造成一次技能伤害。"
|
["desc"]="海的女儿:额外造成一次技能伤害。"
|
||||||
},
|
},
|
||||||
[4500120]={
|
[4500120]={
|
||||||
["desc"]="冰鲜队长:额外造成一次技能伤害,附加<color=#3cff28><u>腐败</u></color>,<color=#3cff28>1</color>回合。"
|
["desc"]="外卖天使:额外造成4次技能伤害,附加<color=#3cff28><u>冰霜</u></color>,<color=#3cff28>1</color>回合。"
|
||||||
},
|
},
|
||||||
[4500220]={
|
[4500220]={
|
||||||
["desc"]="外卖天使:额外造成4次技能伤害,附加<color=#3cff28><u>冰霜</u></color>,<color=#3cff28>1</color>回合。"
|
["desc"]="冰鲜队长:额外造成一次技能伤害,附加<color=#3cff28><u>腐败</u></color>,<color=#3cff28>1</color>回合。"
|
||||||
},
|
},
|
||||||
[5300120]={
|
[5300120]={
|
||||||
["desc"]="圣盾卫士:为团队附加一个<color=#3cff28><u>护盾</u></color>,<color=#3cff28>1</color>回合。"
|
["desc"]="圣盾卫士:为团队附加一个<color=#3cff28><u>护盾</u></color>,<color=#3cff28>1</color>回合。"
|
||||||
@ -60,10 +60,10 @@ local skill = {
|
|||||||
["desc"]="混沌巫师:额外造成一次技能伤害。"
|
["desc"]="混沌巫师:额外造成一次技能伤害。"
|
||||||
},
|
},
|
||||||
[5500120]={
|
[5500120]={
|
||||||
["desc"]="血族快递伯爵:额外造成4次大量技能伤害。"
|
["desc"]="死灵法师:额外造成4次大量技能伤害。"
|
||||||
},
|
},
|
||||||
[5500220]={
|
[5500220]={
|
||||||
["desc"]="死灵法师:额外造成4次大量技能伤害。"
|
["desc"]="血族快递伯爵:额外造成4次大量技能伤害。"
|
||||||
},
|
},
|
||||||
[10015]={
|
[10015]={
|
||||||
["desc"]="每2回合恢复生命"
|
["desc"]="每2回合恢复生命"
|
||||||
|
|||||||
@ -333,9 +333,8 @@ GConst.QUALITY_TYPE =
|
|||||||
[2] = "#A3FF94",
|
[2] = "#A3FF94",
|
||||||
[3] = "#4DFFF5",
|
[3] = "#4DFFF5",
|
||||||
[4] = "#FA79FF",
|
[4] = "#FA79FF",
|
||||||
[5] = "#FFEE79",
|
[5] = "#F3A345",
|
||||||
[6] = "#FFAC40",
|
[6] = "#F34545",
|
||||||
[7] = "#FF5050",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GConst.QUALITY_COLOR = {
|
GConst.QUALITY_COLOR = {
|
||||||
|
|||||||
@ -54,7 +54,7 @@ function SummonManager:onForceSummonRsp(result)
|
|||||||
-- DataManager.ForceData:setForceIsNew(reward.item.id, false)
|
-- DataManager.ForceData:setForceIsNew(reward.item.id, false)
|
||||||
-- end
|
-- end
|
||||||
if guarantee1 then
|
if guarantee1 then
|
||||||
if DataManager.HeroData:getHeroQlt(reward.item.id) == 4 then
|
if DataManager.HeroData:getHeroQlt(reward.item.id) == 5 then
|
||||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, true)
|
DataManager.SummonData:setSummonTrigger(result.reqData.id, true)
|
||||||
else
|
else
|
||||||
DataManager.SummonData:setSummonTrigger(result.reqData.id, false)
|
DataManager.SummonData:setSummonTrigger(result.reqData.id, false)
|
||||||
|
|||||||
@ -186,8 +186,8 @@ function MainComp:refreshChapter(force)
|
|||||||
-- self:doMonsterAction()
|
-- self:doMonsterAction()
|
||||||
self:refreshChapterBtn()
|
self:refreshChapterBtn()
|
||||||
|
|
||||||
self.leftBtn:setActive(ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.IDLE_DROP, false))
|
self.leftBtn:setActive(ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.IDLE_DROP, true))
|
||||||
self.rightBtn:setActive(ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SUMMON_OPEN, false))
|
self.rightBtn:setActive(ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SUMMON_OPEN, true))
|
||||||
end
|
end
|
||||||
|
|
||||||
function MainComp:refreshChapterBg()
|
function MainComp:refreshChapterBg()
|
||||||
|
|||||||
@ -34,8 +34,8 @@ function SummonBallCell:refresh(wishHeroId, heroId, callback, select)
|
|||||||
|
|
||||||
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
||||||
-- self.heroBg:setSprite(GConst.ATLAS_PATH.HERO, GConst.FRAME_QLT[cfg.qlt])
|
-- self.heroBg:setSprite(GConst.ATLAS_PATH.HERO, GConst.FRAME_QLT[cfg.qlt])
|
||||||
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. (cfg.qlt - 2))
|
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
||||||
self.heroDec:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||||
|
|
||||||
@ -71,8 +71,8 @@ function SummonBallCell:refreshInfo(heroId)
|
|||||||
self.heroId = heroId
|
self.heroId = heroId
|
||||||
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
local cfg = DataManager.HeroData:getHeroConfig(heroId)
|
||||||
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
-- self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, cfg.icon)
|
||||||
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. (cfg.qlt - 2))
|
self.heroBg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_card_" .. cfg.qlt)
|
||||||
self.heroDec:setSprite(GConst.ATLAS_PATH.HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
self.heroDec:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HERO_DEC_QLT[cfg.qlt])
|
||||||
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[cfg.position])
|
||||||
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
self.nameTx:setText(ModuleManager.HeroManager:getHeroName(heroId))
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self:bind(DataManager.SummonData, "isDirty", function()
|
self:bind(DataManager.SummonData, "isDirty", function()
|
||||||
self:refreshWishBtn()
|
self:onRefresh()
|
||||||
end)
|
end)
|
||||||
-- self:bind(DataManager.ActTimeData, "isDirty", function()
|
-- self:bind(DataManager.ActTimeData, "isDirty", function()
|
||||||
-- self:onRefresh()
|
-- self:onRefresh()
|
||||||
@ -405,8 +405,8 @@ function SummonMainUI:onSummonRsp(result, newForce)
|
|||||||
if self.isJumpTween or self.selectSpineId ~= 1 then
|
if self.isJumpTween or self.selectSpineId ~= 1 then
|
||||||
ModuleManager.SummonManager:showSummonRewardUI({
|
ModuleManager.SummonManager:showSummonRewardUI({
|
||||||
rewards = self.summonResult.rewards,
|
rewards = self.summonResult.rewards,
|
||||||
callback = function(count)
|
callback = function(count, isAd)
|
||||||
self:onSummon(count)
|
self:onSummon(count, isAd)
|
||||||
end,
|
end,
|
||||||
newForce = newForce,
|
newForce = newForce,
|
||||||
page = self.page
|
page = self.page
|
||||||
|
|||||||
@ -17,8 +17,8 @@ end
|
|||||||
|
|
||||||
function SummonOddsUI:onLoadRootComplete()
|
function SummonOddsUI:onLoadRootComplete()
|
||||||
local uiMap = self.root:genAllChildren()
|
local uiMap = self.root:genAllChildren()
|
||||||
uiMap["summon_odds_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_FORCE_3))
|
uiMap["summon_odds_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_4))
|
||||||
uiMap["summon_odds_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_FORCE_3))
|
uiMap["summon_odds_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_3))
|
||||||
|
|
||||||
self.content = uiMap["summon_odds_ui.bg.target_node.bg.scrollrect.viewport.content"]
|
self.content = uiMap["summon_odds_ui.bg.target_node.bg.scrollrect.viewport.content"]
|
||||||
self.layout_content = self.content:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)
|
self.layout_content = self.content:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT)
|
||||||
@ -45,7 +45,8 @@ function SummonOddsUI:onRefresh()
|
|||||||
local shows = DataManager.SummonData:getSummonShow(self.page)
|
local shows = DataManager.SummonData:getSummonShow(self.page)
|
||||||
self.shadowObjs = {}
|
self.shadowObjs = {}
|
||||||
self.layoutObjs = {}
|
self.layoutObjs = {}
|
||||||
for i, data in pairs(shows) do
|
for i = #shows, 1, -1 do
|
||||||
|
local data = shows[i]
|
||||||
local shadowObj = CS.UnityEngine.Object.Instantiate(self.title:getGameObject())
|
local shadowObj = CS.UnityEngine.Object.Instantiate(self.title:getGameObject())
|
||||||
local title_item = UIPrefabObject:create()
|
local title_item = UIPrefabObject:create()
|
||||||
title_item:initWithPrefab(GConst.EMPTY_STRING, shadowObj)
|
title_item:initWithPrefab(GConst.EMPTY_STRING, shadowObj)
|
||||||
@ -60,13 +61,16 @@ function SummonOddsUI:onRefresh()
|
|||||||
-- local bg = uiMap["title.bg"]
|
-- local bg = uiMap["title.bg"]
|
||||||
-- local txName = uiMap["title.bg.tx_name"]
|
-- local txName = uiMap["title.bg.tx_name"]
|
||||||
-- bg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_bg_" .. data[1])
|
-- bg:setSprite(GConst.ATLAS_PATH.UI_SUMMON, "summon_bg_" .. data[1])
|
||||||
|
local str
|
||||||
if i == 1 then
|
if i == 1 then
|
||||||
descTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_3) .. data[2] / 100 .. "%")
|
str = I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_3) .. data[2] / 100 .. "%"
|
||||||
elseif i == 2 then
|
elseif i == 2 then
|
||||||
descTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_4) .. data[2] / 100 .. "%")
|
str = I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_4) .. data[2] / 100 .. "%"
|
||||||
else
|
else
|
||||||
descTx:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_5) .. data[2] / 100 .. "%")
|
str = I18N:getGlobalText(I18N.GlobalConst.HERO_CARD_DESC_QLT_5) .. data[2] / 100 .. "%"
|
||||||
end
|
end
|
||||||
|
local str = string.format("<color=%s>%s</color>", GConst.QUALITY_TYPE[i + 2], str)
|
||||||
|
descTx:setText(str)
|
||||||
-- descTx:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_GET_DESC_3, data[2] / 100))
|
-- descTx:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_GET_DESC_3, data[2] / 100))
|
||||||
local layoutObj = CS.UnityEngine.Object.Instantiate(self.layout:getGameObject())
|
local layoutObj = CS.UnityEngine.Object.Instantiate(self.layout:getGameObject())
|
||||||
local layout_item = UIPrefabObject:create()
|
local layout_item = UIPrefabObject:create()
|
||||||
|
|||||||
@ -60,9 +60,15 @@ function SummonRewardUI:onLoadRootComplete()
|
|||||||
self.txOne = uiMap["summon_reward_ui.btn_summon_one.text"]
|
self.txOne = uiMap["summon_reward_ui.btn_summon_one.text"]
|
||||||
self.txNumOne = uiMap["summon_reward_ui.btn_summon_one.cost.tx_num_one"]
|
self.txNumOne = uiMap["summon_reward_ui.btn_summon_one.cost.tx_num_one"]
|
||||||
self.imgSummonOneIcon = uiMap["summon_reward_ui.btn_summon_one.cost.img_icon_1"]
|
self.imgSummonOneIcon = uiMap["summon_reward_ui.btn_summon_one.cost.img_icon_1"]
|
||||||
|
self.btnSummonFree = uiMap["summon_reward_ui.bg.btn_summon_free"]
|
||||||
|
self.btnSummonFreeTx = uiMap["summon_reward_ui.bg.btn_summon_free.text_free"]
|
||||||
|
self.btnSummonAd = uiMap["summon_reward_ui.bg.btn_summon_ad"]
|
||||||
|
self.btnSummonAdTx = uiMap["summon_reward_ui.bg.btn_summon_ad.desc_tx"]
|
||||||
|
|
||||||
self.txTen:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_TEN))
|
self.txTen:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_TEN))
|
||||||
self.txOne:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_ONE))
|
self.txOne:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_ONE))
|
||||||
|
self.btnSummonFreeTx:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_DESC_1))
|
||||||
|
self.btnSummonAdTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_1))
|
||||||
|
|
||||||
self.btnSummonTen:addClickListener(function()
|
self.btnSummonTen:addClickListener(function()
|
||||||
self:closeUI()
|
self:closeUI()
|
||||||
@ -72,6 +78,12 @@ function SummonRewardUI:onLoadRootComplete()
|
|||||||
self:closeUI()
|
self:closeUI()
|
||||||
self.callback(1)
|
self.callback(1)
|
||||||
end)
|
end)
|
||||||
|
self.btnSummonAd:addClickListener(function()
|
||||||
|
self:closeUI()
|
||||||
|
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.SUMMON_AD, function()
|
||||||
|
self.callback(1, true)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
function SummonRewardUI:setCellEffectOrder(cell)
|
function SummonRewardUI:setCellEffectOrder(cell)
|
||||||
local effects = cell:getEffectQlts()
|
local effects = cell:getEffectQlts()
|
||||||
@ -87,31 +99,37 @@ function SummonRewardUI:onClose()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SummonRewardUI:refreshSummonBtn()
|
function SummonRewardUI:refreshSummonBtn()
|
||||||
|
local freeCount = DataManager.SummonData:getSummonFreeCount(self.page)
|
||||||
|
local adCount = DataManager.SummonData:getSummonAdCount(self.page)
|
||||||
local itemCost = DataManager.SummonData:getSummonItemCost(self.page)
|
local itemCost = DataManager.SummonData:getSummonItemCost(self.page)
|
||||||
local costId = GFunc.getRewardId(itemCost)
|
local costId = GFunc.getRewardId(itemCost)
|
||||||
local costNum = GFunc.getRewardNum(itemCost)
|
local costNum = GFunc.getRewardNum(itemCost)
|
||||||
local count = DataManager.BagData.ItemData:getItemNumById(costId)
|
local count = DataManager.BagData.ItemData:getItemNumById(costId)
|
||||||
local obj = DataManager.BagData.ItemData:getItemById(costId)
|
local obj = DataManager.BagData.ItemData:getItemById(costId)
|
||||||
local cost = DataManager.SummonData:getSummonGemCost(self.page)
|
local cost = DataManager.SummonData:getSummonGemCost(self.page)
|
||||||
if count >= 1 then
|
self.btnSummonAd:setActive(adCount > 0)
|
||||||
self.txNumOne:setText(1)
|
self.btnSummonFree:setActive(freeCount > 0)
|
||||||
self.btnSummonOne:addRedPoint(100, 30, 0.6)
|
self.btnSummonOne:setActive(freeCount <= 0)
|
||||||
else
|
if freeCount <= 0 then
|
||||||
self.btnSummonOne:removeRedPoint()
|
if count >= 1 then
|
||||||
if cost then
|
self.txNumOne:setText(1)
|
||||||
local costGemNum = GFunc.getRewardNum(cost)
|
self.btnSummonOne:addRedPoint(100, 30, 0.6)
|
||||||
if count == 0 and GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, costGemNum, false) then
|
else
|
||||||
self.txNumOne:setText(costGemNum)
|
self.btnSummonOne:removeRedPoint()
|
||||||
obj = DataManager.BagData.ItemData:getItemById(GConst.ItemConst.ITEM_ID_GEM)
|
if cost then
|
||||||
|
local costGemNum = GFunc.getRewardNum(cost)
|
||||||
|
if count == 0 and GFunc.checkCost(GConst.ItemConst.ITEM_ID_GEM, costGemNum, false) then
|
||||||
|
self.txNumOne:setText(costGemNum)
|
||||||
|
obj = DataManager.BagData.ItemData:getItemById(GConst.ItemConst.ITEM_ID_GEM)
|
||||||
|
else
|
||||||
|
self.txNumOne:setText("<color=#EC3636>1</color>")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self.txNumOne:setText("<color=#EC3636>1</color>")
|
self.txNumOne:setText("<color=#EC3636>1</color>")
|
||||||
end
|
end
|
||||||
else
|
|
||||||
self.txNumOne:setText("<color=#EC3636>1</color>")
|
|
||||||
end
|
end
|
||||||
|
self.imgSummonOneIcon:setSprite(obj:getIconRes())
|
||||||
end
|
end
|
||||||
self.imgSummonOneIcon:setSprite(obj:getIconRes())
|
|
||||||
|
|
||||||
obj = DataManager.BagData.ItemData:getItemById(costId)
|
obj = DataManager.BagData.ItemData:getItemById(costId)
|
||||||
if count >= 10 then
|
if count >= 10 then
|
||||||
@ -200,6 +218,7 @@ function SummonRewardUI:onRefresh()
|
|||||||
end
|
end
|
||||||
self:refreshSummonBtn()
|
self:refreshSummonBtn()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SummonRewardUI:doUITweenShake(delayTime)
|
function SummonRewardUI:doUITweenShake(delayTime)
|
||||||
if self.shakeSeq then
|
if self.shakeSeq then
|
||||||
self.shakeSeq:Kill()
|
self.shakeSeq:Kill()
|
||||||
|
|||||||
@ -36,14 +36,23 @@ end
|
|||||||
|
|
||||||
function SummonData:initData(data)
|
function SummonData:initData(data)
|
||||||
self.summonDataMap = {}
|
self.summonDataMap = {}
|
||||||
for k,v in pairs(data) do
|
for i = 1, 2 do
|
||||||
self.summonDataMap[k] = {}
|
self.summonDataMap[i] = {}
|
||||||
self.summonDataMap[k].freeCount = v.free_count
|
if data[i] then
|
||||||
self.summonDataMap[k].adCount = v.ad_count
|
self.summonDataMap[i].freeCount = data[i].free_count
|
||||||
self.summonDataMap[k].statCount = v.stat_count
|
self.summonDataMap[i].adCount = data[i].ad_count
|
||||||
self.summonDataMap[k].triggerCount = v.trigger_count
|
self.summonDataMap[i].statCount = data[i].stat_count
|
||||||
self.summonDataMap[k].wishId = v.wish_id
|
self.summonDataMap[i].triggerCount = data[i].trigger_count
|
||||||
self.summonDataMap[k].wishCount = v.wish_count
|
self.summonDataMap[i].wishId = data[i].wish_id
|
||||||
|
self.summonDataMap[i].wishCount = data[i].wish_count
|
||||||
|
else
|
||||||
|
self.summonDataMap[i].freeCount = 0
|
||||||
|
self.summonDataMap[i].adCount = 0
|
||||||
|
self.summonDataMap[i].statCount = 0
|
||||||
|
self.summonDataMap[i].triggerCount = 0
|
||||||
|
self.summonDataMap[i].wishId = 0
|
||||||
|
self.summonDataMap[i].wishCount = 0
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- int64 free_count = 1; // 今日免费次数
|
-- int64 free_count = 1; // 今日免费次数
|
||||||
-- int64 ad_count = 2; // 今日广告免费次数
|
-- int64 ad_count = 2; // 今日广告免费次数
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user