Feat 增加团队监控倒计时条强制设置nRefresh#82
Hidden character warning
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds forced nRefresh setting for team monitoring countdown timers. The change modifies the countdown timer behavior to handle specific time values (-1 and -2) by forcing the nRefresh parameter to update expiration times.
- Adds logic to handle nRefresh parameter when tTime.nTime is -1 or -2
- Forces expiration time updates based on nRefresh values with a 3ms buffer
- Includes Chinese comments explaining the forced refresh functionality
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if ui and ui:IsValid() then | ||
| ui.obj:RemoveItem() | ||
| end | ||
| -- 2025.08.25���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����� |
There was a problem hiding this comment.
The comment contains garbled Chinese characters (���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ�����). The comment should use proper UTF-8 encoding for Chinese characters.
| -- 2025.08.25���ӵ���ʱ��ǿ������nRefresh��nTimeΪ-1��-2ǿ�Ƹ���nRefresh��Ϊ���ݾ����ݣ����ж���nRefresh�ֶ����� | |
| -- 2025.08.25 新增倒计时强制刷新,nRefresh:nTime为-1或-2时强制刷新,nRefresh为刷新间隔,未设置则不刷新,nRefresh字段可修改 |
| 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 |
There was a problem hiding this comment.
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.
No description provided.