mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Implement WotLK 3.3.5a LFG/Dungeon Finder packet handlers
Add full client-side handling for the Looking For Dungeon system: - SMSG_LFG_JOIN_RESULT: parse join success/failure, surface error message - SMSG_LFG_QUEUE_STATUS: track dungeon ID, avg wait time, time in queue - SMSG_LFG_PROPOSAL_UPDATE: detect proposal state (active/passed/failed) - SMSG_LFG_ROLE_CHECK_UPDATE: surface role check progress/failure - SMSG_LFG_UPDATE_PLAYER/PARTY: track queue state transitions - SMSG_LFG_PLAYER_REWARD: show dungeon completion reward in chat - SMSG_LFG_BOOT_PROPOSAL_UPDATE: show vote-kick status in chat - SMSG_LFG_TELEPORT_DENIED: surface reason for teleport failure - SMSG_LFG_DISABLED/OFFER_CONTINUE and informational packets consumed Outgoing: lfgJoin(), lfgLeave(), lfgAcceptProposal(), lfgTeleport() State: LfgState enum + lfgState_/lfgDungeonId_/lfgAvgWaitSec_ members
This commit is contained in:
parent
ae5c05e14e
commit
b33831d833
2 changed files with 400 additions and 0 deletions
|
|
@ -707,6 +707,29 @@ public:
|
|||
bool hasPendingGroupInvite() const { return pendingGroupInvite; }
|
||||
const std::string& getPendingInviterName() const { return pendingInviterName; }
|
||||
|
||||
// ---- LFG / Dungeon Finder ----
|
||||
enum class LfgState : uint8_t {
|
||||
None = 0,
|
||||
RoleCheck = 1,
|
||||
Queued = 2,
|
||||
Proposal = 3,
|
||||
Boot = 4,
|
||||
InDungeon = 5,
|
||||
FinishedDungeon= 6,
|
||||
RaidBrowser = 7,
|
||||
};
|
||||
|
||||
// roles bitmask: 0x02=tank, 0x04=healer, 0x08=dps; pass LFGDungeonEntry ID
|
||||
void lfgJoin(uint32_t dungeonId, uint8_t roles);
|
||||
void lfgLeave();
|
||||
void lfgAcceptProposal(uint32_t proposalId, bool accept);
|
||||
void lfgTeleport(bool toLfgDungeon = true);
|
||||
LfgState getLfgState() const { return lfgState_; }
|
||||
bool isLfgQueued() const { return lfgState_ == LfgState::Queued; }
|
||||
bool isLfgInDungeon() const { return lfgState_ == LfgState::InDungeon; }
|
||||
uint32_t getLfgDungeonId() const { return lfgDungeonId_; }
|
||||
int32_t getLfgAvgWaitSec() const { return lfgAvgWaitSec_; }
|
||||
|
||||
// ---- Phase 5: Loot ----
|
||||
void lootTarget(uint64_t guid);
|
||||
void lootItem(uint8_t slotIndex);
|
||||
|
|
@ -1207,6 +1230,16 @@ private:
|
|||
void loadAreaTriggerDbc();
|
||||
void checkAreaTriggers();
|
||||
|
||||
// ---- LFG / Dungeon Finder handlers ----
|
||||
void handleLfgJoinResult(network::Packet& packet);
|
||||
void handleLfgQueueStatus(network::Packet& packet);
|
||||
void handleLfgProposalUpdate(network::Packet& packet);
|
||||
void handleLfgRoleCheckUpdate(network::Packet& packet);
|
||||
void handleLfgUpdatePlayer(network::Packet& packet);
|
||||
void handleLfgPlayerReward(network::Packet& packet);
|
||||
void handleLfgBootProposalUpdate(network::Packet& packet);
|
||||
void handleLfgTeleportDenied(network::Packet& packet);
|
||||
|
||||
// ---- Arena / Battleground handlers ----
|
||||
void handleBattlefieldStatus(network::Packet& packet);
|
||||
void handleInstanceDifficulty(network::Packet& packet);
|
||||
|
|
@ -1533,6 +1566,12 @@ private:
|
|||
uint32_t instanceDifficulty_ = 0;
|
||||
bool instanceIsHeroic_ = false;
|
||||
|
||||
// LFG / Dungeon Finder state
|
||||
LfgState lfgState_ = LfgState::None;
|
||||
uint32_t lfgDungeonId_ = 0; // current dungeon entry
|
||||
int32_t lfgAvgWaitSec_ = -1; // estimated wait, -1=unknown
|
||||
uint32_t lfgTimeInQueueMs_= 0; // ms already in queue
|
||||
|
||||
// ---- Phase 4: Group ----
|
||||
GroupListData partyData;
|
||||
bool pendingGroupInvite = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue