Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion MY_TeamMon/src/MY_TeamMon_SpellTimer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,12 @@ local function CreateCountdown(nType, szKey, tParam, szSender, szReceiver)
if ui and ui:IsValid() then
ui.obj:RemoveItem()
end
-- 2025.08.25���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����޸�
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment contains garbled Chinese characters (���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����޸�). The comment should use proper UTF-8 encoding for Chinese characters.

Suggested change
-- 2025.08.25���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����޸�
-- 2025.08.25 新增倒计时强制刷新,nRefresh:nTime为-1或-2时强制刷新,nRefresh为刷新间隔,未设置则不刷新,nRefresh字段可修改

Copilot uses AI. Check for mistakes.
if tParam.nRefresh then
ST_TIME_EXPIRE[nType][szKey] = nTime + tParam.nRefresh * 1000 - 3
end
elseif tTime.nTime == -2 then
ST_TIME_EXPIRE[nType][szKey] = nil
ST_TIME_EXPIRE[nType][szKey] = nTime + (tParam.nRefresh or 0) * 1000 - 3
Comment on lines +151 to +154
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number '3' appears in both lines 151 and 154 without explanation. Consider defining this as a named constant (e.g., EXPIRE_BUFFER_MS = 3) to improve code maintainability and make the purpose clear.

Copilot uses AI. Check for mistakes.
else
local nExpire = ST_TIME_EXPIRE[nType][szKey]
if nExpire and nExpire > nTime then
Expand Down