Update - 1.9.0.103
EN: 1.9.0.103 CN: 1.9.0.104 JP: 1.9.0.106 KR: 1.9.0.108
This commit is contained in:
@@ -93,7 +93,7 @@ function FriendHonorTitleCtrl:Open()
|
||||
self.tbCurHonorTitle = {}
|
||||
self.tbAllHonorData = {}
|
||||
self.tbGoChosenState = {}
|
||||
local ownHonorData = PlayerData.Base:GetPlayerHonorTitleList() or {}
|
||||
self.ownHonorData = PlayerData.Base:GetPlayerHonorTitleList() or {}
|
||||
local curHononData = PlayerData.Base:GetPlayerHonorTitle() or {}
|
||||
for k, v in ipairs(curHononData) do
|
||||
table.insert(self.tbCurHonorTitle, v.Id)
|
||||
@@ -101,7 +101,14 @@ function FriendHonorTitleCtrl:Open()
|
||||
local allData = ConfigTable.Get("Honor")
|
||||
local groupData = {}
|
||||
local foreachHonor = function(mapData)
|
||||
if mapData.IsUnlock == true or ownHonorData ~= nil and table.indexof(ownHonorData, mapData.Id) > 0 then
|
||||
local bHas = false
|
||||
for k, v in pairs(self.ownHonorData) do
|
||||
if v.Id == mapData.Id then
|
||||
bHas = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if mapData.IsUnlock == true or self.ownHonorData ~= nil and bHas then
|
||||
if mapData.Type == GameEnum.honorType.Group then
|
||||
if groupData[mapData.Params[1]] == nil then
|
||||
groupData[mapData.Params[1]] = {}
|
||||
@@ -137,6 +144,13 @@ function FriendHonorTitleCtrl:RefreshHonorTitle()
|
||||
if honorData.Type == GameEnum.honorType.Character then
|
||||
local affinityData = PlayerData.Char:GetCharAffinityData(honorData.Params[1])
|
||||
level = affinityData.Level
|
||||
elseif honorData.Type == GameEnum.honorType.Levels then
|
||||
for k, v in pairs(self.ownHonorData) do
|
||||
if v.Id == honorData.Id then
|
||||
level = v.Lv or 1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
self._mapNode.goCurHonorTitle[i]:SetHonotTitle(honorData.Id, i == 1, level)
|
||||
end
|
||||
@@ -239,6 +253,13 @@ function FriendHonorTitleCtrl:OnGridRefresh(goGrid, gridIndex)
|
||||
if honorData.Type == GameEnum.honorType.Character then
|
||||
local affinityData = PlayerData.Char:GetCharAffinityData(honorData.Params[1])
|
||||
level = affinityData ~= nil and affinityData.Level or 1
|
||||
elseif honorData.Type == GameEnum.honorType.Levels then
|
||||
for k, v in pairs(self.ownHonorData) do
|
||||
if v.Id == honorData.Id then
|
||||
level = v.Lv or 1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
ctrl:SetHonotTitle(honorData.Id, true, level)
|
||||
self:SetPngSprite(imgHonorTitleEquipBg, honorData.MainRes)
|
||||
|
||||
@@ -121,6 +121,7 @@ function FriendIdCardCtrl:RefreshHead()
|
||||
end
|
||||
end
|
||||
function FriendIdCardCtrl:RefreshHonorTitle()
|
||||
local tbOwnHonorData = PlayerData.Base:GetPlayerHonorTitleList() or {}
|
||||
local tbCurHonorTitle = PlayerData.Base:GetPlayerHonorTitle()
|
||||
for i = 1, 3 do
|
||||
if tbCurHonorTitle[i] ~= nil and tbCurHonorTitle[i].Id ~= 0 and tbCurHonorTitle[i] ~= nil then
|
||||
@@ -129,6 +130,13 @@ function FriendIdCardCtrl:RefreshHonorTitle()
|
||||
if honorData.Type == GameEnum.honorType.Character then
|
||||
local affinityData = PlayerData.Char:GetCharAffinityData(honorData.Params[1])
|
||||
level = affinityData.Level
|
||||
elseif honorData.Type == GameEnum.honorType.Levels then
|
||||
for k, v in pairs(tbOwnHonorData) do
|
||||
if v.Id == honorData.Id then
|
||||
level = v.Lv or 1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
self._mapNode.goHonorTitleCard[i]:SetHonotTitle(honorData.Id, i == 1, level)
|
||||
end
|
||||
|
||||
@@ -155,6 +155,7 @@ function FriendInfoCtrl:RefreshActor()
|
||||
end
|
||||
function FriendInfoCtrl:RefreshHonorTitle()
|
||||
local tbCurHonorTitle = PlayerData.Base:GetPlayerHonorTitle()
|
||||
local tbOwnHonorData = PlayerData.Base:GetPlayerHonorTitleList() or {}
|
||||
for i = 1, 3 do
|
||||
if tbCurHonorTitle[i] ~= nil and tbCurHonorTitle[i].Id ~= 0 and tbCurHonorTitle[i] ~= nil then
|
||||
local honorData = ConfigTable.GetData("Honor", tbCurHonorTitle[i].Id)
|
||||
@@ -166,6 +167,13 @@ function FriendInfoCtrl:RefreshHonorTitle()
|
||||
else
|
||||
printError("不存在角色" .. honorData.Params[1])
|
||||
end
|
||||
elseif honorData.Type == GameEnum.honorType.Levels then
|
||||
for k, v in pairs(tbOwnHonorData) do
|
||||
if v.Id == honorData.Id then
|
||||
level = v.Lv or 1
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
self._mapNode.goHonorTitle[i]:SetHonotTitle(honorData.Id, i == 1, level)
|
||||
end
|
||||
|
||||
@@ -10,23 +10,29 @@ HonorTitleCtrl._mapNodeConfig = {
|
||||
}
|
||||
HonorTitleCtrl._mapEventConfig = {}
|
||||
local HonorTitleStarPath = {
|
||||
"zs_honor_level_0",
|
||||
"zs_honor_level_2",
|
||||
"zs_honor_level_1",
|
||||
"zs_honor_level_4",
|
||||
"zs_honor_level_3"
|
||||
[1] = "zs_honor_level_0",
|
||||
[2] = "zs_honor_level_2",
|
||||
[3] = "zs_honor_level_1",
|
||||
[4] = "zs_honor_level_4",
|
||||
[5] = "zs_honor_level_3",
|
||||
[99] = "zs_honor_level_100"
|
||||
}
|
||||
function HonorTitleCtrl:SetHonotTitle(honorTitleId, bBig, affinity_lv)
|
||||
local honorData = ConfigTable.GetData("Honor", honorTitleId)
|
||||
self:SetPngSprite(self._mapNode.imgHonorTitle, bBig and honorData.MainRes or honorData.SubRes)
|
||||
NovaAPI.SetImageNativeSize(self._mapNode.imgHonorTitle)
|
||||
if honorData.Type ~= GameEnum.honorType.Character then
|
||||
if honorData.Type ~= GameEnum.honorType.Character and honorData.Type ~= GameEnum.honorType.Levels then
|
||||
self._mapNode.goStarBig:SetActive(false)
|
||||
self._mapNode.goStarSmall:SetActive(false)
|
||||
return
|
||||
end
|
||||
local maxLevel = 1
|
||||
self.tbHonorTitle, maxLevel = PlayerData.Char:GetCharHonorTitleData(honorData.Params[1])
|
||||
if honorData.Type == GameEnum.honorType.Character then
|
||||
self.tbHonorTitle, maxLevel = PlayerData.Char:GetCharHonorTitleData(honorData.Params[1])
|
||||
elseif honorData.Type == GameEnum.honorType.Levels then
|
||||
self.tbHonorTitle, maxLevel = PlayerData.Base:GetLevelHonorTitleData(honorTitleId)
|
||||
end
|
||||
if self.tbHonorTitle == nil then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user