Update - 1.4.0.73
EN: 1.4.0.73 CN: 1.4.0.74 JP: 1.4.0.77 KR: 1.4.0.80
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
local BuildAttrPreviewPanel = class("BuildAttrPreviewPanel", BasePanel)
|
||||
BuildAttrPreviewPanel._bIsMainPanel = false
|
||||
BuildAttrPreviewPanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
|
||||
BuildAttrPreviewPanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "StarTowerBuild/BuildAttrPreviewPanel.prefab",
|
||||
|
||||
@@ -7,11 +7,11 @@ BuildSimpleDiscItem._mapNodeConfig = {
|
||||
BuildSimpleDiscItem._mapEventConfig = {}
|
||||
BuildSimpleDiscItem._mapRedDotConfig = {}
|
||||
function BuildSimpleDiscItem:Init(nDiscId)
|
||||
local mapData = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
local mapData = ConfigTable.GetData("Disc", nDiscId)
|
||||
local mapCfg = ConfigTable.GetData_Item(nDiscId)
|
||||
self:SetPngSprite(self._mapNode.imgIcon, mapCfg.Icon .. AllEnum.OutfitIconSurfix.ListGrid)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCfg.Rarity]
|
||||
self:SetAtlasSprite(self._mapNode.imgRarity, "12_rare", sFrame, true)
|
||||
self:SetAtlasSprite(self._mapNode.imgElement, "12_rare", AllEnum.Star_Element[mapData.nEET].icon)
|
||||
self:SetAtlasSprite(self._mapNode.imgElement, "12_rare", AllEnum.Star_Element[mapData.EET].icon)
|
||||
end
|
||||
return BuildSimpleDiscItem
|
||||
|
||||
@@ -53,7 +53,7 @@ function PotentialListItemCtrl:Init(nCharId, nCount, tbPotential, goPotential, b
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local charSkinCfg = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[charCfg.Grade]
|
||||
self:SetPngSprite(self._mapNode.imgHead, charSkinCfg.Icon .. AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetPngSprite(self._mapNode.imgHead, charSkinCfg.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetAtlasSprite(self._mapNode.imgHeadFrame, "12_rare", sFrame, true)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName, charCfg.Name)
|
||||
self.mapPotential = {}
|
||||
|
||||
@@ -137,7 +137,7 @@ function StarTowerBuildBriefItem:RefreshChar()
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
local mapCharCfg = ConfigTable.GetData_Character(nCharTid)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCharCfg.Grade]
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharFrame[i], "12_rare", sFrame)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPotentialCount[i], self._mapData.tbChar[i].nPotentialCount)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharElement[i], "12_rare", AllEnum.Char_Element[mapCharCfg.EET].icon)
|
||||
|
||||
@@ -167,13 +167,18 @@ function StarTowerBuildContentCtrl:InitDisc()
|
||||
for k, nId in ipairs(tbDisc) do
|
||||
if k <= 3 then
|
||||
local mapDisc = PlayerData.Disc:GetDiscById(nId)
|
||||
local tbSubSkill = mapDisc:GetAllSubSkill(self.mapBuild.tbNotes)
|
||||
for nSkillIndex, v in ipairs(tbSubSkill) do
|
||||
table.insert(self.tbSkill, {
|
||||
nSkillId = v,
|
||||
nDiscIndex = k,
|
||||
nSkillIndex = nSkillIndex
|
||||
})
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetTrialDiscById(nId)
|
||||
end
|
||||
if mapDisc ~= nil then
|
||||
local tbSubSkill = mapDisc:GetAllSubSkill(self.mapBuild.tbNotes)
|
||||
for nSkillIndex, v in ipairs(tbSubSkill) do
|
||||
table.insert(self.tbSkill, {
|
||||
nSkillId = v,
|
||||
nDiscIndex = k,
|
||||
nSkillIndex = nSkillIndex
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -236,6 +241,9 @@ function StarTowerBuildContentCtrl:OnBtnClick_Disc()
|
||||
self:ChangeTab(2)
|
||||
end
|
||||
function StarTowerBuildContentCtrl:OnEvent_SelectDepotPotential(nPotentialId, nLevel, nPotentialAdd, btn)
|
||||
if btn == nil or PanelManager.CheckPanelOpen(PanelId.CharBgTrialPanel) then
|
||||
return
|
||||
end
|
||||
local tip = function()
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.PotentialDetail, nPotentialId, nLevel, nPotentialAdd)
|
||||
end
|
||||
|
||||
@@ -51,12 +51,23 @@ function StarTowerBuildDetailCtrl:InitPanel()
|
||||
end
|
||||
self._mapNode.BuildDetail:Refresh(self.mapBuild)
|
||||
self._mapNode.ContentList:Refresh(self.mapBuild)
|
||||
self._mapNode.btn_PreferenceIcon.interactable = self.mapBuild.bPreference
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtLike, self.mapBuild.bPreference and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
|
||||
self._mapNode.btn_LockIcon.interactable = self.mapBuild.bLock
|
||||
NovaAPI.SetTMPText(self._mapNode.txtBuildLock, self.mapBuild.bLock and ConfigTable.GetUIText("RoguelikeBuild_Save_Lock") or ConfigTable.GetUIText("RoguelikeBuild_Save_Unlock"))
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtBuildLock, self.mapBuild.bLock and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
|
||||
NovaAPI.SetTMPText(self._mapNode.TMPBuildSaveTime, string.format("<color=#5e89b4>保存时间:</color>%s", os.date("%Y/%m/%d %H:%M", math.floor(self.mapBuild.nBuildId / 1.0E9))))
|
||||
self._mapNode.btn_Preference.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
self._mapNode.btn_Lock.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
self._mapNode.TMPBuildSaveTime.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
self._mapNode.btnDelete.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
self._mapNode.btnRename.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
if self.mapBuild.bPreference ~= nil then
|
||||
self._mapNode.btn_PreferenceIcon.interactable = self.mapBuild.bPreference
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtLike, self.mapBuild.bPreference and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
|
||||
end
|
||||
if self.mapBuild.bLock ~= nil then
|
||||
self._mapNode.btn_LockIcon.interactable = self.mapBuild.bLock
|
||||
NovaAPI.SetTMPText(self._mapNode.txtBuildLock, self.mapBuild.bLock and ConfigTable.GetUIText("RoguelikeBuild_Save_Lock") or ConfigTable.GetUIText("RoguelikeBuild_Save_Unlock"))
|
||||
NovaAPI.SetTMPColor(self._mapNode.txtBuildLock, self.mapBuild.bLock and Color(0.14901960784313725, 0.25882352941176473, 0.47058823529411764) or Color(0.5803921568627451, 0.6666666666666666, 0.7529411764705882))
|
||||
end
|
||||
if self.mapBuild.bTrial ~= true then
|
||||
NovaAPI.SetTMPText(self._mapNode.TMPBuildSaveTime, string.format("<color=#5e89b4>保存时间:</color>%s", os.date("%Y/%m/%d %H:%M", math.floor(self.mapBuild.nBuildId / 1.0E9))))
|
||||
end
|
||||
end
|
||||
function StarTowerBuildDetailCtrl:OpenConfirmHint()
|
||||
local nCoin = math.floor(math.min(math.max(self.mapBuild.nScore / tonumber(self.tbCoinRate[1]), tonumber(self.tbCoinRate[2])), tonumber(self.tbCoinRate[3])))
|
||||
@@ -111,6 +122,7 @@ end
|
||||
function StarTowerBuildDetailCtrl:OnDisable()
|
||||
end
|
||||
function StarTowerBuildDetailCtrl:OnDestroy()
|
||||
PlayerData.Build:DeleteTrialBuild()
|
||||
end
|
||||
function StarTowerBuildDetailCtrl:OnRelease()
|
||||
end
|
||||
|
||||
@@ -61,6 +61,15 @@ StarTowerBuildDetailItemCtrl._mapEventConfig = {}
|
||||
StarTowerBuildDetailItemCtrl._mapRedDotConfig = {}
|
||||
function StarTowerBuildDetailItemCtrl:Refresh(mapData)
|
||||
self.mapBuild = mapData
|
||||
if self.mapBuild.bTrial == true then
|
||||
self._mapNode.btnLeader.interactable = false
|
||||
for k, v in pairs(self._mapNode.btnSub) do
|
||||
v.interactable = false
|
||||
end
|
||||
for k, v in pairs(self._mapNode.btnDiscItem) do
|
||||
v.interactable = false
|
||||
end
|
||||
end
|
||||
self:RefreshInfo()
|
||||
self:RefreshChar()
|
||||
self:RefreshDisc()
|
||||
@@ -85,7 +94,7 @@ function StarTowerBuildDetailItemCtrl:RefreshChar()
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
local mapCharCfg = ConfigTable.GetData_Character(nCharTid)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[mapCharCfg.Grade]
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon[i], mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharFrame[i], "12_rare", sFrame, true)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtPotentialCount[i], self.mapBuild.tbChar[i].nPotentialCount)
|
||||
self:SetAtlasSprite(self._mapNode.imgCharElement[i], "12_rare", AllEnum.Char_Element[mapCharCfg.EET].icon)
|
||||
@@ -99,6 +108,7 @@ function StarTowerBuildDetailItemCtrl:RefreshDisc()
|
||||
end
|
||||
nIndex = nIndex + 1
|
||||
end
|
||||
self._mapNode.btnDiscDetail.gameObject:SetActive(self.mapBuild.bTrial ~= true)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:SetName(sName)
|
||||
NovaAPI.SetTMPText(self._mapNode.txtBuildName, sName)
|
||||
@@ -121,6 +131,16 @@ function StarTowerBuildDetailItemCtrl:OnBtnClick_Attr()
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.BuildAttrPreview, self.mapBuild.mapRank.Id, self.mapBuild.nScore)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Disc(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nDiscId = self.mapBuild.tbDisc[nIndex]
|
||||
local mapDiscData = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
if mapDiscData == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.DiscSample, nDiscId)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, {nDiscId})
|
||||
end
|
||||
return
|
||||
end
|
||||
local nIdx = 0
|
||||
local nDiscId = 0
|
||||
local tbAllDisc = {}
|
||||
@@ -132,10 +152,23 @@ function StarTowerBuildDetailItemCtrl:OnBtnClick_Disc(btn, nIndex)
|
||||
table.insert(tbAllDisc, nId)
|
||||
end
|
||||
if nDiscId ~= 0 then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, tbAllDisc)
|
||||
local mapDisc = PlayerData.Disc:GetDiscById(nDiscId)
|
||||
if mapDisc ~= nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.Disc, nDiscId, tbAllDisc)
|
||||
end
|
||||
end
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Leader()
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nCharTid = self.mapBuild.tbChar[1].nTid
|
||||
local mapCharCfg = PlayerData.Char:GetCharDataByTid(nCharTid)
|
||||
if mapCharCfg == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, nCharTid, {nCharTid})
|
||||
end
|
||||
return
|
||||
end
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
@@ -143,19 +176,38 @@ function StarTowerBuildDetailItemCtrl:OnBtnClick_Leader()
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[1], tbCharId, true)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_Sub(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nCharTid = self.mapBuild.tbChar[nIndex + 1].nTid
|
||||
local mapCharCfg = PlayerData.Char:GetCharDataByTid(nCharTid)
|
||||
if mapCharCfg == nil then
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgTrialPanel, PanelId.CharInfoTrial, nCharTid)
|
||||
else
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, nCharTid, {nCharTid})
|
||||
end
|
||||
return
|
||||
end
|
||||
local tbCharId = {}
|
||||
for _, v in ipairs(self.mapBuild.tbChar) do
|
||||
table.insert(tbCharId, v.nTid)
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.CharBgPanel, PanelId.CharInfo, tbCharId[nIndex + 1], tbCharId, true)
|
||||
end
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_DiscDetail()
|
||||
function StarTowerBuildDetailItemCtrl:OnBtnClick_DiscDetail(btn, nIndex)
|
||||
if self.mapBuild.bTrial == true then
|
||||
local nDiscId = self.mapBuild.tbDisc[nIndex]
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.DiscSample, nDiscId)
|
||||
return
|
||||
end
|
||||
local tbDisc = {}
|
||||
local mapDiscData = {}
|
||||
for i = 1, 6 do
|
||||
tbDisc[i] = self.mapBuild.tbDisc[i] or 0
|
||||
if 0 ~= tbDisc[i] then
|
||||
mapDiscData[tbDisc[i]] = PlayerData.Disc:GetDiscById(tbDisc[i])
|
||||
local mapDisc = PlayerData.Disc:GetDiscById(tbDisc[i])
|
||||
if mapDisc == nil then
|
||||
mapDisc = PlayerData.Disc:GetTrialDiscById(tbDisc[i])
|
||||
end
|
||||
mapDiscData[tbDisc[i]] = mapDisc
|
||||
end
|
||||
end
|
||||
EventManager.Hit(EventId.OpenPanel, PanelId.DiscSkill, tbDisc, self.mapBuild.tbNotes, mapDiscData)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
local StarTowerBuildDetailPreviewPanel = class("StarTowerBuildDetailPreviewPanel", BasePanel)
|
||||
StarTowerBuildDetailPreviewPanel._bIsMainPanel = false
|
||||
StarTowerBuildDetailPreviewPanel._sSortingLayerName = AllEnum.SortingLayerName.UI_Top
|
||||
StarTowerBuildDetailPreviewPanel._tbDefine = {
|
||||
{
|
||||
sPrefabPath = "StarTowerBuild/StarTowerBuildDetailPanel.prefab",
|
||||
sCtrlName = "Game.UI.StarTower.Build.StarTowerBuildDetailCtrl"
|
||||
}
|
||||
}
|
||||
function StarTowerBuildDetailPreviewPanel:Awake()
|
||||
end
|
||||
function StarTowerBuildDetailPreviewPanel:OnEnable()
|
||||
end
|
||||
function StarTowerBuildDetailPreviewPanel:OnDisable()
|
||||
end
|
||||
function StarTowerBuildDetailPreviewPanel:OnDestroy()
|
||||
end
|
||||
function StarTowerBuildDetailPreviewPanel:OnRelease()
|
||||
end
|
||||
return StarTowerBuildDetailPreviewPanel
|
||||
@@ -25,7 +25,7 @@ function CharPotentialListCtrl:RefreshPotential(nCharId, mapPotential, bShowAll,
|
||||
NovaAPI.SetTMPText(self._mapNode.txtCharName, charCfg.Name)
|
||||
local nSkinId = PlayerData.Char:GetCharUsedSkinId(nCharId)
|
||||
local skinCfg = ConfigTable.GetData_CharacterSkin(nSkinId)
|
||||
self:SetPngSprite(self._mapNode.imgHead, skinCfg.Icon .. AllEnum.CharHeadIconSurfix.XXL)
|
||||
self:SetPngSprite(self._mapNode.imgHead, skinCfg.Icon, AllEnum.CharHeadIconSurfix.XXL)
|
||||
local sFrame = AllEnum.FrameType_New.BoardFrame .. AllEnum.BoardFrameColor[charCfg.Grade]
|
||||
self:SetAtlasSprite(self._mapNode.imgHeadFrame, "12_rare", sFrame)
|
||||
end
|
||||
|
||||
@@ -132,7 +132,7 @@ function DepotCharInfoCtrl:RefreshChoose()
|
||||
if charData ~= nil then
|
||||
local nCharSkinId = charData.nSkinId
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
self:SetPngSprite(self._mapNode.imgHead[i], mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.L)
|
||||
self:SetPngSprite(self._mapNode.imgHead[i], mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.L)
|
||||
self._mapNode.goSelect[i]:SetActive(self.nSelectIndex == i)
|
||||
end
|
||||
end
|
||||
@@ -145,30 +145,30 @@ function DepotCharInfoCtrl:RefreshAttribute()
|
||||
local Info = self.tbActorInfo[self.nCharId]
|
||||
local tbAttr = {}
|
||||
if self.nSelectIndex == 1 then
|
||||
local hp = HealthInfo ~= nil and HealthInfo.hp:AsInt() or 0
|
||||
local hpMax = HealthInfo ~= nil and HealthInfo.hpMax:AsInt() or 0
|
||||
local hp = HealthInfo ~= nil and HealthInfo.hp or 0
|
||||
local hpMax = HealthInfo ~= nil and HealthInfo.hpMax or 0
|
||||
tbAttr = {totalValue = hp, baseValue = hp}
|
||||
self._mapNode.goProperty[1]:SetCharProperty(AllEnum.CharAttr[1], tbAttr, true, hpMax)
|
||||
self._mapNode.goProperty[1].gameObject:SetActive(true)
|
||||
else
|
||||
local hpMax = HealthInfo ~= nil and HealthInfo.hpMax:AsInt() or 0
|
||||
local hpMax = HealthInfo ~= nil and HealthInfo.hpMax or 0
|
||||
tbAttr = {totalValue = hpMax, baseValue = hpMax}
|
||||
self._mapNode.goProperty[1]:SetCharProperty(AllEnum.CharAttr[1], tbAttr, true)
|
||||
self._mapNode.goProperty[1].gameObject:SetActive(true)
|
||||
end
|
||||
local atk = Info ~= nil and Info.atk:AsInt() or 0
|
||||
local atk = Info ~= nil and Info.atk or 0
|
||||
tbAttr = {totalValue = atk, baseValue = atk}
|
||||
self._mapNode.goProperty[2]:SetCharProperty(AllEnum.CharAttr[2], tbAttr, true)
|
||||
local def = Info ~= nil and Info.def:AsInt() or 0
|
||||
local def = Info ~= nil and Info.def or 0
|
||||
tbAttr = {totalValue = def, baseValue = def}
|
||||
self._mapNode.goProperty[3]:SetCharProperty(AllEnum.CharAttr[3], tbAttr, true)
|
||||
local critRate = Info ~= nil and Info.critRate:AsFloat() or 0
|
||||
local critRate = Info ~= nil and Info.critRate or 0
|
||||
tbAttr = {
|
||||
totalValue = critRate * 100,
|
||||
baseValue = critRate * 100
|
||||
}
|
||||
self._mapNode.goProperty[4]:SetCharProperty(AllEnum.CharAttr[4], tbAttr, false)
|
||||
local critPower = Info ~= nil and Info.critPower:AsFloat() or 0
|
||||
local critPower = Info ~= nil and Info.critPower or 0
|
||||
tbAttr = {
|
||||
totalValue = critPower * 100,
|
||||
baseValue = critPower * 100
|
||||
@@ -253,19 +253,19 @@ function DepotCharInfoCtrl:OnBtnClick_Detail()
|
||||
for k, v in pairs(AllEnum.CharAttr) do
|
||||
local total, base
|
||||
if v.sKey == "Hp" then
|
||||
total = HealthInfo ~= nil and HealthInfo.hpMax:AsInt() or 0
|
||||
total = HealthInfo ~= nil and HealthInfo.hpMax or 0
|
||||
elseif v.sKey == "Atk" then
|
||||
total = Info ~= nil and Info.atk:AsInt() or 0
|
||||
total = Info ~= nil and Info.atk or 0
|
||||
elseif v.sKey == "Def" then
|
||||
total = Info ~= nil and Info.def:AsInt() or 0
|
||||
total = Info ~= nil and Info.def or 0
|
||||
elseif v.sKey == "CritRate" then
|
||||
total = Info ~= nil and Info.critRate:AsFloat() or 0
|
||||
total = Info ~= nil and Info.critRate or 0
|
||||
total = total * 100
|
||||
elseif v.sKey == "CritPower" then
|
||||
total = Info ~= nil and Info.critPower:AsFloat() or 0
|
||||
total = Info ~= nil and Info.critPower or 0
|
||||
total = total * 100
|
||||
elseif v.sKey == "Suppress" then
|
||||
total = Info ~= nil and Info.suppressRatio:AsFloat() or 0
|
||||
total = Info ~= nil and Info.suppressRatio or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "UltraEnergy" then
|
||||
@@ -280,76 +280,76 @@ function DepotCharInfoCtrl:OnBtnClick_Detail()
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "DefPierce" then
|
||||
total = Info ~= nil and Info.defPenetrate:AsInt() or 0
|
||||
total = Info ~= nil and Info.defPenetrate or 0
|
||||
base = total
|
||||
elseif v.sKey == "DefIgnore" then
|
||||
total = Info ~= nil and Info.defIgnore:AsFloat() or 0
|
||||
total = Info ~= nil and Info.defIgnore or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "WEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.WEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.WEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "WEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.WEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.WEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "WEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.WEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.WEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "FEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.FEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.FEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "FEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.FEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.FEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "FEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.FEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.FEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "SEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.SEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.SEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "SEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.SEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.SEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "SEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.SEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.SEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "AEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.AEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.AEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "AEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.AEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.AEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "AEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.AEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.AEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "LEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.LEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.LEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "LEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.LEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.LEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "LEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.LEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.LEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "DEE" then
|
||||
total = ElementInfo ~= nil and ElementInfo.DEE:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.DEE or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
elseif v.sKey == "DEP" then
|
||||
total = ElementInfo ~= nil and ElementInfo.DEP:AsInt() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.DEP or 0
|
||||
base = total
|
||||
elseif v.sKey == "DEI" then
|
||||
total = ElementInfo ~= nil and ElementInfo.DEI:AsFloat() or 0
|
||||
total = ElementInfo ~= nil and ElementInfo.DEI or 0
|
||||
total = total * 100
|
||||
base = total
|
||||
end
|
||||
|
||||
@@ -181,7 +181,6 @@ end
|
||||
function DepotPotentialCtrl:Clear()
|
||||
self.bInit = false
|
||||
self.nSelectId = nil
|
||||
self.bPotentialAll = true
|
||||
self._mapNode.PotentialDepotItem.gameObject:SetActive(false)
|
||||
self._mapNode.PotentialCard.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
@@ -35,11 +35,11 @@ function StarTowerAffinityTipsItem:Show(nNpcId, nAffinity)
|
||||
if mapNpcCfg ~= nil then
|
||||
self:SetPngSprite(self._mapNode.imgItemIcon, mapNpcCfg.Head)
|
||||
self._mapNode.itemIconTr.localScale = Vector3.one * 0.25
|
||||
self._mapNode.itemIconTr.anchoredPosition = Vector2(38.8, 4.3)
|
||||
self._mapNode.itemIconTr.anchoredPosition = Vector2(16.9, 3.89)
|
||||
else
|
||||
self:SetAtlasSprite(self._mapNode.imgItemIcon, "10_ico", "icon_favorability_01")
|
||||
self._mapNode.itemIconTr.localScale = Vector3.one
|
||||
self._mapNode.itemIconTr.anchoredPosition = Vector2(36.3, 0)
|
||||
self._mapNode.itemIconTr.anchoredPosition = Vector2(16.9, 0)
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtItemName, orderedFormat(ConfigTable.GetUIText("StarTowerNPCAffinity_Increase"), nAffinity))
|
||||
end
|
||||
@@ -47,7 +47,7 @@ function StarTowerAffinityTipsItem:Show(nNpcId, nAffinity)
|
||||
NovaAPI.SetCanvasGroupAlpha(self._mapNode.canvasGroup, 0)
|
||||
self._mapNode.itemTr.anchoredPosition = Vector2(0, 0)
|
||||
local nInAnimLen = NovaAPI.GetAnimClipLength(self.animRoot, {
|
||||
"TemplateTip_in"
|
||||
"TemplateItemTip_in"
|
||||
})
|
||||
self:AddTimer(1, nInAnimLen + 1, function()
|
||||
self:OnTipItemHide()
|
||||
@@ -55,9 +55,9 @@ function StarTowerAffinityTipsItem:Show(nNpcId, nAffinity)
|
||||
end
|
||||
function StarTowerAffinityTipsItem:OnTipItemHide()
|
||||
local nInAnimLen = NovaAPI.GetAnimClipLength(self.animRoot, {
|
||||
"TemplateTip_out"
|
||||
"TemplateItemTip_out"
|
||||
})
|
||||
self.animRoot:Play("TemplateTip_out")
|
||||
self.animRoot:Play("TemplateItemTip_out")
|
||||
self:AddTimer(1, nInAnimLen, function()
|
||||
EventManager.Hit("StarTowerTipsShowEnd", self, AllEnum.StarTowerTipsType.NPCAffinity)
|
||||
end, true, true, true, nil)
|
||||
|
||||
@@ -32,7 +32,7 @@ function StarTowerItemTipsItem:Show(nTid, nCount)
|
||||
NovaAPI.SetCanvasGroupAlpha(self._mapNode.canvasGroup, 0)
|
||||
self._mapNode.itemTr.anchoredPosition = Vector2(0, 0)
|
||||
local nInAnimLen = NovaAPI.GetAnimClipLength(self.animRoot, {
|
||||
"TemplateTip_in"
|
||||
"TemplateItemTip_in"
|
||||
})
|
||||
self:AddTimer(1, nInAnimLen + 1, function()
|
||||
self:OnTipItemHide()
|
||||
@@ -40,9 +40,9 @@ function StarTowerItemTipsItem:Show(nTid, nCount)
|
||||
end
|
||||
function StarTowerItemTipsItem:OnTipItemHide()
|
||||
local nInAnimLen = NovaAPI.GetAnimClipLength(self.animRoot, {
|
||||
"TemplateTip_out"
|
||||
"TemplateItemTip_out"
|
||||
})
|
||||
self.animRoot:Play("TemplateTip_out")
|
||||
self.animRoot:Play("TemplateItemTip_out")
|
||||
self:AddTimer(1, nInAnimLen, function()
|
||||
EventManager.Hit("StarTowerTipsShowEnd", self, AllEnum.StarTowerTipsType.ItemTip)
|
||||
end, true, true, true, nil)
|
||||
|
||||
@@ -52,7 +52,8 @@ PotentialCardItemCtrl._mapNodeConfig = {
|
||||
SR = {},
|
||||
SSR = {},
|
||||
BgEffect = {},
|
||||
ArrowEffect = {}
|
||||
ArrowEffect = {},
|
||||
exId = {sComponentName = "TMP_Text"}
|
||||
}
|
||||
PotentialCardItemCtrl._mapEventConfig = {}
|
||||
PotentialCardItemCtrl._mapRedDotConfig = {}
|
||||
@@ -79,6 +80,8 @@ function PotentialCardItemCtrl:SetPotentialItem(nTid, nLevel, nNextLevel, bSimpl
|
||||
if nil == potentialCfg then
|
||||
return
|
||||
end
|
||||
self._mapNode.exId.gameObject:SetActive(false)
|
||||
EventManager.Hit("TipsId", self._mapNode.exId, nTid)
|
||||
self._mapNode.db_SSR:SetActive(itemCfg.Rarity == GameEnum.itemRarity.SSR)
|
||||
local bSpecial = itemCfg.Stype == GameEnum.itemStype.SpecificPotential
|
||||
self._mapNode.goPotentialNormal.gameObject:SetActive(not bSpecial)
|
||||
@@ -98,7 +101,7 @@ function PotentialCardItemCtrl:SetNormalCard(itemCfg, potentialCfg, bShowChar)
|
||||
if bShowChar then
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon, mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.S)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon, mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.S)
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtName, itemCfg.Title)
|
||||
local nColor = AllEnum.FrameColor_New[itemCfg.Rarity]
|
||||
@@ -135,7 +138,7 @@ function PotentialCardItemCtrl:SetSpecialCard(itemCfg, potentialCfg, bShowChar)
|
||||
if bShowChar then
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(nCharId)
|
||||
local mapCharSkin = ConfigTable.GetData_CharacterSkin(nCharSkinId)
|
||||
self:SetPngSprite(self._mapNode.imgCharSpIcon, mapCharSkin.Icon .. AllEnum.CharHeadIconSurfix.S)
|
||||
self:SetPngSprite(self._mapNode.imgCharSpIcon, mapCharSkin.Icon, AllEnum.CharHeadIconSurfix.S)
|
||||
end
|
||||
NovaAPI.SetTMPText(self._mapNode.txtSpName, itemCfg.Title)
|
||||
self:SetPngSprite(self._mapNode.imgSpIcon, itemCfg.Icon .. AllEnum.PotentialIconSurfix.A)
|
||||
|
||||
@@ -478,8 +478,8 @@ function PotentialSelectCtrl:OnBtnClick_Confirm()
|
||||
if self.nSelectIdx ~= 0 and self.callback ~= nil then
|
||||
local completeFunc = function(nEventId, tbPotential, mapPotential, nType, nLevel, tbNewIds, mapRoll, nCoin, tbLuckyIds, tbRecommend)
|
||||
self:SelectComplete(nEventId, tbPotential, mapPotential, nType, nLevel, tbNewIds, mapRoll, nCoin, tbLuckyIds, tbRecommend)
|
||||
if nType == 2 then
|
||||
PlayerData.Voice:PlayCharVoice("thankLvup", 9133)
|
||||
if self.nPanelType == 2 then
|
||||
PlayerData.Voice:PlayCharVoice("thankLvup", 9133, nil, true)
|
||||
end
|
||||
end
|
||||
self.callback(self.nSelectIdx, self.nEventId, completeFunc)
|
||||
|
||||
@@ -230,6 +230,7 @@ function StarTowerShopCtrl:RefreshCoin()
|
||||
end
|
||||
end
|
||||
function StarTowerShopCtrl:PlayEnterShopNPCVoice()
|
||||
PlayerData.Voice:StopCharVoice()
|
||||
local mapCurCfg = ConfigTable.GetData("StarTower", self.nStarTowerId)
|
||||
if nil == mapCurCfg then
|
||||
return
|
||||
@@ -328,7 +329,7 @@ function StarTowerShopCtrl:OpenBuyPanel(bOpen, mapGoods, bUnable, bQuit)
|
||||
self._mapNode.imgGoodsTalentBg.gameObject:SetActive(false)
|
||||
if mapGoods.nCharId ~= nil and mapGoods.nCharId > 0 then
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(mapGoods.nCharId)
|
||||
self:SetPngSprite(self._mapNode.imgGoodsCharIcon, ConfigTable.GetData_CharacterSkin(nCharSkinId).Icon .. AllEnum.CharHeadIconSurfix.S)
|
||||
self:SetPngSprite(self._mapNode.imgGoodsCharIcon, ConfigTable.GetData_CharacterSkin(nCharSkinId).Icon, AllEnum.CharHeadIconSurfix.S)
|
||||
self._mapNode.imgGoodsCharIcon.gameObject:SetActive(true)
|
||||
self._mapNode.imgCharEdgeGoods.gameObject:SetActive(true)
|
||||
else
|
||||
@@ -462,6 +463,7 @@ function StarTowerShopCtrl:Awake()
|
||||
}
|
||||
end
|
||||
function StarTowerShopCtrl:OnEnable()
|
||||
NovaAPI.SetL2DTimeState(true)
|
||||
PanelManager.InputDisable()
|
||||
EventManager.Hit("StarTowerSetButtonEnable", false, false)
|
||||
self:AddTimer(1, 0.1, "OpenPanel", true, true, true)
|
||||
@@ -489,24 +491,18 @@ function StarTowerShopCtrl:OnDestroy()
|
||||
end
|
||||
function StarTowerShopCtrl:OnBtn_CloseShop()
|
||||
PanelManager.InputEnable()
|
||||
NovaAPI.SetL2DTimeState(false)
|
||||
EventManager.Hit("StarTowerSetButtonEnable", true, true)
|
||||
GamepadUIManager.DisableGamepadUI("StarTowerShopCtrl")
|
||||
self:Clear()
|
||||
EventManager.Hit("CloseFRShopPanel")
|
||||
EventManager.Hit("ReplayShopRoomBGM")
|
||||
EventManager.Hit(EventId.ClosePanel, PanelId.StarTowerShop)
|
||||
local mapData = PlayerData.Char:GetCharAffinityData(self.nNPCId)
|
||||
if mapData == nil then
|
||||
return
|
||||
end
|
||||
local nLevel = mapData.Level
|
||||
local tbPool = {}
|
||||
for i = 3, 1, -1 do
|
||||
local tbFavorability = ConfigTable.GetConfigArray("NpcFavorabilityRange" .. i)
|
||||
if tbFavorability ~= nil and nLevel <= tbFavorability[2] and nLevel >= tbFavorability[1] then
|
||||
table.insert(tbPool, "chat_lv" .. i)
|
||||
end
|
||||
end
|
||||
PlayerData.Voice:StopCharVoice()
|
||||
local tbPool = {
|
||||
"leave",
|
||||
"posterchat_npc"
|
||||
}
|
||||
if 0 < #tbPool then
|
||||
PlayerData.Voice:PlayCharVoice(tbPool[math.random(1, #tbPool)], self.nNPCId, nil, true)
|
||||
end
|
||||
|
||||
@@ -57,7 +57,7 @@ function StarTowerShopGridCtrl:RefreshGrid(mapGoods, nHasCoin)
|
||||
if mapGoods.nCharId ~= nil and 0 < mapGoods.nCharId then
|
||||
self._mapNode.imgCharEdge.gameObject:SetActive(true)
|
||||
local nCharSkinId = PlayerData.Char:GetCharSkinId(mapGoods.nCharId)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon, ConfigTable.GetData_CharacterSkin(nCharSkinId).Icon .. AllEnum.CharHeadIconSurfix.S)
|
||||
self:SetPngSprite(self._mapNode.imgCharIcon, ConfigTable.GetData_CharacterSkin(nCharSkinId).Icon, AllEnum.CharHeadIconSurfix.S)
|
||||
else
|
||||
self._mapNode.imgCharEdge.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user