From 4ed5ba896a87be700f3e6e8a9442c4264a8e0be1 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Fri, 21 Aug 2020 19:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E5=89=AF=E6=9C=AC=E5=8F=B7?= =?UTF-8?q?=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Guild/Transcript/GuildTranscriptMainPopup.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua index 21eec49e97..618f54ee5a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/Transcript/GuildTranscriptMainPopup.lua @@ -140,13 +140,19 @@ function GuildTranscriptMainPopup:BindEvent() return end NetManager.GuildChallengeMessageResponse(function (msg) - if msg.nextTime <= 0 then + LogGreen("msg.nextTime "..msg.nextTime.." PlayerManager.serverTime "..PlayerManager.serverTime) + local second = msg.nextTime - PlayerManager.serverTime + if second <= 0 then ChatManager.RequestSendGuildTranscript(function() -- PopupTipPanel.ShowTip("") end) else - local timeStar = os.date("%Y时%m分%d", msg.nextTime) - PopupTipPanel.ShowTip(string.format("%s后才可再次使用此功能!",timeStar)) + local day = math.floor(second / (24 * 3600)) + local minute = math.floor(second / 60) % 60 + local sec = math.floor(second % 60) + local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600) + local timeStr = string.format("%s时%s分%s秒", hour, minute, sec) + PopupTipPanel.ShowTip(string.format("%s后才可再次使用此功能!",timeStr)) end end) end)