Merge branch 'tcx_xiyou_yueNan' of http://192.168.1.21:3000/root/miduo_client into tcx_xiyou_yueNan
commit
4bf898c5cd
|
|
@ -4,19 +4,19 @@ local duoDuiHeroConfig = ConfigManager.GetConfig(ConfigName.DuoDuiTowerHero)
|
|||
local BecomeAGodLevel = ConfigManager.GetConfig(ConfigName.BecomeAGodLevel)
|
||||
this.playerGodLevel = 0
|
||||
this.playerGodTowerNum = 0
|
||||
this.playerMeridiansLevel = { 0, 0, 0, 0, 0, 0, 0 }
|
||||
this.playerMeridiansLevel = {0, 0, 0, 0, 0, 0, 0}
|
||||
function this.Initialize()
|
||||
|
||||
end
|
||||
|
||||
function this.Init(msg)
|
||||
--LogError("=====================")
|
||||
--LogError("ddddddddddddd" .. msg.playerGodLevel)
|
||||
--LogError("ddddddddddddd" .. msg.playerGodTowerNum)
|
||||
--for i = 1, #msg.playerMeridiansLevel do
|
||||
--LogError("ddddddddddd" .. msg.playerMeridiansLevel[i])
|
||||
--end
|
||||
--LogError("=====================")
|
||||
-- LogError("=====================")
|
||||
-- LogError("ddddddddddddd" .. msg.playerGodLevel)
|
||||
-- LogError("ddddddddddddd" .. msg.playerGodTowerNum)
|
||||
-- for i = 1, #msg.playerMeridiansLevel do
|
||||
-- LogError("ddddddddddd" .. msg.playerMeridiansLevel[i])
|
||||
-- end
|
||||
-- LogError("=====================")
|
||||
this.playerGodLevel = msg.playerGodLevel
|
||||
this.playerGodTowerNum = msg.playerGodTowerNum
|
||||
this.playerMeridiansLevel = msg.playerMeridiansLevel
|
||||
|
|
@ -29,7 +29,7 @@ end
|
|||
function this.IsCouldUpgrade()
|
||||
local becomAGodLevelData = BecomeAGodLevel[this.playerGodLevel + 1]
|
||||
if becomAGodLevelData then
|
||||
--LogError("xxxxxxxxxxxxxxxxxxxxx"..HeroManager.GetHeroNumByStar(becomAGodLevelData.HeroConfine[2]).."/"..becomAGodLevelData.HeroConfine[1])
|
||||
-- LogError("xxxxxxxxxxxxxxxxxxxxx"..HeroManager.GetHeroNumByStar(becomAGodLevelData.HeroConfine[2]).."/"..becomAGodLevelData.HeroConfine[1])
|
||||
if HeroManager.GetHeroNumByStar(becomAGodLevelData.HeroConfine[2]) < becomAGodLevelData.HeroConfine[1] then
|
||||
return false
|
||||
end
|
||||
|
|
@ -57,7 +57,7 @@ end
|
|||
function this.GetTowerDataByType(_type)
|
||||
local floor = this.GetTowerFloorByType(_type)
|
||||
local towerList = {}
|
||||
--ConfigManager.TryGetAllConfigsDataByDoubleKey(ConfigName.DuoDuiTower,"Type",_type,)
|
||||
-- ConfigManager.TryGetAllConfigsDataByDoubleKey(ConfigName.DuoDuiTower,"Type",_type,)
|
||||
if floor < 0 then
|
||||
floor = 0
|
||||
end
|
||||
|
|
@ -75,12 +75,13 @@ end
|
|||
|
||||
function this.GetCurrFloorRewardByType(_type)
|
||||
local floor = this.GetTowerFloorByType(_type)
|
||||
--如果一层都没打显示第一层的奖励
|
||||
-- 如果一层都没打显示第一层的奖励
|
||||
if floor <= 0 then
|
||||
floor = 1
|
||||
end
|
||||
LogError("floor======" .. floor)
|
||||
local config = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.DuoDuiTower, "Type", _type, "TowerNumber", floor)
|
||||
local config =
|
||||
ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.DuoDuiTower, "Type", _type, "TowerNumber", floor)
|
||||
if config then
|
||||
return config.Income
|
||||
end
|
||||
|
|
@ -122,17 +123,20 @@ function this.GetFourMonsterInfoByWave(curType, wave)
|
|||
data.herodatas = {}
|
||||
data.monsterConfig = {}
|
||||
for i = 1, #tempConfigs do
|
||||
--奖励
|
||||
-- 奖励
|
||||
local tempConfig = tempConfigs[i]
|
||||
if tempConfig.Item and #tempConfig.Item > 0 and tempConfig.TowerWave1 == 1 then
|
||||
for j = 1, #tempConfig.Item do
|
||||
if tempConfig.Item[j][1] ~= nil and tempConfig.Item[j][1] ~= 0 then
|
||||
--LogError("tempConfig.Item[j][1]=="..tempConfig.Item[j][1].." tempConfig.Item[j][2]=="..tempConfig.Item[j][2])
|
||||
table.insert(data.firstReward, { id = tempConfig.Item[j][1], num = tempConfig.Item[j][2] })
|
||||
-- LogError("tempConfig.Item[j][1]=="..tempConfig.Item[j][1].." tempConfig.Item[j][2]=="..tempConfig.Item[j][2])
|
||||
table.insert(data.firstReward, {
|
||||
id = tempConfig.Item[j][1],
|
||||
num = tempConfig.Item[j][2]
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
--LogError("tempConfig.id=="..tempConfig.id)
|
||||
-- LogError("tempConfig.id=="..tempConfig.id)
|
||||
data.id = tempConfig.TowerNumber
|
||||
data.power = tempConfig.Force
|
||||
local id = tempConfig.Hero[5]
|
||||
|
|
@ -184,7 +188,7 @@ function this.GetTowerFreeIdByType(_type)
|
|||
return 0
|
||||
end
|
||||
|
||||
--获取当前等级和下一级的数据
|
||||
-- 获取当前等级和下一级的数据
|
||||
function this.GetPropText(_treeLv, _type)
|
||||
local data = {}
|
||||
local level = _treeLv
|
||||
|
|
@ -192,15 +196,12 @@ function this.GetPropText(_treeLv, _type)
|
|||
local isMax = false
|
||||
for k = 1, #becomAGodSettingData.PropertyGit do
|
||||
local configData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodPropertyGit, "Type",
|
||||
becomAGodSettingData.PropertyGit[k], "Level",
|
||||
level)
|
||||
becomAGodSettingData.PropertyGit[k], "Level", level)
|
||||
local configNextData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodPropertyGit, "Type",
|
||||
becomAGodSettingData.PropertyGit[k],
|
||||
"Level",
|
||||
level + 1)
|
||||
--if configNextData then --如果当前神树等级超出魂灵宝所能达到的最大等级就取最大
|
||||
--configNextData = nil
|
||||
--end
|
||||
becomAGodSettingData.PropertyGit[k], "Level", level + 1)
|
||||
-- if configNextData then --如果当前神树等级超出魂灵宝所能达到的最大等级就取最大
|
||||
-- configNextData = nil
|
||||
-- end
|
||||
for i = 1, #configData.Property do
|
||||
local propArr = configData.Property[i]
|
||||
local propId = propArr[1]
|
||||
|
|
@ -279,8 +280,7 @@ function this.CheckRedPointTupo()
|
|||
end
|
||||
|
||||
function this.CheckRedPoint(level)
|
||||
local levelUpData = ConfigManager.TryGetConfigDataByKey(ConfigName.BecomeAGodMaterialGit, "Level",
|
||||
level)
|
||||
local levelUpData = ConfigManager.TryGetConfigDataByKey(ConfigName.BecomeAGodMaterialGit, "Level", level)
|
||||
if levelUpData.LvupCost then
|
||||
for i = 1, #levelUpData.LvupCost do
|
||||
local data = levelUpData.LvupCost[i]
|
||||
|
|
@ -293,22 +293,25 @@ function this.CheckRedPoint(level)
|
|||
return false
|
||||
end
|
||||
|
||||
--计算 属性加成
|
||||
-- 计算 属性加成
|
||||
function this.CalculateBecomAGodProAddVal()
|
||||
local addAllProVal = {}
|
||||
for _type = 1, 6 do
|
||||
|
||||
local becomAGodSettingData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodSetting, "Type",
|
||||
_type)
|
||||
for k = 1, #becomAGodSettingData.PropertyGit do
|
||||
local configData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodPropertyGit, "Type",
|
||||
becomAGodSettingData.PropertyGit[k], "Level",
|
||||
this.playerMeridiansLevel[_type])
|
||||
for i = 1, #configData.Property do
|
||||
local propArr = configData.Property[i]
|
||||
if addAllProVal[propArr[1]] then
|
||||
addAllProVal[propArr[1]] = addAllProVal[propArr[1]] + propArr[2]
|
||||
else
|
||||
addAllProVal[propArr[1]] = propArr[2]
|
||||
|
||||
if becomAGodSettingData.Floor[k] <= GodsWayTowerManager.GetTowerFloorByType(3) then
|
||||
local configData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodPropertyGit, "Type",
|
||||
becomAGodSettingData.PropertyGit[k], "Level", this.playerMeridiansLevel[_type])
|
||||
for i = 1, #configData.Property do
|
||||
local propArr = configData.Property[i]
|
||||
if addAllProVal[propArr[1]] then
|
||||
addAllProVal[propArr[1]] = addAllProVal[propArr[1]] + propArr[2]
|
||||
else
|
||||
addAllProVal[propArr[1]] = propArr[2]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -323,8 +326,7 @@ function this.GetBecomeAGodProAddRate(type)
|
|||
_type)
|
||||
for k = 1, #becomAGodSettingData.PropertyGit do
|
||||
local configData = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.BecomeAGodPropertyGit, "Type",
|
||||
becomAGodSettingData.PropertyGit[k], "Level",
|
||||
this.playerMeridiansLevel[_type])
|
||||
becomAGodSettingData.PropertyGit[k], "Level", this.playerMeridiansLevel[_type])
|
||||
for i = 1, #configData.SystemProperty do
|
||||
if configData.SystemProperty[1][1] == type then
|
||||
addRate = addRate + configData.SystemProperty[1][2]
|
||||
|
|
@ -340,14 +342,14 @@ function this.GetBecomeAGodProAddRate(type)
|
|||
end
|
||||
|
||||
function this.GetTimeTip(_type)
|
||||
--local config=ConfigManager.GetConfigData(ConfigName.DuoDuiTowerConfig,type)
|
||||
-- local config=ConfigManager.GetConfigData(ConfigName.DuoDuiTowerConfig,type)
|
||||
local buyTime = 0
|
||||
local freeTime = 0
|
||||
if towerInfos[_type] then
|
||||
buyTime = PrivilegeManager.GetPrivilegeRemainValue(towerInfos[_type].buyId)
|
||||
freeTime = PrivilegeManager.GetPrivilegeRemainValue(towerInfos[_type].freeId)
|
||||
end
|
||||
--免费次数
|
||||
-- 免费次数
|
||||
return freeTime, buyTime
|
||||
end
|
||||
|
||||
|
|
@ -355,10 +357,11 @@ function this.GetCost(campId)
|
|||
local buyTimeId = towerInfos[campId].buyId
|
||||
LogError("campId==" .. campId .. " buytimeid===" .. buyTimeId)
|
||||
local storeData = ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig, "StoreId", 7, "Limit", buyTimeId)
|
||||
--商店表数据
|
||||
-- 商店表数据
|
||||
local buyTimes = (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1) >
|
||||
PrivilegeManager.GetPrivilegeNumber(buyTimeId)
|
||||
and PrivilegeManager.GetPrivilegeNumber(buyTimeId) or (PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1)
|
||||
PrivilegeManager.GetPrivilegeNumber(buyTimeId) and
|
||||
PrivilegeManager.GetPrivilegeNumber(buyTimeId) or
|
||||
(PrivilegeManager.GetPrivilegeUsedTimes(buyTimeId) + 1)
|
||||
return storeData.Id, storeData.Cost[1][1], storeData.Cost[2][buyTimes]
|
||||
end
|
||||
|
||||
|
|
@ -369,7 +372,7 @@ end
|
|||
-- return 0
|
||||
-- end
|
||||
|
||||
--检测红点状态
|
||||
-- 检测红点状态
|
||||
function this.CheckRedPointStatus()
|
||||
local towers = ConfigManager.GetConfig(ConfigName.DuoDuiTowerConfig)
|
||||
if towers then
|
||||
|
|
|
|||
|
|
@ -156,12 +156,16 @@ function this.UpdateWin(_data)
|
|||
else
|
||||
propText:SetActive(true)
|
||||
propText:GetComponent("Text").text = GetLanguageStrById(propInfoList[i].name)
|
||||
if BecomeAGodManager.playerGodLevel >= 0 and i > 2 then
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val ..
|
||||
" <color=#53FF00>神觉 +" .. (propInfoList[i].val * addRate / 100) .. " (" .. addRate .. "%)</color>"
|
||||
elseif i > 2 then
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val ..
|
||||
" <color=#53FF00>神觉 +0 (0%)</color>"
|
||||
if addRate > 0 then
|
||||
if BecomeAGodManager.playerGodLevel >= 0 and i > 2 then
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val ..
|
||||
" <color=#53FF00>神觉 +" .. (propInfoList[i].val * addRate / 100) .. " (" .. addRate .. "%)</color>"
|
||||
elseif i > 2 then
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val ..
|
||||
" <color=#53FF00>神觉 +0 (0%)</color>"
|
||||
else
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val
|
||||
end
|
||||
else
|
||||
Util.GetGameObject(propText, "val"):GetComponent("Text").text = propInfoList[i].val
|
||||
end
|
||||
|
|
|
|||
|
|
@ -775,7 +775,8 @@ function this.ExecuteLoading()
|
|||
--[[[56] =]] function() NetManager.ExplorerMapInfoRequest(LoadingPanel.OnStep) end, --灵脉秘境
|
||||
--[[[57] =]] function() CommonActPageManager.GetPowerRicePower(LoadingPanel.OnStep) end, --战力冲刺
|
||||
--[[[58] =]] function() NetManager.RequestMagicSoldierInfo(LoadingPanel.OnStep) end, --神兵
|
||||
--[[[59] =]] function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
--[[[59] =]] function() NetManager.RequestDuoduiInfoRequest(LoadingPanel.OnStep) end,
|
||||
|
||||
--[[[60] =]] function() NetManager.BaublesAllInfoRequest(LoadingPanel.OnStep) end, --新法宝
|
||||
--[[[61] =]] function() NetManager.TrainingArchitectureInfoRequest(LoadingPanel.OnStep) end, --特训信息
|
||||
--[[[62] =]] function() NetManager.NewArenaResetRequest(LoadingPanel.OnStep) end, -- 竞技场
|
||||
|
|
@ -790,6 +791,7 @@ function this.ExecuteLoading()
|
|||
--[[[71] =]] function() JumpServerManager.LoginGetWorldArenaInfoRequest(LoadingPanel.OnStep) end, --跨服天梯
|
||||
--[[[72] =]] function() NetManager.AssistInfoRequest(LoadingPanel.OnStep) end,
|
||||
----[[[73] =]]function() NetManager.AnewRechargeOrderRequest(LoadingPanel.OnStep) end,
|
||||
--[[[73] =]] function() NetManager.GemNewInfoRequest(LoadingPanel.OnStep) end, --新命石
|
||||
function() -- 登录请求最终接口,所有请求放在此接口之前
|
||||
-- 登录成功确认
|
||||
NetManager.LoginConfimRequest()
|
||||
|
|
|
|||
|
|
@ -152,8 +152,8 @@ function this.ShowPokemonInfo()
|
|||
end
|
||||
Util.GetGameObject(proList[index], "proName"):GetComponent("Text").text = curAllPro[key].proName
|
||||
--Util.GetGameObject(proList[index], "proValue"):GetComponent("Text").text = curAllPro[key].proValue
|
||||
|
||||
if index > 1 then
|
||||
if addRate > 0 then
|
||||
if index > 1 then
|
||||
Util.GetGameObject(proList[index], "proValue"):GetComponent("Text").text = this.ToNumber(curAllPro[key]
|
||||
.proValue) ..
|
||||
" <color=#53FF00>神觉 +" ..
|
||||
|
|
@ -173,6 +173,12 @@ function this.ShowPokemonInfo()
|
|||
Util.GetGameObject(proList[index], "proValue"):GetComponent("Text").text = curAllPro[key]
|
||||
.proValue
|
||||
end
|
||||
else
|
||||
Util.GetGameObject(proList[index], "proValue"):GetComponent("Text").text = curAllPro[key]
|
||||
.proValue
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
index = index + 1
|
||||
end
|
||||
|
|
|
|||
|
|
@ -136,7 +136,8 @@ function RewardTailsmanChipShowPopup:OnShow()
|
|||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop)
|
||||
end
|
||||
if BecomeAGodManager.playerGodLevel >= 0 then
|
||||
if addRate > 0 then
|
||||
if BecomeAGodManager.playerGodLevel >= 0 then
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop) ..
|
||||
" <color=#07CB1D>神觉 +" ..
|
||||
(prop * addRate / 100) .. " (" .. addRate .. "%)</color>"
|
||||
|
|
@ -144,6 +145,10 @@ function RewardTailsmanChipShowPopup:OnShow()
|
|||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop) ..
|
||||
" <color=#07CB1D>神觉 +0 (0%)</color>"
|
||||
end
|
||||
else
|
||||
vText.text = GetPropertyFormatStr(proConfigData.Style, prop)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue