feat: open dungeon finder UI when server sends SMSG_OPEN_LFG_DUNGEON_FINDER

Previously SMSG_OPEN_LFG_DUNGEON_FINDER was consumed silently with no UI
response. Now it fires an OpenLfgCallback wired to openDungeonFinder() on
the GameScreen, so the dungeon finder window opens as the server requests.
This commit is contained in:
Kelsi 2026-03-12 21:24:42 -07:00
parent e68ffbc711
commit a1edddd1f0
4 changed files with 16 additions and 1 deletions

View file

@ -1625,6 +1625,10 @@ public:
using TaxiFlightStartCallback = std::function<void()>;
void setTaxiFlightStartCallback(TaxiFlightStartCallback cb) { taxiFlightStartCallback_ = std::move(cb); }
// Callback fired when server sends SMSG_OPEN_LFG_DUNGEON_FINDER (open dungeon finder UI)
using OpenLfgCallback = std::function<void()>;
void setOpenLfgCallback(OpenLfgCallback cb) { openLfgCallback_ = std::move(cb); }
bool isMounted() const { return currentMountDisplayId_ != 0; }
bool isHostileAttacker(uint64_t guid) const { return hostileAttackers_.count(guid) > 0; }
float getServerRunSpeed() const { return serverRunSpeed_; }
@ -2916,6 +2920,7 @@ private:
TaxiPrecacheCallback taxiPrecacheCallback_;
TaxiOrientationCallback taxiOrientationCallback_;
TaxiFlightStartCallback taxiFlightStartCallback_;
OpenLfgCallback openLfgCallback_;
uint32_t currentMountDisplayId_ = 0;
uint32_t mountAuraSpellId_ = 0; // Spell ID of the aura that caused mounting (for CMSG_CANCEL_AURA fallback)
float serverRunSpeed_ = 7.0f;

View file

@ -641,6 +641,7 @@ public:
uint32_t str = 0, uint32_t agi = 0, uint32_t sta = 0,
uint32_t intel = 0, uint32_t spi = 0);
void triggerAchievementToast(uint32_t achievementId, std::string name = {});
void openDungeonFinder() { showDungeonFinder_ = true; }
};
} // namespace ui