From c622e547c9b3bd8c38bc9ba354c22a937b180a34 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 10 Mar 2026 09:01:34 -0700 Subject: [PATCH] game: clear in-flight NPC/GO query sets on disconnect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pendingCreatureQueries and pendingGameObjectQueries_ were never cleared on disconnect. If a query was sent but the response lost (e.g. server disconnect mid-flight), the entry would remain in the pending set after reconnect, causing queryCreatureInfo/queryGameObjectInfo to silently skip re-issuing the query — leaving NPC and GO names unpopulated for those entries. Clear both sets on disconnect so reconnect sees them as unqueried and re-sends the queries as needed. creatureInfoCache/gameObjectInfoCache_ are intentionally preserved across sessions to avoid re-querying entries whose responses did arrive. --- src/game/game_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 38841221..76815c3a 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -486,6 +486,10 @@ void GameHandler::disconnect() { contacts_.clear(); transportAttachments_.clear(); serverUpdatedTransportGuids_.clear(); + // Clear in-flight query sets so reconnect can re-issue queries for any + // entries whose responses were lost during the disconnect. + pendingCreatureQueries.clear(); + pendingGameObjectQueries_.clear(); requiresWarden_ = false; wardenGateSeen_ = false; wardenGateElapsed_ = 0.0f;