From 4be033a60846cbdd290da27be44f270eba5a964d Mon Sep 17 00:00:00 2001 From: Matheus Date: Tue, 2 Sep 2025 07:00:27 -0300 Subject: Melhorado método para apagar mensagens. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/Utils/MessageLogData.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/Utils') diff --git a/scripts/Utils/MessageLogData.cs b/scripts/Utils/MessageLogData.cs index ed30062..e8f0f09 100644 --- a/scripts/Utils/MessageLogData.cs +++ b/scripts/Utils/MessageLogData.cs @@ -16,7 +16,9 @@ private Message LastMessage { } public void ClearMessages() { - foreach (Message message in messages) { + for (int i = messages.Count - 1; i >= 0; i--) { + Message message = messages[i]; + messages.RemoveAt(i); message.QueueFree(); } } -- cgit v1.2.3