From 3ea08daa1915a62b47c64901fc16a22e9cd5dbd6 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 30 Sep 2026 02:34:17 -0500 Subject: [PATCH] fix(mail): tell the mailbox OpenMail and CloseMail like live Live followed pushGameState with NotifyClientObject OpenMail to the mailbox, and ToggleMail with CloseMail. The mailbox's client script uses them to mark itself in use (no interact icon, no second use) while the Mail UI is open. Co-Authored-By: Claude Opus 5.5 --- dScripts/02_server/Map/General/MailBoxServer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dScripts/02_server/Map/General/MailBoxServer.cpp b/dScripts/02_server/Map/General/MailBoxServer.cpp index 25eac7663..b6818358b 100644 --- a/dScripts/02_server/Map/General/MailBoxServer.cpp +++ b/dScripts/02_server/Map/General/MailBoxServer.cpp @@ -2,6 +2,7 @@ #include "Amf3.h" #include "GameMessages.h" #include "EffectsMessages.h" +#include "ObjectMessages.h" #include "Entity.h" void MailBoxServer::OnUse(Entity* self, Entity* user) { @@ -14,6 +15,9 @@ void MailBoxServer::OnUse(Entity* self, Entity* user) { uiMessage.strMessageName = "pushGameState"; uiMessage.args = std::move(args); uiMessage.SendToClient(user->GetSystemAddress()); + + // The mailbox's client script marks itself in use (hides the interact icon, refuses another use) until CloseMail + GameMessages::NotifyClientObject(self->GetObjectID(), u"OpenMail").Send(user->GetSystemAddress()); } void MailBoxServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) { @@ -25,5 +29,7 @@ void MailBoxServer::OnFireEventServerSide(Entity* self, Entity* sender, std::str uiMessage.strMessageName = "ToggleMail"; uiMessage.args = std::move(args); uiMessage.SendToClient(sender->GetSystemAddress()); + + GameMessages::NotifyClientObject(self->GetObjectID(), u"CloseMail").Send(sender->GetSystemAddress()); } }