diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 8bc19474..46c76133 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -1362,13 +1362,15 @@ void GameHandler::update(float deltaTime) { addSystemChatMessage("Interrupted."); } // Check if client-side cast timer expired (tick-down is in SpellHandler::updateTimers). - // SMSG_SPELL_GO normally clears casting, but GO interaction casts are client-timed - // and need this fallback to trigger the loot/use action. + // For GO interaction casts, do NOT re-send CMSG_GAMEOBJ_USE — the server + // drives the interaction and sends SMSG_SPELL_GO + SMSG_LOOT_RESPONSE when + // the cast completes. Re-sending USE here sent a duplicate packet that + // confused the server's GO state machine, and resetCastState() then cleared + // lastInteractedGoGuid_ so the subsequent SMSG_SPELL_GO couldn't trigger loot. if (spellHandler_ && spellHandler_->casting_ && spellHandler_->castTimeRemaining_ <= 0.0f) { if (pendingGameObjectInteractGuid_ != 0) { - uint64_t interactGuid = pendingGameObjectInteractGuid_; + // Let the server finish — just clear the pending flag. pendingGameObjectInteractGuid_ = 0; - performGameObjectInteractionNow(interactGuid); } spellHandler_->resetCastState(); } diff --git a/src/game/spell_handler.cpp b/src/game/spell_handler.cpp index c87e5089..900ec19f 100644 --- a/src/game/spell_handler.cpp +++ b/src/game/spell_handler.cpp @@ -1619,7 +1619,11 @@ void SpellHandler::resetCastState() { queuedSpellId_ = 0; queuedSpellTarget_ = 0; owner_.pendingGameObjectInteractGuid_ = 0; - owner_.lastInteractedGoGuid_ = 0; + // lastInteractedGoGuid_ is intentionally NOT cleared here — it must survive + // until handleSpellGo sends CMSG_LOOT after the server-side cast completes. + // handleSpellGo clears it after use (line 958). Previously this was cleared + // here, which meant the client-side timer fallback destroyed the guid before + // SMSG_SPELL_GO arrived, preventing loot from opening on quest chests. } void SpellHandler::resetAllState() {