mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: fire MAIL_SHOW/CLOSED and AUCTION_HOUSE_SHOW/CLOSED events
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Fire MAIL_SHOW when mailbox opens (SMSG_SHOW_MAILBOX) and MAIL_CLOSED when it closes. Fire AUCTION_HOUSE_SHOW when AH opens and AUCTION_HOUSE_CLOSED when it closes. Used by mail addons (Postal) and AH addons (Auctionator).
This commit is contained in:
parent
395d6cdcba
commit
22798d1c76
1 changed files with 6 additions and 0 deletions
|
|
@ -24793,11 +24793,13 @@ void GameHandler::updateAttachedTransportChildren(float /*deltaTime*/) {
|
|||
// ============================================================
|
||||
|
||||
void GameHandler::closeMailbox() {
|
||||
bool wasOpen = mailboxOpen_;
|
||||
mailboxOpen_ = false;
|
||||
mailboxGuid_ = 0;
|
||||
mailInbox_.clear();
|
||||
selectedMailIndex_ = -1;
|
||||
showMailCompose_ = false;
|
||||
if (wasOpen && addonEventCallback_) addonEventCallback_("MAIL_CLOSED", {});
|
||||
}
|
||||
|
||||
void GameHandler::refreshMailList() {
|
||||
|
|
@ -24974,6 +24976,7 @@ void GameHandler::handleShowMailbox(network::Packet& packet) {
|
|||
hasNewMail_ = false;
|
||||
selectedMailIndex_ = -1;
|
||||
showMailCompose_ = false;
|
||||
if (addonEventCallback_) addonEventCallback_("MAIL_SHOW", {});
|
||||
// Request inbox contents
|
||||
refreshMailList();
|
||||
}
|
||||
|
|
@ -25285,8 +25288,10 @@ void GameHandler::openAuctionHouse(uint64_t guid) {
|
|||
}
|
||||
|
||||
void GameHandler::closeAuctionHouse() {
|
||||
bool wasOpen = auctionOpen_;
|
||||
auctionOpen_ = false;
|
||||
auctioneerGuid_ = 0;
|
||||
if (wasOpen && addonEventCallback_) addonEventCallback_("AUCTION_HOUSE_CLOSED", {});
|
||||
}
|
||||
|
||||
void GameHandler::auctionSearch(const std::string& name, uint8_t levelMin, uint8_t levelMax,
|
||||
|
|
@ -25367,6 +25372,7 @@ void GameHandler::handleAuctionHello(network::Packet& packet) {
|
|||
auctionHouseId_ = data.auctionHouseId;
|
||||
auctionOpen_ = true;
|
||||
gossipWindowOpen = false; // Close gossip when auction house opens
|
||||
if (addonEventCallback_) addonEventCallback_("AUCTION_HOUSE_SHOW", {});
|
||||
auctionActiveTab_ = 0;
|
||||
auctionBrowseResults_ = AuctionListResult{};
|
||||
auctionOwnerResults_ = AuctionListResult{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue