羁绊功能修改
parent
e7abac49ce
commit
d956e6050a
File diff suppressed because it is too large
Load Diff
|
@ -38,6 +38,7 @@ local contentScripts = {
|
||||||
--灵脉秘境纪录
|
--灵脉秘境纪录
|
||||||
[GENERAL_POPUP_TYPE.LingMaiRecord] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_LingMaiRecord"), panelName = "GeneralBigPopup_LingMaiRecord"},
|
[GENERAL_POPUP_TYPE.LingMaiRecord] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_LingMaiRecord"), panelName = "GeneralBigPopup_LingMaiRecord"},
|
||||||
[GENERAL_POPUP_TYPE.IncarnationDes] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes"), panelName = "GeneralBigPopup_IncarnationDes"},
|
[GENERAL_POPUP_TYPE.IncarnationDes] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes"), panelName = "GeneralBigPopup_IncarnationDes"},
|
||||||
|
[GENERAL_POPUP_TYPE.IncarnationDes2] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes2"), panelName = "GeneralBigPopup_IncarnationDes2"},
|
||||||
[GENERAL_POPUP_TYPE.chooseTailsManSoul] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_WishTailsmanSoulChip"), panelName = "GeneralBigPopup_WishTailsmanSoulChip"},
|
[GENERAL_POPUP_TYPE.chooseTailsManSoul] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_WishTailsmanSoulChip"), panelName = "GeneralBigPopup_WishTailsmanSoulChip"},
|
||||||
--寻仙招募选择up英雄
|
--寻仙招募选择up英雄
|
||||||
[GENERAL_POPUP_TYPE.ChooseUpHero] = {view = require("Modules/Popup/View/GeneralPopup_ChooseUpHero"), panelName = "GeneralBigPopup_ChooseUpHero"},
|
[GENERAL_POPUP_TYPE.ChooseUpHero] = {view = require("Modules/Popup/View/GeneralPopup_ChooseUpHero"), panelName = "GeneralBigPopup_ChooseUpHero"},
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
----- 神应属性弹窗 -----
|
||||||
|
local this = {}
|
||||||
|
local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||||
|
--传入父脚本模块
|
||||||
|
local parent
|
||||||
|
local sortingOrder=0
|
||||||
|
local attriList = {}
|
||||||
|
|
||||||
|
function this:InitComponent(gameObject)
|
||||||
|
self.bg =Util.GetGameObject(gameObject, "bg")
|
||||||
|
self.proGroup =Util.GetGameObject(gameObject, "proGroup")
|
||||||
|
self.proTitle =Util.GetGameObject(gameObject, "title")
|
||||||
|
self.proTip =Util.GetGameObject(gameObject, "tip")
|
||||||
|
self.proValue =Util.GetGameObject(gameObject, "pro")
|
||||||
|
self.proNum =Util.GetGameObject(self.proValue, "name")
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:BindEvent()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:AddListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:RemoveListener()
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:OnShow(_parent,_Data)
|
||||||
|
parent=_parent
|
||||||
|
sortingOrder = _parent.sortingOrder
|
||||||
|
parent.BG:SetActive(false)
|
||||||
|
local args = _Data
|
||||||
|
local data = args[1]
|
||||||
|
for i = 1, #data do
|
||||||
|
if not attriList[i] then
|
||||||
|
attriList[i] = {}
|
||||||
|
attriList[i].proGroup = newObjToParent(self.proGroup,self.bg)
|
||||||
|
end
|
||||||
|
attriList[i].proGroup.gameObject:SetActive(false)
|
||||||
|
if not attriList[i].title then
|
||||||
|
attriList[i].title = newObjToParent(self.proTitle,attriList[i].proGroup)
|
||||||
|
attriList[i].titleCom = Util.GetGameObject(attriList[i].title,"name/text"):GetComponent("Text")
|
||||||
|
end
|
||||||
|
attriList[i].title.gameObject:SetActive(false)
|
||||||
|
for j = 1, #data[i].pro do
|
||||||
|
if not attriList[i].pro then
|
||||||
|
attriList[i].pro = {}
|
||||||
|
end
|
||||||
|
if not attriList[i].TextCom then
|
||||||
|
attriList[i].TextCom = {}
|
||||||
|
end
|
||||||
|
if not attriList[i].proParent then
|
||||||
|
attriList[i].proParent = newObjToParent(self.proValue,attriList[i].proGroup)
|
||||||
|
end
|
||||||
|
if not attriList[i].pro[j] then
|
||||||
|
attriList[i].pro[j] = newObjToParent(self.proNum,attriList[i].proParent)
|
||||||
|
attriList[i].TextCom[j] = attriList[i].pro[j]:GetComponent("Text")
|
||||||
|
end
|
||||||
|
attriList[i].pro[j].gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
if not attriList[i].tip then
|
||||||
|
attriList[i].tip = newObjToParent(self.proTip,attriList[i].proGroup)
|
||||||
|
attriList[i].tipComp = Util.GetGameObject(attriList[i].tip,"name"):GetComponent("Text")
|
||||||
|
end
|
||||||
|
attriList[i].proGroup.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
for i = 1, #data do
|
||||||
|
attriList[i].proGroup.gameObject:SetActive(true)
|
||||||
|
if data[i].title and data[i].title ~= "" then
|
||||||
|
attriList[i].title.gameObject:SetActive(true)
|
||||||
|
attriList[i].titleCom.text = data[i].title
|
||||||
|
else
|
||||||
|
attriList[i].title.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
for j = 1, #data[i].pro do
|
||||||
|
attriList[i].pro[j].gameObject:SetActive(true)
|
||||||
|
attriList[i].TextCom[j].text = data[i].pro[j]
|
||||||
|
end
|
||||||
|
if data[i].tip and data[i].tip ~= "" then
|
||||||
|
attriList[i].tip.gameObject:SetActive(true)
|
||||||
|
attriList[i].tipComp.text = data[i].tip
|
||||||
|
else
|
||||||
|
attriList[i].tip.gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:OnClose()
|
||||||
|
Util.ClearChild(self.bg.transform)
|
||||||
|
attriList = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
function this:OnDestroy()
|
||||||
|
Util.ClearChild(self.bg.transform)
|
||||||
|
attriList = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
return this
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f11aea8f71233a643ac7a7dc5e17dc63
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -292,6 +292,17 @@ function this.AddPotentialDataByType(dyn,type,lv)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--改变所有英雄的礼物等级
|
||||||
|
function this.ChangeAllHeroGiftLV()
|
||||||
|
for i, v in pairs(heroDatas) do
|
||||||
|
if v.potential then
|
||||||
|
for key, value in pairs(v.potential) do
|
||||||
|
value.giftLv=GiftManager.GetHeroPotencyLvById(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--设置法灵
|
--设置法灵
|
||||||
function this.SetHeroBaublesId(dyn,_id)
|
function this.SetHeroBaublesId(dyn,_id)
|
||||||
if heroDatas[dyn] then
|
if heroDatas[dyn] then
|
||||||
|
@ -1219,7 +1230,7 @@ function this.UpdateHeroLvEnd()
|
||||||
if heroEndStar == nil then
|
if heroEndStar == nil then
|
||||||
heroEndStar = v.Star
|
heroEndStar = v.Star
|
||||||
end
|
end
|
||||||
LogError("heroEndStar================="..heroEndStar)
|
-- LogError("heroEndStar================="..heroEndStar)
|
||||||
for i, v2 in ConfigPairs(heroRankUpConfig) do
|
for i, v2 in ConfigPairs(heroRankUpConfig) do
|
||||||
if v2.Star == v.Star then
|
if v2.Star == v.Star then
|
||||||
if v2.OpenStar == heroEndStar then
|
if v2.OpenStar == heroEndStar then
|
||||||
|
@ -2967,72 +2978,73 @@ end
|
||||||
local rewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
|
local rewardGroup = ConfigManager.GetConfig(ConfigName.RewardGroup)
|
||||||
function this.GetHeroReturnItems(selectHeroData, type)
|
function this.GetHeroReturnItems(selectHeroData, type)
|
||||||
local allRewardData = {}
|
local allRewardData = {}
|
||||||
-- if type == GENERAL_POPUP_TYPE.ResolveRecall then
|
if type == GENERAL_POPUP_TYPE.ResolveRecall then
|
||||||
-- local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
|
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 34).Value) / 10000
|
||||||
-- local ShowItemlist = {}
|
local ShowItemlist = {}
|
||||||
-- --HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
|
--HeroReturn 的 ReturnHero + RankupReturn * specificValue + HeroLevelConfig 的 Consume * specificValue
|
||||||
-- --先把回溯英雄放进去
|
--先把回溯英雄放进去
|
||||||
-- for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
-- local curHeroData = heroDatas[i]
|
local curHeroData = heroDatas[i]
|
||||||
-- if not curHeroData then
|
if not curHeroData then
|
||||||
-- return
|
return
|
||||||
-- end
|
end
|
||||||
-- local pId
|
local pId
|
||||||
-- if curHeroData.breakId == 0 then
|
if curHeroData.breakId == 0 then
|
||||||
-- pId=0
|
pId=0
|
||||||
-- else
|
else
|
||||||
-- pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
|
pId= heroRankUpConfig[curHeroData.breakId].Phase[2]
|
||||||
-- end
|
end
|
||||||
-- local heroReturnConfig =
|
local heroReturnConfig =
|
||||||
-- ConfigManager.TryGetConfigDataByDoubleKey(
|
ConfigManager.TryGetConfigDataByDoubleKey(
|
||||||
-- ConfigName.HeroReturn,
|
ConfigName.HeroReturn,
|
||||||
-- "HeroId",
|
"HeroId",
|
||||||
-- curHeroData.id,
|
curHeroData.id,
|
||||||
-- "Star",
|
"Star",
|
||||||
-- pId
|
pId
|
||||||
-- )
|
)
|
||||||
-- local rewardShowStr1 = {}
|
local rewardShowStr1 = {}
|
||||||
-- if not heroReturnConfig then
|
if not heroReturnConfig then
|
||||||
-- LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
|
LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
|
ShowItemlist[heroReturnConfig.HeroId] = {heroReturnConfig.HeroId,1,curHeroData.star}
|
||||||
-- rewardShowStr1 = heroReturnConfig.RankupReturn
|
rewardShowStr1 = heroReturnConfig.RankupReturn
|
||||||
-- if rewardShowStr1 then
|
if rewardShowStr1 then
|
||||||
-- for k,v in ipairs(rewardShowStr1) do
|
for k,v in ipairs(rewardShowStr1) do
|
||||||
-- if v[1] and v[2] then
|
if v[1] and v[2] then
|
||||||
-- if not ShowItemlist[v[1]] then
|
if not ShowItemlist[v[1]] then
|
||||||
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
|
rewardShowStr1 = ConfigManager.GetConfigData(ConfigName.HeroLevelConfig, v.lv).SumConsume
|
||||||
-- if rewardShowStr1 then
|
if rewardShowStr1 then
|
||||||
-- for k,v in ipairs(rewardShowStr1) do
|
for k,v in ipairs(rewardShowStr1) do
|
||||||
-- if not ShowItemlist[v[1]] then
|
if not ShowItemlist[v[1]] then
|
||||||
-- ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1], v[2] * specificValue}
|
||||||
-- else
|
else
|
||||||
-- ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
ShowItemlist[v[1]] = {v[1],ShowItemlist[v[1]][2] + v[2] * specificValue}
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- end
|
end
|
||||||
-- --this.GetHeroReturnItems2(ShowItemlist,allRewardData)
|
--this.GetHeroReturnItems2(ShowItemlist,allRewardData)
|
||||||
-- end
|
end
|
||||||
-- local dropList = {}
|
local dropList = {}
|
||||||
-- for n,m in pairs(ShowItemlist) do
|
for n,m in pairs(ShowItemlist) do
|
||||||
-- local curReward = {}
|
local curReward = {}
|
||||||
-- curReward.id = m[1]
|
curReward.id = m[1]
|
||||||
-- curReward.num = math.floor(m[2])
|
curReward.num = math.floor(m[2])
|
||||||
-- curReward.itemConfig = itemConfig[curReward.id]
|
curReward.itemConfig = itemConfig[curReward.id]
|
||||||
-- curReward.star = m[3] or nil
|
curReward.star = m[3] or nil
|
||||||
-- table.insert(dropList, curReward)
|
table.insert(dropList, curReward)
|
||||||
-- end
|
end
|
||||||
-- return dropList
|
return dropList
|
||||||
-- else
|
elseif type == GENERAL_POPUP_TYPE.ResolveDismantle then
|
||||||
if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
|
|
||||||
|
--if type == GENERAL_POPUP_TYPE.ResolveDismantle or type== GENERAL_POPUP_TYPE.ResolveRecall then --献祭
|
||||||
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 35).Value) / 10000
|
local specificValue = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 35).Value) / 10000
|
||||||
for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
--当英雄一次都未突破和进阶时
|
--当英雄一次都未突破和进阶时
|
||||||
|
@ -3196,7 +3208,7 @@ function this.GetReturnItemsByType(selectHeroData)
|
||||||
for i, v in pairs(selectHeroData) do
|
for i, v in pairs(selectHeroData) do
|
||||||
local curHeroData = heroDatas[i]
|
local curHeroData = heroDatas[i]
|
||||||
local temp = {}
|
local temp = {}
|
||||||
if curHeroData.talismanList > 1 then
|
if curHeroData.talismanList and curHeroData.talismanList > 1 then
|
||||||
local temp1 =tonumber(ConfigManager.GetConfigData(ConfigName.HeroConfig, curHeroData.id).EquipTalismana[2])
|
local temp1 =tonumber(ConfigManager.GetConfigData(ConfigName.HeroConfig, curHeroData.id).EquipTalismana[2])
|
||||||
for i = 1, curHeroData.talismanList - 1 do
|
for i = 1, curHeroData.talismanList - 1 do
|
||||||
temp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",temp1,"Level",i).RankupBasicMaterial
|
temp = ConfigManager.GetConfigDataByDoubleKey(ConfigName.EquipTalismana,"TalismanaId",temp1,"Level",i).RankupBasicMaterial
|
||||||
|
@ -4244,6 +4256,19 @@ function this.GetHeroPotencyAddByType(_dyn,_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function this.GetHeroPotencyAddByTypeAndPotencyData(_data,_type)
|
||||||
|
if _data and _type and _data[_type] then
|
||||||
|
local aaa=_data[_type]
|
||||||
|
local allLv=aaa.lv+aaa.giftLv
|
||||||
|
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.PotentialNew,"Type",_type,"Level",allLv)
|
||||||
|
if config then
|
||||||
|
local pro=config.Attribute/10000
|
||||||
|
return pro
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function this.ResetHero(dynamicloadId)
|
function this.ResetHero(dynamicloadId)
|
||||||
if heroDatas[dynamicloadId] then
|
if heroDatas[dynamicloadId] then
|
||||||
|
|
|
@ -5,6 +5,7 @@ local Trump = ConfigManager.GetConfig(ConfigName.Trump)
|
||||||
local TrumpLevelupPool = ConfigManager.GetConfig(ConfigName.TrumpLevelupPool)
|
local TrumpLevelupPool = ConfigManager.GetConfig(ConfigName.TrumpLevelupPool)
|
||||||
local passiveSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig)
|
local passiveSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig)
|
||||||
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
|
||||||
|
local propertyConfig=ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||||
this.TailsmanList = {}
|
this.TailsmanList = {}
|
||||||
function this.Initialize()
|
function this.Initialize()
|
||||||
end
|
end
|
||||||
|
@ -123,7 +124,10 @@ end
|
||||||
|
|
||||||
function this.GetTailsmanTotalPro()
|
function this.GetTailsmanTotalPro()
|
||||||
local proList = {}
|
local proList = {}
|
||||||
|
local special=ConfigManager.GetConfigData(ConfigName.SpecialConfig,177)
|
||||||
|
local num=tonumber(special.Value)/10000
|
||||||
for k,v in pairs(this.TailsmanList) do
|
for k,v in pairs(this.TailsmanList) do
|
||||||
|
--LogError("Trump[k].LvupPool==========="..Trump[k].LvupPool.." level==="..v)
|
||||||
local tempPro = ConfigManager.GetConfigDataByDoubleKey(ConfigName.TrumpLevelupPool,"PoolId",Trump[k].LvupPool,"Level",v).LvupProps
|
local tempPro = ConfigManager.GetConfigDataByDoubleKey(ConfigName.TrumpLevelupPool,"PoolId",Trump[k].LvupPool,"Level",v).LvupProps
|
||||||
if tempPro then
|
if tempPro then
|
||||||
for i = 1,#tempPro do
|
for i = 1,#tempPro do
|
||||||
|
@ -134,18 +138,77 @@ function this.GetTailsmanTotalPro()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local tempPro = this.GetTotalStarPro()
|
--获取所有技能加成属性
|
||||||
if tempPro then
|
local addLv=0
|
||||||
for i = 1,#tempPro do
|
for i=1,5 do
|
||||||
if not proList[tempPro[i][1]] then
|
local curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(i)
|
||||||
proList[tempPro[i][1]] = 0
|
for j=1,#curData do
|
||||||
|
--LogError("curData.lv=========="..curData[j].lv)
|
||||||
|
if curData[j].lv>0 then
|
||||||
|
addLv=addLv+curData[j].lv
|
||||||
end
|
end
|
||||||
proList[tempPro[i][1]] = proList[tempPro[i][1]] + tempPro[i][2]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
--屏蔽星数加成属性
|
||||||
|
-- local tempPro = this.GetTotalStarPro()
|
||||||
|
-- if tempPro then
|
||||||
|
-- for i = 1,#tempPro do
|
||||||
|
-- if not proList[tempPro[i][1]] then
|
||||||
|
-- proList[tempPro[i][1]] = 0
|
||||||
|
-- end
|
||||||
|
-- proList[tempPro[i][1]] = proList[tempPro[i][1]] + tempPro[i][2]
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- for k, v in pairs(proList) do
|
||||||
|
-- LogError("属性 v========================================="..v)
|
||||||
|
-- end
|
||||||
|
-- LogError("addlv============================"..addLv)
|
||||||
|
if addLv>0 then
|
||||||
|
for k, v in pairs(proList) do
|
||||||
|
if propertyConfig[k].Style==1 then
|
||||||
|
proList[k]=math.floor(v*(1+addLv*num)+0.5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
return proList
|
return proList
|
||||||
end
|
end
|
||||||
|
function this.GetTailsmanTotalProNoAdd()
|
||||||
|
local proList = {}
|
||||||
|
local special=ConfigManager.GetConfigData(ConfigName.SpecialConfig,177)
|
||||||
|
local num=tonumber(special.Value)/10000
|
||||||
|
for k,v in pairs(this.TailsmanList) do
|
||||||
|
--LogError("Trump[k].LvupPool==========="..Trump[k].LvupPool.." level==="..v)
|
||||||
|
local tempPro = ConfigManager.GetConfigDataByDoubleKey(ConfigName.TrumpLevelupPool,"PoolId",Trump[k].LvupPool,"Level",v).LvupProps
|
||||||
|
if tempPro then
|
||||||
|
for i = 1,#tempPro do
|
||||||
|
if not proList[tempPro[i][1]] then
|
||||||
|
proList[tempPro[i][1]] = 0
|
||||||
|
end
|
||||||
|
proList[tempPro[i][1]] = proList[tempPro[i][1]] + tempPro[i][2]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--屏蔽星数加成属性
|
||||||
|
-- local tempPro = this.GetTotalStarPro()
|
||||||
|
-- if tempPro then
|
||||||
|
-- for i = 1,#tempPro do
|
||||||
|
-- if not proList[tempPro[i][1]] then
|
||||||
|
-- proList[tempPro[i][1]] = 0
|
||||||
|
-- end
|
||||||
|
-- proList[tempPro[i][1]] = proList[tempPro[i][1]] + tempPro[i][2]
|
||||||
|
-- end
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- for k, v in pairs(proList) do
|
||||||
|
-- LogError("属性 v========================================="..v)
|
||||||
|
-- end
|
||||||
|
-- LogError("addlv============================"..addLv)
|
||||||
|
|
||||||
|
return proList
|
||||||
|
end
|
||||||
function this.GetTailsmanCost(id,lv)
|
function this.GetTailsmanCost(id,lv)
|
||||||
local num = ConfigManager.GetConfigDataByDoubleKey(ConfigName.TrumpLevelupPool,"PoolId",Trump[id].LvupPool,"Level",lv).LvupCostItemNum
|
local num = ConfigManager.GetConfigDataByDoubleKey(ConfigName.TrumpLevelupPool,"PoolId",Trump[id].LvupPool,"Level",lv).LvupCostItemNum
|
||||||
local costId = Trump[id].LvupCostItem
|
local costId = Trump[id].LvupCostItem
|
||||||
|
|
|
@ -2,7 +2,10 @@
|
||||||
TailsmanSoulMainPanel = Inherit(BasePanel)
|
TailsmanSoulMainPanel = Inherit(BasePanel)
|
||||||
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||||
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
|
||||||
|
local specialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,177)
|
||||||
local sortOrder = 0
|
local sortOrder = 0
|
||||||
|
local pro=tonumber(specialConfig.Value)/10000
|
||||||
|
local addLv=0
|
||||||
local curData = {}
|
local curData = {}
|
||||||
function TailsmanSoulMainPanel:InitComponent()
|
function TailsmanSoulMainPanel:InitComponent()
|
||||||
self.spLoader = SpriteLoader.New()
|
self.spLoader = SpriteLoader.New()
|
||||||
|
@ -14,8 +17,9 @@ function TailsmanSoulMainPanel:InitComponent()
|
||||||
self.tailsmainSoulDi = Util.GetGameObject(self.tailsmainSoul, "di"):GetComponent("Image")
|
self.tailsmainSoulDi = Util.GetGameObject(self.tailsmainSoul, "di"):GetComponent("Image")
|
||||||
self.icon = Util.GetGameObject(self.tailsmainSoul, "icon"):GetComponent("Image")
|
self.icon = Util.GetGameObject(self.tailsmainSoul, "icon"):GetComponent("Image")
|
||||||
|
|
||||||
self.starGray = Util.GetGameObject(self.transform,"proMainLayout/starGrid/starGray")
|
--self.starGray = Util.GetGameObject(self.transform,"proMainLayout/starGrid/starGray")
|
||||||
self.starLight = Util.GetGameObject(self.transform,"proMainLayout/starGrid/starLight")
|
--self.starLight = Util.GetGameObject(self.transform,"proMainLayout/starGrid/starLight")
|
||||||
|
self.starGrid = Util.GetGameObject(self.transform,"proMainLayout/starGrid")
|
||||||
self.upLvBtn = Util.GetGameObject(self.transform, "proMainLayout/upLvBtn")
|
self.upLvBtn = Util.GetGameObject(self.transform, "proMainLayout/upLvBtn")
|
||||||
self.upLvBtnText = Util.GetGameObject(self.upLvBtn, "Text"):GetComponent("Text")
|
self.upLvBtnText = Util.GetGameObject(self.upLvBtn, "Text"):GetComponent("Text")
|
||||||
self.upLvBtnRed = Util.GetGameObject(self.upLvBtn, "red")
|
self.upLvBtnRed = Util.GetGameObject(self.upLvBtn, "red")
|
||||||
|
@ -107,7 +111,7 @@ function TailsmanSoulMainPanel:RemoveListener()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TailsmanSoulMainPanel:OnSortingOrderChange()
|
function TailsmanSoulMainPanel:OnSortingOrderChange()
|
||||||
--Util.SetParticleSortLayer(self.effect,self.sortingOrder + 1)
|
-- Util.SetParticleSortLayer(self.effect,self.sortingOrder + 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TailsmanSoulMainPanel:OnOpen(curCompId)
|
function TailsmanSoulMainPanel:OnOpen(curCompId)
|
||||||
|
@ -138,14 +142,15 @@ end
|
||||||
|
|
||||||
function TailsmanSoulMainPanel:GetSkillDataList()
|
function TailsmanSoulMainPanel:GetSkillDataList()
|
||||||
local datas = {}
|
local datas = {}
|
||||||
|
|
||||||
for k,v in pairs(self.skillDataList) do
|
for k,v in pairs(self.skillDataList) do
|
||||||
local str = v
|
local str = v
|
||||||
if self.complv == k then
|
if self.complv == k then
|
||||||
str = string.format("<color=#00FF00>%s</color>",str)
|
str = string.format("<color=#00FF00>%s %s</color>",str,"羁绊基础属性提升"..pro*100*k.."%")
|
||||||
elseif self.complv < k then
|
elseif self.complv < k then
|
||||||
str = string.format("<color=#BFBFBF>%s</color>",str)
|
str = string.format("<color=#BFBFBF>%s %s</color>",str,"羁绊聚灵基础属性提升"..pro*100*k.."%")
|
||||||
else
|
else
|
||||||
str = string.format("<color=#FFCF9E>%s</color>",str)
|
str = string.format("<color=#FFCF9E>%s %s</color>",str,"羁绊聚灵基础属性提升"..pro*100*k.."%")
|
||||||
end
|
end
|
||||||
datas[k] = str
|
datas[k] = str
|
||||||
end
|
end
|
||||||
|
@ -156,13 +161,26 @@ function TailsmanSoulMainPanel:ChangeTailsMan()
|
||||||
self.data = self.trumpList[self.index]
|
self.data = self.trumpList[self.index]
|
||||||
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(self.data.config.Icon))
|
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(self.data.config.Icon))
|
||||||
--self.tailsmainSoulDi.sprite = self.spLoader:LoadSprite(GetTailsmanDiImage[self.data.config.Quality])
|
--self.tailsmainSoulDi.sprite = self.spLoader:LoadSprite(GetTailsmanDiImage[self.data.config.Quality])
|
||||||
|
--获取技能加成等级
|
||||||
|
addLv=0
|
||||||
|
for i=1,5 do
|
||||||
|
local curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(i)
|
||||||
|
for j=1,#curData do
|
||||||
|
--LogError("curData.lv=========="..curData[j].lv)
|
||||||
|
if curData[j].lv>0 then
|
||||||
|
addLv=addLv+curData[j].lv
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
local data1 = self:GetProData()
|
local data1 = self:GetProData()
|
||||||
|
|
||||||
self:SetProList(data1,self.proList,self.proGrid,self.pro)
|
self:SetProList(data1,self.proList,self.proGrid,self.pro)
|
||||||
self:SetSelect()
|
self:SetSelect()
|
||||||
self:SetCostItem()
|
self:SetCostItem()
|
||||||
self:SetStar(self.starGray,self.data.config.LvMax)
|
--self:SetStar(self.starGray,self.data.config.LvMax)
|
||||||
self:SetStar(self.starLight,self.data.lv)
|
--self:SetStar(self.starLight,self.data.lv)
|
||||||
|
SetHeroStars(self.spLoader,self.starGrid,self.data.lv)
|
||||||
end
|
end
|
||||||
|
|
||||||
function TailsmanSoulMainPanel:GetProData()
|
function TailsmanSoulMainPanel:GetProData()
|
||||||
|
@ -178,9 +196,11 @@ function TailsmanSoulMainPanel:GetProData()
|
||||||
end
|
end
|
||||||
local str = ""
|
local str = ""
|
||||||
for i = 1,#curData do
|
for i = 1,#curData do
|
||||||
str = string.format("<color=#ecdfc8>%s:%s</color>",propertyConfig[curData[i][1]].Info,GetPropertyFormatStrOne(propertyConfig[curData[i][1]].Style,curData[i][2]) )
|
--LogError("addlv======================"..addLv.." pro========="..pro)
|
||||||
|
local value=math.floor(curData[i][2]*(1+addLv*pro)+0.5)
|
||||||
|
str = string.format("<color=#ecdfc8>%s:%s</color>",propertyConfig[curData[i][1]].Info,GetPropertyFormatStrOne(propertyConfig[curData[i][1]].Style,value) )
|
||||||
if nextProData[curData[i][1]] then
|
if nextProData[curData[i][1]] then
|
||||||
str = str..string.format("<color=#00FF00>(+%s)</color>",GetPropertyFormatStrOne(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - curData[i][2]))
|
str = str..string.format("<color=#00FF00>(+%s)</color>",GetPropertyFormatStrOne(propertyConfig[curData[i][1]].Style,nextProData[curData[i][1]] - value))
|
||||||
end
|
end
|
||||||
table.insert(proData,str)
|
table.insert(proData,str)
|
||||||
end
|
end
|
||||||
|
@ -195,6 +215,9 @@ function TailsmanSoulMainPanel:SetProData(proData)
|
||||||
end
|
end
|
||||||
proList[proData[i][1]] = proList[proData[i][1]] + proData[i][2]
|
proList[proData[i][1]] = proList[proData[i][1]] + proData[i][2]
|
||||||
end
|
end
|
||||||
|
for k, v in pairs(proList) do
|
||||||
|
proList[k]=math.floor(v*(1+addLv*pro)+0.5)
|
||||||
|
end
|
||||||
return proList
|
return proList
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -263,8 +286,9 @@ function TailsmanSoulMainPanel:SetTailsManList(data,grid,pre)
|
||||||
self.tailsList[i].card = Util.GetGameObject(self.tailsList[i].go,"ItemView")
|
self.tailsList[i].card = Util.GetGameObject(self.tailsList[i].go,"ItemView")
|
||||||
self.tailsList[i].bg = Util.GetGameObject(self.tailsList[i].card.transform,"item/frame"):GetComponent("Image")
|
self.tailsList[i].bg = Util.GetGameObject(self.tailsList[i].card.transform,"item/frame"):GetComponent("Image")
|
||||||
self.tailsList[i].icon = Util.GetGameObject(self.tailsList[i].card.transform,"item/icon"):GetComponent("Image")
|
self.tailsList[i].icon = Util.GetGameObject(self.tailsList[i].card.transform,"item/icon"):GetComponent("Image")
|
||||||
self.tailsList[i].starGray = Util.GetGameObject(self.tailsList[i].card.transform,"item/starGrid/starGray")
|
--self.tailsList[i].starGray = Util.GetGameObject(self.tailsList[i].card.transform,"item/starGrid/starGray")
|
||||||
self.tailsList[i].starLight = Util.GetGameObject(self.tailsList[i].card.transform,"starGrid/starLight")
|
--self.tailsList[i].starLight = Util.GetGameObject(self.tailsList[i].card.transform,"starGrid/starLight")
|
||||||
|
self.tailsList[i].starGrid = Util.GetGameObject(self.tailsList[i].card.transform,"starGrid")
|
||||||
self.tailsList[i].name = Util.GetGameObject(self.tailsList[i].card.transform,"name"):GetComponent("Text")
|
self.tailsList[i].name = Util.GetGameObject(self.tailsList[i].card.transform,"name"):GetComponent("Text")
|
||||||
self.tailsList[i].red = Util.GetGameObject(self.tailsList[i].card.transform,"redPoint")
|
self.tailsList[i].red = Util.GetGameObject(self.tailsList[i].card.transform,"redPoint")
|
||||||
end
|
end
|
||||||
|
@ -272,8 +296,9 @@ function TailsmanSoulMainPanel:SetTailsManList(data,grid,pre)
|
||||||
self.tailsList[i].bg.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(data[i].config.Quality))
|
self.tailsList[i].bg.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(data[i].config.Quality))
|
||||||
self.tailsList[i].icon.sprite = self.spLoader:LoadSprite(GetResourcePath(data[i].config.Icon))
|
self.tailsList[i].icon.sprite = self.spLoader:LoadSprite(GetResourcePath(data[i].config.Icon))
|
||||||
self.tailsList[i].name.text = data[i].config.Name
|
self.tailsList[i].name.text = data[i].config.Name
|
||||||
self:SetStar(self.tailsList[i].starGray,data[i].config.LvMax)
|
--self:SetStar(self.tailsList[i].starGray,data[i].config.LvMax)
|
||||||
self:SetStar(self.tailsList[i].starLight,data[i].lv)
|
--self:SetStar(self.tailsList[i].starLight,data[i].lv)
|
||||||
|
SetHeroStars(self.spLoader,self.tailsList[i].starGrid,data[i].lv)
|
||||||
local costId,num = TailsManSoulManager.GetTailsmanCost(data[i].id,data[i].lv)
|
local costId,num = TailsManSoulManager.GetTailsmanCost(data[i].id,data[i].lv)
|
||||||
local curNum = BagManager.GetItemCountById(costId)
|
local curNum = BagManager.GetItemCountById(costId)
|
||||||
if num and num > 0 and curNum >= num then
|
if num and num > 0 and curNum >= num then
|
||||||
|
|
Loading…
Reference in New Issue