From 6b5e92402736cc3d3ad59e993d8612639dffeeaf Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sun, 29 Mar 2026 22:22:20 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20GO=20interaction=20casts=20canceled=20by?= =?UTF-8?q?=20any=20movement=20=E2=80=94=20quest=20credit=20lost?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pendingGameObjectInteractGuid_ was always cleared to 0 right before the interaction, which defeated the cancel-protection guard in cancelCast(). Any positional movement (WASD, jump) during a GO interaction cast (e.g., "Opening" on a quest chest) sent CMSG_CANCEL_CAST to the server, aborting the interaction and preventing quest objective credit. Now sets pendingGameObjectInteractGuid_ to the GO guid so: 1. cancelCast() skips CMSG_CANCEL_CAST for GO-triggered casts 2. The cast-completion fallback can re-trigger loot after timer expires 3. isGameObjectInteractionCasting() returns true during GO casts --- src/game/game_handler.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index e07aab41..66a1d438 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -6114,8 +6114,14 @@ void GameHandler::interactWithGameObject(uint64_t guid) { if (spellHandler_ && spellHandler_->casting_ && spellHandler_->currentCastSpellId_ != 0) return; // Always clear melee intent before GO interactions. stopAutoAttack(); - // Interact immediately; server drives any real cast/channel feedback. - pendingGameObjectInteractGuid_ = 0; + // Set the pending GO guid so that: + // 1. cancelCast() won't send CMSG_CANCEL_CAST for GO-triggered casts + // (e.g., "Opening" on a quest chest) — without this, any movement + // during the cast cancels it server-side and quest credit is lost. + // 2. The cast-completion fallback in update() can call + // performGameObjectInteractionNow after the cast timer expires. + // 3. isGameObjectInteractionCasting() returns true during GO casts. + pendingGameObjectInteractGuid_ = guid; performGameObjectInteractionNow(guid); }