melia icon indicating copy to clipboard operation
melia copied to clipboard

Add Mail System

Open SalmanTKhan opened this issue 2 years ago • 1 comments

The mail system is a feature of the barracks that lets server admins send messages and gifts to players, which they can move to a character's inventory from the character selection.

To Do

  1. Decide to call it Mailbox or Post Box; subsequent classes would follow the same name, for example MailboxMessageState vs PostBoxMessageState.
  2. The current implementation is each mail is unique to the account, so if you want to send a mass mail message, you will create an individual table row for each account with the same message. The other option is to create another table and reference the mail for each account via that table.
  3. I'll leave the current implementation as a draft pull request until we figure out the first two.
  4. Currently known issue(s), is that I haven't figured out why mail doesn't show up in the read state; it disappears, which might be packet-related or logically related.

Update by exec: Fleshed out the description a little.

SalmanTKhan avatar Jul 28 '23 01:07 SalmanTKhan

  1. I'd say we should favor the names from the English localization in most cases, unless there's a compelling reason to go with the internal name. For example, the MNA property is called SPR in English, but copying that would be rather inconvenient, since we need to constantly cross-reference behavior in the client, where this property is called MNA. In the case of mails I don't foresee such issues though, so it should be fine.
  2. Since messages need to be individually manageable, such as marking them as read, I'm guessing you would primarily be moving the message text to another table to prevent duplication when sending messages to a lot of players. Honestly, I don't know if that's worth the effort, though it would save some disk space. And if you had a server with a couple hundred or even thousands of accounts, a somewhat lengthy message could indeed balloon in size quickly. It might be worth a look.

exectails avatar Jul 28 '23 02:07 exectails

The current basic implementation has been pulled (thanks Salman) and is technically ready to be used. Though we don't really have an interface for creating mails yet, which we'll probably want to add to some form of admin interface.

exectails avatar Jul 28 '24 10:07 exectails