fix(chat): resolve /r reply target when name arrives after whisper

Whisper sender name may not be in the player name cache when the packet
arrives. Store the sender GUID and lazily resolve the name from the
cache in getLastWhisperSender(). Also backfill lastWhisperSender_ when
the SMSG_NAME_QUERY_RESPONSE arrives.
This commit is contained in:
Kelsi 2026-04-04 00:03:05 -07:00
parent c85d023329
commit 5538655383
4 changed files with 31 additions and 9 deletions

View file

@ -1988,6 +1988,11 @@ void EntityController::handleNameQueryResponse(network::Packet& packet) {
}
}
// Backfill whisper reply target if the name arrived after the whisper.
if (owner_.lastWhisperSenderGuid_ == data.guid && owner_.lastWhisperSender_.empty()) {
owner_.lastWhisperSender_ = data.name;
}
// Backfill mail inbox sender names
for (auto& mail : owner_.mailInbox_) {
if (mail.messageType == 0 && mail.senderGuid == data.guid) {