mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
Handle SMSG_SUMMON_REQUEST with accept/decline popup
- Parse SMSG_SUMMON_REQUEST (summonerGuid + zoneId + timeoutMs), store summoner name from entity list, show chat notification - acceptSummon() sends CMSG_SUMMON_RESPONSE(1), declineSummon() sends CMSG_SUMMON_RESPONSE(0), SMSG_SUMMON_CANCEL clears pending state - renderSummonRequestPopup(): shows summoner name + countdown timer with Accept/Decline buttons
This commit is contained in:
parent
f369fe9c6e
commit
770ac645d5
4 changed files with 101 additions and 0 deletions
|
|
@ -707,6 +707,13 @@ public:
|
|||
bool hasPendingGroupInvite() const { return pendingGroupInvite; }
|
||||
const std::string& getPendingInviterName() const { return pendingInviterName; }
|
||||
|
||||
// ---- Summon ----
|
||||
bool hasPendingSummonRequest() const { return pendingSummonRequest_; }
|
||||
const std::string& getSummonerName() const { return summonerName_; }
|
||||
float getSummonTimeoutSec() const { return summonTimeoutSec_; }
|
||||
void acceptSummon();
|
||||
void declineSummon();
|
||||
|
||||
// ---- Trade ----
|
||||
enum class TradeStatus : uint8_t {
|
||||
None = 0, PendingIncoming, Open, Accepted, Complete
|
||||
|
|
@ -1280,6 +1287,7 @@ private:
|
|||
|
||||
// ---- Instance lockout handler ----
|
||||
void handleRaidInstanceInfo(network::Packet& packet);
|
||||
void handleSummonRequest(network::Packet& packet);
|
||||
void handleTradeStatus(network::Packet& packet);
|
||||
void handleDuelRequested(network::Packet& packet);
|
||||
void handleDuelComplete(network::Packet& packet);
|
||||
|
|
@ -1638,6 +1646,12 @@ private:
|
|||
bool pendingGroupInvite = false;
|
||||
std::string pendingInviterName;
|
||||
|
||||
// Summon state
|
||||
bool pendingSummonRequest_ = false;
|
||||
uint64_t summonerGuid_ = 0;
|
||||
std::string summonerName_;
|
||||
float summonTimeoutSec_ = 0.0f;
|
||||
|
||||
// Trade state
|
||||
TradeStatus tradeStatus_ = TradeStatus::None;
|
||||
uint64_t tradePeerGuid_= 0;
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ private:
|
|||
void renderDuelRequestPopup(game::GameHandler& gameHandler);
|
||||
void renderLootRollPopup(game::GameHandler& gameHandler);
|
||||
void renderTradeRequestPopup(game::GameHandler& gameHandler);
|
||||
void renderSummonRequestPopup(game::GameHandler& gameHandler);
|
||||
void renderBuffBar(game::GameHandler& gameHandler);
|
||||
void renderLootWindow(game::GameHandler& gameHandler);
|
||||
void renderGossipWindow(game::GameHandler& gameHandler);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue