法宝聚灵修改
parent
2f9b1e8167
commit
8676f80073
|
@ -2591,6 +2591,7 @@ GENERAL_POPUP_TYPE={
|
||||||
GodPrintUp = 71, --神印升品阶
|
GodPrintUp = 71, --神印升品阶
|
||||||
GiveLikeHotHero = 72,--英雄热度排行
|
GiveLikeHotHero = 72,--英雄热度排行
|
||||||
WishEquipDraw = 73, --心愿法宝抽卡
|
WishEquipDraw = 73, --心愿法宝抽卡
|
||||||
|
IncarnationDes2 = 74,
|
||||||
}
|
}
|
||||||
|
|
||||||
--通用信息弹窗类型
|
--通用信息弹窗类型
|
||||||
|
|
|
@ -202,7 +202,7 @@ function this.GetHeroPotencyLvById(did)
|
||||||
local list=this.allHeroGifts[did]
|
local list=this.allHeroGifts[did]
|
||||||
for i=1,#list do
|
for i=1,#list do
|
||||||
local id=list[i]
|
local id=list[i]
|
||||||
if equipConfig[id] and equipConfig[id].PotentialNew and #equipConfig[id].PotentialNew>0 then
|
if equipConfig[id] and equipConfig[id].PotentialNew and #equipConfig[id].PotentialNew>0 and type(equipConfig[id].PotentialNew[1])~="userdata" then
|
||||||
lv=lv+equipConfig[id].PotentialNew[2]
|
lv=lv+equipConfig[id].PotentialNew[2]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -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: 67d99074caaee654a97ba1e52214684f
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -6,6 +6,8 @@ local redPointList = {}
|
||||||
local tabsRedpoints = {}
|
local tabsRedpoints = {}
|
||||||
local tabs={}
|
local tabs={}
|
||||||
local tabsImg = {"r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
|
local tabsImg = {"r_hero_huo 1_zh", "r_hero_feng 1_zh", "r_hero_shui 1_zh", "r_hero_dadi 1_zh"}
|
||||||
|
local special=ConfigManager.GetConfigData(ConfigName.SpecialConfig,177)
|
||||||
|
local pro=tonumber(special.Value)/100
|
||||||
-- Tab管理器
|
-- Tab管理器
|
||||||
local TabBox = require("Modules/Common/TabBox")
|
local TabBox = require("Modules/Common/TabBox")
|
||||||
local tabData = {
|
local tabData = {
|
||||||
|
@ -25,6 +27,7 @@ local tabData = {
|
||||||
local curData = {}
|
local curData = {}
|
||||||
local curPage = 1
|
local curPage = 1
|
||||||
local proId = 1
|
local proId = 1
|
||||||
|
local addLv=0
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function TailsManSouPanel:InitComponent()
|
function TailsManSouPanel:InitComponent()
|
||||||
this.spLoader = SpriteLoader.New()
|
this.spLoader = SpriteLoader.New()
|
||||||
|
@ -82,14 +85,15 @@ function TailsManSouPanel:BindEvent()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(self.addBtn, function()
|
Util.AddClick(self.addBtn, function()
|
||||||
local li = TailsManSoulManager.GetTailsmanTotalPro()
|
local li = TailsManSoulManager.GetTailsmanTotalPro()
|
||||||
|
local li2= TailsManSoulManager.GetTailsmanTotalProNoAdd()
|
||||||
if not li or #li < 1 then
|
if not li or #li < 1 then
|
||||||
PopupTipPanel.ShowTip("当前无属性加成")
|
PopupTipPanel.ShowTip("当前无属性加成")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local s = function(data)
|
local s = function(data,data2)
|
||||||
local lis1 = {}
|
local lis1 = {}
|
||||||
for k,v in pairs(data) do
|
for k,v in pairs(data) do
|
||||||
table.insert(lis1,{str = string.format("<color=#00FF00>%s+%s</color>",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v)),sort = propertyConfig[k].SortId})
|
table.insert(lis1,{str = string.format("<color=#00FF00>%s+%s 法宝共鸣额外加成%s (%s%%)</color>",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v),GetPropertyFormatStr(propertyConfig[k].Style,v-data2[k]),addLv*pro),sort = propertyConfig[k].SortId})
|
||||||
end
|
end
|
||||||
table.sort(lis1,function(a,b)
|
table.sort(lis1,function(a,b)
|
||||||
return a.sort < b.sort
|
return a.sort < b.sort
|
||||||
|
@ -103,7 +107,7 @@ function TailsManSouPanel:BindEvent()
|
||||||
local data = {}
|
local data = {}
|
||||||
local singData = {}
|
local singData = {}
|
||||||
singData.title = "加成属性"
|
singData.title = "加成属性"
|
||||||
singData.pro = s(li)
|
singData.pro = s(li,li2)
|
||||||
singData.tip = ""
|
singData.tip = ""
|
||||||
table.insert(data,singData)
|
table.insert(data,singData)
|
||||||
-- for i = 1 ,#data do
|
-- for i = 1 ,#data do
|
||||||
|
@ -112,7 +116,7 @@ function TailsManSouPanel:BindEvent()
|
||||||
-- LogGreen("data[i]:"..v)
|
-- LogGreen("data[i]:"..v)
|
||||||
-- end
|
-- end
|
||||||
-- end
|
-- end
|
||||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes,data)
|
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes2,data)
|
||||||
|
|
||||||
-- local li = TailsManSoulManager.GetTailsmanTotalPro()
|
-- local li = TailsManSoulManager.GetTailsmanTotalPro()
|
||||||
-- local li2 = {}
|
-- local li2 = {}
|
||||||
|
@ -238,6 +242,17 @@ function TailsManSouPanel:OnShow()
|
||||||
--self.tabBox:Init(self.tabbox.gameObject, tabs, curPage)
|
--self.tabBox:Init(self.tabbox.gameObject, tabs, curPage)
|
||||||
curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(1)
|
curData = TailsManSoulManager.GetTailsmanSoulDatasByPro(1)
|
||||||
self:RefreshData()
|
self:RefreshData()
|
||||||
|
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
|
||||||
self.effectJin.gameObject:SetActive(tabData[curPage].quality == 5)
|
self.effectJin.gameObject:SetActive(tabData[curPage].quality == 5)
|
||||||
self.effectHong.gameObject:SetActive(tabData[curPage].quality == 6)
|
self.effectHong.gameObject:SetActive(tabData[curPage].quality == 6)
|
||||||
Util.SetParticleSortLayer(self.effectJin.gameObject,self.sortingOrder + 1)
|
Util.SetParticleSortLayer(self.effectJin.gameObject,self.sortingOrder + 1)
|
||||||
|
|
|
@ -174,7 +174,41 @@ function this.GetTailsmanTotalPro()
|
||||||
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
|
||||||
|
|
|
@ -4,6 +4,8 @@ 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 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()
|
||||||
|
@ -140,15 +142,15 @@ end
|
||||||
|
|
||||||
function TailsmanSoulMainPanel:GetSkillDataList()
|
function TailsmanSoulMainPanel:GetSkillDataList()
|
||||||
local datas = {}
|
local datas = {}
|
||||||
local pro=tonumber(specialConfig.Value)/10000*100
|
|
||||||
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 %s</color>",str,"法宝聚灵基础属性提升"..pro*k.."%")
|
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 %s</color>",str,"法宝聚灵基础属性提升"..pro*k.."%")
|
str = string.format("<color=#BFBFBF>%s %s</color>",str,"法宝聚灵基础属性提升"..pro*100*k.."%")
|
||||||
else
|
else
|
||||||
str = string.format("<color=#FFCF9E>%s %s</color>",str,"法宝聚灵基础属性提升"..pro*k.."%")
|
str = string.format("<color=#FFCF9E>%s %s</color>",str,"法宝聚灵基础属性提升"..pro*100*k.."%")
|
||||||
end
|
end
|
||||||
datas[k] = str
|
datas[k] = str
|
||||||
end
|
end
|
||||||
|
@ -159,7 +161,20 @@ 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()
|
||||||
|
@ -181,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
|
||||||
|
@ -198,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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue