I’m currently working on building a mailbox system based on notifications. Our aim is to include company data along with notifications on the server side.
For instance:
We will introduce a new Mailbox type for notifications.
When the server sends a mailbox-type notification to a player, the server will also create accompanying data such as:
{
notificationId: xxx,
sendTime: xxx,
isRead: false,
isClaimed: false
}
This data will be sent to the player.
The client will also synchronize this data to keep track of the mailbox.
Additionally, if we can’t retrieve the ID on the server side, we will need to delay the next RPC (Remote Procedure Call) from the server for updating the status. Currently, this isn’t an issue since all the fields have default values of empty or false. We can use these default values to generate the data on the client side and build it on the server during the next update RPC, such as when a player reads a notification. However, if there’s data that needs to be built based on server configuration, we may encounter difficulties, especially if there’s no way to link the notification ID with the data.