mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Move mailbox closing to its script (#740)
This commit is contained in:
@@ -9,3 +9,11 @@ void MailBoxServer::OnUse(Entity* self, Entity* user) {
|
||||
args.InsertValue("state", value);
|
||||
GameMessages::SendUIMessageServerToSingleClient(user, user->GetSystemAddress(), "pushGameState", &args);
|
||||
}
|
||||
|
||||
void MailBoxServer::OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) {
|
||||
if (args == "toggleMail") {
|
||||
AMFArrayValue args;
|
||||
args.InsertValue("visible", new AMFFalseValue());
|
||||
GameMessages::SendUIMessageServerToSingleClient(sender, sender->GetSystemAddress(), "ToggleMail", &args);
|
||||
}
|
||||
}
|
||||
|
@@ -12,4 +12,5 @@ public:
|
||||
* @param user The user that interacted with this Entity.
|
||||
*/
|
||||
void OnUse(Entity* self, Entity* user) override;
|
||||
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2, int32_t param3) override;
|
||||
};
|
||||
|
Reference in New Issue
Block a user