mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
fix: right-clicking a quest-starting item now opens the quest offer dialog
Items with startQuestId != 0 were calling useItemBySlot()/useItemInBag() which sends CMSG_USE_ITEM — but quest-starting items have no on-use spell, so the server silently ignored the packet and no quest dialog appeared. Fix: - offerQuestFromItem(itemGuid, questId): sends CMSG_QUESTGIVER_QUERY_QUEST with the item's own GUID as the questgiver GUID. The server responds with SMSG_QUESTGIVER_QUEST_DETAILS which handleQuestDetails() already picks up and opens the Accept/Decline dialog with full rewards/description. - getBagItemGuid(bagIndex, slotIndex): resolves the per-slot item GUID from the bag's containerContents_ map (mirrors the logic inside useItemInBag). - inventory_screen.cpp right-click handler: checks item.startQuestId != 0 before the equip/use branch; if set, resolves item GUID and calls offerQuestFromItem. Works for both backpack slots and bag slots.
This commit is contained in:
parent
c70740fcdf
commit
a731223e47
3 changed files with 43 additions and 4 deletions
|
|
@ -1460,6 +1460,9 @@ public:
|
|||
void acceptQuest();
|
||||
void declineQuest();
|
||||
void closeGossip();
|
||||
// Quest-starting items: right-click triggers quest offer dialog via questgiver protocol
|
||||
void offerQuestFromItem(uint64_t itemGuid, uint32_t questId);
|
||||
uint64_t getBagItemGuid(int bagIndex, int slotIndex) const;
|
||||
bool isGossipWindowOpen() const { return gossipWindowOpen; }
|
||||
const GossipMessageData& getCurrentGossip() const { return currentGossip; }
|
||||
bool isQuestDetailsOpen() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue