mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
Fix vendor buying and add quest turn-in flow
CMSG_BUY_ITEM was missing the trailing uint8 bag field, causing the server to silently drop undersized packets. Add handlers for SMSG_QUESTGIVER_REQUEST_ITEMS and SMSG_QUESTGIVER_OFFER_REWARD with UI windows for quest completion and reward selection.
This commit is contained in:
parent
6d112a06ce
commit
06fe167c11
6 changed files with 447 additions and 0 deletions
|
|
@ -363,6 +363,17 @@ public:
|
|||
bool isQuestDetailsOpen() const { return questDetailsOpen; }
|
||||
const QuestDetailsData& getQuestDetails() const { return currentQuestDetails; }
|
||||
|
||||
// Quest turn-in
|
||||
bool isQuestRequestItemsOpen() const { return questRequestItemsOpen_; }
|
||||
const QuestRequestItemsData& getQuestRequestItems() const { return currentQuestRequestItems_; }
|
||||
void completeQuest(); // Send CMSG_QUESTGIVER_COMPLETE_QUEST
|
||||
void closeQuestRequestItems();
|
||||
|
||||
bool isQuestOfferRewardOpen() const { return questOfferRewardOpen_; }
|
||||
const QuestOfferRewardData& getQuestOfferReward() const { return currentQuestOfferReward_; }
|
||||
void chooseQuestReward(uint32_t rewardIndex); // Send CMSG_QUESTGIVER_CHOOSE_REWARD
|
||||
void closeQuestOfferReward();
|
||||
|
||||
// Quest log
|
||||
struct QuestLogEntry {
|
||||
uint32_t questId = 0;
|
||||
|
|
@ -538,6 +549,8 @@ private:
|
|||
void handleGossipMessage(network::Packet& packet);
|
||||
void handleGossipComplete(network::Packet& packet);
|
||||
void handleQuestDetails(network::Packet& packet);
|
||||
void handleQuestRequestItems(network::Packet& packet);
|
||||
void handleQuestOfferReward(network::Packet& packet);
|
||||
void handleListInventory(network::Packet& packet);
|
||||
LootResponseData generateLocalLoot(uint64_t guid);
|
||||
void simulateLootResponse(const LootResponseData& data);
|
||||
|
|
@ -689,6 +702,12 @@ private:
|
|||
bool questDetailsOpen = false;
|
||||
QuestDetailsData currentQuestDetails;
|
||||
|
||||
// Quest turn-in
|
||||
bool questRequestItemsOpen_ = false;
|
||||
QuestRequestItemsData currentQuestRequestItems_;
|
||||
bool questOfferRewardOpen_ = false;
|
||||
QuestOfferRewardData currentQuestOfferReward_;
|
||||
|
||||
// Quest log
|
||||
std::vector<QuestLogEntry> questLog_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue