mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Revert quest reward window delay that caused dialog to hang
The delayed-opening logic conflicted with quest details' use of the same questDetailsOpenTime variable, causing the reward dialog to never appear. Reverted to immediately opening the window. Item info queries are still triggered, but will populate asynchronously with placeholders shown initially.
This commit is contained in:
parent
510370dc7b
commit
b5291d1883
2 changed files with 3 additions and 14 deletions
|
|
@ -1099,16 +1099,7 @@ public:
|
|||
void completeQuest(); // Send CMSG_QUESTGIVER_COMPLETE_QUEST
|
||||
void closeQuestRequestItems();
|
||||
|
||||
bool isQuestOfferRewardOpen() {
|
||||
if (questOfferRewardOpen_) return true;
|
||||
if (questDetailsOpenTime != std::chrono::steady_clock::time_point{}) {
|
||||
if (std::chrono::steady_clock::now() >= questDetailsOpenTime) {
|
||||
questOfferRewardOpen_ = true;
|
||||
questDetailsOpenTime = std::chrono::steady_clock::time_point{};
|
||||
}
|
||||
}
|
||||
return questOfferRewardOpen_;
|
||||
}
|
||||
bool isQuestOfferRewardOpen() const { return questOfferRewardOpen_; }
|
||||
const QuestOfferRewardData& getQuestOfferReward() const { return currentQuestOfferReward_; }
|
||||
void chooseQuestReward(uint32_t rewardIndex); // Send CMSG_QUESTGIVER_CHOOSE_REWARD
|
||||
void closeQuestOfferReward();
|
||||
|
|
|
|||
|
|
@ -15770,19 +15770,17 @@ void GameHandler::handleQuestOfferReward(network::Packet& packet) {
|
|||
pendingTurnInRewardRequest_ = false;
|
||||
}
|
||||
currentQuestOfferReward_ = data;
|
||||
questOfferRewardOpen_ = true;
|
||||
questRequestItemsOpen_ = false;
|
||||
gossipWindowOpen = false;
|
||||
questDetailsOpen = false;
|
||||
questDetailsOpenTime = std::chrono::steady_clock::time_point{};
|
||||
|
||||
// Query item names for reward items
|
||||
for (const auto& item : data.choiceRewards)
|
||||
queryItemInfo(item.itemId, 0);
|
||||
for (const auto& item : data.fixedRewards)
|
||||
queryItemInfo(item.itemId, 0);
|
||||
|
||||
// Delay opening window by 100ms to allow item queries to complete (avoids "Item X" placeholders)
|
||||
questOfferRewardOpen_ = false;
|
||||
questDetailsOpenTime = std::chrono::steady_clock::now() + std::chrono::milliseconds(100);
|
||||
}
|
||||
|
||||
void GameHandler::completeQuest() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue