Skip to content

Commit 36d3679

Browse files
ZXXX1999tinymins
authored andcommitted
fix: 兼容旧版数据
1 parent 90af35f commit 36d3679

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

MY_TeamMon/src/MY_TeamMon_SpellTimer.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ local function CreateCountdown(nType, szKey, tParam, szSender, szReceiver)
146146
if ui and ui:IsValid() then
147147
ui.obj:RemoveItem()
148148
end
149-
-- 2025.08.25增加倒计时条强制设置nRefresh,nTime为-1,-2强制更改nRefresh
150-
ST_TIME_EXPIRE[nType][szKey] = nTime + (tParam.nRefresh or 0) * 1000 - 3
149+
-- 2025.08.25增加倒计时条强制设置nRefresh,nTime为-1,-2强制更改nRefresh,为兼容旧数据,先判断有nRefresh字段再修改
150+
if tParam.nRefresh then
151+
ST_TIME_EXPIRE[nType][szKey] = nTime + tParam.nRefresh * 1000 - 3
152+
end
151153
elseif tTime.nTime == -2 then
152154
ST_TIME_EXPIRE[nType][szKey] = nTime + (tParam.nRefresh or 0) * 1000 - 3
153155
else

0 commit comments

Comments
 (0)