summaryrefslogtreecommitdiff
path: root/scripts/Utils
diff options
context:
space:
mode:
authorMatheus <matheus.guedes.mg.m@gmail.com>2025-09-02 07:00:27 -0300
committerMatheus <matheus.guedes.mg.m@gmail.com>2025-09-02 07:00:27 -0300
commit4be033a60846cbdd290da27be44f270eba5a964d (patch)
tree60951531e33fe8e1fb71e0f208104ac02b001cf6 /scripts/Utils
parent2023ac3fa6477142299115b056b4ad380a9a9f7a (diff)
Melhorado método para apagar mensagens.
Diffstat (limited to 'scripts/Utils')
-rw-r--r--scripts/Utils/MessageLogData.cs4
1 files changed, 3 insertions, 1 deletions
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();
}
}