Merge branch 'fang/dungeon' of http://git.juzugame.com/b6-client/b6-lua into fang/dungeon
# Conflicts: # lua/app/config/chapter_dungeon_gold.lua # lua/app/module/dungeon/dungeon_manager.lua
This commit is contained in:
commit
f20f435227
@ -25,7 +25,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[2]={
|
[2]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -53,7 +53,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[3]={
|
[3]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -81,7 +81,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[4]={
|
[4]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -109,7 +109,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[5]={
|
[5]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -137,7 +137,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[6]={
|
[6]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -165,7 +165,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[7]={
|
[7]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -193,7 +193,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[8]={
|
[8]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -221,7 +221,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[9]={
|
[9]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -249,7 +249,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[10]={
|
[10]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -277,7 +277,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[11]={
|
[11]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -305,7 +305,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[12]={
|
[12]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -333,7 +333,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[13]={
|
[13]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -361,7 +361,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[14]={
|
[14]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -389,7 +389,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[15]={
|
[15]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -417,7 +417,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[16]={
|
[16]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -445,7 +445,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[17]={
|
[17]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -473,7 +473,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[18]={
|
[18]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -501,7 +501,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[19]={
|
[19]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -529,7 +529,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[20]={
|
[20]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -557,7 +557,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[21]={
|
[21]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -585,7 +585,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[22]={
|
[22]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -613,7 +613,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[23]={
|
[23]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -641,7 +641,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[24]={
|
[24]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -669,7 +669,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[25]={
|
[25]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -697,7 +697,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[26]={
|
[26]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -725,7 +725,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[27]={
|
[27]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -753,7 +753,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[28]={
|
[28]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -781,7 +781,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[29]={
|
[29]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -809,7 +809,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
},
|
},
|
||||||
[30]={
|
[30]={
|
||||||
["scene"]="bg_11",
|
["scene"]="bg_11",
|
||||||
@ -837,7 +837,7 @@ local chapter_dungeon_gold = {
|
|||||||
["num"]=1000,
|
["num"]=1000,
|
||||||
["num_for_nothing"]="VwhcAw=="
|
["num_for_nothing"]="VwhcAw=="
|
||||||
},
|
},
|
||||||
["wave_limit"]=5
|
["wave_limit"]=15
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
local config = {
|
local config = {
|
||||||
|
|||||||
@ -38,7 +38,7 @@ end
|
|||||||
function DungeonManager:reqChallengeGold(id)
|
function DungeonManager:reqChallengeGold(id)
|
||||||
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
||||||
-- 判断次数
|
-- 判断次数
|
||||||
if DataManager.DungeonData:getRemainTimes(moduleKey) <= 0 then
|
if not (DataManager.DungeonData:getRemainTimes(moduleKey) > 0) then
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -92,7 +92,7 @@ end
|
|||||||
function DungeonManager:reqSweepGold(id)
|
function DungeonManager:reqSweepGold(id)
|
||||||
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
||||||
-- 判断次数
|
-- 判断次数
|
||||||
if DataManager.DungeonData:getRemainTimes(moduleKey) <= 0 then
|
if not (DataManager.DungeonData:getRemainTimes(moduleKey) > 0) then
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -125,7 +125,7 @@ end
|
|||||||
function DungeonManager:reqChallengeShards(id)
|
function DungeonManager:reqChallengeShards(id)
|
||||||
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_GOLD
|
||||||
-- 判断次数
|
-- 判断次数
|
||||||
if DataManager.DungeonData:getRemainTimes(moduleKey) <= 0 then
|
if not (DataManager.DungeonData:getRemainTimes(moduleKey) > 0) then
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -178,7 +178,7 @@ end
|
|||||||
function DungeonManager:reqSweepShards(id)
|
function DungeonManager:reqSweepShards(id)
|
||||||
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_SHARDS
|
local moduleKey = ModuleManager.MODULE_KEY.DUNGEON_SHARDS
|
||||||
-- 判断次数
|
-- 判断次数
|
||||||
if DataManager.DungeonData:getRemainTimes(moduleKey) <= 0 then
|
if not (DataManager.DungeonData:getRemainTimes(moduleKey) > 0) then
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE_DESC_1))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
@ -39,7 +39,6 @@ function DungeonBoardCell:refreshInfo()
|
|||||||
self.txOpen:setText(DataManager.DungeonData:getOpenTimeDesc(self.moduleKey))
|
self.txOpen:setText(DataManager.DungeonData:getOpenTimeDesc(self.moduleKey))
|
||||||
self.icon:setSprite(DataManager.DungeonData:getIcon(self.moduleKey))
|
self.icon:setSprite(DataManager.DungeonData:getIcon(self.moduleKey))
|
||||||
-- self.baseObject:setTexture("assets/arts/textures/background/fund/fund_bg_1.png")
|
-- self.baseObject:setTexture("assets/arts/textures/background/fund/fund_bg_1.png")
|
||||||
-- self.iconBuff:setSprite(GConst.ATLAS_PATH.ICON_BUFF, "")
|
|
||||||
|
|
||||||
if DataManager.DungeonData:isActive(self.moduleKey) then
|
if DataManager.DungeonData:isActive(self.moduleKey) then
|
||||||
self.btnStart:setVisible(true)
|
self.btnStart:setVisible(true)
|
||||||
@ -81,7 +80,6 @@ function DungeonBoardCell:refreshRewards()
|
|||||||
self.scrollRect:addRefreshCallback(function(index, cell)
|
self.scrollRect:addRefreshCallback(function(index, cell)
|
||||||
cell:refreshItemById(rewards[index], 0)
|
cell:refreshItemById(rewards[index], 0)
|
||||||
end)
|
end)
|
||||||
self.scrollRect:setTotalCount(#rewards)
|
|
||||||
else
|
else
|
||||||
rewards = DataManager.DungeonData:getBoardShowRewardIcon(self.moduleKey)
|
rewards = DataManager.DungeonData:getBoardShowRewardIcon(self.moduleKey)
|
||||||
-- 展示icon图片
|
-- 展示icon图片
|
||||||
@ -91,8 +89,8 @@ function DungeonBoardCell:refreshRewards()
|
|||||||
cell:setVisibleFragment(false)
|
cell:setVisibleFragment(false)
|
||||||
cell:setTouchEnable(false)
|
cell:setTouchEnable(false)
|
||||||
end)
|
end)
|
||||||
self.scrollRect:setTotalCount(#rewards)
|
|
||||||
end
|
end
|
||||||
|
self.scrollRect:setTotalCount(#rewards)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonBoardCell:refreshCountdown(txCountdown)
|
function DungeonBoardCell:refreshCountdown(txCountdown)
|
||||||
|
|||||||
@ -39,9 +39,14 @@ function DungeonDifficultyUI:onLoadRootComplete()
|
|||||||
self.arrowRight = self.uiMap["dungeon_difficulty_ui.bg.select.chapter.arrow_right"]
|
self.arrowRight = self.uiMap["dungeon_difficulty_ui.bg.select.chapter.arrow_right"]
|
||||||
self.txDesc = self.uiMap["dungeon_difficulty_ui.bg.tx_desc"]
|
self.txDesc = self.uiMap["dungeon_difficulty_ui.bg.tx_desc"]
|
||||||
self.txTitle = self.uiMap["dungeon_difficulty_ui.bg.title.title_text"]
|
self.txTitle = self.uiMap["dungeon_difficulty_ui.bg.title.title_text"]
|
||||||
|
self.buffObj = self.uiMap["dungeon_difficulty_ui.bg.boss_buff"]
|
||||||
|
self.txbuff = self.uiMap["dungeon_difficulty_ui.bg.boss_buff.tx_buff"]
|
||||||
|
self.iconBuff = self.uiMap["dungeon_difficulty_ui.bg.boss_buff.icon_buff"]
|
||||||
|
self.rewardFirst = self.uiMap["dungeon_difficulty_ui.bg.rewards.reward_first"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||||
|
self.rewardPass = self.uiMap["dungeon_difficulty_ui.bg.rewards.reward_pass"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
|
||||||
|
self.txFrist = self.uiMap["dungeon_difficulty_ui.bg.rewards.reward_first.tx_first"]
|
||||||
|
|
||||||
self.txTitle:setText(DataManager.DungeonData:getTitle(self.module))
|
self.txTitle:setText(DataManager.DungeonData:getTitle(self.module))
|
||||||
self.txDesc:setText(DataManager.DungeonData:getRule(self.module))
|
|
||||||
self.txDifficulty:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_STAGE))
|
self.txDifficulty:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_STAGE))
|
||||||
self.txStart:setText(I18N:getGlobalText(I18N.GlobalConst.START_DESC))
|
self.txStart:setText(I18N:getGlobalText(I18N.GlobalConst.START_DESC))
|
||||||
self.txSweep:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
|
self.txSweep:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
|
||||||
@ -49,16 +54,7 @@ function DungeonDifficultyUI:onLoadRootComplete()
|
|||||||
self.txStartCost:setText("-"..GFunc.getRewardNum(cost))
|
self.txStartCost:setText("-"..GFunc.getRewardNum(cost))
|
||||||
self.txSweepCost:setText("-"..GFunc.getRewardNum(cost))
|
self.txSweepCost:setText("-"..GFunc.getRewardNum(cost))
|
||||||
self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, DataManager.DungeonData:getRemainTimes(self.module)))
|
self.txTime:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, DataManager.DungeonData:getRemainTimes(self.module)))
|
||||||
-- todo 奖励
|
self.txFrist:setText(I18N:getGlobalText(I18N.GlobalConst.FIRST_PASS))
|
||||||
self.scrollRect = self.uiMap[""]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
|
|
||||||
self.scrollRect:addInitCallback(function()
|
|
||||||
return GConst.TYPEOF_LUA_CLASS.REWARD_CELL
|
|
||||||
end)
|
|
||||||
self.scrollRect:addRefreshCallback(function(index, cell)
|
|
||||||
cell:refreshByConfig()
|
|
||||||
end)
|
|
||||||
self.scrollRect:clearCells()
|
|
||||||
self.scrollRect:setTotalCount(0)
|
|
||||||
|
|
||||||
self:refreshDifficulty()
|
self:refreshDifficulty()
|
||||||
|
|
||||||
@ -96,6 +92,34 @@ function DungeonDifficultyUI:refreshDifficulty()
|
|||||||
self.arrowRight:setActive(not self:isCanChallengeMaxId())
|
self.arrowRight:setActive(not self:isCanChallengeMaxId())
|
||||||
self.btnSweep:setActive(self:isCanSweepId())
|
self.btnSweep:setActive(self:isCanSweepId())
|
||||||
self.txLevel:setText(tostring(self.curId))
|
self.txLevel:setText(tostring(self.curId))
|
||||||
|
|
||||||
|
-- buff or desc
|
||||||
|
local buff = DataManager.DungeonData:getBossBuff(self.module, self.curId)
|
||||||
|
local desc = DataManager.DungeonData:getRule(self.module)
|
||||||
|
if buff then
|
||||||
|
self.txDesc:setActive(false)
|
||||||
|
self.buffObj:setActive(true)
|
||||||
|
self.txbuff:setText("")
|
||||||
|
self.iconBuff:setSprite("","")
|
||||||
|
elseif desc then
|
||||||
|
self.txDesc:setActive(true)
|
||||||
|
self.buffObj:setActive(false)
|
||||||
|
self.txDesc:setText(desc)
|
||||||
|
else
|
||||||
|
self.txDesc:setActive(false)
|
||||||
|
self.buffObj:setActive(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 奖励
|
||||||
|
local rewardFirst = DataManager.DungeonData:getFirstReward(self.module, self.curId)
|
||||||
|
local rewardPass = DataManager.DungeonData:getPassReward(self.module, self.curId)
|
||||||
|
if not self:isCanSweepId() and rewardFirst then
|
||||||
|
self.rewardFirst:setVisible(true)
|
||||||
|
self.rewardFirst:refreshByConfig(rewardFirst)
|
||||||
|
else
|
||||||
|
self.rewardFirst:setVisible(false)
|
||||||
|
end
|
||||||
|
self.rewardPass:refreshByConfig(rewardPass)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 是否是可扫荡关卡
|
-- 是否是可扫荡关卡
|
||||||
|
|||||||
@ -303,6 +303,11 @@ function DungeonData:getRule(moduleKey)
|
|||||||
return self.dataDungeons[moduleKey]:getRuleString()
|
return self.dataDungeons[moduleKey]:getRuleString()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 获取副本当前关卡buff
|
||||||
|
function DungeonData:getBossBuff(moduleKey, id)
|
||||||
|
return self.dataDungeons[moduleKey]:getBossBuff(id)
|
||||||
|
end
|
||||||
|
|
||||||
-- 获取副本开启时间描述
|
-- 获取副本开启时间描述
|
||||||
function DungeonData:getOpenTimeDesc(moduleKey)
|
function DungeonData:getOpenTimeDesc(moduleKey)
|
||||||
return self.dataDungeons[moduleKey]:getOpenWeekString()
|
return self.dataDungeons[moduleKey]:getOpenWeekString()
|
||||||
|
|||||||
@ -31,8 +31,8 @@ function DungeonDataBaseComp:getRuleString()
|
|||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 获取副本boss抗性描述(碎片副本)
|
-- 获取副本boss抗性(碎片副本)
|
||||||
function DungeonDataBaseComp:getBossBuffString()
|
function DungeonDataBaseComp:getBossBuff(id)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ function DungeonGoldDataComp:getModuleKey()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonGoldDataComp:getOpenWeekCycle()
|
function DungeonGoldDataComp:getOpenWeekCycle()
|
||||||
return {2,4,6,7}
|
return {1,2,3,4,5,6,7}
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonGoldDataComp:getConfigName()
|
function DungeonGoldDataComp:getConfigName()
|
||||||
|
|||||||
@ -26,7 +26,7 @@ function DungeonShardsDataComp:getModuleKey()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function DungeonShardsDataComp:getOpenWeekCycle()
|
function DungeonShardsDataComp:getOpenWeekCycle()
|
||||||
return {1,3,5,7}
|
return {1,2,3,4,5,6,7}
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonShardsDataComp:getConfigName()
|
function DungeonShardsDataComp:getConfigName()
|
||||||
@ -37,14 +37,15 @@ function DungeonShardsDataComp:getTitleString()
|
|||||||
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_SHARDS_TITLE)
|
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_SHARDS_TITLE)
|
||||||
end
|
end
|
||||||
|
|
||||||
function DungeonShardsDataComp:getBossBuffString()
|
|
||||||
return I18N:getText("buff", buffId, "desc")
|
|
||||||
end
|
|
||||||
|
|
||||||
function DungeonShardsDataComp:getOpenWeekString()
|
function DungeonShardsDataComp:getOpenWeekString()
|
||||||
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_SHARDS_OPEN)
|
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_SHARDS_OPEN)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function DungeonShardsDataComp:getBossBuff(id)
|
||||||
|
Logger.printTable(self:getConfig()[id])
|
||||||
|
return self:getConfig()[id].effect
|
||||||
|
end
|
||||||
|
|
||||||
function DungeonShardsDataComp:getIcon()
|
function DungeonShardsDataComp:getIcon()
|
||||||
return GConst.ATLAS_PATH.COMMON,"common_dec_3"
|
return GConst.ATLAS_PATH.COMMON,"common_dec_3"
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user