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
@@ -8,56 +8,8 @@ local OnApplicationFocus = function(_, bFocus)
bAppSuspended = not bFocus
end
function NotificationManager.RegisterNotification(nId, nSubkey, nTime)
if not SDKManager:IsSDKInit() then
return
end
if not NovaAPI.IsMobilePlatform() then
return
end
local configData = ConfigTable.GetData("NotificationConfig", nId)
if configData == nil then
printLog("NotificationManager 注册推送失败,配置表数据不存在")
return
end
local setTime = nTime - 5000
if setTime <= CS.ClientManager.Instance.serverTimeStamp then
return
end
local data = {
id = nId,
key = nId + nSubkey,
time = nTime,
timer = TimerManager.Add(1, setTime - CS.ClientManager.Instance.serverTimeStamp, nil, function()
if not bAppSuspended then
printLog("NotificationManager 由计时器触发的取消推送成功,id:", tostring(nId + nSubkey))
UnregisterNotification(nId, nSubkey)
end
end, true, true, false, nil)
}
table.insert(tbNotification, data)
local sContent = configData.Content
sContent = string.gsub(sContent, "==PLAYER_NAME==", PlayerData.Base:GetPlayerNickName())
SDKManager:BuildLocalNotification(nId + nSubkey, configData.Title, sContent, nTime)
printLog("NotificationManager 注册推送成功,id:", tostring(nId + nSubkey), "title:", configData.Title, "content:", sContent, "time:", tostring(setTime))
end
function NotificationManager.UnregisterNotification(nId, nSubkey)
if not SDKManager:IsSDKInit() then
return
end
if not NovaAPI.IsMobilePlatform() then
return
end
local tbRemove = {}
for i, data in ipairs(tbNotification) do
if data.id == nId and data.key == nId + nSubkey then
data.timer:_Stop()
table.remove(tbNotification, i)
table.insert(tbRemove, nId + nSubkey)
break
end
end
SDKManager:DeleteLocalNotification(tbRemove)
printLog("NotificationManager 取消推送成功,id:", tostring(nId + nSubkey))
end
local function Uninit()
EventManager.Remove(EventId.CSLuaManagerShutdown, NotificationManager, Uninit)