feat(load): unread mail is announced during the load

Live pushed a mail NotificationResponse (NewMail, the unread count)
right after the respawn checkpoint in loads where the player had
unread mail, without the client asking (e.g. a new character's first
load: ServerDoneLoadingAllObjects, PlayerReachedRespawnCheckpoint,
NotifyMissionTask, MAIL). DLU had that call commented out, so the
mailbox icon only lit up once the client asked or new mail arrived.

It is sent only when there is unread mail (inferred: the 223 captured
loads without one are loads without unread mail; only 3 of 226 loads
carry it).

Check: send a character mail, log it out and back in without opening
the mailbox: the new-mail indicator shows right after loading; a
character with no unread mail shows none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 03:33:17 -05:00
parent 87ce8e3e45
commit 41ecf9d5d8
4 changed files with 28 additions and 4 deletions

View File

@@ -1136,10 +1136,7 @@ void LoadPlayer(const SystemAddress& sysAddr) {
invalidTransferList.bCustomerFeedbackOnInvalidMapTransfer = false;
invalidTransferList.SendToClient(sysAddr);
GameMessages::SendDoneLoading(player->GetObjectID(), respawnPoint, spawnPosition, spawnRotation, sysAddr);
//Send the player it's mail count:
//update: this might not be needed so im going to try disabling this here.
//Mail::HandleNotificationRequest(sysAddr, player->GetObjectID());
Mail::NotifyUnreadMailOnLoad(Database::Get()->GetUnreadMailCount(c->GetID()), sysAddr);
//Notify chat that a player has loaded:
auto* character = player->GetCharacter();