mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
e68ffbc711
commit
a1edddd1f0
4 changed files with 16 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -2550,6 +2550,11 @@ void Application::setupUICallbacks() {
|
|||
}
|
||||
});
|
||||
|
||||
// Open dungeon finder callback — server sends SMSG_OPEN_LFG_DUNGEON_FINDER
|
||||
gameHandler->setOpenLfgCallback([this]() {
|
||||
if (uiManager) uiManager->getGameScreen().openDungeonFinder();
|
||||
});
|
||||
|
||||
// Creature move callback (online mode) - update creature positions
|
||||
gameHandler->setCreatureMoveCallback([this](uint64_t guid, float x, float y, float z, uint32_t durationMs) {
|
||||
if (!renderer || !renderer->getCharacterRenderer()) return;
|
||||
|
|
|
|||
|
|
@ -5133,10 +5133,14 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
case Opcode::SMSG_UPDATE_LFG_LIST:
|
||||
case Opcode::SMSG_LFG_PLAYER_INFO:
|
||||
case Opcode::SMSG_LFG_PARTY_INFO:
|
||||
case Opcode::SMSG_OPEN_LFG_DUNGEON_FINDER:
|
||||
// Informational LFG packets not yet surfaced in UI — consume silently.
|
||||
packet.setReadPos(packet.getSize());
|
||||
break;
|
||||
case Opcode::SMSG_OPEN_LFG_DUNGEON_FINDER:
|
||||
// Server requests client to open the dungeon finder UI
|
||||
packet.setReadPos(packet.getSize()); // consume any payload
|
||||
if (openLfgCallback_) openLfgCallback_();
|
||||
break;
|
||||
|
||||
case Opcode::SMSG_ARENA_TEAM_COMMAND_RESULT:
|
||||
handleArenaTeamCommandResult(packet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue