mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
fix: quest reward items stuck as 'Item #ID' due to stale pending queries
Two fixes for item name resolution: 1. Clear entry from pendingItemQueries_ even when response parsing fails. Previously a malformed response left the entry stuck in pending forever, blocking all retries so the UI permanently showed "Item 12345". 2. Add 5-second periodic cleanup of pendingItemQueries_ so lost/dropped responses don't permanently block item info resolution.
This commit is contained in:
parent
51da88b120
commit
020e016853
3 changed files with 19 additions and 0 deletions
|
|
@ -1116,6 +1116,17 @@ for (auto& [guid, entity] : entityController_->getEntityManager().getEntities())
|
|||
void GameHandler::updateTimers(float deltaTime) {
|
||||
if (spellHandler_) spellHandler_->updateTimers(deltaTime);
|
||||
|
||||
// Periodically clear stale pending item queries so they can be retried.
|
||||
// Without this, a lost/malformed response leaves the entry stuck forever.
|
||||
pendingItemQueryTimer_ += deltaTime;
|
||||
if (pendingItemQueryTimer_ >= 5.0f) {
|
||||
pendingItemQueryTimer_ = 0.0f;
|
||||
if (!pendingItemQueries_.empty()) {
|
||||
LOG_DEBUG("Clearing ", pendingItemQueries_.size(), " stale pending item queries");
|
||||
pendingItemQueries_.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (auctionSearchDelayTimer_ > 0.0f) {
|
||||
auctionSearchDelayTimer_ -= deltaTime;
|
||||
if (auctionSearchDelayTimer_ < 0.0f) auctionSearchDelayTimer_ = 0.0f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue