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

@ -5762,8 +5762,7 @@ void GameHandler::performGameObjectInteractionNow(uint64_t guid) {
// (using lastInteractedGoGuid_ set above). For instant-open chests
// (no cast), the server sends SMSG_LOOT_RESPONSE directly after USE.
} else if (isMailbox) {
// Server responds with SMSG_SHOW_MAILBOX → InventoryHandler::handleShowMailbox
// opens the UI and requests the mail list.
openMailbox(guid);
}
// CMSG_GAMEOBJ_REPORT_USE triggers GO AI scripts (SmartAI, ScriptAI) which
@ -6532,6 +6531,10 @@ void GameHandler::updateAttachedTransportChildren(float deltaTime) {
// Mail System
// ============================================================
void GameHandler::openMailbox(uint64_t guid) {
if (inventoryHandler_) inventoryHandler_->openMailbox(guid);
}
void GameHandler::closeMailbox() {
if (inventoryHandler_) inventoryHandler_->closeMailbox();
}