mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Implement duel request/accept/decline UI and packet handling
- Parse SMSG_DUEL_REQUESTED: store challenger guid/name, set pendingDuelRequest_ flag, show chat notification - Parse SMSG_DUEL_COMPLETE: clear pending flag, notify on cancel - Parse SMSG_DUEL_WINNER: show "X defeated Y in a duel!" chat message - Handle SMSG_DUEL_OUTOFBOUNDS with warning message - Add acceptDuel() method sending CMSG_DUEL_ACCEPTED (new builder) - Wire forfeitDuel() to clear pendingDuelRequest_ on decline - Add renderDuelRequestPopup() ImGui window (Accept/Decline buttons) positioned near group invite popup; shown when challenge is pending - Add DuelAcceptPacket builder to world_packets.hpp/cpp
This commit is contained in:
parent
e4f53ce0c3
commit
2d124e7e54
7 changed files with 129 additions and 3 deletions
|
|
@ -707,6 +707,12 @@ public:
|
|||
bool hasPendingGroupInvite() const { return pendingGroupInvite; }
|
||||
const std::string& getPendingInviterName() const { return pendingInviterName; }
|
||||
|
||||
// ---- Duel ----
|
||||
bool hasPendingDuelRequest() const { return pendingDuelRequest_; }
|
||||
const std::string& getDuelChallengerName() const { return duelChallengerName_; }
|
||||
void acceptDuel();
|
||||
// forfeitDuel() already declared at line ~399
|
||||
|
||||
// ---- Instance lockouts ----
|
||||
struct InstanceLockout {
|
||||
uint32_t mapId = 0;
|
||||
|
|
@ -1249,6 +1255,9 @@ private:
|
|||
|
||||
// ---- Instance lockout handler ----
|
||||
void handleRaidInstanceInfo(network::Packet& packet);
|
||||
void handleDuelRequested(network::Packet& packet);
|
||||
void handleDuelComplete(network::Packet& packet);
|
||||
void handleDuelWinner(network::Packet& packet);
|
||||
|
||||
// ---- LFG / Dungeon Finder handlers ----
|
||||
void handleLfgJoinResult(network::Packet& packet);
|
||||
|
|
@ -1601,6 +1610,12 @@ private:
|
|||
bool pendingGroupInvite = false;
|
||||
std::string pendingInviterName;
|
||||
|
||||
// Duel state
|
||||
bool pendingDuelRequest_ = false;
|
||||
uint64_t duelChallengerGuid_= 0;
|
||||
uint64_t duelFlagGuid_ = 0;
|
||||
std::string duelChallengerName_;
|
||||
|
||||
// ---- Guild state ----
|
||||
std::string guildName_;
|
||||
std::vector<std::string> guildRankNames_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue