符文副本

This commit is contained in:
puxuan 2025-11-11 10:45:44 +08:00
parent a99eb5bd25
commit 3314a7062d
34 changed files with 31591 additions and 4012 deletions

View File

@ -111,7 +111,7 @@ function ConfigManager:preLoadConfig()
end end
handleMonsterGrow("monster_chapter") handleMonsterGrow("monster_chapter")
handleMonsterGrow("monster_daily_challenge") handleMonsterGrow("monster_daily_challenge")
-- handleMonsterGrow("monster_dungeon_gold") handleMonsterGrow("monster_dungeon_rune")
-- handleMonsterGrow("monster_dungeon_shards") -- handleMonsterGrow("monster_dungeon_shards")
-- handleMonsterGrow("monster_dungeon_equip") -- handleMonsterGrow("monster_dungeon_equip")
-- handleMonsterGrow("monster_dungeon_armor") -- handleMonsterGrow("monster_dungeon_armor")

View File

@ -52,6 +52,7 @@ function DataManager:init()
self:initManager("PrivilegeCardData", "app/userdata/privilege_card/privilege_card_data") self:initManager("PrivilegeCardData", "app/userdata/privilege_card/privilege_card_data")
-- 日常副本 -- 日常副本
self:initManager("DungeonDailyData", "app/userdata/dungeon/dungeon_daily_data") self:initManager("DungeonDailyData", "app/userdata/dungeon/dungeon_daily_data")
self:initManager("DungeonRuneData", "app/userdata/dungeon/dungeon_rune_data")
end end
function DataManager:initManager(name, path) function DataManager:initManager(name, path)
@ -185,6 +186,7 @@ function DataManager:initWithServerData(data)
-- 副本 -- 副本
self.DungeonData:init() self.DungeonData:init()
self.DungeonDailyData:init(data.dungeon) self.DungeonDailyData:init(data.dungeon)
self.DungeonRuneData:init(data.dungeon)
-- 商店礼包都初始化完了后检查一下每日红点 -- 商店礼包都初始化完了后检查一下每日红点
-- self.ShopData:checkShopDiscountRedPoint() -- self.ShopData:checkShopDiscountRedPoint()

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: df7b334ee782a4d4898f4b43b5b6336e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

File diff suppressed because it is too large Load Diff

View File

@ -502,9 +502,30 @@ local const = {
}, },
["summon_skip_2"]={ ["summon_skip_2"]={
["value"]=100 ["value"]=100
},
["dungeon_rune_lvlimit"]={
["value"]=20
},
["dungeon_rune_revival"]={
["value"]=5
},
["dungeon_rune_cost"]={
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=200,
["num_for_nothing"]="VAhc"
}
}
},
["dungeon_rune_buylimit"]={
["value"]=5
} }
} }
local config = { local config = {
data=const,count=83 data=const,count=87
} }
return config return config

View File

@ -112,9 +112,13 @@ local func_open = {
["fund_chapter"]={ ["fund_chapter"]={
["stage"]=2, ["stage"]=2,
["pop_ups"]=1 ["pop_ups"]=1
},
["runes_open"]={
["stage"]=20,
["pop_ups"]=1
} }
} }
local config = { local config = {
data=func_open,count=28 data=func_open,count=29
} }
return config return config

View File

@ -1338,6 +1338,16 @@ local item = {
} }
} }
}, },
[52]={
["type"]=2,
["qlt"]=4,
["icon"]="6"
},
[53]={
["type"]=2,
["qlt"]=4,
["icon"]="7"
},
[13001]={ [13001]={
["type"]=5, ["type"]=5,
["inbag"]=1, ["inbag"]=1,
@ -1575,6 +1585,6 @@ local item = {
} }
} }
local config = { local config = {
data=item,count=75 data=item,count=77
} }
return config return config

File diff suppressed because it is too large Load Diff

View File

@ -200,6 +200,12 @@ local item = {
[51]={ [51]={
["name"]="能量饮料自选宝箱" ["name"]="能量饮料自选宝箱"
}, },
[52]={
["name"]="银羽毛"
},
[53]={
["name"]="金羽毛"
},
[13001]={ [13001]={
["name"]="熔芯", ["name"]="熔芯",
["desc"]="凑齐可解锁或升级。" ["desc"]="凑齐可解锁或升级。"

View File

@ -108,10 +108,11 @@ BattleConst.FORMATION_TYPE = {
DUNGEON = "3",-- 日常副本 DUNGEON = "3",-- 日常副本
ARENA_ATTACK = "4",-- 竞技场进攻 ARENA_ATTACK = "4",-- 竞技场进攻
ARENA_DEFEND = "5",-- 竞技场防守 ARENA_DEFEND = "5",-- 竞技场防守
DUNGEON_RUNE = "6", -- 符文副本
DUNGEON_WEAPON = "41", -- 武器副本 DUNGEON_WEAPON = "41", -- 武器副本
DUNGEON_ARMOR = "51", -- 支线副本 DUNGEON_ARMOR = "51", -- 支线副本
BOSS_RUSH = "61", -- boss rush BOSS_RUSH = "61", -- boss rush
DUNGEON_RUNE = "71", -- 符文副本 -- DUNGEON_RUNE = "71", -- 符文副本
} }
BattleConst.TYPEOF_LUA_COMP = { BattleConst.TYPEOF_LUA_COMP = {

View File

@ -15,14 +15,12 @@ function BattleControllerDungeonRune:getChapterConfig()
end end
function BattleControllerDungeonRune:getChapterId() function BattleControllerDungeonRune:getChapterId()
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) return DataManager.DungeonRuneData:getCurFightChapterId()
return runeData:getCurFightChapterId()
end end
function BattleControllerDungeonRune:initOther() function BattleControllerDungeonRune:initOther()
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.canRebirthTimes = 1 -- 每次只能复活一次 self.canRebirthTimes = 1 -- 每次只能复活一次
self.addRoundCount = runeData:getRebirthAddRoundCount() self.addRoundCount = DataManager.DungeonRuneData:getRebirthAddRoundCount()
self.dungeonRuneRemainRoundCount = self:getChapterConfig()[self.chapterId].round or 1 self.dungeonRuneRemainRoundCount = self:getChapterConfig()[self.chapterId].round or 1
self.dungeonRuneMaxRoundCount = self.dungeonRuneRemainRoundCount self.dungeonRuneMaxRoundCount = self.dungeonRuneRemainRoundCount
@ -31,7 +29,7 @@ function BattleControllerDungeonRune:initOther()
self.battleUI:refreshWave(desc, GConst.ATLAS_PATH.BATTLE, "battle_dec_2") self.battleUI:refreshWave(desc, GConst.ATLAS_PATH.BATTLE, "battle_dec_2")
end end
self.runeMaxLv = runeData:getBattleMaxlv() or 1 self.runeMaxLv = DataManager.DungeonRuneData:getBattleMaxlv() or 1
self.battleData:setMaxBattleLv(self.runeMaxLv) self.battleData:setMaxBattleLv(self.runeMaxLv)
end end
@ -428,10 +426,9 @@ function BattleControllerDungeonRune:postWaveOver(atkDead, isQuit)
local duration = self.waveDurationTime local duration = self.waveDurationTime
local totalTime = self.totalDurationTime local totalTime = self.totalDurationTime
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local startTimes = DataManager.DungeonRuneData:getChapterFightCount(self.chapterId)
local startTimes = runeData:getChapterFightCount(self.chapterId)
local isFirstWin = false local isFirstWin = false
if runeData:getPassedMaxId() < self.chapterId and self.victory then if DataManager.DungeonRuneData:getPassedMaxId() < self.chapterId and self.victory then
isFirstWin = true isFirstWin = true
end end
@ -441,9 +438,8 @@ function BattleControllerDungeonRune:postWaveOver(atkDead, isQuit)
end end
function BattleControllerDungeonRune:postFightStart() function BattleControllerDungeonRune:postFightStart()
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local startTimes = DataManager.DungeonRuneData:getChapterFightCount(self.chapterId)
local startTimes = runeData:getChapterFightCount(self.chapterId) local unlockMaxChapter = DataManager.DungeonRuneData:getPassedMaxId() + 1
local unlockMaxChapter = runeData:getPassedMaxId() + 1
BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, self:getWaveIndex(), self.chapterId, unlockMaxChapter, startTimes) BIReport:postFightBegin(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, self:getWaveIndex(), self.chapterId, unlockMaxChapter, startTimes)
end end
@ -461,8 +457,7 @@ function BattleControllerDungeonRune:getRuneTaskNumByType(taskInfo)
end end
function BattleControllerDungeonRune:getRuneTaskAllOver() function BattleControllerDungeonRune:getRuneTaskAllOver()
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(self.chapterId)
local chapterCondition = runeData:getChapterCondition(self.chapterId)
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self, chapterCondition) local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self, chapterCondition)
local taskOver = true local taskOver = true
for index, info in pairs(taskProgress) do for index, info in pairs(taskProgress) do

View File

@ -1,30 +1,35 @@
local DungeonConst = {} local DungeonConst = {}
DungeonConst.MODULE_KEY_DUNGEON_DAILY = "dungeon_daily" DungeonConst.MODULE_KEY_DUNGEON_DAILY = "dungeon_gold"
DungeonConst.DUNGEON_DAILY_TYPE = { DungeonConst.DUNGEON_DAILY_TYPE = {
GOLD = 1, GOLD = 1,
MATERIAL = 2 MATERIAL = 2,
RUNE = 3,
} }
-- 对应dungeon表id -- 对应dungeon表id
DungeonConst.IDS = { DungeonConst.IDS = {
[DungeonConst.MODULE_KEY_DUNGEON_DAILY] = 1, [DungeonConst.MODULE_KEY_DUNGEON_DAILY] = 1,
[ModuleManager.MODULE_KEY.RUNES_OPEN] = 2,
} }
-- 标题 -- 标题
DungeonConst.STR_TITLE = { DungeonConst.STR_TITLE = {
[DungeonConst.MODULE_KEY_DUNGEON_DAILY] = I18N.GlobalConst.DUNGEON_TITLE_1, [DungeonConst.MODULE_KEY_DUNGEON_DAILY] = I18N.GlobalConst.DUNGEON_TITLE_1,
[ModuleManager.MODULE_KEY.RUNES_OPEN] = I18N.GlobalConst.DUNGEON_RUNE_TITLE,
} }
-- 帮助信息 -- 帮助信息
DungeonConst.STR_HELP = { DungeonConst.STR_HELP = {
[DungeonConst.MODULE_KEY_DUNGEON_DAILY] = I18N.GlobalConst.DUNGEON_HELP_1, [DungeonConst.MODULE_KEY_DUNGEON_DAILY] = I18N.GlobalConst.DUNGEON_HELP_1,
[ModuleManager.MODULE_KEY.RUNES_OPEN] = I18N.GlobalConst.DUNGEON_RUNE_HELP,
} }
-- banner名称 -- banner名称
DungeonConst.IMG_BANNER = { DungeonConst.IMG_BANNER = {
[DungeonConst.MODULE_KEY_DUNGEON_DAILY] = "dungeon_banner_3", [DungeonConst.MODULE_KEY_DUNGEON_DAILY] = "dungeon_banner_3",
[ModuleManager.MODULE_KEY.RUNES_OPEN] = "dungeon_banner_4",
} }
-- 副本排行榜类型,客户端自定义 -- 副本排行榜类型,客户端自定义

View File

@ -5,14 +5,13 @@ function DungeonRuneManager:showMainUI()
end end
function DungeonRuneManager:showFightUI(id) function DungeonRuneManager:showFightUI(id)
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) if not DataManager.DungeonRuneData:canFight(id) then
if not runeData:canFight(id) then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE)) GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
return return
end end
local params = {id = id} local params = {id = id}
local isBoss = runeData:isBossChapter(id) local isBoss = DataManager.DungeonRuneData:isBossChapter(id)
if isBoss then if isBoss then
UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_boss_fight_ui", params) UIManager:showUI("app/ui/dungeon_rune/dungeon_rune_boss_fight_ui", params)
else else
@ -34,13 +33,12 @@ function DungeonRuneManager:showRoundTipUI(round)
end end
function DungeonRuneManager:reqFight(id) function DungeonRuneManager:reqFight(id)
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) if not DataManager.DungeonRuneData:canFight(id) then
if not runeData:canFight(id) then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE)) GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
return return
end end
local passed = runeData:passedChapter(id) local passed = DataManager.DungeonRuneData:passedChapter(id)
if not passed and not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GLOD_WING, 1, true) then if not passed and not GFunc.checkCost(GConst.ItemConst.ITEM_ID_GLOD_WING, 1, true) then
return return
end end
@ -52,7 +50,7 @@ function DungeonRuneManager:reqFight(id)
table.insert(heroes, heroId) table.insert(heroes, heroId)
end end
end end
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeStartReq, {id = id, heroes = heroes}, {}, self.rspFight, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_START) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeStartReq, {id = id, heroes = heroes}, self.rspFight, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_START)
end end
function DungeonRuneManager:rspFight(result) function DungeonRuneManager:rspFight(result)
@ -61,8 +59,7 @@ function DungeonRuneManager:rspFight(result)
return return
end end
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) DataManager.DungeonRuneData:setCurFightChapterId(result.reqData.id)
runeData:setCurFightChapterId(result.reqData.id)
local params = { local params = {
atkFormation = {} atkFormation = {}
} }
@ -90,21 +87,20 @@ function DungeonRuneManager:reqFightSettlement(chapterId, combatReport, taskProg
combatReport = combatReport, combatReport = combatReport,
remainRound = remainRound, remainRound = remainRound,
} }
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeSettlementReq, parmas, {}, self.rspFightSettlement, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SETTLEMENT) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeSettlementReq, parmas, self.rspFightSettlement, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SETTLEMENT)
end end
function DungeonRuneManager:rspFightSettlement(result) function DungeonRuneManager:rspFightSettlement(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then if result.err_code == GConst.ERROR_STR.SUCCESS then
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local passId = DataManager.DungeonRuneData:getPassedMaxId()
local passId = runeData:getPassedMaxId()
if result.reqData then if result.reqData then
if result.reqData.win then if result.reqData.win then
runeData:updatePassedMaxId(result.max_id) DataManager.DungeonRuneData:updatePassedMaxId(result.max_id)
runeData:updatePassRound(result.reqData.id, result.reqData.task_stat[GConst.BattleConst.BATTLE_TASK_FIELD.TOTAL_TURN] or 0) DataManager.DungeonRuneData:updatePassRound(result.reqData.id, result.reqData.task_stat[GConst.BattleConst.BATTLE_TASK_FIELD.TOTAL_TURN] or 0)
end end
ModuleManager.BattleManager:showBattleRuneResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, result.rewards, result.reqData.combatReport, result.reqData.remainRound) ModuleManager.BattleManager:showBattleRuneResultUI(GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE, result.rewards, result.reqData.combatReport, result.reqData.remainRound)
end end
if passId ~= runeData:getPassedMaxId() then if passId ~= DataManager.DungeonRuneData:getPassedMaxId() then
local data = {} local data = {}
data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr() data.dungeon_progress = DataManager.DungeonData:getDungeonBIStr()
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data) CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)
@ -116,7 +112,7 @@ function DungeonRuneManager:rspFightSettlement(result)
ModuleManager.TaskManager:addFightTaskProgress(taskStat) ModuleManager.TaskManager:addFightTaskProgress(taskStat)
end end
end end
runeData:setDirty() DataManager.DungeonRuneData:setDirty()
end end
end end
@ -125,24 +121,22 @@ function DungeonRuneManager:reqSweep(id)
return return
end end
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) if not DataManager.DungeonRuneData:canSweep(id) then
if not runeData:canSweep(id) then
return return
end end
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneFarmReq, {id = id}, {}, self.rspSweep, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SWEEP) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneFarmReq, {id = id}, self.rspSweep, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_SWEEP)
end end
function DungeonRuneManager:rspSweep(result) function DungeonRuneManager:rspSweep(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then if result.err_code == GConst.ERROR_STR.SUCCESS then
GFunc.showRewardBox(result.rewards) GFunc.showRewardBox(result.rewards)
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) DataManager.DungeonRuneData:setDirty()
runeData:setDirty()
end end
end end
function DungeonRuneManager:reqRebirth(isHpOver) function DungeonRuneManager:reqRebirth(isHpOver)
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneAdReq, {}, {}, self.rspRebirth) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneAdReq, {}, self.rspRebirth)
end end
function DungeonRuneManager:rspRebirth(result) function DungeonRuneManager:rspRebirth(result)
@ -166,7 +160,7 @@ function DungeonRuneManager:reqFormation(formation)
local params = { local params = {
heroes = heroes heroes = heroes
} }
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeHeroesReq, params, {}, self.rspFormation) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneChallengeHeroesReq, params, self.rspFormation)
end end
function DungeonRuneManager:rspFormation(result) function DungeonRuneManager:rspFormation(result)
@ -203,20 +197,18 @@ function DungeonRuneManager:reqBuySliverWing(count)
if not count then if not count then
return return
end end
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local cost = DataManager.DungeonRuneData:getBuySliverCost()
local cost = runeData:getBuySliverCost()
if not GFunc.checkCost(cost.id, cost.num * count, true) then if not GFunc.checkCost(cost.id, cost.num * count, true) then
return return
end end
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneBuySliverReq, {buy_count = count}, {}, self.rspBuySliverWing, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_BUY_WING) self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterRuneBuySliverReq, {buy_count = count}, self.rspBuySliverWing, BIReport.ITEM_GET_TYPE.DUNGEON_RUNE_BUY_WING)
end end
function DungeonRuneManager:rspBuySliverWing(result) function DungeonRuneManager:rspBuySliverWing(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then if result.err_code == GConst.ERROR_STR.SUCCESS then
GFunc.showRewardBox(result.rewards) GFunc.showRewardBox(result.rewards)
if result.reqData then if result.reqData then
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) DataManager.DungeonRuneData:addSliverWingBuyCount(result.reqData.buy_count)
runeData:addSliverWingBuyCount(result.reqData.buy_count)
end end
end end
end end

View File

@ -22,8 +22,8 @@ ItemConst.ITEM_ID_SEVEN_DAY_SCORE = 45 -- 七天乐积分
ItemConst.ITEM_ID_SEVEN_DAY_SCORE_2 = 45 -- 七天乐积分 ItemConst.ITEM_ID_SEVEN_DAY_SCORE_2 = 45 -- 七天乐积分
ItemConst.ITEM_ID_FOURTEEN_DAY_EXCHANGE = 51 ItemConst.ITEM_ID_FOURTEEN_DAY_EXCHANGE = 51
ItemConst.ITEM_ID_BOSS_RUSH = 52 ItemConst.ITEM_ID_BOSS_RUSH = 52
ItemConst.ITEM_ID_GLOD_WING = 49 ItemConst.ITEM_ID_GLOD_WING = 52
ItemConst.ITEM_ID_SLIVER_WING = 50 ItemConst.ITEM_ID_SLIVER_WING = 53
ItemConst.ITEM_ID_RUNES = 55 ItemConst.ITEM_ID_RUNES = 55
ItemConst.ITEM_ID_FULL_MOON = 56 ItemConst.ITEM_ID_FULL_MOON = 56
ItemConst.ITEM_ID_DUNGEON_TICKET_1 = 47 ItemConst.ITEM_ID_DUNGEON_TICKET_1 = 47

View File

@ -29,7 +29,6 @@ function BattleRuneResultUI:ctor(params)
end end
end end
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.chapterId = ModuleManager.BattleManager.battleController.chapterId self.chapterId = ModuleManager.BattleManager.battleController.chapterId
end end
@ -131,7 +130,7 @@ function BattleRuneResultUI:onRefresh()
end end
self:refreshUnitInfo() self:refreshUnitInfo()
if self.runeData:isBossChapter(self.chapterId) then if DataManager.DungeonRuneData:isBossChapter(self.chapterId) then
self.showRewardInfo = true self.showRewardInfo = true
self:refreshRewards() self:refreshRewards()
else else
@ -199,7 +198,7 @@ function BattleRuneResultUI:refreshTaskNode()
return return
end end
local chapterCondition = self.runeData:getChapterCondition(id) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(id)
if not chapterCondition then if not chapterCondition then
return return
end end
@ -212,7 +211,7 @@ function BattleRuneResultUI:refreshTaskNode()
if condition then if condition then
objs.cell:getBaseObject():setActive(true) objs.cell:getBaseObject():setActive(true)
local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress
local desc = self.runeData:getConditionDesc(condition) local desc = DataManager.DungeonRuneData:getConditionDesc(condition)
local over = false local over = false
if taskProgress[newIndex] then if taskProgress[newIndex] then
local info = taskProgress[newIndex] local info = taskProgress[newIndex]
@ -224,7 +223,7 @@ function BattleRuneResultUI:refreshTaskNode()
desc = desc .. string.format("<color=%s>(%s/%s)</color>", color, info.progress, info.totalProgress) desc = desc .. string.format("<color=%s>(%s/%s)</color>", color, info.progress, info.totalProgress)
end end
objs.cell:refresh(condition) objs.cell:refresh(condition)
objs.desc:setText(self.runeData:getConditionDesc(condition)) objs.desc:setText(DataManager.DungeonRuneData:getConditionDesc(condition))
if over then if over then
objs.descUnDone:setText(GConst.EMPTY_STRING) objs.descUnDone:setText(GConst.EMPTY_STRING)
objs.check:setVisible(true) objs.check:setVisible(true)
@ -283,9 +282,9 @@ function BattleRuneResultUI:refreshRewards()
self.rewardScrollRectComp:refillCells(rewardCount) self.rewardScrollRectComp:refillCells(rewardCount)
-- local id = self.chapterId -- local id = self.chapterId
-- self.descRoundMin:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, self.runeData:getChapterPassRound(id))) -- self.descRoundMin:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, DataManager.DungeonRuneData:getChapterPassRound(id)))
-- GFunc.centerImgAndTx(self.imgRoundmIn, self.descRoundMin, 10) -- GFunc.centerImgAndTx(self.imgRoundmIn, self.descRoundMin, 10)
-- self.imgRoundNew:setVisible(self.runeData:getTagRoundNew() == true) -- self.imgRoundNew:setVisible(DataManager.DungeonRuneData:getTagRoundNew() == true)
end end
function BattleRuneResultUI:refreshUnitInfo() function BattleRuneResultUI:refreshUnitInfo()

View File

@ -525,8 +525,7 @@ end
function BattleUI:refreshTaskNode() function BattleUI:refreshTaskNode()
if self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE then if self.battleController.battleType == GConst.BattleConst.BATTLE_TYPE.DUNGEON_RUNE then
self.taskNode:setLocalScale(0.6, 0.6, 0.6) self.taskNode:setLocalScale(0.6, 0.6, 0.6)
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(self.battleController.chapterId)
local chapterCondition = runeData:getChapterCondition(self.battleController.chapterId)
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self.battleController, chapterCondition) local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self.battleController, chapterCondition)
for index, cell in ipairs(self.taskCells) do for index, cell in ipairs(self.taskCells) do
local newIndex = index + 1 local newIndex = index + 1
@ -534,7 +533,7 @@ function BattleUI:refreshTaskNode()
if condition then if condition then
cell:getBaseObject():setActive(true) cell:getBaseObject():setActive(true)
local atlast, iconName = runeData:getConditionIcon(condition) local atlast, iconName = DataManager.DungeonRuneData:getConditionIcon(condition)
local taskNum = condition[3] or 0 local taskNum = condition[3] or 0
local over = false local over = false
if taskProgress[newIndex] then if taskProgress[newIndex] then

View File

@ -23,16 +23,16 @@ function HeroFormationComp:refresh()
if formation[i] then if formation[i] then
local heroEntity = DataManager.HeroData:getHeroById(formation[i]) local heroEntity = DataManager.HeroData:getHeroById(formation[i])
if heroEntity then if heroEntity then
heroCell:setVisible(true, 0.6) heroCell:setActive(true)
heroCell:refresh(heroEntity) heroCell:refresh(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId())
end) end)
else else
heroCell:setVisible(false) heroCell:setActive(false)
end end
else else
heroCell:setVisible(false) heroCell:setActive(false)
end end
end end
end end
@ -42,16 +42,16 @@ function HeroFormationComp:refreshByFormation(formation)
if formation[i] then if formation[i] then
local heroEntity = DataManager.HeroData:getHeroById(formation[i]) local heroEntity = DataManager.HeroData:getHeroById(formation[i])
if heroEntity then if heroEntity then
heroCell:setVisible(true, 0.6) heroCell:setActive(true)
heroCell:refresh(heroEntity) heroCell:refresh(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId())
end) end)
else else
heroCell:setVisible(false) heroCell:setActive(false)
end end
else else
heroCell:setVisible(false) heroCell:setActive(false)
end end
end end
end end
@ -60,13 +60,13 @@ function HeroFormationComp:refreshByEntitys(formation)
for i, heroCell in ipairs(self.heroCells) do for i, heroCell in ipairs(self.heroCells) do
local heroEntity = formation[i] local heroEntity = formation[i]
if heroEntity then if heroEntity then
heroCell:setVisible(true, 0.6) heroCell:setActive(true)
heroCell:refreshBriefInfo(heroEntity) heroCell:refreshBriefInfo(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity)
end) end)
else else
heroCell:setVisible(false) heroCell:setActive(false)
end end
end end
end end

View File

@ -54,13 +54,12 @@ function ResourceCell:show(itemId, hideAddImg)
self.addImg:setVisible(true) self.addImg:setVisible(true)
elseif itemId == GConst.ItemConst.ITEM_ID_SLIVER_WING then elseif itemId == GConst.ItemConst.ITEM_ID_SLIVER_WING then
self.baseObject:addClickListener(function() self.baseObject:addClickListener(function()
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
local reward = { local reward = {
type = GConst.REWARD_TYPE.ITEM, type = GConst.REWARD_TYPE.ITEM,
id = GConst.ItemConst.ITEM_ID_SLIVER_WING, id = GConst.ItemConst.ITEM_ID_SLIVER_WING,
num = 1 num = 1
} }
ModuleManager.CommonManager:showExchangeUI(1, runeData:getRemainSliverWingCount(), reward, runeData:getBuySliverCost(), function(count) ModuleManager.CommonManager:showExchangeUI(1, DataManager.DungeonRuneData:getRemainSliverWingCount(), reward, DataManager.DungeonRuneData:getBuySliverCost(), function(count)
ModuleManager.DungeonRuneManager:reqBuySliverWing(count) ModuleManager.DungeonRuneManager:reqBuySliverWing(count)
end) end)
end) end)

View File

@ -49,7 +49,8 @@ function DungeonCell:refresh(moduleKey)
cell:setActive(false) cell:setActive(false)
end end
end end
self.banner:setSprite(GConst.ATLAS_PATH.UI_DUNGEON, GConst.DungeonConst.IMG_BANNER[self.moduleKey]) -- self.banner:setSprite(GConst.ATLAS_PATH.UI_DUNGEON, GConst.DungeonConst.IMG_BANNER[self.moduleKey])
self.banner:setTexture("assets/arts/textures/background/dungeon/" .. GConst.DungeonConst.IMG_BANNER[self.moduleKey] .. ".png")
if DataManager.DungeonData:isOpen(self.moduleKey) then if DataManager.DungeonData:isOpen(self.moduleKey) then
self.infoNode:setVisible(true) self.infoNode:setVisible(true)
self.lockNode:setVisible(false) self.lockNode:setVisible(false)
@ -81,11 +82,14 @@ function DungeonCell:onClickGo()
end end
if self.moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY then if self.moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY then
ModuleManager.DungeonManager:showDungeonDaylyMainUI() ModuleManager.DungeonManager:showDungeonDaylyMainUI()
elseif self.moduleKey == ModuleManager.MODULE_KEY.RUNES_OPEN then
ModuleManager.DungeonRuneManager:showMainUI()
end end
end end
function DungeonCell:updateTime() function DungeonCell:updateTime()
if self.moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY then if self.moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY or
self.moduleKey == ModuleManager.MODULE_KEY.RUNES_OPEN then
local remainTime = Time:getTodaySurplusTime() local remainTime = Time:getTodaySurplusTime()
if self.remainTime ~= remainTime then if self.remainTime ~= remainTime then
self.remainTime = remainTime self.remainTime = remainTime

View File

@ -12,6 +12,9 @@ function DungeonComp:init()
self:bind(DataManager.DungeonDailyData.MaterialData, "isDirty", function() self:bind(DataManager.DungeonDailyData.MaterialData, "isDirty", function()
self:refresh() self:refresh()
end) end)
self:bind(DataManager.DungeonRuneData, "isDirty", function()
self:refresh()
end)
end end
function DungeonComp:refresh(moduleKey) function DungeonComp:refresh(moduleKey)

View File

@ -4,8 +4,7 @@ function RuneBattleTaskCell:refresh(desc, taskInfo, over)
local uiMap = self:getUIMap() local uiMap = self:getUIMap()
uiMap["task_cell.desc"]:setText(desc) uiMap["task_cell.desc"]:setText(desc)
uiMap["task_cell.check"]:setVisible(over) uiMap["task_cell.check"]:setVisible(over)
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) uiMap["task_cell.task_icon"]:setSprite(DataManager.DungeonRuneData:getConditionIcon(taskInfo))
uiMap["task_cell.task_icon"]:setSprite(runeData:getConditionIcon(taskInfo))
end end
return RuneBattleTaskCell return RuneBattleTaskCell

View File

@ -26,8 +26,7 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
bg:setVisible(chapterListCount ~= index) bg:setVisible(chapterListCount ~= index)
end end
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) local maxPassedId = DataManager.DungeonRuneData:getPassedMaxId()
local maxPassedId = runeData:getPassedMaxId()
local fightBg = uiMap["chapter_cell.touch_node.bg"] local fightBg = uiMap["chapter_cell.touch_node.bg"]
local curBg = uiMap["chapter_cell.touch_node.bg_cur"] local curBg = uiMap["chapter_cell.touch_node.bg_cur"]
local lightImg = uiMap["chapter_cell.touch_node.img_light"] local lightImg = uiMap["chapter_cell.touch_node.img_light"]
@ -37,7 +36,7 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
lightImg:setVisible(false) lightImg:setVisible(false)
sweep:setVisible(false) sweep:setVisible(false)
local passed = false local passed = false
local isBossChapter = runeData:isBossChapter(id) local isBossChapter = DataManager.DungeonRuneData:isBossChapter(id)
curBg:setVisible(isBossChapter) curBg:setVisible(isBossChapter)
fightBg:setVisible(not isBossChapter) fightBg:setVisible(not isBossChapter)
local curLayerDecs local curLayerDecs
@ -56,7 +55,7 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
curLayerDecs:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id)) curLayerDecs:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, id))
if maxPassedId >= id then -- 已通关的 if maxPassedId >= id then -- 已通关的
passed = true passed = true
local canSweep = runeData:canSweep(id) local canSweep = DataManager.DungeonRuneData:canSweep(id)
sweep:setVisible(canSweep) sweep:setVisible(canSweep)
if canSweep then if canSweep then
uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH)) uiMap["chapter_cell.touch_node.sweep_bg.tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
@ -65,10 +64,10 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
curMask:setVisible(false) curMask:setVisible(false)
curLayerDecs:setAnchoredPositionX(0) curLayerDecs:setAnchoredPositionX(0)
-- lightImg:setVisible(true) -- lightImg:setVisible(true)
-- descMinRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, runeData:getChapterPassRound(id))) -- descMinRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, DataManager.DungeonRuneData:getChapterPassRound(id)))
-- descMinRound:setVisible(true) -- descMinRound:setVisible(true)
else else
if runeData:canFight(id) then if DataManager.DungeonRuneData:canFight(id) then
curLock:setVisible(false) curLock:setVisible(false)
curMask:setVisible(false) curMask:setVisible(false)
curLayerDecs:setAnchoredPositionX(0) curLayerDecs:setAnchoredPositionX(0)
@ -86,7 +85,7 @@ function RuneChapterCell:refresh(id, index, isFinal, chapterListCount)
end end
end end
local rewards = runeData:getChapterRewards(id) local rewards = DataManager.DungeonRuneData:getChapterRewards(id)
local rewardCount = 0 local rewardCount = 0
for i, cell in ipairs(self.rewardCells) do for i, cell in ipairs(self.rewardCells) do
if rewards[i] then if rewards[i] then

View File

@ -19,8 +19,7 @@ function RuneTaskCell:refresh(taskInfo)
taskNum = taskParams2 or 0 taskNum = taskParams2 or 0
end end
local runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN) icon:setSprite(DataManager.DungeonRuneData:getConditionIcon(taskInfo))
icon:setSprite(runeData:getConditionIcon(taskInfo))
desc:setText(taskNum) desc:setText(taskNum)

View File

@ -15,8 +15,6 @@ function DungeonRuneBossFightUI:getPrefabPath()
end end
function DungeonRuneBossFightUI:ctor(params) function DungeonRuneBossFightUI:ctor(params)
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.id = params.id self.id = params.id
end end
@ -28,9 +26,9 @@ end
function DungeonRuneBossFightUI:_display() function DungeonRuneBossFightUI:_display()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
uiMap["dungeon_rune_boss_fight_ui.bg.title.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id)) uiMap["dungeon_rune_boss_fight_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id))
uiMap["dungeon_rune_boss_fight_ui.bg.btn_again.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_2)) uiMap["dungeon_rune_boss_fight_ui.bg.btn_again.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_2))
local spineName, spineScale = self.runeData:getChapterMonsterSpine(self.id) local spineName, spineScale = DataManager.DungeonRuneData:getChapterMonsterSpine(self.id)
local spineObject = uiMap["dungeon_rune_boss_fight_ui.bg.banner.ui_spine_obj"] local spineObject = uiMap["dungeon_rune_boss_fight_ui.bg.banner.ui_spine_obj"]
spineObject:setVisible(false) spineObject:setVisible(false)
spineObject:loadAssetAsync(spineName, function() spineObject:loadAssetAsync(spineName, function()
@ -39,7 +37,7 @@ function DungeonRuneBossFightUI:_display()
spineObject:setVisible(true) spineObject:setVisible(true)
end, true) end, true)
local i18Config = self.runeData:getChapterMonsterI18N(self.id) local i18Config = DataManager.DungeonRuneData:getChapterMonsterI18N(self.id)
uiMap["dungeon_rune_boss_fight_ui.bg.desc_1"]:setText(i18Config.name) uiMap["dungeon_rune_boss_fight_ui.bg.desc_1"]:setText(i18Config.name)
uiMap["dungeon_rune_boss_fight_ui.bg.desc_2"]:setText(i18Config.desc) uiMap["dungeon_rune_boss_fight_ui.bg.desc_2"]:setText(i18Config.desc)
@ -55,7 +53,7 @@ function DungeonRuneBossFightUI:_addListeners()
end) end)
uiMap["dungeon_rune_boss_fight_ui.bg.btn"]:addClickListener(function() uiMap["dungeon_rune_boss_fight_ui.bg.btn"]:addClickListener(function()
local passed = self.runeData:passedChapter(self.id) local passed = DataManager.DungeonRuneData:passedChapter(self.id)
if passed then if passed then
ModuleManager.DungeonRuneManager:reqSweep(self.id) ModuleManager.DungeonRuneManager:reqSweep(self.id)
else else
@ -69,7 +67,7 @@ function DungeonRuneBossFightUI:_addListeners()
end end
function DungeonRuneBossFightUI:_bind() function DungeonRuneBossFightUI:_bind()
self:bind(self.runeData, "isDirty", function() self:bind(DataManager.DungeonRuneData, "isDirty", function()
self:refreshFightBtn() self:refreshFightBtn()
end) end)
end end
@ -80,18 +78,18 @@ function DungeonRuneBossFightUI:refreshTargetInfo()
self.taskRuneCell = CellManager:addCellComp(uiMap["dungeon_rune_boss_fight_ui.bg.banner.rune_task_cell"], RUNE_TASK_CELL) self.taskRuneCell = CellManager:addCellComp(uiMap["dungeon_rune_boss_fight_ui.bg.banner.rune_task_cell"], RUNE_TASK_CELL)
end end
local chapterCondition = self.runeData:getChapterCondition(self.id) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(self.id)
if chapterCondition[1] then if chapterCondition[1] then
self.taskRuneCell:refresh(chapterCondition[1]) self.taskRuneCell:refresh(chapterCondition[1])
self.taskRuneCell:addClickListener(function() self.taskRuneCell:addClickListener(function()
ModuleManager.TipsManager:showDescTips(self.runeData:getConditionDesc(chapterCondition[1]), self.taskRuneCell:getBaseObject()) ModuleManager.TipsManager:showDescTips(DataManager.DungeonRuneData:getConditionDesc(chapterCondition[1]), self.taskRuneCell:getBaseObject())
end) end)
end end
end end
function DungeonRuneBossFightUI:refreshRewardInfo() function DungeonRuneBossFightUI:refreshRewardInfo()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
local passed = self.runeData:passedChapter(self.id) local passed = DataManager.DungeonRuneData:passedChapter(self.id)
local title = uiMap["dungeon_rune_boss_fight_ui.bg.desc_3"] local title = uiMap["dungeon_rune_boss_fight_ui.bg.desc_3"]
local descPassRound = uiMap["dungeon_rune_boss_fight_ui.bg.desc_4"] local descPassRound = uiMap["dungeon_rune_boss_fight_ui.bg.desc_4"]
@ -105,17 +103,17 @@ function DungeonRuneBossFightUI:refreshRewardInfo()
end end
end end
local rewards = self.runeData:getChapterRewards(self.id) local rewards = DataManager.DungeonRuneData:getChapterRewards(self.id)
if passed then if passed then
title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_4)) title:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_4))
-- local round = self.runeData:getChapterPassRound(self.id) -- local round = DataManager.DungeonRuneData:getChapterPassRound(self.id)
imgPassIcon:setActive(false) imgPassIcon:setActive(false)
descPassRound:setText(GConst.EMPTY_STRING) descPassRound:setText(GConst.EMPTY_STRING)
descPassRound:setAnchoredPositionX(0) descPassRound:setAnchoredPositionX(0)
-- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round)) -- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round))
-- imgPassIcon:setActive(true) -- imgPassIcon:setActive(true)
GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5) GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5)
rewards = self.runeData:getChapterSweepRewards(self.id) rewards = DataManager.DungeonRuneData:getChapterSweepRewards(self.id)
else else
imgPassIcon:setActive(false) imgPassIcon:setActive(false)
descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_5)) descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_5))
@ -145,7 +143,7 @@ function DungeonRuneBossFightUI:refreshFightBtn()
local num = uiMap["dungeon_rune_boss_fight_ui.bg.btn.num"] local num = uiMap["dungeon_rune_boss_fight_ui.bg.btn.num"]
local desc = uiMap["dungeon_rune_boss_fight_ui.bg.btn.desc"] local desc = uiMap["dungeon_rune_boss_fight_ui.bg.btn.desc"]
local passed = self.runeData:passedChapter(self.id) local passed = DataManager.DungeonRuneData:passedChapter(self.id)
if passed then if passed then
desc:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH)) desc:setText(I18N:getGlobalText(I18N.GlobalConst.SMASH))
num:setText(1) num:setText(1)

View File

@ -15,8 +15,6 @@ function DungeonRuneFightUI:getPrefabPath()
end end
function DungeonRuneFightUI:ctor(params) function DungeonRuneFightUI:ctor(params)
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.id = params.id self.id = params.id
end end
@ -27,7 +25,7 @@ end
function DungeonRuneFightUI:_display() function DungeonRuneFightUI:_display()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
uiMap["dungeon_rune_fight_ui.bg.title.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id)) uiMap["dungeon_rune_fight_ui.bg.tx_title"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_WEAPON_DESC_6, self.id))
uiMap["dungeon_rune_fight_ui.bg.desc_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_1)) uiMap["dungeon_rune_fight_ui.bg.desc_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_1))
self:refreshTargetInfo() self:refreshTargetInfo()
self:refreshRewardInfo() self:refreshRewardInfo()
@ -54,14 +52,14 @@ function DungeonRuneFightUI:refreshTargetInfo()
end end
end end
local chapterCondition = self.runeData:getChapterCondition(self.id) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(self.id)
for index, cell in ipairs(self.taskRuneCells) do for index, cell in ipairs(self.taskRuneCells) do
local info = chapterCondition[index] local info = chapterCondition[index]
if info then if info then
cell:refresh(info) cell:refresh(info)
cell:getBaseObject():setActive(true) cell:getBaseObject():setActive(true)
cell:addClickListener(function() cell:addClickListener(function()
ModuleManager.TipsManager:showDescTips(self.runeData:getConditionDesc(info), cell:getBaseObject()) ModuleManager.TipsManager:showDescTips(DataManager.DungeonRuneData:getConditionDesc(info), cell:getBaseObject())
end) end)
else else
cell:getBaseObject():setActive(false) cell:getBaseObject():setActive(false)
@ -72,7 +70,7 @@ end
function DungeonRuneFightUI:refreshRewardInfo() function DungeonRuneFightUI:refreshRewardInfo()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
local passed = self.runeData:passedChapter(self.id) local passed = DataManager.DungeonRuneData:passedChapter(self.id)
local descPassRound = uiMap["dungeon_rune_fight_ui.bg.desc_3"] local descPassRound = uiMap["dungeon_rune_fight_ui.bg.desc_3"]
local imgPassIcon = uiMap["dungeon_rune_fight_ui.bg.icon"] local imgPassIcon = uiMap["dungeon_rune_fight_ui.bg.icon"]
local rewardNode = uiMap["dungeon_rune_fight_ui.bg.reward_node"] local rewardNode = uiMap["dungeon_rune_fight_ui.bg.reward_node"]
@ -84,7 +82,7 @@ function DungeonRuneFightUI:refreshRewardInfo()
if passed then if passed then
descPassRound:setVisible(false) descPassRound:setVisible(false)
imgPassIcon:setVisible(false) imgPassIcon:setVisible(false)
-- local round = self.runeData:getChapterPassRound(self.id) -- local round = DataManager.DungeonRuneData:getChapterPassRound(self.id)
-- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round)) -- descPassRound:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_MIN, round))
-- GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5) -- GFunc.centerImgAndTx(imgPassIcon, descPassRound, 5)
lineR:setVisible(false) lineR:setVisible(false)
@ -99,7 +97,7 @@ function DungeonRuneFightUI:refreshRewardInfo()
end end
end end
local rewards = self.runeData:getChapterRewards(self.id) local rewards = DataManager.DungeonRuneData:getChapterRewards(self.id)
for index, cell in ipairs(self.rewardCells) do for index, cell in ipairs(self.rewardCells) do
local reward = rewards[index] local reward = rewards[index]
if reward then if reward then
@ -124,7 +122,7 @@ function DungeonRuneFightUI:refreshFightBtn()
local desc = uiMap["dungeon_rune_fight_ui.bg.btn.desc"] local desc = uiMap["dungeon_rune_fight_ui.bg.btn.desc"]
local descAgain = uiMap["dungeon_rune_fight_ui.bg.btn.desc_again"] local descAgain = uiMap["dungeon_rune_fight_ui.bg.btn.desc_again"]
local passed = self.runeData:passedChapter(self.id) local passed = DataManager.DungeonRuneData:passedChapter(self.id)
local notPass = not passed local notPass = not passed
iconBg:setVisible(notPass) iconBg:setVisible(notPass)
icon:setVisible(notPass) icon:setVisible(notPass)

View File

@ -19,25 +19,20 @@ function DungeonRuneMainUI:getCurrencyParams()
return self.currencyParams return self.currencyParams
end end
function DungeonRuneMainUI:onPressBackspace()
self:closeUI()
end
function DungeonRuneMainUI:getPrefabPath() function DungeonRuneMainUI:getPrefabPath()
return "assets/prefabs/ui/dungeon_rune/dungeon_rune_main_ui.prefab" return "assets/prefabs/ui/dungeon_rune/dungeon_rune_main_ui.prefab"
end end
function DungeonRuneMainUI:ctor() function DungeonRuneMainUI:ctor()
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.chapterList = {} self.chapterList = {}
self.chapterListCount = 0 self.chapterListCount = 0
for id, info in ipairs(ConfigManager:getConfig(self.runeData:getConfigName())) do for id, info in ipairs(ConfigManager:getConfig(DataManager.DungeonRuneData:getConfigName())) do
table.insert(self.chapterList, id) table.insert(self.chapterList, id)
self.chapterListCount = self.chapterListCount + 1 self.chapterListCount = self.chapterListCount + 1
end end
self.chapterListCount = self.chapterListCount - 1 self.chapterListCount = self.chapterListCount - 1
self.lastChapterId = table.remove(self.chapterList) self.lastChapterId = table.remove(self.chapterList)
self.targetId = self.runeData:getPassedMaxId() self.targetId = DataManager.DungeonRuneData:getPassedMaxId()
if self.targetId <= 0 then if self.targetId <= 0 then
self.targetId = 1 self.targetId = 1
end end
@ -68,7 +63,7 @@ function DungeonRuneMainUI:_addListeners()
end end
function DungeonRuneMainUI:_bind() function DungeonRuneMainUI:_bind()
self:bind(self.runeData, "isDirty", function() self:bind(DataManager.DungeonRuneData, "isDirty", function()
self:refreshFormation() self:refreshFormation()
self:refreshAllCells() self:refreshAllCells()
end) end)

View File

@ -33,7 +33,6 @@ function DungeonRuneRankUI:getPrefabPath()
end end
function DungeonRuneRankUI:ctor() function DungeonRuneRankUI:ctor()
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
end end
function DungeonRuneRankUI:onLoadRootComplete() function DungeonRuneRankUI:onLoadRootComplete()
@ -67,7 +66,7 @@ function DungeonRuneRankUI:_addListeners()
end end
function DungeonRuneRankUI:_bind() function DungeonRuneRankUI:_bind()
self:bind(self.runeData, "isDirty", function() self:bind(DataManager.DungeonRuneData, "isDirty", function()
self:refreshRankNode() self:refreshRankNode()
self:refreshMyRankInfo() self:refreshMyRankInfo()
self:refreshPages() self:refreshPages()
@ -94,9 +93,9 @@ end
function DungeonRuneRankUI:refreshRankNode() function DungeonRuneRankUI:refreshRankNode()
if self.curPage == PAGE_TYPE.LAST_DAY then if self.curPage == PAGE_TYPE.LAST_DAY then
self.rankList = self.runeData:getLastRankInfo() self.rankList = DataManager.DungeonRuneData:getLastRankInfo()
elseif self.curPage == PAGE_TYPE.TODAY then elseif self.curPage == PAGE_TYPE.TODAY then
self.rankList = self.runeData:getCurRankInfo() self.rankList = DataManager.DungeonRuneData:getCurRankInfo()
else else
self.rankList = {} self.rankList = {}
end end
@ -132,7 +131,7 @@ function DungeonRuneRankUI:refreshPages()
end end
end end
if self.runeData:canGetRankReward() then if DataManager.DungeonRuneData:canGetRankReward() then
self.pageObjs[3].page:addRedPoint(77, -6.5, 1) self.pageObjs[3].page:addRedPoint(77, -6.5, 1)
else else
self.pageObjs[3].page:removeRedPoint() self.pageObjs[3].page:removeRedPoint()
@ -151,12 +150,12 @@ end
function DungeonRuneRankUI:refreshMyRankInfo() function DungeonRuneRankUI:refreshMyRankInfo()
local info local info
local canGot = self.runeData:canGetRankReward() local canGot = DataManager.DungeonRuneData:canGetRankReward()
if self.curPage == PAGE_TYPE.TODAY then if self.curPage == PAGE_TYPE.TODAY then
info = self.runeData:getCurRankSelfInfo() info = DataManager.DungeonRuneData:getCurRankSelfInfo()
else else
info = self.runeData:getLastSelfInfo() info = DataManager.DungeonRuneData:getLastSelfInfo()
end end
local rank = info and info.rank or 0 local rank = info and info.rank or 0
@ -206,13 +205,13 @@ function DungeonRuneRankUI:refreshMyRankInfo()
roundObj:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_11, round)) roundObj:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC_11, round))
end end
local got = self.runeData:isGotRankReward() local got = DataManager.DungeonRuneData:isGotRankReward()
local rewards local rewards
if canGot then if canGot then
rewards = self.runeData:getRankRewards(rank) rewards = DataManager.DungeonRuneData:getRankRewards(rank)
else else
info = self.runeData:getCurRankSelfInfo() info = DataManager.DungeonRuneData:getCurRankSelfInfo()
rewards = self.runeData:getRankRewards(info.rank or 0) rewards = DataManager.DungeonRuneData:getRankRewards(info.rank or 0)
got = false got = false
end end
@ -237,7 +236,7 @@ end
function DungeonRuneRankUI:refreshTime() function DungeonRuneRankUI:refreshTime()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
local remainTime = self.runeData:getCloseTime() local remainTime = DataManager.DungeonRuneData:getCloseTime()
local str local str
str = Time:formatNumTimeStr(remainTime) str = Time:formatNumTimeStr(remainTime)
uiMap["dungeon_rune_rank_ui.bg.time_node.tx_time"]:setText(str) uiMap["dungeon_rune_rank_ui.bg.time_node.tx_time"]:setText(str)

View File

@ -9,7 +9,6 @@ function DungeonRuneRebirthUI:getPrefabPath()
end end
function DungeonRuneRebirthUI:ctor(params) function DungeonRuneRebirthUI:ctor(params)
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.adCallback = params.adCallback self.adCallback = params.adCallback
self.refuseCallback = params.refuseCallback self.refuseCallback = params.refuseCallback
self.isHpOver = params.isHpOver self.isHpOver = params.isHpOver

View File

@ -15,8 +15,6 @@ function DungeonRuneTaskUI:getPrefabPath()
end end
function DungeonRuneTaskUI:ctor(params) function DungeonRuneTaskUI:ctor(params)
self.runeData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.RUNES_OPEN)
self.id = params.id self.id = params.id
end end
@ -34,7 +32,7 @@ function DungeonRuneTaskUI:_display()
end end
end end
local chapterCondition = self.runeData:getChapterCondition(self.id) local chapterCondition = DataManager.DungeonRuneData:getChapterCondition(self.id)
local count = 0 local count = 0
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition) local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition)
for index, cell in ipairs(self.taskCells) do for index, cell in ipairs(self.taskCells) do
@ -43,7 +41,7 @@ function DungeonRuneTaskUI:_display()
if condition then if condition then
cell:getBaseObject():setActive(true) cell:getBaseObject():setActive(true)
local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress local taskNum = taskProgress[newIndex] and taskProgress[newIndex].progress
local desc = self.runeData:getConditionDesc(condition, taskNum) local desc = DataManager.DungeonRuneData:getConditionDesc(condition, taskNum)
local over = false local over = false
if taskProgress[newIndex] then if taskProgress[newIndex] then
local info = taskProgress[newIndex] local info = taskProgress[newIndex]

View File

@ -57,6 +57,8 @@ end
function DungeonData:isOpen(moduleKey, showToast) function DungeonData:isOpen(moduleKey, showToast)
if moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY and DataManager.DungeonDailyData:isOpen(showToast) then if moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY and DataManager.DungeonDailyData:isOpen(showToast) then
return true return true
elseif moduleKey == ModuleManager.MODULE_KEY.RUNES_OPEN and DataManager.DungeonRuneData:isOpen(showToast) then
return true
end end
return false return false
end end
@ -129,6 +131,8 @@ end
function DungeonData:getShowRewards(moduleKey) function DungeonData:getShowRewards(moduleKey)
if moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY then if moduleKey == GConst.DungeonConst.MODULE_KEY_DUNGEON_DAILY then
return GFunc.getConstCost("dungeon_show_reward", true) return GFunc.getConstCost("dungeon_show_reward", true)
elseif moduleKey == ModuleManager.MODULE_KEY.RUNES_OPEN then
return GFunc.getConstCost("dungeon_show_reward", true)
-- elseif moduleKey == ModuleManager.MODULE_KEY.TOWER then -- elseif moduleKey == ModuleManager.MODULE_KEY.TOWER then
-- return GFunc.getConstCost("tower_show_reward", true) -- return GFunc.getConstCost("tower_show_reward", true)
-- elseif moduleKey == ModuleManager.MODULE_KEY.WORLD_BOSS then -- elseif moduleKey == ModuleManager.MODULE_KEY.WORLD_BOSS then

View File

@ -0,0 +1,326 @@
local DungeonRuneData = class("DungeonRuneData", BaseData)
local TASK_TYPE = GConst.DungeonRuneConst.TASK_TYPE
function DungeonRuneData:ctor()
self.data.isDirty = false
self.maxPassedId = 0
self.runeInfo = {}
end
function DungeonRuneData:clear()
self.data.isDirty = false
DataManager:unregisterCrossDayFunc("DungeonRuneData")
end
function DungeonRuneData:init(data)
data = data or {}
if EDITOR_MODE then
Logger.logHighlight("-----DungeonRuneData------")
Logger.printTable(data)
end
data.total_challenge_count = 0
data.stat_counts = {}
data.max_challenge_id = 1
data.turns = {}
data.heroes = {}
data.buy_silver_count = 0
self.totalChallengeCount = data.total_challenge_count or 0
self.fightCountMap = data.stat_counts or {}
self.maxPassedId = data.max_challenge_id and (data.max_challenge_id - 1) or 0
self.runeInfo = data.turns or {}
self.heroes = data.heroes or {}
self.buySilverCount = data.buy_silver_count or 0
DataManager.FormationData:initFormationByType(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE, self.heroes)
DataManager:registerCrossDayFunc("DungeonRuneData", function()
self:onCrossDay()
end)
end
function DungeonRuneData:onCrossDay()
self.buySilverCount = 0
self:setDirty()
end
function DungeonRuneData:setDirty()
self.data.isDirty = not self.data.isDirty
end
function DungeonRuneData:isOpen(showToast)
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.RUNES_OPEN, not showToast) then
return false
end
return true
end
function DungeonRuneData:getModuleKey()
return ModuleManager.MODULE_KEY.RUNES_OPEN
end
function DungeonRuneData:getConfig(chapterId)
return ConfigManager:getConfig(self:getConfigName())[chapterId]
end
function DungeonRuneData:getConfigName()
return "chapter_dungeon_rune"
end
function DungeonRuneData:getTitleString()
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_TITLE)
end
function DungeonRuneData:getRuleString()
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_HELP)
end
function DungeonRuneData:getOpenWeekString()
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_DESC)
end
function DungeonRuneData:getBanner()
return "assets/arts/textures/background/dungeon/dungeon_bg_5.png"
end
function DungeonRuneData:getOpenTextColor()
return "#FFFFFF"
end
function DungeonRuneData:isNoTotalLimit()
return true
end
function DungeonRuneData:isNotShowLimitCount()
return true
end
function DungeonRuneData:getIsAllTimeOpen()
return true
end
function DungeonRuneData:onClickFight()
ModuleManager.DungeonRuneManager:showMainUI()
end
function DungeonRuneData:getTodayRemainLimitCount()
return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_GLOD_WING)
end
function DungeonRuneData:getRebirthAddRoundCount()
if not self.rebirthAddRoundCount then
self.rebirthAddRoundCount = GFunc.getConstIntValue("dungeon_rune_revival")
end
return self.rebirthAddRoundCount
end
function DungeonRuneData:getBattleMaxlv()
if not self.battleMaxLv then
self.battleMaxLv = GFunc.getConstIntValue("dungeon_rune_lvlimit")
end
return self.battleMaxLv
end
function DungeonRuneData:getBuySliverWingCost()
if not self.buySliverWingCost then
self.buySliverWingCost = GFunc.getConstReward("dungeon_rune_cost")
end
return self.buySliverWingCost
end
function DungeonRuneData:getPassedMaxId()
return self.maxPassedId
end
function DungeonRuneData:updatePassedMaxId(maxId)
if not maxId then
return
end
self.maxPassedId = math.max(maxId - 1, 1)
end
function DungeonRuneData:canSweep(id)
if id > self.maxPassedId then
return false
end
if not self:isBossChapter(id) then
return false
end
return DataManager.BagData.ItemData:getItemNumById(GConst.ItemConst.ITEM_ID_SLIVER_WING) > 0
end
function DungeonRuneData:canFight(id)
if self.maxPassedId + 1 >= id then
return true
end
return false
end
function DungeonRuneData:passedChapter(id)
return self.maxPassedId >= id
end
function DungeonRuneData:curFight(id)
return id == self.maxPassedId + 1
end
function DungeonRuneData:getChapterPassRound(id)
if not self.runeInfo[id] then
return 0
end
return self.runeInfo[id] or 0
end
function DungeonRuneData:updatePassRound(id, round)
local cur = self.runeInfo[id]
if not cur or cur > round then
self.runeInfo[id] = round
self:tagRoundNew()
end
end
function DungeonRuneData:tagRoundNew()
self.tagNew = true
end
function DungeonRuneData:getTagRoundNew()
return self.tagNew
end
function DungeonRuneData:getChapterRewards(id)
return self:getConfig(id).first_reward
end
function DungeonRuneData:getChapterSweepRewards(id)
return self:getConfig(id).sweep_reward
end
function DungeonRuneData:isBossChapter(id)
local cfg = self:getConfig(id)
return not cfg.monster[2] -- 只有一个怪物的就是boss关卡
end
function DungeonRuneData:getChapterCondition(id)
local cfg = self:getConfig(id)
if not self.cacheChaperCondition then
self.cacheChaperCondition = {}
end
if not self.cacheChaperCondition[id] then
self.cacheChaperCondition[id] = {}
table.insert(self.cacheChaperCondition[id], {0, cfg.round, 0})
if cfg.requirement then
for _, condition in ipairs(cfg.requirement) do
table.insert(self.cacheChaperCondition[id], GFunc.getTable(condition))
end
end
end
return self.cacheChaperCondition[id]
end
function DungeonRuneData:getConditionIcon(taskInfo)
local iconSprite
local iconConst = GConst.DungeonRuneConst.TASK_ICON[taskInfo[1]]
if type(iconConst) == "table" then
iconSprite = iconConst[taskInfo[2]]
else
iconSprite = iconConst
end
return GConst.ATLAS_PATH.UI_DUNGEON_RUNE, iconSprite
end
function DungeonRuneData:getConditionDesc(taskInfo, taskNum)
local taskType = taskInfo[1]
local taskParams1 = taskInfo[2]
local taskParams2 = taskInfo[3]
if taskType == TASK_TYPE.PASS_ROUND then
if taskNum and taskNum > 0 then
taskParams1 = taskNum
end
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_1, taskParams1)
elseif taskType == TASK_TYPE.ELIMINATION_ELEMENT then
if taskNum and taskNum > 0 then
local num = taskParams2 - taskNum
if num > 0 then
taskParams2 = num
end
end
local desc = ModuleManager.HeroManager:getMatchTypeName(taskParams1, true)
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_2, taskParams2, desc)
elseif taskType == TASK_TYPE.BREAK_GRID_TYPE then
if taskNum and taskNum > 0 then
local num = taskParams2 - taskNum
if num > 0 then
taskParams2 = num
end
end
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_3, taskParams2)
elseif taskType == TASK_TYPE.KILL_MONSTER then
if taskNum and taskNum > 0 then
local num = taskParams2 - taskNum
if num > 0 then
taskParams2 = num
end
end
return I18N:getGlobalText(I18N.GlobalConst.DUNGEON_RUNE_QUEST_4, taskParams2)
end
end
function DungeonRuneData:getChapterMonsterSpine(id)
local cfg = self:getConfig(id)
local monsterId = cfg.monster[1]
local info = ConfigManager:getConfig("monster")[monsterId]
return info.model_id, info.model_ui
end
function DungeonRuneData:getChapterMonsterI18N(id)
local cfg = self:getConfig(id)
local monsterId = cfg.monster[1]
local info = ConfigManager:getConfig("monster")[monsterId]
local monsterBase = info.monster_base
return I18N:getConfig("monster_base")[monsterBase]
end
function DungeonRuneData:getCurFightChapterId()
return self.curFightChapterId or 1
end
function DungeonRuneData:setCurFightChapterId(chapterId)
self.curFightChapterId = chapterId
end
function DungeonRuneData:getChapterFightCount(id)
return self.fightCountMap[id] or 0
end
function DungeonRuneData:getSliverWingBuyCount()
return self.buySilverCount or 0
end
function DungeonRuneData:addSliverWingBuyCount(count)
self.buySilverCount = self.buySilverCount + count
end
function DungeonRuneData:getRemainSliverWingCount()
if not self.todayLimitSliverCount then
self.todayLimitSliverCount = GFunc.getConstIntValue("dungeon_rune_buylimit")
end
local count = self.todayLimitSliverCount - self:getSliverWingBuyCount()
if count <= 0 then
count = 0
end
return count
end
function DungeonRuneData:getBuySliverCost()
if not self.todayBuySliverCost then
self.todayBuySliverCost = GFunc.getConstReward("dungeon_rune_cost")
end
return self.todayBuySliverCost
end
return DungeonRuneData

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8dd81378176ec4fc0a2edc5a0e81cdd2
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -109,6 +109,10 @@ function FormationData:getArenaDefendFormation()
return self:getFormation(GConst.BattleConst.FORMATION_TYPE.ARENA_DEFEND) return self:getFormation(GConst.BattleConst.FORMATION_TYPE.ARENA_DEFEND)
end end
function FormationData:getDungeonRuneFormation()
return self:getFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_RUNE)
end
-- function FormationData:getDungeonWeaponFormation() -- function FormationData:getDungeonWeaponFormation()
-- local formation = self:getFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON) -- local formation = self:getFormation(GConst.BattleConst.FORMATION_TYPE.DUNGEON_WEAPON)
-- if table.nums(formation) <= 0 then -- if table.nums(formation) <= 0 then