|
|
@@ -16,6 +16,9 @@ function ClimbingTowerDataMgr:ctor()
|
|
|
self.battleEndCondList = nil
|
|
|
self.bInited = false
|
|
|
self.towerMode = 0 -- 0 原来的模式 1 无尽模式
|
|
|
+ self.wjLevel = 1
|
|
|
+ self.wjBossInfo = nil
|
|
|
+ self.wjRewordCfg = nil
|
|
|
end
|
|
|
|
|
|
function ClimbingTowerDataMgr:Clear()
|
|
|
@@ -480,6 +483,7 @@ function ClimbingTowerDataMgr:BattleEnd(battleTime,isPlayRecord,timeStamp)
|
|
|
end
|
|
|
if self:GetTowerMode() == 2 then
|
|
|
LogError("無盡模式!!")
|
|
|
+ self.wjLevel = self.wjLevel + 1
|
|
|
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIClimbingTowerBattleWin,{Enum.UIPageName.UIClimbingTower,nil})
|
|
|
return
|
|
|
end
|
|
|
@@ -605,4 +609,66 @@ function ClimbingTowerDataMgr:GetModelockInfo(mode)
|
|
|
end
|
|
|
return lockInfo
|
|
|
end
|
|
|
+
|
|
|
+function ClimbingTowerDataMgr:GetCurWjLevel()
|
|
|
+ return self.wjLevel
|
|
|
+end
|
|
|
+
|
|
|
+function ClimbingTowerDataMgr:SetCurWjLevel(lv)
|
|
|
+ self.wjLevel = lv
|
|
|
+end
|
|
|
+
|
|
|
+function ClimbingTowerDataMgr:GetWjRewordCfgByLv(lv)
|
|
|
+ local cfgmgr = ManagerContainer.CfgMgr
|
|
|
+ local cfg = nil
|
|
|
+ if self.wjRewordCfg and cfgmgr:LevelISWjRewordCfg(self.wjRewordCfg,lv) then
|
|
|
+ cfg = self.wjRewordCfg
|
|
|
+ else
|
|
|
+ cfg = cfgmgr:GetWjRewordByLv(lv)
|
|
|
+ end
|
|
|
+
|
|
|
+ return cfg
|
|
|
+end
|
|
|
+
|
|
|
+function ClimbingTowerDataMgr:GetWjRewordByLv(lv)
|
|
|
+ local cfg = self:GetWjRewordCfgByLv(lv)
|
|
|
+
|
|
|
+ local maxLv = cfg.levels[1][2]
|
|
|
+ local minLv = cfg.levels[1][1]
|
|
|
+ -- {cfgId = reward[1], num = reward[2]}
|
|
|
+ local reword = {}
|
|
|
+ for _, v in pairs(cfg.reword) do
|
|
|
+ local item = {cfgId = v[1], num = v[2]}
|
|
|
+
|
|
|
+ reword[item.cfgId] = item
|
|
|
+ end
|
|
|
+
|
|
|
+ for _, v in pairs(cfg.levelReword) do
|
|
|
+ local item = {cfgId = v[1], num = v[2]}
|
|
|
+ local num = (lv - minLv) * item.num
|
|
|
+ if reword[item.cfgId] == nil then
|
|
|
+ item.num = num
|
|
|
+ reword[item.cfgId] = item
|
|
|
+ else
|
|
|
+ local temp = reword[item.cfgId]
|
|
|
+ temp.num = temp.num + num
|
|
|
+ end
|
|
|
+ end
|
|
|
+ local ret = {}
|
|
|
+ for _, v in pairs(reword) do
|
|
|
+ table.insert(ret,v)
|
|
|
+ end
|
|
|
+ return ret
|
|
|
+end
|
|
|
+function ClimbingTowerDataMgr:GetCurWjReword()
|
|
|
+ return self:GetWjRewordByLv(self.wjLevel)
|
|
|
+end
|
|
|
+function ClimbingTowerDataMgr:GetCurSpecialReword(isShow)
|
|
|
+ local cfg = self:GetWjRewordCfgByLv(self.wjLevel)
|
|
|
+ if isShow then
|
|
|
+ return ManagerContainer.CfgMgr:GetReward(cfg.specialReword)
|
|
|
+ end
|
|
|
+ return cfg.specialReword
|
|
|
+end
|
|
|
+
|
|
|
return ClimbingTowerDataMgr
|