fix(mail): route GO mailbox open through InventoryHandler

The decomposition PRs moved mail state to InventoryHandler but the GO
interaction code still set stale GameHandler fields. Add openMailbox()
on InventoryHandler and forward from GameHandler so the correct
mailboxGuid_/mailboxOpen_ are set and refreshMailList() works.
This commit is contained in:
Kelsi 2026-04-05 04:22:48 -07:00
parent 62f3f515e2
commit 35be19e74c
4 changed files with 18 additions and 2 deletions

View file

@ -1536,6 +1536,17 @@ void InventoryHandler::categorizeTrainerSpells() {
// Mail
// ============================================================
void InventoryHandler::openMailbox(uint64_t guid) {
mailboxGuid_ = guid;
mailboxOpen_ = true;
hasNewMail_ = false;
selectedMailIndex_ = -1;
showMailCompose_ = false;
clearMailAttachments();
if (owner_.addonEventCallback_) owner_.addonEventCallback_("MAIL_SHOW", {});
refreshMailList();
}
void InventoryHandler::closeMailbox() {
mailboxOpen_ = false;
mailboxGuid_ = 0;