【修行】提交
parent
7ba5209394
commit
92b22fdc0c
|
|
@ -45,7 +45,7 @@ end
|
|||
--绑定事件(用于子类重写)
|
||||
function HandBookRoleInfoLayout:BindEvent()
|
||||
Util.AddClick(self.allProButton, function()
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,heroConFigData,false)
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,heroConFigData,false,nil,true)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ function this.RoleInfo1()
|
|||
Util.AddOnceClick(this.proBtn,function()
|
||||
local guildSkill = nil
|
||||
if this.isOther then guildSkill = curHeroData.guildSkill end
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,curHeroData.heroConfig,true,guildSkill)
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,curHeroData.heroConfig,true,guildSkill,true)
|
||||
end)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,67 @@
|
|||
PracticeManager = {}
|
||||
local this = PracticeManager
|
||||
local XinXianConfig = ConfigManager.GetConfig(ConfigName.XiuXianConfig)
|
||||
|
||||
function this.Initialize()
|
||||
this.PracticeLevel = 0
|
||||
this.PracticeLevel = 1
|
||||
this.StarNum = 0
|
||||
this.PracticeConfigData = {}
|
||||
end
|
||||
|
||||
--从服务器更新当前修行等级
|
||||
function this.UpdataFromServer(msg)
|
||||
this.PracticeLevel = msg.level
|
||||
this.StarNum = PlayerManager.level
|
||||
end
|
||||
|
||||
--获取当前等级表数据
|
||||
function this.GetCurConfigData()
|
||||
return XinXianConfig[this.PracticeLevel]
|
||||
end
|
||||
|
||||
--获取每一小点属性加成
|
||||
function this.GetSinglePointAdd()
|
||||
local singlePointAddList = {}
|
||||
local TotalPros = XinXianConfig[this.PracticeLevel].TotalPros
|
||||
for i = 1, #TotalPros do
|
||||
if not singlePointAddList[TotalPros[i][1]] then
|
||||
singlePointAddList[TotalPros[i][1]] = 0
|
||||
end
|
||||
singlePointAddList[TotalPros[i][1]] = TotalPros[i][2]
|
||||
end
|
||||
return singlePointAddList
|
||||
end
|
||||
|
||||
--获取当前获得的所有属性相加
|
||||
function this.GetCurAllGetAdd()
|
||||
local curAllGetAddList = {}
|
||||
for i = 1, this.PracticeLevel do
|
||||
local Pros = XinXianConfig[this.PracticeLevel].TotalPros
|
||||
for i = 1, #Pros do
|
||||
if not curAllGetAddList[Pros[i][1]] then
|
||||
curAllGetAddList[Pros[i][1]] = 0
|
||||
end
|
||||
curAllGetAddList[Pros[i][1]] = Pros[i][2]
|
||||
end
|
||||
end
|
||||
return curAllGetAddList
|
||||
end
|
||||
|
||||
--获取各个大境界中所有小属性加成的总和
|
||||
function this.GetAddsList()
|
||||
local addsList = {}
|
||||
for i, v in ConfigPairs(XinXianConfig) do
|
||||
if not addsList[v.RealmId] then
|
||||
addsList[v.RealmId] = {}
|
||||
end
|
||||
local Pros = v.TotalPros
|
||||
for i = 1, #Pros do
|
||||
if not addsList[v.RealmId][Pros[i][1]] then
|
||||
addsList[v.RealmId][Pros[i][1]] = 0
|
||||
end
|
||||
addsList[v.RealmId][Pros[i][1]] = Pros[i][2]
|
||||
end
|
||||
end
|
||||
return addsList
|
||||
end
|
||||
|
||||
return PracticeManager
|
||||
|
|
@ -44,7 +44,7 @@ function Practice:BindEvent()
|
|||
LogGreen("self.previewBtn")
|
||||
end)
|
||||
Util.AddClick(self.additionBtn, function()
|
||||
LogGreen("self.additionBtn")
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,PracticeManager.GetCurAllGetAdd(),nil,false,nil,false)
|
||||
end)
|
||||
Util.AddClick(self.imprintBtn, function()
|
||||
LogGreen("self.imprintBtn")
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function RoleInfoLayout:BindEvent()
|
|||
|
||||
--显示所有属性
|
||||
Util.AddClick(this.allProButton, function()
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,curHeroData.heroConfig,true)
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,allAddProVal,curHeroData.heroConfig,true,nil,true)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@ local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
|||
local fristProGoList = {}
|
||||
local secondProGoList = {}
|
||||
local thirdlyProGoList = {}
|
||||
local allAddProVal
|
||||
local heroSConFig
|
||||
local isShowGuild = true
|
||||
local isShowExtraSkill = true
|
||||
--初始化组件(用于子类重写)
|
||||
function RoleProInfoPopup:InitComponent()
|
||||
this.btnBack=Util.GetGameObject(self.transform, "btnBack")
|
||||
|
|
@ -20,7 +22,9 @@ function RoleProInfoPopup:InitComponent()
|
|||
this.proPre2=Util.GetGameObject(self.gameObject, "proPre2")
|
||||
this.fristGrid=Util.GetGameObject(self.gameObject, "grid/ver/recordPer (1)/Mask")
|
||||
this.secondGrid=Util.GetGameObject(self.gameObject, "grid/ver/recordPer (2)/Mask")
|
||||
this.secondGridP=Util.GetGameObject(self.gameObject, "grid/ver/recordPer (2)")
|
||||
this.thirdlyGrid=Util.GetGameObject(self.gameObject, "grid/ver/recordPer (3)/Mask")
|
||||
this.thirdlyGridP=Util.GetGameObject(self.gameObject, "grid/ver/recordPer (3)")
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
|
|
@ -32,17 +36,19 @@ function RoleProInfoPopup:BindEvent()
|
|||
end
|
||||
local guildSkill = nil
|
||||
--界面打开时调用(用于子类重写)
|
||||
function RoleProInfoPopup:OnOpen(...)
|
||||
function RoleProInfoPopup:OnOpen(_allAddProVal,_configData,_isShowGuild,_guildSkill,_isShowExtraSkill)
|
||||
|
||||
allAddProVal = _allAddProVal
|
||||
heroSConFig = _configData
|
||||
isShowGuild = _isShowGuild--图鉴不显示公会技能等级特殊操作
|
||||
guildSkill = _guildSkill and _guildSkill or nil--其他玩家公会技能等级特殊操作
|
||||
isShowExtraSkill = _isShowExtraSkill
|
||||
|
||||
local data={...}
|
||||
heroSConFig=data[2]
|
||||
isShowGuild=data[3]--图鉴不显示公会技能等级特殊操作
|
||||
guildSkill = data[4] and data[4] or nil--其他玩家公会技能等级特殊操作
|
||||
for i = 1, #sDataTable do
|
||||
allPro[i] = {}
|
||||
end
|
||||
--加基础 和 辅助属性
|
||||
for proId, val in pairs(data[1]) do
|
||||
for proId, val in pairs(allAddProVal) do
|
||||
if propertyConfig[proId] then
|
||||
if propertyConfig[proId].IfShow ~= 0 then
|
||||
local curLength = #allPro[propertyConfig[proId].IfShow] > 0 and #allPro[propertyConfig[proId].IfShow] or 1
|
||||
|
|
@ -58,24 +64,34 @@ function RoleProInfoPopup:OnOpen(...)
|
|||
end
|
||||
end
|
||||
end
|
||||
--加公会技能特殊属性
|
||||
allPro[3][1] = {}
|
||||
local allLv = isShowGuild and GuildSkillManager.GetAllGuildSkillLv(heroSConFig.Profession) or 0
|
||||
if guildSkill then allLv = guildSkill end
|
||||
table.insert(allPro[3][1],{proId = Language[11061]..GuildSkillType[heroSConFig.Profession],proVal = allLv})
|
||||
--for i = 1, #allPro do
|
||||
-- for j = 1, #allPro[i] do
|
||||
-- for k = 1, #allPro[i][j] do
|
||||
-- --LogGreen("allPro[i][j][k] "..allPro[i][j][k].proId.." "..allPro[i][j][k].proVal)
|
||||
-- end
|
||||
-- end
|
||||
--end
|
||||
if isShowGuild then
|
||||
--加公会技能特殊属性
|
||||
LogGreen("加公会技能特殊属性")
|
||||
allPro[3][1] = {}
|
||||
local allLv = isShowGuild and GuildSkillManager.GetAllGuildSkillLv(heroSConFig.Profession) or 0
|
||||
if guildSkill then allLv = guildSkill end
|
||||
table.insert(allPro[3][1],{proId = Language[11061]..GuildSkillType[heroSConFig.Profession],proVal = allLv})
|
||||
--for i = 1, #allPro do
|
||||
-- for j = 1, #allPro[i] do
|
||||
-- for k = 1, #allPro[i][j] do
|
||||
-- --LogGreen("allPro[i][j][k] "..allPro[i][j][k].proId.." "..allPro[i][j][k].proVal)
|
||||
-- end
|
||||
-- end
|
||||
--end
|
||||
end
|
||||
|
||||
this.ShowPanelData()
|
||||
end
|
||||
function this.ShowPanelData()
|
||||
this.GridShowData(1,allPro[1],fristProGoList, this.proPre1,this.fristGrid)
|
||||
this.GridShowData(2,allPro[2],secondProGoList, this.proPre1,this.secondGrid)
|
||||
this.GridShowData(3,allPro[3],thirdlyProGoList, this.proPre2,this.thirdlyGrid)
|
||||
if isShowExtraSkill then
|
||||
this.GridShowData(2,allPro[2],secondProGoList, this.proPre1,this.secondGrid)
|
||||
end
|
||||
if isShowGuild then
|
||||
this.GridShowData(3,allPro[3],thirdlyProGoList, this.proPre2,this.thirdlyGrid)
|
||||
end
|
||||
this.secondGridP:SetActive(isShowExtraSkill)
|
||||
this.thirdlyGridP:SetActive(isShowGuild)
|
||||
end
|
||||
function this.GridShowData(type,curAllPro,curProGoList,curPre,curGrid)
|
||||
for i = 1, math.max(#curAllPro, #curProGoList) do
|
||||
|
|
|
|||
Loading…
Reference in New Issue