Update - 1.13.0.124

EN: 1.13.0.124
CN: 1.13.0.124
JP: 1.13.0.128
KR: 1.13.0.130
This commit is contained in:
SL1900
2026-07-21 12:30:00 +09:00
parent a12087abad
commit 8c4bd41668
1334 changed files with 873026 additions and 95164 deletions
@@ -0,0 +1,79 @@
local SoldierShopProbabilityCtrl = class("SoldierShopProbabilityCtrl", BaseCtrl)
SoldierShopProbabilityCtrl._mapNodeConfig = {
btnCloseFull = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
btnClose = {
sComponentName = "UIButton",
callback = "OnBtnClick_Close"
},
ScrollView = {
sComponentName = "LoopScrollView"
},
txtWindowTitle = {
sComponentName = "TMP_Text",
sLanguageId = "Soldier_ShopProbability_Title"
},
TextLv = {
sComponentName = "TMP_Text",
sLanguageId = "WorldClass_Level"
},
TextLvCost = {sComponentName = "TMP_Text", nCount = 5}
}
SoldierShopProbabilityCtrl._mapEventConfig = {}
SoldierShopProbabilityCtrl._mapRedDotConfig = {}
local ITEM_LUA_PATH = "Game.UI.Soldier.ShopProbability.SoldierShopProbabilityItemCtrl"
function SoldierShopProbabilityCtrl:Awake()
self._tbItemCtrls = {}
if self._mapNode.ListItemTemplate ~= nil then
self._mapNode.ListItemTemplate:SetActive(false)
end
end
function SoldierShopProbabilityCtrl:OnEnable()
self:_RefreshList()
end
function SoldierShopProbabilityCtrl:OnDisable()
self:UnbindRowItems()
self.tbRowsCtrl = nil
end
function SoldierShopProbabilityCtrl:OnDestroy()
end
function SoldierShopProbabilityCtrl:_RefreshList()
for k, v in pairs(self._mapNode.TextLvCost) do
NovaAPI.SetTMPText(v, orderedFormat(ConfigTable.GetUIText("Soldier_ShopProbability_ChessCost"), k))
end
self.tbRows = {}
local _f = function(mapLine)
if mapLine ~= nil then
table.insert(self.tbRows, mapLine)
end
end
ForEachTableLine(ConfigTable.Get("SoldierShopLevel"), _f)
table.sort(self.tbRows, function(a, b)
return (a.Level or 0) < (b.Level or 0)
end)
self:UnbindRowItems()
self._mapNode.ScrollView:Init(#self.tbRows, self, self.OnGridRefresh)
end
function SoldierShopProbabilityCtrl:OnGridRefresh(goGrid, nGridIndex)
local nIndex = nGridIndex + 1
local ctrl = self:BindCtrlByNode(goGrid, ITEM_LUA_PATH)
if ctrl ~= nil then
self.tbRowsCtrl[goGrid:GetInstanceID()] = ctrl
ctrl:Refresh(self.tbRows[nIndex])
end
end
function SoldierShopProbabilityCtrl:UnbindRowItems()
if self.tbRowsCtrl == nil then
self.tbRowsCtrl = {}
return
end
for _, ctrl in ipairs(self.tbRowsCtrl) do
self:UnbindCtrlByNode(ctrl)
end
end
function SoldierShopProbabilityCtrl:OnBtnClick_Close()
EventManager.Hit(EventId.ClosePanel, PanelId.SoldierShopProbabilityPanel)
end
return SoldierShopProbabilityCtrl
@@ -0,0 +1,30 @@
local SoldierShopProbabilityItemCtrl = class("SoldierShopProbabilityItemCtrl", BaseCtrl)
SoldierShopProbabilityItemCtrl._mapNodeConfig = {
TextProbability = {nCount = 5, sComponentName = "TMP_Text"},
txtLv = {sComponentName = "TMP_Text"}
}
SoldierShopProbabilityItemCtrl._mapEventConfig = {}
SoldierShopProbabilityItemCtrl._mapRedDotConfig = {}
local RARITY_COUNT = 5
function SoldierShopProbabilityItemCtrl:Awake()
end
function SoldierShopProbabilityItemCtrl:OnEnable()
end
function SoldierShopProbabilityItemCtrl:OnDisable()
end
function SoldierShopProbabilityItemCtrl:OnDestroy()
end
function SoldierShopProbabilityItemCtrl:Refresh(cfgData)
if cfgData == nil then
return
end
NovaAPI.SetTMPText(self._mapNode.txtLv, tostring(cfgData.Level or ""))
for i = 1, RARITY_COUNT do
local txt = self._mapNode.TextProbability[i]
if txt ~= nil then
local nValue = cfgData["Rarity" .. i] or 0
NovaAPI.SetTMPText(txt, tostring(nValue) .. "%")
end
end
end
return SoldierShopProbabilityItemCtrl
@@ -0,0 +1,22 @@
local SoldierShopProbabilityPanel = class("SoldierShopProbabilityPanel", BasePanel)
SoldierShopProbabilityPanel._bIsMainPanel = false
SoldierShopProbabilityPanel._sSortingLayerName = AllEnum.SortingLayerName.UI
SoldierShopProbabilityPanel._tbDefine = {
{
sPrefabPath = "Soldier/Level/SoldierShopProbabilityPanel.prefab",
sCtrlName = "Game.UI.Soldier.ShopProbability.SoldierShopProbabilityCtrl"
}
}
function SoldierShopProbabilityPanel:Awake()
end
function SoldierShopProbabilityPanel:OnEnable()
end
function SoldierShopProbabilityPanel:OnAfterEnter()
end
function SoldierShopProbabilityPanel:OnDisable()
end
function SoldierShopProbabilityPanel:OnDestroy()
end
function SoldierShopProbabilityPanel:OnRelease()
end
return SoldierShopProbabilityPanel